Run a OpenStack all-in-one in Google Cloud

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

Advertisements

2 thoughts on “Run a OpenStack all-in-one in Google Cloud”

  1. I’ve used your instructions without success. Everything was looking good except:

    ‘/etc/openstack_deploy/user_variables.yml’: No such file or directory

    ls /etc/openstack_deploy -la
    total 12
    drwxr-xr-x 3 root root 4096 Oct 4 13:57 .
    drwxr-xr-x 95 root root 4096 Oct 4 13:57 ..
    drwxr-xr-x 2 root root 4096 Oct 4 13:57 ansible_facts

    Finally, there is no access via port 80/443 even from the host:

    curl localhost:80
    curl: (7) Failed to connect to localhost port 80: Connection refused

    Any ideas?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s