Most of you probably are familiar with OpenStack, but probably not everyone is familiar with Ursula. For your IBM Bluemix Private Cloud, we use Ursula to install a specialized version of OpenStack. Automated installation reduces user errors and results in faster, cleaner, more customizable OpenStack installations. This blog gets you started on understanding and working with Ursula. All of our Ursula playbooks are open source, and they are available on GitHub. Eventually, you could customize some for your own use.
Ursula is:
The collection of Ansible playbooks that Blue Box created, to deploy and manage OpenStack cloud.
Ursula can be installed in two ways: one way is by using Vagrant, and the other way is by “Manual Deployment.” This post concentrates on the manual deployment method.
Ursula comes with instructions on how to perform a manual deployment; however, those can be rather intimidating for newcomers to OpenStack. In this post, I’ll share my experiences with installing Ursula, and give you some detailed instructions on how I did it, and how to troubleshoot it, in case you have difficulties.
Requirements: Two Virtual Private Servers (VPS)
1x VPS in which to set up Ansible. I chose to do this on a CentOS 6.x VPS. I used a 2GB, 2 core VPS.
1x VPS to be used as the deployment target. This target has more specific requirements:
Ubuntu 14 LTS (Do not use Ubuntu 12 LTS.)
8GB of RAM (It probably will deploy on less, but it may be quite slow.)
4 cores
An IP address. In this example, the public IP of our VPS is 69.87.123.456 (which is obviously not a valid IP address!)
Prepare the CentOS 6.x VPS
Ansible will use this CentOS VPS to install OpenStack on the Ubuntu one! Here are the steps:
Step 2. Install the Python 2.7 packages and some dependencies:
Step 3. Create a Virtual Environment for Python. We’ll call it ursula-python:
Step 4. Activate the Virtual Environment:
Step 5. Use git to clone the Ursula repository and install its Python requirements:
Step 6. Set up an SSH configuration for the allinone. Note that you must already have set up SSH key authentication between the CentOS 6.x VPS and the Ubuntu target:
Edit or create ~/.ssh/config and add the following information:
The example above assumes that the username of your target Ubuntu 14 VPS is root, the IP is 69.87.123.456 and the private SSH key is located at /root/id_rsa -– change those as needed.
Fix/correct the SSL certificate that comes in envs/example/defaults-2.0.yml
Step 1. Confirm that the cert is broken by extracting it and examining it:
Step 2. Extract the cert to the file defaults2.0-cert.crt
Step 3. Try to get details out of it:
As you can see from the error, this one is obviously broken and needs to be replaced.
Step 4. Generate a new self-signed certificate and private key. We’ll use a fake hostname as the Common Name. In this case, the Common Name is openstack.chaidas.com.
Step 5. Now replace the broken cert with this one you generated:
sed -i -- 's!crt: |!crt: "{{ lookup(\x27'file\\x27',\x27'/etc/ssl/server.crt\\x27') }}"!g' defaults-2.0.yml
sed -i -- 's!key: |!key: "{{ lookup(\x27'file\\x27',\x27'/etc/ssl/serverkey.pem\\x27') }}"!g' defaults-2.0.yml
Step 6. Make sure to change the FQDN to the one you just used for the Common Name (in this example, it is openstack.chaidas.com) . Do not skip this step, otherwise things will break, down the road!
Start the deployment
Step 1. Inside a screen session, run the allinone installation. Note that a successful deployment takes about 1 hour and 26 minutes on an 8GB, 4 Core VPS.
Step 2. Once this process is done, you should be able to log in to Horizon by going to the IP address of your VPS (that would be the 69.87.123.456 in this example). The username is “admin” and the default password is “asdf”.
Step 3. Enjoy!
Common Errors and Resolutions
ERROR 1: Packages not downloading due to SSL errors
Fix with the following steps:
On the target, delete the files under /etc/apt/sources.list.d/apt_mirror_openstack_* that is:
Back on the Ansible host, run this command:
Re-run Ursula:
ERROR 2: The Keystone API cannot talk to Keystone
Fix with these steps:
Edit the file ~/ursula/envs/example/allinone/group_vars/all.yml