forked from canonical/stsstack-bundles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nicolas Bock <[email protected]>
- Loading branch information
1 parent
510a665
commit e4a1ca8
Showing
1 changed file
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |