This article describes setting up a single-node machine running OpenStack on openSUSE, using OBS packages and a collection of Chef recipes bundled together via
soksolok (which stands for SUSE OpenStack knife-solo kitchen).
This setup assumes two machines are available: the workstation machine (which could be running any OS) and the node machine (where OpenStack will be installed and run). These are the requirements for the two machines:
- is able to connect through ssh to the Node machine
- has a SUSE release installed. We have tested the chef cookbooks on openSUSE 12.3 and SLES 11SP3.
- can connect to the Internet (especially OBS)
- has sshd running and is connectible from the Workstation machine
Both machines can be virtualized.
If the Preliminaries are met, you can proceed with executing these steps on the Workstation. The setup uses knife-solo which will install the chef gem and chef-solo on the target node as well as download the proper cookbooks and call chef-solo with a included config and attributes files.
- Install some dependencies:
# zypper addrepo obs://devel:languages:ruby:extensions/openSUSE_12.3 "Ruby extensions" # zypper install rubygem-knife-solo rubygem-librarian # gem install librarian-chef
Make sure you're using the latest versions of these packages (rubygem-knife-solo >= 0.3.0 and rubygem-librarian >= 0.1.1-6.1)
- Clone our example knife-solo directory (kitchen):
$ git clone git://github.com/SUSE-Cloud/soksolok.git $ cd soksolok
- If you are using a node with SLES, ensure that the relevant SPx and SDK installation sources are configured.
- Bootstrap chef-solo on the node. This will install chef on the target machine from OBS:
$ knife bootstrap --template-file bootstrap.suse.erb --user root your-node-name
- Make sure that the node filename in nodes/ (named node1.json by default) matches the hostname of your Node machine, so you might want to rename it.
- (Optional) Modify any configuration files for knife-solo:
- Deploy using knife solo cook:
$ knife solo cook root@your-node-name
- when deploying on postgresql on openSUSE 12.3, you might be affected by bug #809420. The fix is to run sysctl --system.
- chef will need the following patch applied on openSUSE 12.3, otherwise the group provider will fail because of the system-wide packaging switch to shadow-utils: CHEF-4015. This patch was already applied to the systems:management chef repos.