Browse Source

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.)
configure-hook
Pete Vander Giessen 1 year ago
parent
commit
56cd24f5d0
3 changed files with 22 additions and 1 deletions
  1. BIN
      snap-overlay/data/mysql.tar.xz
  2. +6
    -0
      snap/hooks/configure
  3. +16
    -1
      tests/basic-test.sh

BIN
snap-overlay/data/mysql.tar.xz View File


+ 6
- 0
snap/hooks/configure View File

@ -23,6 +23,12 @@ done
# 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
# 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
echo "Configuring RabbitMQ"
# Rabbitmq isn't always started when we run this. Wait for it to start.


+ 16
- 1
tests/basic-test.sh View File

@ -20,8 +20,23 @@ multipass copy-files microstack_rocky_amd64.snap $MACHINE:
multipass exec $MACHINE -- \
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
# 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)
echo "Waiting for ping..."
PINGS=1


Loading…
Cancel
Save