puppet controller role: per service VIP settings
[apex-tripleo-heat-templates.git] / cinder-storage.yaml
1 heat_template_version: 2015-04-30
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   CinderPassword:
20     default: unset
21     description: The password for the cinder service and db account, used by cinder-api.
22     type: string
23     hidden: true
24   VirtualIP:
25     default: ''
26     type: string
27   ExtraConfig:
28     default: {}
29     description: |
30       Additional configuration to inject into the cluster. The JSON should have
31       the following structure:
32         {"FILEKEY":
33           {"config":
34             [{"section": "SECTIONNAME",
35               "values":
36                 [{"option": "OPTIONNAME",
37                   "value": "VALUENAME"
38                  }
39                 ]
40              }
41             ]
42           }
43         }
44       For instance:
45         {"nova":
46           {"config":
47             [{"section": "default",
48               "values":
49                 [{"option": "force_config_drive",
50                   "value": "always"
51                  }
52                 ]
53              },
54              {"section": "cells",
55               "values":
56                 [{"option": "driver",
57                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
58                  }
59                 ]
60              }
61             ]
62           }
63         }
64     type: json
65   Flavor:
66     description: Flavor for block storage nodes to request when deploying.
67     type: string
68     constraints:
69       - custom_constraint: nova.flavor
70   GlancePort:
71     default: "9292"
72     description: Glance port.
73     type: string
74   KeyName:
75     default: default
76     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
77     type: string
78   RabbitPassword:
79     default: 'guest'
80     type: string
81   RabbitUserName:
82     default: 'guest'
83     type: string
84   RabbitClientUseSSL:
85     default: false
86     description: >
87         Rabbit client subscriber parameter to specify
88         an SSL connection to the RabbitMQ host.
89     type: string
90   RabbitClientPort:
91     default: 5672
92     description: Set rabbit subscriber port, change this if using SSL
93     type: number
94   SnmpdReadonlyUserName:
95     default: ro_snmp_user
96     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
97     type: string
98   SnmpdReadonlyUserPassword:
99     default: unset
100     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
101     type: string
102     hidden: true
103 resources:
104   BlockStorage:
105     type: OS::Nova::Server
106     properties:
107       image:
108         {get_param: Image}
109       flavor: {get_param: Flavor}
110       key_name: {get_param: KeyName}
111       networks:
112         - network: ctlplane
113       user_data_format: SOFTWARE_CONFIG
114       user_data: {get_resource: NodeUserData}
115
116   NodeUserData:
117     type: OS::TripleO::NodeUserData
118
119   InternalApiPort:
120     type: OS::TripleO::BlockStorage::Ports::InternalApiPort
121     properties:
122       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
123
124   StoragePort:
125     type: OS::TripleO::BlockStorage::Ports::StoragePort
126     properties:
127       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
128
129   StorageMgmtPort:
130     type: OS::TripleO::BlockStorage::Ports::StorageMgmtPort
131     properties:
132       ControlPlaneIP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
133
134   NetworkConfig:
135     type: OS::TripleO::BlockStorage::Net::SoftwareConfig
136     properties:
137       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
138       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
139       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
140
141   NetworkDeployment:
142     type: OS::TripleO::SoftwareDeployment
143     properties:
144       config: {get_resource: NetworkConfig}
145       server: {get_resource: BlockStorage}
146
147   BlockStorageDeployment:
148     type: OS::Heat::StructuredDeployment
149     properties:
150       server: {get_resource: BlockStorage}
151       config: {get_resource: BlockStorageConfig}
152       input_values:
153         controller_virtual_ip: {get_param: VirtualIP}
154         cinder_dsn: {list_join: ['', ['mysql://cinder:', {get_param: CinderPassword}, '@', {get_param: VirtualIP} , '/cinder']]}
155         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
156         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
157       signal_transport: NO_SIGNAL
158   BlockStorageConfig:
159     type: OS::Heat::StructuredConfig
160     properties:
161       group: os-apply-config
162       config:
163         keystone:
164           host: {get_input: controller_virtual_ip}
165         cinder:
166           db: {get_input: cinder_dsn}
167           volume_size_mb:
168             get_param: CinderLVMLoopDeviceSize
169           iscsi-helper:
170             get_param: CinderISCSIHelper
171         snmpd:
172           export_MIB: UCD-SNMP-MIB
173           readonly_user_name: {get_input: snmpd_readonly_user_name}
174           readonly_user_password: {get_input: snmpd_readonly_user_password}
175         rabbit:
176           host: {get_input: controller_virtual_ip}
177           username: {get_param: RabbitUserName}
178           password: {get_param: RabbitPassword}
179         glance:
180           host: {get_input: controller_virtual_ip}
181           port: {get_param: GlancePort}
182 outputs:
183   hosts_entry:
184     value:
185       str_replace:
186         template: "IP HOST"
187         params:
188           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
189           HOST: {get_attr: [BlockStorage, name]}
190   internal_api_ip_address:
191     description: IP address of the server in the internal_api network
192     value: {get_attr: [InternalApiPort, ip_address]}
193   storage_ip_address:
194     description: IP address of the server in the storage network
195     value: {get_attr: [StoragePort, ip_address]}
196   storage_mgmt_ip_address:
197     description: IP address of the server in the storage_mgmt network
198     value: {get_attr: [StorageMgmtPort, ip_address]}