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