Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | export OS_INTERFACE='admin' |
| 3 | |
Ievgeniia Zadorozhna | 22ce72c | 2024-02-29 18:48:21 +0100 | [diff] [blame] | 4 | # Prepare clouds.yaml file for the future cleanup, with original admin creds |
| 5 | sed -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 | |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 7 | # local vars |
| 8 | name_prefix=cvp |
| 9 | filename=${name_prefix}.manifest |
| 10 | rcfile=${name_prefix}rc |
| 11 | huge_pages=false |
| 12 | logfile=prepare.log |
| 13 | |
| 14 | # Project, User, Roles |
| 15 | project=${name_prefix}.project |
| 16 | user=${name_prefix}.user |
| 17 | admin=${name_prefix}.admin |
| 18 | password=mcp1234 |
| 19 | |
| 20 | # Security group |
| 21 | sg_all=${name_prefix}.sg.all |
| 22 | sg_icmp=${name_prefix}.sg.icmp |
| 23 | sg_ssh=${name_prefix}.sg.ssh |
| 24 | sg_iperf=${name_prefix}.sg.perf |
| 25 | |
| 26 | # Testkey |
| 27 | key=${name_prefix}_testkey |
| 28 | |
| 29 | # Flavors: tiny, small (cirrus and migration), medium (ubuntu and volume/stress activities) |
| 30 | flavor_t=${name_prefix}.tiny |
| 31 | flavor_s=${name_prefix}.small |
| 32 | flavor_m=${name_prefix}.medium |
| 33 | flavor_h=${name_prefix}.high |
| 34 | |
| 35 | # Fixed Networks (2, for testing router interconnection) |
| 36 | net_left=${name_prefix}.net.1 |
| 37 | net_right=${name_prefix}.net.2 |
| 38 | subnet1=${name_prefix}.subnet.1 |
| 39 | subnet2=${name_prefix}.subnet.2 |
| 40 | |
| 41 | # Router |
| 42 | router=${name_prefix}.router |
| 43 | |
Ievgeniia Zadorozhna | 78ada71 | 2024-02-23 17:23:38 +0100 | [diff] [blame] | 44 | # Images: cirros (6.0, 6.2), ubuntu (16.04, 20.04) |
| 45 | cirros61=${name_prefix}.cirros.61 |
| 46 | cirros62=${name_prefix}.cirros.62 |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 47 | ubuntu16=${name_prefix}.ubuntu.1604 |
Alex | db7786b | 2022-02-21 17:58:29 -0600 | [diff] [blame] | 48 | ubuntu20=${name_prefix}.ubuntu.2004 |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 49 | |
Ievgeniia Zadorozhna | 78ada71 | 2024-02-23 17:23:38 +0100 | [diff] [blame] | 50 | cirros61_link=https://download.cirros-cloud.net/0.6.1/cirros-0.6.1-x86_64-disk.img |
| 51 | cirros62_link=https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 52 | ubuntu16_link=https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img |
Alex | db7786b | 2022-02-21 17:58:29 -0600 | [diff] [blame] | 53 | ubuntu20_link=https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 54 | |
| 55 | # Volume (2GB) |
| 56 | volume=${name_prefix}.volume |
| 57 | |
| 58 | function show_help { |
| 59 | printf "CVP Pipeline: Resource creation script\n\t-h, -?\t\tShow this help\n" |
| 60 | printf "\t-H\t\tAdds '--property hw:mem_page_size=large' to flavors, i.e. huge_pages for DPDK\n" |
| 61 | printf "\t-w <path>\tSets working folder" |
| 62 | } |
| 63 | |
| 64 | OPTIND=1 # Reset in case getopts has been used previously in the shell. |
| 65 | while getopts "h?:Hw:" opt; do |
| 66 | case "$opt" in |
| 67 | h|\?) |
| 68 | show_help |
| 69 | exit 0 |
| 70 | ;; |
| 71 | w) working_folder=${OPTARG} |
| 72 | printf "# Working folder is ${working_folder}\n" |
| 73 | ;; |
| 74 | h) huge_pages=true |
| 75 | printf "# Using 'huge_pages' property in flavors\n" |
| 76 | ;; |
| 77 | esac |
| 78 | done |
| 79 | |
| 80 | shift $((OPTIND-1)) |
| 81 | [ "${1:-}" = "--" ] && shift |
| 82 | |
| 83 | function put() { |
| 84 | echo "$1=$2" | tee -a ${filename} |
| 85 | } |
| 86 | |
| 87 | # now, some hard to understand stuff... |
| 88 | # f1 $(<command with output to cut>) |
| 89 | function f1() { echo $1 | cut -d' ' -f1; }; |
| 90 | # <commands with output to cut> | p1 |
| 91 | function p1() { while read input; do echo ${input} | cut -d' ' -f1; done; }; |
| 92 | # ol1 is short for openstack list with 1 param. Also grep and cut |
| 93 | # "ol1 network public" will list all networks, grep by name public and return IDs |
| 94 | function ol1() { echo $(openstack $1 list -c ID -c Name -f value | grep $2 | cut -d' ' -f1); } |
| 95 | # same as ol1 but with 2 initial commands before list |
| 96 | function ol2() { echo $(openstack $1 $2 list -c ID -c Name -f value | grep $3 | cut -d' ' -f1); } |
| 97 | |
| 98 | function print_manifest() { |
| 99 | touch ./${filename} |
| 100 | truncate -s 0 ${filename} |
| 101 | printf "\n\n# Checking and filling manifest: $(pwd)/${filename}\n" |
| 102 | put project_name ${project} |
| 103 | put project_id $(ol1 project ${project}) |
| 104 | put user_name ${user} |
| 105 | put user_id $(ol1 user ${user}) |
| 106 | put admin_name ${admin} |
| 107 | put admin_id $(ol1 user ${admin}) |
| 108 | # sg |
| 109 | put secgroup_all_name ${sg_all} |
| 110 | put secgroup_all_id $(ol2 security group ${sg_all}) |
| 111 | put secgroup_icmp_name ${sg_icmp} |
| 112 | put secgroup_icmp_id $(ol2 security group ${sg_icmp}) |
| 113 | put secgroup_ssh_name ${sg_ssh} |
| 114 | put secgroup_ssh_id $(ol2 security group ${sg_ssh}) |
| 115 | put secgroup_iperf_name ${sg_iperf} |
| 116 | put secgroup_iperf_id $(ol2 security group ${sg_iperf}) |
| 117 | |
| 118 | # keypair |
| 119 | put keypair_name ${key} |
| 120 | put keypair_id $(ol1 keypair ${key}) |
| 121 | |
| 122 | # flavors |
| 123 | put flavor_tiny_name ${flavor_t} |
| 124 | put flavor_tiny_id $(ol1 flavor ${flavor_t}) |
| 125 | put flavor_small_name ${flavor_s} |
| 126 | put flavor_small_id $(ol1 flavor ${flavor_s}) |
| 127 | put flavor_medium_name ${flavor_m} |
| 128 | put flavor_medium_id $(ol1 flavor ${flavor_m}) |
| 129 | put flavor_high_name ${flavor_h} |
| 130 | put flavor_high_id $(ol1 flavor ${flavor_h}) |
| 131 | |
| 132 | # fixed nets |
| 133 | put fixed_net_left_name ${net_left} |
| 134 | put fixed_net_left_id $(ol1 network ${net_left}) |
| 135 | put fixed_net_right_name ${net_right} |
| 136 | put fixed_net_right_id $(ol1 network ${net_right}) |
| 137 | put fixed_net_left_subnet_name ${subnet1} |
| 138 | put fixed_net_left_subnet_id $(openstack subnet list --network ${net_left} -c ID -f value | p1) |
| 139 | put fixed_net_right_subnet_name ${subnet2} |
| 140 | put fixed_net_right_subnet_id $(openstack subnet list --network ${net_right} -c ID -f value | p1) |
| 141 | |
| 142 | # router |
| 143 | put router_name ${router} |
| 144 | put router_id $(ol1 router ${router}) |
| 145 | |
| 146 | # volumes |
| 147 | put volume_name ${volume} |
| 148 | put volume_id $(ol1 volume ${volume}) |
| 149 | |
| 150 | # images |
Ievgeniia Zadorozhna | 78ada71 | 2024-02-23 17:23:38 +0100 | [diff] [blame] | 151 | put cirros61_name ${cirros61} |
| 152 | put cirros61_id $(ol1 image ${cirros61}) |
| 153 | put cirros62_name ${cirros62} |
| 154 | put cirros62_id $(ol1 image ${cirros62}) |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 155 | put ubuntu16_name ${ubuntu16} |
| 156 | put ubuntu16_id $(ol1 image ${ubuntu16}) |
Alex | db7786b | 2022-02-21 17:58:29 -0600 | [diff] [blame] | 157 | put ubuntu20_name ${ubuntu20} |
| 158 | put ubuntu20_id $(ol1 image ${ubuntu20}) |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | # create rc file out of current ENV vars |
| 162 | function putrc() { |
| 163 | printf "# Saving ${1} file\n" |
| 164 | echo "export OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-3}" >${1} |
| 165 | echo "export OS_AUTH_URL=${OS_AUTH_URL}" >>${1} |
| 166 | echo "export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME}" >>${1} |
| 167 | echo "export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME}" >>${1} |
| 168 | echo "export OS_PROJECT_NAME=${OS_PROJECT_NAME}" >>${1} |
| 169 | echo "export OS_TENANT_NAME=${OS_TENANT_NAME}" >>${1} |
| 170 | echo "export OS_USERNAME=${OS_USERNAME}" >>${1} |
| 171 | echo "export OS_PASSWORD=${OS_PASSWORD}" >>${1} |
| 172 | echo "export OS_REGION_NAME=${OS_REGION_NAME}" >>${1} |
| 173 | echo "export OS_INTERFACE=${OS_INTERFACE}" >>${1} |
| 174 | echo "export OS_ENDPOINT_TYPE=${OS_ENDPOINT_TYPE}" >>${1} |
| 175 | echo "export OS_CACERT=${OS_CACERT}" >>${1} |
| 176 | } |
| 177 | |
| 178 | # update ENV vars to newly created project |
| 179 | function updatesession() { |
| 180 | export OS_PROJECT_NAME=${project} |
| 181 | export OS_TENANT_NAME=${project} |
| 182 | export OS_USERNAME=${admin} |
| 183 | export OS_PASSWORD=${password} |
| 184 | } |
| 185 | |
| 186 | function process_cmds() { |
| 187 | if [ -s ${cmds} ]; then |
| 188 | cat ${cmds} | tr '\n' '\0' | xargs -P 1 -n 1 -0 echo | tee /dev/tty | openstack -v 2>&1 >>${logfile} |
| 189 | truncate -s 0 ${cmds} |
| 190 | fi |
| 191 | } |
| 192 | |
| 193 | function _project() { |
| 194 | echo project create ${project} >>${cmds} |
Ievgeniia Zadorozhna | a76c852 | 2023-08-03 17:00:54 +0300 | [diff] [blame] | 195 | admin_username=$(openstack user list --project admin -c Name -f value | grep admin) |
| 196 | echo role add --user ${admin_username} --project ${project} admin >>${cmds} |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | function _users() { |
| 200 | echo user create --project ${project} --password ${password} ${user} >>${cmds} |
| 201 | echo user create --project ${project} --password ${password} ${admin} >>${cmds} |
| 202 | echo role add --user ${admin} --project ${project} admin >>${cmds} |
| 203 | echo role add --user ${admin} --project ${project} creator >>${cmds} |
| 204 | echo role add --user ${user} --project ${project} member >>${cmds} |
| 205 | echo role add --user ${user} --project ${project} creator >>${cmds} |
Ievgeniia Zadorozhna | 5452a37 | 2023-07-10 20:54:13 +0300 | [diff] [blame] | 206 | echo role add --user ${user} --project ${project} load-balancer_member >>${cmds} |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 207 | |
| 208 | } |
| 209 | |
| 210 | function _sg_all() { |
| 211 | echo security group create --project ${project} ${sg_all} >>${cmds} |
| 212 | # icmp |
| 213 | echo security group rule create --protocol icmp ${sg_all} >>${cmds} |
| 214 | # ssh |
| 215 | echo security group rule create --protocol tcp --dst-port 22 ${sg_all} >>${cmds} |
| 216 | # iperf |
| 217 | echo security group rule create --protocol tcp --dst-port 5001 ${sg_all} >>${cmds} |
| 218 | # iperf3 |
| 219 | echo security group rule create --protocol tcp --dst-port 5201 ${sg_all} >>${cmds} |
| 220 | # nc connectivity |
| 221 | echo security group rule create --protocol tcp --dst-port 3000 ${sg_all} >>${cmds} |
| 222 | # http |
| 223 | echo security group rule create --protocol tcp --dst-port 80 ${sg_all} >>${cmds} |
| 224 | # https |
| 225 | echo security group rule create --protocol tcp --dst-port 443 ${sg_all} >>${cmds} |
| 226 | } |
| 227 | |
| 228 | function _sg_icmp() { |
| 229 | echo security group create --project ${project} ${sg_icmp} >>${cmds} |
| 230 | echo security group rule create --protocol icmp ${sg_icmp} >>${cmds} |
| 231 | } |
| 232 | |
| 233 | function _sg_ssh() { |
| 234 | echo security group create --project ${project} ${sg_ssh} >>${cmds} |
| 235 | # icmp |
| 236 | echo security group rule create --protocol icmp ${sg_ssh} >>${cmds} |
| 237 | # ssh |
| 238 | echo security group rule create --protocol tcp --dst-port 22 ${sg_ssh} >>${cmds} |
| 239 | } |
| 240 | |
| 241 | function _sg_iperf() { |
| 242 | echo security group create --project ${project} ${sg_iperf} >>${cmds} |
| 243 | # icmp |
| 244 | echo security group rule create --protocol icmp ${sg_iperf} >>${cmds} |
| 245 | # iperf |
| 246 | echo security group rule create --protocol tcp --dst-port 5001 ${sg_iperf} >>${cmds} |
| 247 | # iperf3 |
| 248 | echo security group rule create --protocol tcp --dst-port 5201 ${sg_iperf} >>${cmds} |
| 249 | } |
| 250 | |
| 251 | function create_keypair() { |
| 252 | echo "# Creating keypair" |
| 253 | openstack keypair create ${key} >${key} |
| 254 | chmod 600 ${key} |
| 255 | echo "-> created keyfile: $(pwd)/${key}" |
| 256 | } |
| 257 | |
| 258 | function _flavors() { |
| 259 | # huge paged flavors |
| 260 | if [ "$huge_pages" = true ]; then |
Alex | c7f187c | 2022-04-28 10:02:27 -0500 | [diff] [blame] | 261 | echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} --property hw:mem_page_size=large >>${cmds} |
| 262 | echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} --property hw:mem_page_size=large >>${cmds} |
| 263 | echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} --property hw:mem_page_size=large >>${cmds} |
| 264 | echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} --property hw:mem_page_size=large >>${cmds} |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 265 | else |
Alex | c7f187c | 2022-04-28 10:02:27 -0500 | [diff] [blame] | 266 | echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} >>${cmds} |
| 267 | echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} >>${cmds} |
| 268 | echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} >>${cmds} |
| 269 | echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} >>${cmds} |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 270 | fi |
| 271 | } |
| 272 | |
| 273 | function _volumes() { |
| 274 | echo volume create --size 2 ${volume} >>${cmds} |
| 275 | } |
| 276 | |
| 277 | function create_fixed_nets() { |
| 278 | echo "# Creating fixed networks" |
| 279 | echo network create --project ${project} ${net_left} >>${cmds} |
| 280 | echo subnet create ${subnet1} --network ${net_left} --subnet-range 10.10.11.0/24 >>${cmds} |
| 281 | echo network set --share ${net_left} >>${cmds} |
| 282 | echo network create --project ${project} ${net_right} >>${cmds} |
| 283 | echo subnet create ${subnet2} --network ${net_right} --subnet-range 10.10.12.0/24 >>${cmds} |
| 284 | echo network set --share ${net_right} >>${cmds} |
| 285 | process_cmds |
| 286 | |
| 287 | # get subnet ids |
| 288 | subnet1_id=$(openstack subnet list --network ${net_left} -c ID -f value) |
| 289 | subnet2_id=$(openstack subnet list --network ${net_right} -c ID -f value) |
| 290 | |
| 291 | echo router create --project ${project} ${router} >>${cmds} |
| 292 | process_cmds |
| 293 | |
| 294 | router_id=$(openstack router list -c ID -c Name -f value | grep ${router} | cut -d' ' -f1) |
| 295 | echo router add subnet ${router_id} ${subnet1_id} >>${cmds} |
| 296 | echo router add subnet ${router_id} ${subnet2_id} >>${cmds} |
| 297 | process_cmds |
| 298 | |
Ievgeniia Zadorozhna | dbf166a | 2022-03-09 18:52:36 +0300 | [diff] [blame] | 299 | # get external network name |
Ievgeniia Zadorozhna | 2b0ba2c | 2024-02-20 00:15:35 +0100 | [diff] [blame] | 300 | if [ -n "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then |
| 301 | # if CUSTOM_PUBLIC_NET_NAME is set to some specific net, check it is present on the cloud and use it |
| 302 | echo "# Checking that the external network ${CUSTOM_PUBLIC_NET_NAME} is present on the cloud" |
| 303 | network_exists=$(openstack network show "$CUSTOM_PUBLIC_NET_NAME" -c id -f value 2>/dev/null) |
| 304 | if [ -n "$network_exists" ]; then |
| 305 | echo router set ${router} --external-gateway ${CUSTOM_PUBLIC_NET_NAME} >>${cmds} |
| 306 | process_cmds |
| 307 | else |
| 308 | echo "# The network ${CUSTOM_PUBLIC_NET_NAME} does not exist" |
| 309 | CUSTOM_PUBLIC_NET_NAME="" |
| 310 | fi |
| 311 | fi |
| 312 | if [ -z "${CUSTOM_PUBLIC_NET_NAME:-}" ]; then |
| 313 | echo "# Selecting a random external network as an external gateway for the router" |
| 314 | # if the custom network is not set or is empty, select the first external network |
| 315 | external=$(openstack network list --external -c Name -f value | head -n1) |
| 316 | echo router set ${router} --external-gateway ${external} >>${cmds} |
| 317 | process_cmds |
| 318 | fi |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | function _get_image() { |
| 322 | # build vars for name and link |
| 323 | name="${1}" |
| 324 | link="${1}_link" |
| 325 | which wget >/dev/null |
| 326 | if [ $? -ne 0 ]; then |
| 327 | printf "\nERROR: 'wget' not detected. Download skipped: ${!name}\n" |
| 328 | else |
| 329 | # no redownloads, quet, save named and show progress |
| 330 | r=$(wget --no-check-certificate -nc -q -O ./${!name} --show-progress ${!link}) |
| 331 | if [ $? -ne 0 ]; then |
| 332 | # non-empty output on error |
| 333 | echo ${r} |
| 334 | fi |
| 335 | fi |
| 336 | } |
| 337 | |
| 338 | function create_image() { |
| 339 | name="${1}" |
| 340 | # Check if image is in the cloud |
| 341 | echo "# Checking image '${!name}'" |
| 342 | ids=( $(ol1 image ${!name}) ) |
| 343 | # if array is empty, download and upload it |
| 344 | if [ ${#ids[@]} -eq 0 ]; then |
| 345 | # check and download |
| 346 | if [ ! -f ${!name} ]; then |
| 347 | r=$(_get_image ${1}) |
| 348 | else |
| 349 | r="" |
| 350 | fi |
| 351 | # check if output is not empty |
| 352 | if [ ${#r} -eq 0 ]; then |
| 353 | image_id=$(openstack image create --public --disk-format qcow2 --container-format bare --file ${!name} ${!name} -c id -f value) |
| 354 | echo "-> created ${!name} (${image_id})" |
| 355 | else |
| 356 | printf "\n-> Error detected, creation skipped\n" |
| 357 | fi |
| 358 | else |
| 359 | # image(s) already there, list them |
| 360 | for id in ${ids[@]}; do |
| 361 | echo "-> found ${!name} with ID of '${id}'" |
| 362 | done |
| 363 | fi |
| 364 | } |
| 365 | |
| 366 | ################### |
| 367 | ### Main |
| 368 | ################### |
| 369 | if [[ -z ${working_folder+x} ]]; then |
| 370 | # cwd into working dir |
| 371 | cd ${working_folder} |
| 372 | fi |
| 373 | |
| 374 | cmds=$(mktemp) |
| 375 | trap "rm -f ${cmds}" EXIT |
| 376 | echo "Using tempfile: '${cmds}'" |
| 377 | |
| 378 | touch ${logfile} |
| 379 | echo "Using log file: '${logfile}'" |
| 380 | |
| 381 | # Create |
| 382 | echo "# Creating project and users" |
| 383 | _project |
| 384 | _users |
| 385 | process_cmds |
| 386 | |
| 387 | echo "# Creating 'rc' and switching" |
| 388 | putrc "./adminrc" |
| 389 | updatesession |
| 390 | putrc "./${rcfile}" |
| 391 | |
| 392 | echo "# Creating basic resources" |
| 393 | # not dependent stuff |
| 394 | _sg_all |
| 395 | _sg_icmp |
| 396 | _sg_ssh |
| 397 | _sg_iperf |
| 398 | _flavors |
| 399 | _volumes |
| 400 | process_cmds |
| 401 | |
| 402 | # sophisticated, step dependent stuff |
| 403 | create_keypair |
| 404 | create_fixed_nets |
| 405 | |
| 406 | # images |
Ievgeniia Zadorozhna | 78ada71 | 2024-02-23 17:23:38 +0100 | [diff] [blame] | 407 | create_image cirros61 |
| 408 | create_image cirros62 |
Alex | db7786b | 2022-02-21 17:58:29 -0600 | [diff] [blame] | 409 | create_image ubuntu16 |
| 410 | create_image ubuntu20 |
Alex | a443774 | 2022-02-16 14:42:38 -0600 | [diff] [blame] | 411 | |
| 412 | ### Manifest and fall back to original rc |
| 413 | print_manifest |
| 414 | printf ="\n\nSetting quota\n" |
| 415 | openstack quota set --cores -1 --ram -1 --instances -1 --volumes -1 --gigabytes -1 cvp.project |
| 416 | source "./adminrc" |
| 417 | printf "\n\nOriginal rc preserved and backed up in 'adminrc'\nNew rc is '${rcfile}'\n" |