2 Documentation Test suite to verify packet flows between vm instances.
5 Library OperatingSystem
6 Library RequestsLibrary
7 Resource ../libraries/OpenStackInstallUtils.robot
8 Resource ../libraries/OpenStackOperations.robot
9 Resource ../libraries/SystemUtils.robot
10 Resource ../libraries/Utils.robot
12 Suite Setup OpenStackInstallUtils.Get All Ssh Connections
13 Suite Teardown Close All Connections
18 Create And Configure Glance Db ${OS_CONTROL_1_IP} root mysql ${OS_CONTROL_1_HOSTNAME}
19 IF 2 < ${NUM_CONTROL_NODES}
20 Create And Configure Glance Db Other Nodes ${OS_CONTROL_2_IP} root mysql ${OS_CONTROL_2_HOSTNAME}
22 IF 2 < ${NUM_CONTROL_NODES}
23 Create And Configure Glance Db Other Nodes ${OS_CONTROL_3_IP} root mysql ${OS_CONTROL_3_HOSTNAME}
25 IF 3 < ${NUM_CONTROL_NODES}
26 Create And Configure Glance Db Other Nodes ${OS_CONTROL_4_IP} root mysql ${OS_CONTROL_4_HOSTNAME}
28 IF 3 < ${NUM_CONTROL_NODES}
29 Create And Configure Glance Db Other Nodes ${OS_CONTROL_5_IP} root mysql ${OS_CONTROL_5_HOSTNAME}
31 IF 2 > ${NUM_CONTROL_NODES}
32 Create Openstack Elements ${OS_CONTROL_1_HOSTNAME}
34 IF 2 < ${NUM_CONTROL_NODES}
35 Create Openstack Elements ${HAPROXY_HOSTNAME}
37 IF 2 > ${NUM_CONTROL_NODES}
38 Install Configure Glance ${OS_CONTROL_1_IP} ${OS_CONTROL_1_HOSTNAME}
40 IF 2 > ${NUM_CONTROL_NODES} Start Glance ${OS_CONTROL_1_IP}
41 IF 2 < ${NUM_CONTROL_NODES}
42 Install Configure Glance ${OS_CONTROL_1_IP} ${HAPROXY_HOSTNAME}
44 IF 2 < ${NUM_CONTROL_NODES}
45 Install Configure Glance ${OS_CONTROL_2_IP} ${HAPROXY_HOSTNAME}
47 IF 2 < ${NUM_CONTROL_NODES}
48 Install Configure Glance ${OS_CONTROL_3_IP} ${HAPROXY_HOSTNAME}
50 IF 3 < ${NUM_CONTROL_NODES}
51 Install Configure Glance ${OS_CONTROL_4_IP} ${HAPROXY_HOSTNAME}
53 IF 4 < ${NUM_CONTROL_NODES}
54 Install Configure Glance ${OS_CONTROL_5_IP} ${HAPROXY_HOSTNAME}
56 IF 2 < ${NUM_CONTROL_NODES} Start Glance ${OS_CONTROL_1_IP}
57 IF 2 < ${NUM_CONTROL_NODES} Start Glance ${OS_CONTROL_2_IP}
58 IF 2 < ${NUM_CONTROL_NODES} Start Glance ${OS_CONTROL_3_IP}
59 IF 2 < ${NUM_CONTROL_NODES}
60 Generic HAProxy Entry ${HAPROXY_IP} ${HAPROXY_IP} 9292 glance_api
62 IF 2 < ${NUM_CONTROL_NODES}
63 Generic HAProxy Entry ${HAPROXY_IP} ${HAPROXY_IP} 9191 glance_registry
68 Create And Configure Glance Db
69 [Arguments] ${os_node_cxn} ${mysql_user} ${mysql_pass} ${host_name}
70 Create Database for Mysql ${os_node_cxn} ${mysql_user} ${mysql_pass} glance
71 Grant Privileges To Mysql Database
79 Grant Privileges To Mysql Database
87 IF 2 < ${NUM_CONTROL_NODES}
88 Grant Privileges To Mysql Database
94 ... ${HAPROXY_HOSTNAME}
98 Create And Configure Glance Db Other Nodes
99 [Arguments] ${os_node_cxn} ${mysql_user} ${mysql_pass} ${host_name}
100 Grant Privileges To Mysql Database
108 Grant Privileges To Mysql Database
116 IF 2 < ${NUM_CONTROL_NODES}
117 Grant Privileges To Mysql Database
123 ... ${HAPROXY_HOSTNAME}
127 Create Openstack Elements
128 [Arguments] ${host_name}
129 Source Local File /tmp/stackrc
130 Create User glance default glance rc_file=/tmp/stackrc
131 Role Add service glance admin rc_file=/tmp/stackrc
132 Create Service glance "Image Service" image rc_file=/tmp/stackrc
133 Create Endpoint RegionOne ${host_name} image public 9292 rc_file=/tmp/stackrc
134 Create Endpoint RegionOne ${host_name} image internal 9292 rc_file=/tmp/stackrc
135 Create Endpoint RegionOne ${host_name} image admin 9292 rc_file=/tmp/stackrc
137 Install Configure Glance
138 [Arguments] ${os_node_cxn} ${host_name}
139 IF '${OS_APPS_PRE_INSTALLED}' == 'no'
140 Install Rpm Package ${os_node_cxn} openstack-glance
142 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf DEFAULT bind_host "0.0.0.0"
143 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf DEFAULT notification_driver "noop"
144 IF 2 < ${NUM_CONTROL_NODES}
147 ... /etc/glance/glance-api.conf
150 ... "rabbit://openstack:rabbit@${OS_CONTROL_1_HOSTNAME},openstack:rabbit@${OS_CONTROL_2_HOSTNAME},openstack:rabbit@${OS_CONTROL_3_HOSTNAME}"
152 IF 2 > ${NUM_CONTROL_NODES}
155 ... /etc/glance/glance-api.conf
158 ... "rabbit://openstack:rabbit@${host_name}"
160 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf oslo_messaging_rabbit rabbit_max_retries 0
161 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf oslo_messaging_rabbit rabbit_ha_queues true
164 ... /etc/glance/glance-api.conf
167 ... "mysql+pymysql://glance:glance@${host_name}/glance"
170 ... /etc/glance/glance-api.conf
171 ... keystone_authtoken
173 ... http://${host_name}:5000
176 ... /etc/glance/glance-api.conf
177 ... keystone_authtoken
179 ... http://${host_name}:35357
180 IF 2 < ${NUM_CONTROL_NODES}
183 ... /etc/glance/glance-api.conf
184 ... keystone_authtoken
185 ... memcached_servers
186 ... ${OS_CONTROL_1_IP}:11211,${OS_CONTROL_2_IP}:11211,${OS_CONTROL_3_IP}:11211
188 IF 2 > ${NUM_CONTROL_NODES}
191 ... /etc/glance/glance-api.conf
192 ... keystone_authtoken
193 ... memcached_servers
194 ... ${host_name}:11211
196 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf keystone_authtoken auth_type password
199 ... /etc/glance/glance-api.conf
200 ... keystone_authtoken
201 ... project_domain_name
203 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf keystone_authtoken user_domain_name default
204 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf keystone_authtoken project_name service
205 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf keystone_authtoken username glance
206 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf keystone_authtoken password glance
207 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf paste_deploy flavor keystone
208 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf glance_store stores "file,http"
209 Crudini Edit ${os_node_cxn} /etc/glance/glance-api.conf glance_store default_store file
212 ... /etc/glance/glance-api.conf
214 ... filesystem_store_datadir
215 ... /var/lib/glance/images/
216 Chmod File ${os_node_cxn} /etc/glance/glance-api.conf 640
217 Chown File ${os_node_cxn} /etc/glance/glance-api.conf root glance
218 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf DEFAULT bind_host "0.0.0.0"
219 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf DEFAULT notification_driver "noop"
220 IF 2 < ${NUM_CONTROL_NODES}
223 ... /etc/glance/glance-registry.conf
226 ... "rabbit://openstack:rabbit@${OS_CONTROL_1_HOSTNAME},openstack:rabbit@${OS_CONTROL_2_HOSTNAME},openstack:rabbit@${OS_CONTROL_3_HOSTNAME}"
228 IF 2 > ${NUM_CONTROL_NODES}
231 ... /etc/glance/glance-registry.conf
234 ... "rabbit://openstack:rabbit@${host_name}"
238 ... /etc/glance/glance-registry.conf
239 ... oslo_messaging_rabbit
240 ... rabbit_max_retries
244 ... /etc/glance/glance-registry.conf
245 ... oslo_messaging_rabbit
250 ... /etc/glance/glance-registry.conf
253 ... "mysql+pymysql://glance:glance@${host_name}/glance"
256 ... /etc/glance/glance-registry.conf
257 ... keystone_authtoken
259 ... http://${host_name}:5000
262 ... /etc/glance/glance-registry.conf
263 ... keystone_authtoken
265 ... http://${host_name}:35357
266 IF 2 < ${NUM_CONTROL_NODES}
269 ... /etc/glance/glance-registry.conf
270 ... keystone_authtoken
271 ... memcached_servers
272 ... ${OS_CONTROL_1_IP}:11211,${OS_CONTROL_2_IP}:11211,${OS_CONTROL_3_IP}:11211
274 IF 2 > ${NUM_CONTROL_NODES}
277 ... /etc/glance/glance-registry.conf
278 ... keystone_authtoken
279 ... memcached_servers
280 ... ${host_name}:11211
282 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf keystone_authtoken auth_type password
285 ... /etc/glance/glance-registry.conf
286 ... keystone_authtoken
287 ... project_domain_name
291 ... /etc/glance/glance-registry.conf
292 ... keystone_authtoken
295 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf keystone_authtoken project_name service
296 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf keystone_authtoken username glance
297 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf keystone_authtoken password glance
298 Crudini Edit ${os_node_cxn} /etc/glance/glance-registry.conf paste_deploy flavor keystone
299 IF 2 < ${NUM_CONTROL_NODES} and '${OS_APPS_PRE_INSTALLED}' == 'no'
300 Install Rpm Package ${os_node_cxn} nfs-utils
302 IF 2 < ${NUM_CONTROL_NODES}
303 Enable Service ${os_node_cxn} rpcbind
305 IF 2 < ${NUM_CONTROL_NODES} Start Service ${os_node_cxn} rpcbind
306 IF 2 < ${NUM_CONTROL_NODES}
307 Run Command ${os_node_cxn} sudo mkdir -p /var/lib/glance/images
309 IF 2 < ${NUM_CONTROL_NODES}
310 Run Command ${os_node_cxn} sudo mount -t nfs ${HAPROXY_IP}:/images /var/lib/glance/images
312 IF 2 < ${NUM_CONTROL_NODES}
313 Run Command ${os_node_cxn} sudo mount
315 Run Command As User ${os_node_cxn} "glance-manage db_sync" glance
316 Enable Service ${os_node_cxn} openstack-glance-api
317 Enable Service ${os_node_cxn} openstack-glance-registry
320 [Arguments] ${os_node_cxn}
321 Start Service ${os_node_cxn} openstack-glance-api
322 Start Service ${os_node_cxn} openstack-glance-registry