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.10. You may download it from https://Virtualbox.com
2. Install Vagrant. We are currently using 1.4.3. You may download it from https://downloads.vagrantup.com
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/havana
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-omnibus
$ vagrant plugin install vagrant-chef-zero
6. Check that the plugins are successfully installed:
$ vagrant plugin list
vagrant-chef-zero (0.6.0)
vagrant-omnibus (1.3.0)
7. In your openstack-chef-repo
, make sure you are on the stable\havana
branch.
$ cd openstack-chef-repo
$ git co stable\havana
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:
$ vagrant box add opscode-ubuntu-12.04 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
11. Start up the Vagrant virtual machine with the following command:
$ vagrant up ubuntu1204
12. SSH into the Vagrant virtual machine once it has completed the installation:
$ vagrant ssh ubuntu1204
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 [email protected]
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.
[email protected]'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 ubuntu1204 -f
This looks like dead path. I tried and run into the same problem as RobertRehberg. I have Mac OSX 10.9 and chef -v:
Chef Development Kit Version: 0.1.0
But still have the same problem "/Applications/Vagrant/embedded/gems/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `fetch': key not found: :retries (KeyError)"