Created
November 16, 2016 16:49
-
-
Save michjohn/a7cd582fc19e0b4bc894eea6249829f9 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
export OCTAVIA_DIR=/opt/stack/octavia | |
export DIB_RELEASE=trusty | |
# Out with the old | |
glance image-delete $(glance image-list | awk '/ amphora-x64-haproxy / {print $2}') | |
rm $OCTAVIA_DIR/diskimage-create/amphora-x64-haproxy.qcow2 | |
rm -rf $OCTAVIA_DIR/diskimage-create/amphora-x64-haproxy.d | |
# Build a new one | |
export DIB_REPOLOCATION_amphora_agent=$OCTAVIA_DIR | |
export DIB_REPOREF_amphora_agent=$(git -C "$OCTAVIA_DIR" log -1 --pretty="format:%H") | |
cd $OCTAVIA_DIR/diskimage-create | |
./diskimage-create.sh -s 2 | |
# Load me up a new one | |
glance image-create --name amphora-x64-haproxy --tags amphora --disk-format qcow2 --container-format bare --visibility public --file $OCTAVIA_DIR/diskimage-create/amphora-x64-haproxy.qcow2 --progress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment