Skip to content

Instantly share code, notes, and snippets.

@michjohn
Created November 16, 2016 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michjohn/a7cd582fc19e0b4bc894eea6249829f9 to your computer and use it in GitHub Desktop.
Save michjohn/a7cd582fc19e0b4bc894eea6249829f9 to your computer and use it in GitHub Desktop.
#!/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