Skip to content

Commit

Permalink
Fix upload octavia script
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bock <[email protected]>
  • Loading branch information
nicolasbock committed Dec 6, 2024
1 parent 510a665 commit e4a1ca8
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions openstack/tools/upload_octavia_amphora_image.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
#!/bin/bash -eu
juju run octavia-diskimage-retrofit/0 retrofit-image
#!/bin/bash

set -e -u

basedir=$(realpath $(dirname $0))
source ${basedir}/../novarc

set -x

ID=$(openstack image show --format value --column id jammy)

TASK=$(juju run octavia-diskimage-retrofit/0 retrofit-image source-image=${ID} --background 2>&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}

0 comments on commit e4a1ca8

Please sign in to comment.