Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the openstack vm image based and have a volume attached #131

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions cluster/providers/openstack/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,25 @@ function packstack_create_cirros_volume {
openstack volume create --image cirros --size 1 cirros-volume

# wait for the volume to be created
sleep 10
while [ "$(openstack volume show -f value -c status cirros-volume)" != "available" ]; do
echo "waiting for volume to be created"
sleep 3
done

# boot VM instance from image
openstack server create --image cirros --flavor m1.tiny --wait cirros-server

# wait for the server to be created
while [ "$(openstack server show -f value -c status cirros-server)" != "ACTIVE" ]; do
echo "waiting for server to be created"
sleep 3
done

# attach the cirros-volume to the server
echo "attaching volume to server"
openstack server add volume cirros-server cirros-volume

# boot VM instance from volume
openstack server create --flavor m1.tiny --volume cirros-volume cirros-volume
sleep 15
openstack volume list
openstack volume list
openstack server list
}

Expand Down
Loading