diff --git a/openstack/tools/upload_octavia_amphora_image.sh b/openstack/tools/upload_octavia_amphora_image.sh index af6b0bfa..6fe86311 100755 --- a/openstack/tools/upload_octavia_amphora_image.sh +++ b/openstack/tools/upload_octavia_amphora_image.sh @@ -1,2 +1,46 @@ -#!/bin/bash -eu -juju run octavia-diskimage-retrofit/0 retrofit-image +#!/bin/bash + +set -e -u + +declare amphora_series=jammy + +while (( $# > 0 )); do + case $1 in + -h|--help) + cat <&1 | grep show-task | sed --regexp-extended 's/^.*task ([0-9]+).*/\1/') + +echo -n "Running retrofit" +while [[ $(juju show-task ${TASK}) =~ running ]]; do + echo -n . + sleep 5 +done +echo + +ID=$(openstack image list --format json | jq --raw-output '.[] | select(.Name | match("amphora")) | .ID') + +openstack image set --tag octavia-amphora ${ID}