{"id":23138242,"url":"https://github.com/softlayer/chef-openstack","last_synced_at":"2025-08-17T11:32:54.623Z","repository":{"id":11187704,"uuid":"13567040","full_name":"softlayer/chef-openstack","owner":"softlayer","description":"These are a concise set of recipes for OpenStack and SoftLayer servers.  In addition, the following site provides a getting started guide for OpenStack on SoftLayer.","archived":false,"fork":false,"pushed_at":"2014-02-08T01:00:34.000Z","size":21466,"stargazers_count":27,"open_issues_count":1,"forks_count":13,"subscribers_count":18,"default_branch":"Havana","last_synced_at":"2024-05-09T17:09:57.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"softlayer.github.io/chef-openstack","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softlayer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-14T16:43:09.000Z","updated_at":"2017-01-10T22:28:41.000Z","dependencies_parsed_at":"2022-09-11T15:23:16.736Z","dependency_job_id":null,"html_url":"https://github.com/softlayer/chef-openstack","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlayer%2Fchef-openstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlayer%2Fchef-openstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlayer%2Fchef-openstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softlayer%2Fchef-openstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softlayer","download_url":"https://codeload.github.com/softlayer/chef-openstack/tar.gz/refs/heads/Havana","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230121666,"owners_count":18176477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T13:10:17.780Z","updated_at":"2024-12-17T13:10:18.488Z","avatar_url":"https://github.com/softlayer.png","language":"Ruby","readme":"SoftLayer Chef Recipes for OpenStack\n====================================\n\nPurpose\n-------\nThese are a concise set of recipes meant to be used with SoftLayer hardware servers and Cloud Compute Instances (CCIs). They allow deployers to scale or branch out as many pieces of OpenStack infrastructure as is possible to be deployed on SoftLayer for testing or production.\n\nRequirements\n------------\n#### Chef Server ####\nChef Server \u003e= 11.4\n\n#### Platforms ####\nUbuntu 12.04 LTS\n\n#### Cookbooks ####\n* Partial_search\n* MySQL\n* NTP\n* Build-essential\n* Openssl\n\nChef Attributes\n---------------\nFor Information on specific attributes please see the attributes/ directory.\n\nServer Preparation\n----------------\n###### Cinder ######\nBy default, Cinder will use `/dev/sdb` as the storage device. It is strongly recommended you have a second disk partition for Cinder. You can override this variable with the path to any other device (including a [loop device](http://en.wikipedia.org/wiki/Loop_device \"loop device\") for testing, such as `/dev/lo0`). The Cinder recipe will check for the volume group name of the LUN, and if it isn't present it will repartition the drive and format it for Cinder. **All data will be ERASED** if the recipe finds the disk but does not find the volume group associated with it.\n\n###### OpenStack Regions #######\n\nEach OpenStack cluster can have unlimited regions associated with it; this is implemented through Chef Environments. OpenStack clusters are isolated through the use of Chef environment names and OpenStack region names, and the Horizon dashboard configuration is populated with the Keystone authentication endpoint for each region (environment), allowing end-users to choose a region at login. Each time additional regions are added, the dashboard recipe will need to be re-run on every controller server to repopulate the Keystone server information in Horizon.\n\nPlease refer to the attributes/ directory for more information.\n\nConfigure Environment Overrides for Chef-OpenStack\n--------------------------------------------------\nYou are required to provide some attributes for your OpenStack Chef deployment. These can be overridden at the environment level or at the node level, but the environmental level is strongly recommended.\n\nEdit your environment with the following command (you may also edit this from the Chef web-based UI). An editor will open where you may define your environment's attributes in JSON format.\n\n\tknife environment create ENVIRONMENT (options)    \n\tknife environment edit ENVIRONMENT (options)\n\nTake special care to ensure your final environment document is valid JSON, as knife may discard your attempted change if the JSON does not properly validate once you save and exit the editor.\n\nThe following is an example of the minimum attributes that can be used to deploy an environment:\n\n    \"override_attributes\": {\n        \"admin\": {\n            \"password\": \"admin_pass\"\n        },\n        \"network\": {\n            \"public_interface\": \"eth1\",\n            \"private_interface\": \"eth0\"\n        },\n        \"neutron\": {\n            \"db\": {\n                \"password\": \"my_neutron_pass\"\n            },\n            \"softlayer_public_portable\": \"XX.XX.XX.XX/YY\",\n            \"softlayer_private_portable\": \"AA.AA.AA.AA/BB\"\n        },\n        \"nova\": {\n            \"db\": {\n                \"password\": \"my_nova_pass\"\n            }\n        },\n        \"glance\": {\n            \"db\": {\n                \"password\": \"my_glance_pass\"\n            }\n        },\n        \"keystone\": {\n            \"db\": {\n                \"password\": \"my_keystone_pass\"\n            }\n        },\n        \"cinder\": {\n            \"db\": {\n                \"password\": \"my_cinder_pass\"\n            }\n        }\n    }\n\n**SoftLayer public and private portable blocks are ordered separately through the SoftLayer website.**\n\nInstallation Overview\n---------------------\nThe instructions below provide a general overview of steps you will perform to install an OpenStack environment with SoftLayer Private Cloud. It demonstrates a typical OpenStack installation, and includes additional information about customizing or modifying your installation. Generally, your installation will follow these steps, with more details outlined in the other sections below.\n\n1.  Configure a bootstrap script with the hardware servers and/or cloud compute instances (CCIs) that you wish to bootstrap with Chef. Ensure you substitute the proper FQDN/IP, user account with sudo access, the path to that user's private key to log in to the server, as well as the Chef Server environment in which the server resides. In this example, these are represented with FQDN, USER, and ENVIRONMENT, respectively.\n\n        knife bootstrap FQDN -x USER --sudo -i /home/USER/.ssh/id_rsa -E ENVIRONMENT\n\n2.  Edit the role information for each server and role. In this case, since Chef Server will know the FQDN of each server, you can simply use the FQDN rather than providing an IP as you may have done in step 1.\n\n        knife node run_list add FQDN 'recipe[chef-openstack::controller]'\n\n3.  Run the bootstrap script you've just created to prepare each server with the `chef-client` utility.\n\n4.  Run the `chef-client` program on each server to start installation. Servers should be chef'ed in this order:\n    * MySQL recipes\n    * RabbitMQ recipes\n    * Keystone recipes\n    * Controller recipes\n    * Any remaining recipes\n\nStep-by-step Install\n--------------------\n### Install Chef Server ###\nThis installation is not outlined here. Please follow the Opscode installation guide for Chef Server at http://docs.opscode.com/install_server.html.\n\n### Bootstrap the servers ###\nThere are two choices when bootstrapping servers. SoftLayer has provided an example script that can be edited for your needs, or you can manually bootstrap them on your own by following a chef-client install guide or installing chef-client on your own. It is recommended to use the sample bootstrap script.\n\nEdit the script with each hardware server you would like to include in the OpenStack installation. It is highly recommended that at least three servers be used—one as the controller, one as a network server, and one as a compute server. After the bootstrap process completes, the script will assign one or more OpenStack recipes to the hardware servers.  A three-server bootstrap example script is shown below.\n\n\t#!/bin/bash\n\tknife bootstrap controller.example.com -x innovation --sudo -i /home/USER/.ssh/id_rsa -E MyOpenStack\n\tknife bootstrap network.example.com -x innovation --sudo -i /home/USER/.ssh/id_rsa -E MyOpenStack\n\tknife bootstrap compute.example.com -x innovation --sudo -i /home/USER/.ssh/id_rsa -E MyOpenStack\n\t\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::mysql-glance]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::mysql-cinder]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::mysql-keystone]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::mysql-nova]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::mysql-neutron]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::rabbitmq-server]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::keystone]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::controller]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::cinder]'\n\tknife node run_list add controller.example.com 'recipe[chef-openstack::glance]'\n\tknife node run_list add network.example.com 'recipe[chef-openstack::neutron-network]'\n\tknife node run_list add compute.example.com 'recipe[chef-openstack::nova-kvm]'\n\n### Run `chef-client` on the servers  ###\nOpenStack makes use of several other open sources projects.  As such, it depends on them to be available before the deployment of core OpenStack services.  \n\nServers should be chef'ed in this order:\n\n* All MySQL recipes\n* RabbitMQ recipes\n* Keystone recipes\n* Controller recipes\n* Any remaining recipes\n\n\t\t\n\t\tuser@controller:~$ sudo chef-client\n\t\tStarting Chef Client, version 11.4.4\n\t\tresolving cookbooks for run list: [\"chef-openstack::mysql-glance\", \"chef-openstack::mysql-cinder\", \"chef-\n\t\topenstack::mysql-keystone\", \"chef-openstack::mysql-nova\", \"chef-openstack::mysql-neutron\", \"chef-\n\t\topenstack::rabbitmq-server\", \"chef-openstack::keystone\", \"chef-openstack::controller\", \"chef-\n\t\topenstack::cinder\", \"chef-openstack::glance\"]\n\t\t...\n\t\t...\n\n\n### Verify Installation ###\nRun the following commands on the controller to check if OpenStack has been deployed and is running correctly:\n\nRun `source ~/.openrc` to update your environment so you can use the OpenStack command line tools. The .openrc file is located at /root/.openrc.\n\nYou may wish to add `source .openrc` to your `.bash_profile` file so that the CLI variables are set each time you log in:\n\n    root@controller:~# echo \"source ~/.openrc\" \u003e\u003e ~/.bash_profile\n\n    root@controller:~# source ~/.openrc\n\n    root@controller:~# nova-manage service list\n    Binary            Host                   Zone      Status   State  Updated_At\n    nova-cert         controller.example.com  internal  enabled  :-)    2013-09-17 15:21:29\n    nova-scheduler    controller.example.com  internal  enabled  :-)    2013-09-17 15:21:29\n    nova-conductor    controller.example.com  internal  enabled  :-)    2013-09-17 15:21:29\n    nova-consoleauth  controller.example.com  internal  enabled  :-)    2013-09-17 15:21:30\n    nova-compute      compute.example.com     nova      enabled  :-)    2013-09-17 15:21:23\n\n    root@controller:~# neutron agent-list\n    +--------------------------------------+--------------------+-----------------------+-------+----------------+\n    | id                                   | agent_type         | host                  | alive | admin_state_up |\n    +--------------------------------------+--------------------+-----------------------+-------+----------------+\n    | 438d2dd2-daf3-496c-99ad-179ed307b8d6 | Open vSwitch agent | compute.example.com   | :-)   | True           |\n    | 4c684b66-16db-4853-8cb3-51098c3752b3 | L3 agent           | network.example.com   | :-)   | True           |\n    | 98c3d818-0ebe-4cd6-89bf-0f107a7532ab | DHCP agent         | network.example.com   | :-)   | True           |\n    | dd3b9134-ab76-440a-ba7a-70135202eb82 | Open vSwitch agent | network.example.com   | :-)   | True           |\n    +--------------------------------------+--------------------+-----------------------+-------+----------------+\n\nServices will have a `:-)` if they are working correctly and `XX` if they are not.\n\nAuthors\n-------\n\nPaul Sroufe ([psroufe@softlayer.com](mailto:psroufe@softlayer.com \"Paul Sroufe\"))  \nBrian Cline ([bcline@softlayer.com](mailto:bcline@softlayer.com \"Brian Cline\"))  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlayer%2Fchef-openstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftlayer%2Fchef-openstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlayer%2Fchef-openstack/lists"}