Make rabbitmq bind on ctlplane instead of 0.0.0.0
[apex-tripleo-heat-templates.git] / cinder-storage.yaml
1 heat_template_version: 2014-10-16
2 description: 'Common Block Storage Configuration'
3 parameters:
4   Image:
5     default: overcloud-cinder-volume
6     type: string
7   CinderEnableIscsiBackend:
8     default: true
9     description: Whether to enable or not the Iscsi backend for Cinder
10     type: boolean
11   CinderISCSIHelper:
12     default: tgtadm
13     description: The iSCSI helper to use with cinder.
14     type: string
15   CinderLVMLoopDeviceSize:
16     default: 5000
17     description: The size of the loopback file used by the cinder LVM driver.
18     type: number
19   VirtualIP:
20     default: ''
21     type: string
22   ExtraConfig:
23     default: {}
24     description: |
25       Additional configuration to inject into the cluster. The JSON should have
26       the following structure:
27         {"FILEKEY":
28           {"config":
29             [{"section": "SECTIONNAME",
30               "values":
31                 [{"option": "OPTIONNAME",
32                   "value": "VALUENAME"
33                  }
34                 ]
35              }
36             ]
37           }
38         }
39       For instance:
40         {"nova":
41           {"config":
42             [{"section": "default",
43               "values":
44                 [{"option": "force_config_drive",
45                   "value": "always"
46                  }
47                 ]
48              },
49              {"section": "cells",
50               "values":
51                 [{"option": "driver",
52                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
53                  }
54                 ]
55              }
56             ]
57           }
58         }
59     type: json
60   Flavor:
61     description: Flavor for block storage nodes to request when deploying.
62     type: string
63     constraints:
64       - custom_constraint: nova.flavor
65   GlancePort:
66     default: "9292"
67     description: Glance port.
68     type: string
69   KeyName:
70     default: default
71     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
72     type: string
73   RabbitPassword:
74     default: ''
75     type: string
76   RabbitUserName:
77     default: ''
78     type: string
79   RabbitClientUseSSL:
80     default: false
81     description: >
82         Rabbit client subscriber parameter to specify
83         an SSL connection to the RabbitMQ host.
84     type: string
85   RabbitClientPort:
86     default: 5672
87     description: Set rabbit subscriber port, change this if using SSL
88     type: number
89   SnmpdReadonlyUserName:
90     default: ro_snmp_user
91     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
92     type: string
93   SnmpdReadonlyUserPassword:
94     default: unset
95     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
96     type: string
97     hidden: true
98 resources:
99   BlockStorage:
100     type: OS::Nova::Server
101     properties:
102       image:
103         {get_param: Image}
104       flavor: {get_param: Flavor}
105       key_name: {get_param: KeyName}
106       user_data_format: SOFTWARE_CONFIG
107       networks:
108         - network: ctlplane
109   BlockStorageDeployment:
110     type: OS::Heat::StructuredDeployment
111     properties:
112       server: {get_resource: BlockStorage}
113       config: {get_resource: BlockStorageConfig}
114       input_values:
115         controller_virtual_ip: {get_param: VirtualIP}
116         cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: VirtualIP} , '/cinder']]}
117         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
118         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
119       signal_transport: NO_SIGNAL
120   BlockStorageConfig:
121     type: OS::Heat::StructuredConfig
122     properties:
123       group: os-apply-config
124       config:
125         keystone:
126           host: {get_input: controller_virtual_ip}
127         cinder:
128           db: {get_input: cinder_dsn}
129           volume_size_mb:
130             get_param: CinderLVMLoopDeviceSize
131           iscsi-helper:
132             get_param: CinderISCSIHelper
133         snmpd:
134           export_MIB: UCD-SNMP-MIB
135           readonly_user_name: {get_input: snmpd_readonly_user_name}
136           readonly_user_password: {get_input: snmpd_readonly_user_password}
137         rabbit:
138           host: {get_input: controller_virtual_ip}
139           username: {get_param: RabbitUserName}
140           password: {get_param: RabbitPassword}
141         glance:
142           host: {get_input: controller_virtual_ip}
143           port: {get_param: GlancePort}
144 outputs:
145   hosts_entry:
146     value:
147       str_replace:
148         template: "IP HOST HOST.novalocal"
149         params:
150           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
151           HOST: {get_attr: [BlockStorage, name]}