Welcome to the OpenStack Deployment with Chef Workshop. These instructions are tailored to provide the minimal configuration for doing the walk-through. There is an expectation of Chef familiarity, but the steps are the same used in the presentation.
User shell commands will start with '$' or '#' for the 'root' user on the Virtualbox image.
1. Install Virtualbox. We are currently using 4.3.20. You may download it from https://Virtualbox.com
2. Install Vagrant. We are currently using 1.7.2. You may download it from https://www.vagrantup.com/downloads.html
3. Install the Chef Development Kit. We are currently using 0.1.0. You may download it from https://www.getchef.com/downloads/chef-dk/
4. The Chef repository for the session is the stable/icehouse
branch from Stackforge. You may download it from https://github.com/stackforge/openstack-chef-repo
5. Install the following Vagrant plugins:
$ vagrant plugin install vagrant-berkshelf
$ vagrant plugin install vagrant-chef-zero
$ vagrant plugin install vagrant-omnibus
6. Check that the plugins are successfully installed:
$ vagrant plugin list
vagrant-berkshelf (4.0.2)
vagrant-chef-zero (0.7.1)
vagrant-omnibus (1.4.1)
7. In your openstack-chef-repo
, make sure you are on the stable/icehouse
branch.
$ cd openstack-chef-repo
$ git co stable/icehouse
8. Use Berkshelf to download the Chef cookbooks specified in the Berksfile.
$ berks vendor .cookbooks
9. Set an environment file to specify which Vagrantfile to use, for example:
$ export VAGRANT_VAGRANTFILE=Vagrantfile-aio-nova
10. Install the Virtualbox image we will be using for the demo from one of the mirrors:
10.a Look at https://opscode-vm-bento.s3.amazonaws.com/ for list of current images if 14.04LTS does not work for you.
10.b It does not look like the Vagrant files in stable/icehouse have support for Ubuntu 14.04LTS
$ vagrant box add ubuntu-14.04 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
11. Start up the Vagrant virtual machine with the following command:
$ vagrant up ubuntu1404
12. SSH into the Vagrant virtual machine once it has completed the installation:
$ vagrant ssh ubuntu1404
13. Become the 'root' user:
$ sudo su -
14. Source the openrc
file to configure the root
user's environment for OpenStack:
# source openrc
15. List the Nova Compute services that are running:
# nova service-list
16. List the Nova Compute hypervisors that are running:
# nova hypervisor-list
17. List the images available for creating instances:
# nova image-list
18. Boot a very small test instance:
# nova boot test1 --image cirros --flavor 1 --poll
19. List the instances that are currently running:
# nova list
21. Inspect the running test instance:
# nova show test1
22. SSH into the image, the user is 'cirros' and the password is 'cubswin:)':
# ssh cirros@192.168.100.2
The authenticity of host '192.168.100.2 (192.168.100.2)' can't be established.
RSA key fingerprint is 90:c5:8c:9c:f7:73:b4:54:cf:15:0d:28:54:7f:e7:19.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.100.2' (RSA) to the list of known hosts.
cirros@192.168.100.2's password:
$ uptime
06:55:23 up 2 min, load average: 0.01, 0.02, 0.01
23. Connect to the OpenStack Dashboard:
https://localhost:8443
24. Create a zero.rb
file for interacting with your Vagrant deployed OpenStack:
chef_server_url 'http://10.10.6.135:4002'
node_name 'mray'
client_key '.chef/mray.pem'
knife[:openstack_username] = "admin"
knife[:openstack_password] = "admin"
knife[:openstack_tenant] = "admin"
knife[:openstack_auth_url] = "http://127.0.0.1:5000/v2.0/tokens"
25. Test with commands
knife node list -c zero.rb
26. Logout of the instance and exit the Vagrant virtual machine. Destroy the Vagrant VM:
$ vagrant destroy ubuntu1404 -f