Merge "controller-puppet: Honor MysqlRootPassword"
[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   SnmpdReadonlyUserName:
80     default: ro_snmp_user
81     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
82     type: string
83   SnmpdReadonlyUserPassword:
84     default: unset
85     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
86     type: string
87     hidden: true
88 resources:
89   BlockStorage:
90     type: OS::Nova::Server
91     properties:
92       image:
93         {get_param: Image}
94       flavor: {get_param: Flavor}
95       key_name: {get_param: KeyName}
96       user_data_format: SOFTWARE_CONFIG
97       networks:
98         - network: ctlplane
99   BlockStorageDeployment:
100     type: OS::Heat::StructuredDeployment
101     properties:
102       server: {get_resource: BlockStorage}
103       config: {get_resource: BlockStorageConfig}
104       input_values:
105         controller_virtual_ip: {get_param: VirtualIP}
106         cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: VirtualIP} , '/cinder']]}
107         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
108         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
109       signal_transport: NO_SIGNAL
110   BlockStorageConfig:
111     type: OS::Heat::StructuredConfig
112     properties:
113       group: os-apply-config
114       config:
115         keystone:
116           host: {get_input: controller_virtual_ip}
117         cinder:
118           db: {get_input: cinder_dsn}
119           volume_size_mb:
120             get_param: CinderLVMLoopDeviceSize
121           iscsi-helper:
122             get_param: CinderISCSIHelper
123         snmpd:
124           export_MIB: UCD-SNMP-MIB
125           readonly_user_name: {get_input: snmpd_readonly_user_name}
126           readonly_user_password: {get_input: snmpd_readonly_user_password}
127         rabbit:
128           host: {get_input: controller_virtual_ip}
129           username: {get_param: RabbitUserName}
130           password: {get_param: RabbitPassword}
131         glance:
132           host: {get_input: controller_virtual_ip}
133           port: {get_param: GlancePort}
134 outputs:
135   hosts_entry:
136     value:
137       str_replace:
138         template: "IP HOST HOST.novalocal"
139         params:
140           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
141           HOST: {get_attr: [BlockStorage, name]}