Merge "Firstboot rsync for development purposes"
[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   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: 'guest'
75     type: string
76   RabbitUserName:
77     default: 'guest'
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       networks:
107         - network: ctlplane
108       user_data_format: SOFTWARE_CONFIG
109       user_data: {get_resource: NodeUserData}
110
111   NodeUserData:
112     type: OS::TripleO::NodeUserData
113
114   NetworkConfig:
115     type: OS::TripleO::BlockStorage::Net::SoftwareConfig
116
117   NetworkDeployment:
118     type: OS::TripleO::SoftwareDeployment
119     properties:
120       config: {get_attr: [NetworkConfig, config_id]}
121       server: {get_resource: BlockStorage}
122
123   BlockStorageDeployment:
124     type: OS::Heat::StructuredDeployment
125     properties:
126       server: {get_resource: BlockStorage}
127       config: {get_resource: BlockStorageConfig}
128       input_values:
129         controller_virtual_ip: {get_param: VirtualIP}
130         cinder_dsn: {list_join: ['', ['mysql://cinder:unset@', {get_param: VirtualIP} , '/cinder']]}
131         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
132         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
133       signal_transport: NO_SIGNAL
134   BlockStorageConfig:
135     type: OS::Heat::StructuredConfig
136     properties:
137       group: os-apply-config
138       config:
139         keystone:
140           host: {get_input: controller_virtual_ip}
141         cinder:
142           db: {get_input: cinder_dsn}
143           volume_size_mb:
144             get_param: CinderLVMLoopDeviceSize
145           iscsi-helper:
146             get_param: CinderISCSIHelper
147         snmpd:
148           export_MIB: UCD-SNMP-MIB
149           readonly_user_name: {get_input: snmpd_readonly_user_name}
150           readonly_user_password: {get_input: snmpd_readonly_user_password}
151         rabbit:
152           host: {get_input: controller_virtual_ip}
153           username: {get_param: RabbitUserName}
154           password: {get_param: RabbitPassword}
155         glance:
156           host: {get_input: controller_virtual_ip}
157           port: {get_param: GlancePort}
158 outputs:
159   hosts_entry:
160     value:
161       str_replace:
162         template: "IP HOST"
163         params:
164           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
165           HOST: {get_attr: [BlockStorage, name]}