blob: 0170630b19b7cee7c0242e38156b3b40ba2a74bb [file] [log] [blame]
Alexa4437742022-02-16 14:42:38 -06001#!/bin/bash
2export OS_INTERFACE='admin'
3
Ievgeniia Zadorozhna2bbb1cc2024-02-29 18:48:21 +01004# Prepare clouds.yaml file for the future cleanup, with original admin creds
5sed -i "s#AUTH_URL#${OS_AUTH_URL}#g; s#USERNAME#${OS_USERNAME}#g; s#USER_PASSWORD#${OS_PASSWORD}#g; s#PROJECT_NAME#${OS_PROJECT_NAME}#g; s#PROJECT_DOMAIN_NAME#${OS_PROJECT_DOMAIN_NAME}#g; s#USER_DOMAIN_NAME#${OS_USER_DOMAIN_NAME}#g; s#REGION_NAME#${OS_REGION_NAME}#g" /opt/res-files/clouds.yaml
6
Alexa4437742022-02-16 14:42:38 -06007# local vars
8name_prefix=cvp
9filename=${name_prefix}.manifest
10rcfile=${name_prefix}rc
11huge_pages=false
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020012set_gw_heat_router=false
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010013raw_disk_format=false
Alexa4437742022-02-16 14:42:38 -060014logfile=prepare.log
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020015working_folder=$(pwd)
16
17# Cloud admin details
18admin_username=${OS_USERNAME}
Alexa4437742022-02-16 14:42:38 -060019
20# Project, User, Roles
21project=${name_prefix}.project
22user=${name_prefix}.user
23admin=${name_prefix}.admin
24password=mcp1234
Ievgeniia Zadorozhna24e7e852024-08-06 17:32:44 +020025domain=${OS_PROJECT_DOMAIN_NAME}
Alexa4437742022-02-16 14:42:38 -060026
27# Security group
28sg_all=${name_prefix}.sg.all
29sg_icmp=${name_prefix}.sg.icmp
30sg_ssh=${name_prefix}.sg.ssh
31sg_iperf=${name_prefix}.sg.perf
32
33# Testkey
34key=${name_prefix}_testkey
35
36# Flavors: tiny, small (cirrus and migration), medium (ubuntu and volume/stress activities)
37flavor_t=${name_prefix}.tiny
38flavor_s=${name_prefix}.small
39flavor_m=${name_prefix}.medium
40flavor_h=${name_prefix}.high
41
42# Fixed Networks (2, for testing router interconnection)
43net_left=${name_prefix}.net.1
44net_right=${name_prefix}.net.2
45subnet1=${name_prefix}.subnet.1
46subnet2=${name_prefix}.subnet.2
47
48# Router
49router=${name_prefix}.router
50
Ievgeniia Zadorozhna4cbb7212025-03-21 17:53:00 +010051# Images: cirros (6.1, 6.2), ubuntu (20.04, 22.04)
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +010052cirros61=${name_prefix}.cirros.61
53cirros62=${name_prefix}.cirros.62
Alexdb7786b2022-02-21 17:58:29 -060054ubuntu20=${name_prefix}.ubuntu.2004
Ievgeniia Zadorozhna4cbb7212025-03-21 17:53:00 +010055ubuntu22=${name_prefix}.ubuntu.2204
Alexa4437742022-02-16 14:42:38 -060056
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +010057cirros61_link=https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img
58cirros62_link=https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
Alexdb7786b2022-02-21 17:58:29 -060059ubuntu20_link=https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
Ievgeniia Zadorozhna4cbb7212025-03-21 17:53:00 +010060ubuntu22_link=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
Alexa4437742022-02-16 14:42:38 -060061
62# Volume (2GB)
63volume=${name_prefix}.volume
64
65function show_help {
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020066 printf "QA verification: Resources creation script\n\t-h, -?\t\tShow this help\n"
Alexa4437742022-02-16 14:42:38 -060067 printf "\t-H\t\tAdds '--property hw:mem_page_size=large' to flavors, i.e. huge_pages for DPDK\n"
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020068 printf "\t-w <path>\tSets working folder (default: ${working_folder})\n"
69 printf "\t-g\t\tTo set external_gateway_info to heat-router with the external network (if not set yet)\n"
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010070 printf "\t-r\t\tTo create the images in RAW disk format instead of the QCOW2\n"
Alexa4437742022-02-16 14:42:38 -060071}
72
73OPTIND=1 # Reset in case getopts has been used previously in the shell.
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010074while getopts ":grHw:h?" opt; do
Alexa4437742022-02-16 14:42:38 -060075 case "$opt" in
76 h|\?)
77 show_help
78 exit 0
79 ;;
80 w) working_folder=${OPTARG}
81 printf "# Working folder is ${working_folder}\n"
82 ;;
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020083 H) huge_pages=true
Alexa4437742022-02-16 14:42:38 -060084 printf "# Using 'huge_pages' property in flavors\n"
85 ;;
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +020086 g) set_gw_heat_router=true
87 printf "# Setting external_gateway_info to heat-router with the external network (if not set yet)\n\n"
88 ;;
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +010089 r) raw_disk_format=true
90 printf "# Creating the images in RAW disk format instead of the QCOW2\n"
91 ;;
Alexa4437742022-02-16 14:42:38 -060092 esac
93done
94
95shift $((OPTIND-1))
96[ "${1:-}" = "--" ] && shift
97
98function put() {
99 echo "$1=$2" | tee -a ${filename}
100}
101
102# now, some hard to understand stuff...
103# f1 $(<command with output to cut>)
104function f1() { echo $1 | cut -d' ' -f1; };
105# <commands with output to cut> | p1
106function p1() { while read input; do echo ${input} | cut -d' ' -f1; done; };
107# ol1 is short for openstack list with 1 param. Also grep and cut
108# "ol1 network public" will list all networks, grep by name public and return IDs
109function ol1() { echo $(openstack $1 list -c ID -c Name -f value | grep $2 | cut -d' ' -f1); }
110# same as ol1 but with 2 initial commands before list
111function ol2() { echo $(openstack $1 $2 list -c ID -c Name -f value | grep $3 | cut -d' ' -f1); }
112
113function print_manifest() {
114 touch ./${filename}
115 truncate -s 0 ${filename}
116 printf "\n\n# Checking and filling manifest: $(pwd)/${filename}\n"
117 put project_name ${project}
118 put project_id $(ol1 project ${project})
119 put user_name ${user}
120 put user_id $(ol1 user ${user})
121 put admin_name ${admin}
122 put admin_id $(ol1 user ${admin})
123 # sg
124 put secgroup_all_name ${sg_all}
125 put secgroup_all_id $(ol2 security group ${sg_all})
126 put secgroup_icmp_name ${sg_icmp}
127 put secgroup_icmp_id $(ol2 security group ${sg_icmp})
128 put secgroup_ssh_name ${sg_ssh}
129 put secgroup_ssh_id $(ol2 security group ${sg_ssh})
130 put secgroup_iperf_name ${sg_iperf}
131 put secgroup_iperf_id $(ol2 security group ${sg_iperf})
132
133 # keypair
134 put keypair_name ${key}
135 put keypair_id $(ol1 keypair ${key})
136
137 # flavors
138 put flavor_tiny_name ${flavor_t}
139 put flavor_tiny_id $(ol1 flavor ${flavor_t})
140 put flavor_small_name ${flavor_s}
141 put flavor_small_id $(ol1 flavor ${flavor_s})
142 put flavor_medium_name ${flavor_m}
143 put flavor_medium_id $(ol1 flavor ${flavor_m})
144 put flavor_high_name ${flavor_h}
145 put flavor_high_id $(ol1 flavor ${flavor_h})
146
147 # fixed nets
148 put fixed_net_left_name ${net_left}
149 put fixed_net_left_id $(ol1 network ${net_left})
150 put fixed_net_right_name ${net_right}
151 put fixed_net_right_id $(ol1 network ${net_right})
152 put fixed_net_left_subnet_name ${subnet1}
153 put fixed_net_left_subnet_id $(openstack subnet list --network ${net_left} -c ID -f value | p1)
154 put fixed_net_right_subnet_name ${subnet2}
155 put fixed_net_right_subnet_id $(openstack subnet list --network ${net_right} -c ID -f value | p1)
156
157 # router
158 put router_name ${router}
159 put router_id $(ol1 router ${router})
160
161 # volumes
162 put volume_name ${volume}
163 put volume_id $(ol1 volume ${volume})
164
165 # images
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +0100166 put cirros61_name ${cirros61}
167 put cirros61_id $(ol1 image ${cirros61})
168 put cirros62_name ${cirros62}
169 put cirros62_id $(ol1 image ${cirros62})
Alexdb7786b2022-02-21 17:58:29 -0600170 put ubuntu20_name ${ubuntu20}
171 put ubuntu20_id $(ol1 image ${ubuntu20})
Ievgeniia Zadorozhna4cbb7212025-03-21 17:53:00 +0100172 put ubuntu22_name ${ubuntu22}
173 put ubuntu22_id $(ol1 image ${ubuntu22})
Alexa4437742022-02-16 14:42:38 -0600174}
175
176# create rc file out of current ENV vars
177function putrc() {
178 printf "# Saving ${1} file\n"
179 echo "export OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-3}" >${1}
180 echo "export OS_AUTH_URL=${OS_AUTH_URL}" >>${1}
181 echo "export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME}" >>${1}
182 echo "export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME}" >>${1}
183 echo "export OS_PROJECT_NAME=${OS_PROJECT_NAME}" >>${1}
184 echo "export OS_TENANT_NAME=${OS_TENANT_NAME}" >>${1}
185 echo "export OS_USERNAME=${OS_USERNAME}" >>${1}
186 echo "export OS_PASSWORD=${OS_PASSWORD}" >>${1}
187 echo "export OS_REGION_NAME=${OS_REGION_NAME}" >>${1}
188 echo "export OS_INTERFACE=${OS_INTERFACE}" >>${1}
189 echo "export OS_ENDPOINT_TYPE=${OS_ENDPOINT_TYPE}" >>${1}
190 echo "export OS_CACERT=${OS_CACERT}" >>${1}
191}
192
193# update ENV vars to newly created project
194function updatesession() {
195 export OS_PROJECT_NAME=${project}
196 export OS_TENANT_NAME=${project}
197 export OS_USERNAME=${admin}
198 export OS_PASSWORD=${password}
199}
200
201function process_cmds() {
202 if [ -s ${cmds} ]; then
203 cat ${cmds} | tr '\n' '\0' | xargs -P 1 -n 1 -0 echo | tee /dev/tty | openstack -v 2>&1 >>${logfile}
204 truncate -s 0 ${cmds}
205 fi
206}
207
208function _project() {
209 echo project create ${project} >>${cmds}
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200210 # admin_username=$(openstack user list --project admin --domain ${domain} -c Name -f value | grep admin)
211 # user admin_username from the initial env vars of the pod
Ievgeniia Zadorozhnaa76c8522023-08-03 17:00:54 +0300212 echo role add --user ${admin_username} --project ${project} admin >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600213}
214
215function _users() {
216 echo user create --project ${project} --password ${password} ${user} >>${cmds}
217 echo user create --project ${project} --password ${password} ${admin} >>${cmds}
218 echo role add --user ${admin} --project ${project} admin >>${cmds}
219 echo role add --user ${admin} --project ${project} creator >>${cmds}
220 echo role add --user ${user} --project ${project} member >>${cmds}
221 echo role add --user ${user} --project ${project} creator >>${cmds}
Ievgeniia Zadorozhna5452a372023-07-10 20:54:13 +0300222 echo role add --user ${user} --project ${project} load-balancer_member >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600223
224}
225
226function _sg_all() {
227 echo security group create --project ${project} ${sg_all} >>${cmds}
228 # icmp
229 echo security group rule create --protocol icmp ${sg_all} >>${cmds}
230 # ssh
231 echo security group rule create --protocol tcp --dst-port 22 ${sg_all} >>${cmds}
232 # iperf
233 echo security group rule create --protocol tcp --dst-port 5001 ${sg_all} >>${cmds}
234 # iperf3
235 echo security group rule create --protocol tcp --dst-port 5201 ${sg_all} >>${cmds}
236 # nc connectivity
237 echo security group rule create --protocol tcp --dst-port 3000 ${sg_all} >>${cmds}
238 # http
239 echo security group rule create --protocol tcp --dst-port 80 ${sg_all} >>${cmds}
240 # https
241 echo security group rule create --protocol tcp --dst-port 443 ${sg_all} >>${cmds}
Ievgeniia Zadorozhna78008592025-02-23 00:49:21 +0100242 # fio
243 echo security group rule create --protocol tcp --dst-port 8765 ${sg_all} >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600244}
245
246function _sg_icmp() {
247 echo security group create --project ${project} ${sg_icmp} >>${cmds}
248 echo security group rule create --protocol icmp ${sg_icmp} >>${cmds}
249}
250
251function _sg_ssh() {
252 echo security group create --project ${project} ${sg_ssh} >>${cmds}
253 # icmp
254 echo security group rule create --protocol icmp ${sg_ssh} >>${cmds}
255 # ssh
256 echo security group rule create --protocol tcp --dst-port 22 ${sg_ssh} >>${cmds}
257}
258
259function _sg_iperf() {
260 echo security group create --project ${project} ${sg_iperf} >>${cmds}
261 # icmp
262 echo security group rule create --protocol icmp ${sg_iperf} >>${cmds}
263 # iperf
264 echo security group rule create --protocol tcp --dst-port 5001 ${sg_iperf} >>${cmds}
265 # iperf3
266 echo security group rule create --protocol tcp --dst-port 5201 ${sg_iperf} >>${cmds}
267}
268
269function create_keypair() {
270 echo "# Creating keypair"
271 openstack keypair create ${key} >${key}
272 chmod 600 ${key}
273 echo "-> created keyfile: $(pwd)/${key}"
274}
275
276function _flavors() {
277 # huge paged flavors
278 if [ "$huge_pages" = true ]; then
Alexc7f187c2022-04-28 10:02:27 -0500279 echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} --property hw:mem_page_size=large >>${cmds}
280 echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} --property hw:mem_page_size=large >>${cmds}
281 echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} --property hw:mem_page_size=large >>${cmds}
282 echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} --property hw:mem_page_size=large >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600283 else
Alexc7f187c2022-04-28 10:02:27 -0500284 echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} >>${cmds}
285 echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} >>${cmds}
286 echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} >>${cmds}
287 echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} >>${cmds}
Alexa4437742022-02-16 14:42:38 -0600288 fi
289}
290
291function _volumes() {
292 echo volume create --size 2 ${volume} >>${cmds}
293}
294
295function create_fixed_nets() {
296 echo "# Creating fixed networks"
297 echo network create --project ${project} ${net_left} >>${cmds}
298 echo subnet create ${subnet1} --network ${net_left} --subnet-range 10.10.11.0/24 >>${cmds}
299 echo network set --share ${net_left} >>${cmds}
300 echo network create --project ${project} ${net_right} >>${cmds}
301 echo subnet create ${subnet2} --network ${net_right} --subnet-range 10.10.12.0/24 >>${cmds}
302 echo network set --share ${net_right} >>${cmds}
303 process_cmds
304
305 # get subnet ids
306 subnet1_id=$(openstack subnet list --network ${net_left} -c ID -f value)
307 subnet2_id=$(openstack subnet list --network ${net_right} -c ID -f value)
308
309 echo router create --project ${project} ${router} >>${cmds}
310 process_cmds
311
312 router_id=$(openstack router list -c ID -c Name -f value | grep ${router} | cut -d' ' -f1)
313 echo router add subnet ${router_id} ${subnet1_id} >>${cmds}
314 echo router add subnet ${router_id} ${subnet2_id} >>${cmds}
315 process_cmds
316
Ievgeniia Zadorozhnadbf166a2022-03-09 18:52:36 +0300317 # get external network name
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100318 if [ -n "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then
319 # if CUSTOM_PUBLIC_NET_NAME is set to some specific net, check it is present on the cloud and use it
320 echo "# Checking that the external network ${CUSTOM_PUBLIC_NET_NAME} is present on the cloud"
321 network_exists=$(openstack network show "$CUSTOM_PUBLIC_NET_NAME" -c id -f value 2>/dev/null)
322 if [ -n "$network_exists" ]; then
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200323 TEST_PUBLIC_NET=${CUSTOM_PUBLIC_NET_NAME}
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100324 echo router set ${router} --external-gateway ${CUSTOM_PUBLIC_NET_NAME} >>${cmds}
325 process_cmds
326 else
327 echo "# The network ${CUSTOM_PUBLIC_NET_NAME} does not exist"
328 CUSTOM_PUBLIC_NET_NAME=""
329 fi
330 fi
331 if [ -z "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then
332 echo "# Selecting a random external network as an external gateway for the router"
333 # if the custom network is not set or is empty, select the first external network
334 external=$(openstack network list --external -c Name -f value | head -n1)
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200335 TEST_PUBLIC_NET=${external}
Ievgeniia Zadorozhna7bc54052024-02-20 00:15:35 +0100336 echo router set ${router} --external-gateway ${external} >>${cmds}
337 process_cmds
338 fi
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200339
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200340 if [ "$set_gw_heat_router" = true ]; then
341 echo "# Variable 'set_gw_heat_router' is true; setting the external gateway info for heat-router (if not set yet)..."
342 # set external gateway info for the Heat router if it is not set (required for Heat Tempest tests)
343 external_gateway_info=$(openstack router show heat-router -f json -c external_gateway_info | jq -r '.external_gateway_info')
344 if [[ "$external_gateway_info" == "null" ]]; then
345 echo "# Setting external gw info for heat-router using ${TEST_PUBLIC_NET}"
346 openstack router set --external-gateway ${TEST_PUBLIC_NET} heat-router
347 if [[ $? -eq 0 ]]; then
348 echo "# External gateway set successfully for heat-router"
349 openstack router show heat-router -c external_gateway_info
350 else
351 echo "# Failed to set external gateway for heat-router"
352 fi
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200353 else
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200354 echo "# Router heat-router already has an external gateway"
355 openstack router show heat-router -c external_gateway_info
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200356 fi
357 else
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200358 echo "# Variable 'set_gw_heat_router' is not true, skipping setting external_gateway_info for heat-router..."
Ievgeniia Zadorozhnac21d5522024-07-26 18:42:49 +0200359 fi
Alexa4437742022-02-16 14:42:38 -0600360}
361
362function _get_image() {
363 # build vars for name and link
364 name="${1}"
365 link="${1}_link"
366 which wget >/dev/null
367 if [ $? -ne 0 ]; then
368 printf "\nERROR: 'wget' not detected. Download skipped: ${!name}\n"
369 else
370 # no redownloads, quet, save named and show progress
371 r=$(wget --no-check-certificate -nc -q -O ./${!name} --show-progress ${!link})
372 if [ $? -ne 0 ]; then
373 # non-empty output on error
374 echo ${r}
375 fi
376 fi
377}
378
379function create_image() {
380 name="${1}"
381 # Check if image is in the cloud
382 echo "# Checking image '${!name}'"
383 ids=( $(ol1 image ${!name}) )
384 # if array is empty, download and upload it
385 if [ ${#ids[@]} -eq 0 ]; then
386 # check and download
387 if [ ! -f ${!name} ]; then
388 r=$(_get_image ${1})
389 else
390 r=""
391 fi
392 # check if output is not empty
393 if [ ${#r} -eq 0 ]; then
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +0100394 if [ "$raw_disk_format" = true ]; then
395 qemu-img convert -f qcow2 -O raw ${!name} ${!name}.raw
396 image_id=$(openstack image create --public --disk-format raw --container-format bare --file ${!name}.raw ${!name} -c id -f value)
397 echo "-> created ${!name} (${image_id})"
398 rm ${!name}.raw
399 else
Alexa4437742022-02-16 14:42:38 -0600400 image_id=$(openstack image create --public --disk-format qcow2 --container-format bare --file ${!name} ${!name} -c id -f value)
401 echo "-> created ${!name} (${image_id})"
Ievgeniia Zadorozhnae83b9612024-12-24 16:02:23 +0100402 fi
Alexa4437742022-02-16 14:42:38 -0600403 else
404 printf "\n-> Error detected, creation skipped\n"
405 fi
406 else
407 # image(s) already there, list them
408 for id in ${ids[@]}; do
409 echo "-> found ${!name} with ID of '${id}'"
410 done
411 fi
412}
413
414###################
415### Main
416###################
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200417echo "Using working folder: ${working_folder}"
Alexa4437742022-02-16 14:42:38 -0600418if [[ -z ${working_folder+x} ]]; then
419 # cwd into working dir
420 cd ${working_folder}
421fi
422
423cmds=$(mktemp)
424trap "rm -f ${cmds}" EXIT
425echo "Using tempfile: '${cmds}'"
426
427touch ${logfile}
428echo "Using log file: '${logfile}'"
429
430# Create
431echo "# Creating project and users"
432_project
433_users
434process_cmds
435
436echo "# Creating 'rc' and switching"
437putrc "./adminrc"
438updatesession
439putrc "./${rcfile}"
440
441echo "# Creating basic resources"
442# not dependent stuff
443_sg_all
444_sg_icmp
445_sg_ssh
446_sg_iperf
447_flavors
448_volumes
449process_cmds
450
451# sophisticated, step dependent stuff
452create_keypair
453create_fixed_nets
454
455# images
Ievgeniia Zadorozhna1cb5b102024-01-19 04:31:09 +0100456create_image cirros61
457create_image cirros62
Alexdb7786b2022-02-21 17:58:29 -0600458create_image ubuntu20
Ievgeniia Zadorozhna4cbb7212025-03-21 17:53:00 +0100459create_image ubuntu22
Alexa4437742022-02-16 14:42:38 -0600460
461### Manifest and fall back to original rc
462print_manifest
463printf ="\n\nSetting quota\n"
Ievgeniia Zadorozhnacf3140b2024-09-18 15:11:20 +0200464openstack quota set --cores -1 --ram -1 --instances -1 --volumes -1 --gigabytes -1 --server-groups -1 --server-group-members -1 cvp.project
Alexa4437742022-02-16 14:42:38 -0600465source "./adminrc"
466printf "\n\nOriginal rc preserved and backed up in 'adminrc'\nNew rc is '${rcfile}'\n"