Moved from database dump to hack.

Dropped a command to change the endpoints from localhost to 10.20.20.1
in the configure hook.

This is a temporary solution, pending automation of the database
update. (I was burning too much time getting a manual dump to work for
now.)
This commit is contained in:
Pete Vander Giessen 2019-04-10 09:47:06 -04:00
parent 369abc1f6f
commit 56cd24f5d0
3 changed files with 22 additions and 1 deletions

Binary file not shown.

View File

@ -23,6 +23,12 @@ done
# Grant nova user access to cell0 # Grant nova user access to cell0
echo "GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'10.20.20.1' IDENTIFIED BY 'nova';" | mysql-start-client -u root echo "GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'10.20.20.1' IDENTIFIED BY 'nova';" | mysql-start-client -u root
# Endpoints from localhost -> 10.20.20.1
# TODO Rebuild database so that these are already set to 10.20.20.1,
# after lp:1824176 is addressed, and the process of building a new
# mysql.tar.xz is less fraught.
openstack endpoint list | grep localhost | while read line; do openstack endpoint set `echo $line | cut -d" " -f2` --url `echo $line | cut -d" " -f14 | sed 's/localhost/10.20.20.1/'`; done
# RabbitMQ # RabbitMQ
echo "Configuring RabbitMQ" echo "Configuring RabbitMQ"
# Rabbitmq isn't always started when we run this. Wait for it to start. # Rabbitmq isn't always started when we run this. Wait for it to start.

View File

@ -20,8 +20,23 @@ multipass copy-files microstack_rocky_amd64.snap $MACHINE:
multipass exec $MACHINE -- \ multipass exec $MACHINE -- \
sudo snap install --classic --dangerous microstack*.snap sudo snap install --classic --dangerous microstack*.snap
# Run microstack.launch and wait for it to complete. # Run microstack.launch
multipass exec $MACHINE -- /snap/bin/microstack.launch breakfast multipass exec $MACHINE -- /snap/bin/microstack.launch breakfast
# Verify that endpoints are setup correctly
# List of endpoints should contain 10.20.20.1
if ! multipass exec $MACHINE -- /snap/bin/microstack.openstack endpoint list | grep "10.20.20.1"; then
echo "Endpoints are not set to 10.20.20.1!";
exit 1;
fi
# List of endpoints should not contain localhost
if multipass exec $MACHINE -- /snap/bin/microstack.openstack endpoint list | grep "localhost"; then
echo "Endpoints are not set to 10.20.20.1!";
exit 1;
fi
# Verify that microstack.launch completed
IP=$(multipass exec $MACHINE -- /snap/bin/microstack.openstack server list | grep breakfast | cut -d" " -f9) IP=$(multipass exec $MACHINE -- /snap/bin/microstack.openstack server list | grep breakfast | cut -d" " -f9)
echo "Waiting for ping..." echo "Waiting for ping..."
PINGS=1 PINGS=1