With this recipe I have installed a VM in Google Compute Engine with an all-in-one OpenStack setup for testing purposes.
I assume you already have the gcloud command line client working, and have created a new project, called openstack-123456 in this example.
I’m going to create a Ubuntu 16.04 VM with an extra 100 GB disk:
gcloud compute instances create aio1 \
--zone us-east1-b --project openstack-123456 \
--image-project ubuntu-os-cloud --image-family ubuntu-1604-lts \
--machine-type n1-standard-4 --boot-disk-size 60
gcloud compute disks create openstack-disk-2 \
--zone us-east1-b --project openstack-123456 \
--size 100
gcloud compute instances attach-disk aio1 \
--zone us-east1-b --project openstack-123456 \
--disk openstack-disk-2
We already have our VM running, so we connect to it and install OpenStack all-in-one with Ansible.
apt-get update
apt-get dist-upgrade -y
reboot
git clone https://git.openstack.org/openstack/openstack-ansible /opt/openstack-ansible
cd /opt/openstack-ansible
git checkout stable/queens
export BOOTSTRAP_OPTS="bootstrap_host_data_disk_device=sdb"
export ANSIBLE_ROLE_FETCH_MODE=git-clone
scripts/bootstrap-ansible.sh
scripts/bootstrap-aio.sh
Add this line to /etc/openstack_deploy/user_variables.yml
lxc_cache_prep_timeout: 3600
Finally, run the playbooks:
cd /opt/openstack-ansible/playbooks
openstack-ansible setup-hosts.yml
openstack-ansible setup-infrastructure.yml
openstack-ansible setup-openstack.yml
When finished, you will be able to access Horizon at https://your-public-IP
All the passwords will be stored at /etc/openstack_deploy/user_secrets.yml, use the keystone_auth_admin_password to log in in Horizon.
For more information: https://docs.openstack.org/openstack-ansible/queens/contributor/quickstart-aio.html