Skip to content

Commit 3b9d888

Browse files
committed
Merge pull request #6 from perfectsine/v4update
v0.3.4 merged.
2 parents df0f260 + 047a168 commit 3b9d888

40 files changed

Lines changed: 387 additions & 592 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG for OpenStack Havana recipes
22

3+
## 0.3.4
4+
5+
* Removed roles from cookbook, recipes are now used in place
6+
* Added dependecies in recipes
7+
* Big updates to the READMEs check them out!
8+
* Updated Vagrant script to work with new cookbook
9+
310
## 0.3.3:
411

512
* Updated readme

README.md

Lines changed: 80 additions & 333 deletions
Large diffs are not rendered by default.

attributes/README.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
2+
Required Attributes
3+
-------------------
4+
These attributes must be overridden through a an [environment](http://docs.opscode.com/essentials_environments.html "Chef Environments") for each deployment.
5+
6+
* `['admin']['password']` - The password that is used throughout OpenStack to connect all the services together. This password is also applied on the demo and reseller test accounts.
7+
* `['network']['private_interface']` - The interface that is for a local (backend) network access. (SoftLayer default: eth0 or bond0)
8+
* `['network']['public_interface']` - The public network interface where API requests and the dashboard are accessible (SoftLayer default: eth1 or bond1)
9+
* `['neutron']['softlayer_private_portable']` - Must be included by the customer during ordering, and must be routed to the same VLAN as the compute and network nodes.
10+
* `['neutron']['softlayer_public_portable']` - Must be purchased by the customer during ordering, and must be routed to the same VLAN as the compute and network nodes. This block is attached to the OpenStack L3 router to provide NAT to Neutron networks connected to the public router. Must be at least a /30 to be compatible with the current OpenStack configuration.
11+
* `['neutron']['db']['password']` - The Neutron database password (different from the MySQL root password)
12+
* `['nova']['db']['password']` - The Nova database password (different from the MySQL root password)
13+
* `['glance']['db']['password']` - The Glance database password (different from the MySQL root password)
14+
* `['keystone']['db']['password']` - The Keystone database password (different from the MySQL root password)
15+
* `['cinder']['db']['password']` - The Cinder database password (different from the MySQL root password)
16+
17+
18+
Additional Attributes
19+
---------------------
20+
Configuration settings of core OpenStack services are in the `attributes/` directory. Default values can be found for Nova, Neutron, Keystone, Cinder, and Glance in their respective attribute files. In conjunction with the set\_attributes and set\_cloundnetwork recipes, all the configuration file settings are filled in based on SoftLayer hardware.
21+
22+
OpenStack neutron network defaults are also found in `attributes/neutron.rb` near the bottom. The portable blocks ordered must match the VLAN of the neutron and compute nodes.
23+
24+
For testing purposes, default values are provided for all attributes except `node['neutron']['network']['softlayer_private_portable']` and `node['neutron']['network']['softlayer_public_portable']`.
25+
26+
##### Setting up your OpenStack cloud #####
27+
The chef recipes need to know where the services are being deployed. This is done through the set\_cloudnetwork.rb recipe and partial_search cookbook. The recipe uses a key-pair hash to associate roles with variables throughout the rest of the chef deployment. You can change the name of the roles in `attributes/default.rb`.
28+
29+
* `node['admin']['cloud_network']['roles']` - (*Only edit if you have reason to change them*) Edit only the role names as the keys are referenced by other recipes and all the keys need to have an associated role.
30+
31+
### Nova ###
32+
* `node['nova']['debug']` - Set debug mode for Nova services
33+
* `node['nova']['verbose']` - Set verbose logging mode for Nova services
34+
35+
* `node['nova']['db']['name']` - Name of Nova database
36+
* `node['nova']['db']['username']` - Database username for Nova
37+
* `node['nova']['db']['password']` - Database password for Nova
38+
39+
* `node['nova']['config']['cpu_allocation_ratio']` - Overprovisioning factor for virtual CPU allocation
40+
* `node['nova']['config']['ram_allocation_ratio']` - Overprovisioning factor for RAM allocation
41+
* `node['nova']['config']['disk_allocation_ratio']` - Overprovisioning factor disk allocation
42+
43+
* `node['nova']['config']['force_config_drive']` - Set to use a config drive for instance metadata (Default: true)
44+
* `node['nova']['config']['novnc_enable']` - Set to enable access to the noVNC console for instances
45+
46+
### Neutron ###
47+
* `node['neutron']['config']['debug']` - Set debug mode for Neutron services
48+
* `node['neutron']['config']['verbose']` - Set verbose logging mode for Neutron services
49+
50+
* `node['neutron']['db']['name']` - Name of Neutron database
51+
* `node['neutron']['db']['username']` - Database username for Neutron
52+
* `node['neutron']['db']['password']` - Database password for Neutron
53+
54+
* `node['neutron']['service_tenant_name']` - Keystone tenant name for Neutron services
55+
* `node['neutron']['service_user']` - Keystone user name for Neutron services
56+
57+
* `node['neutron']['config']['bind_host']` - IP to listen on (default: 0.0.0.0)
58+
* `node['neutron']['config']['bind_port']` - Port to listen on (default: 9696)
59+
60+
* `node['neutron']['config']['quota_network']` - Maximum Neutron networks each tenant can create
61+
* `node['neutron']['config']['quota_subnet']` - Maximum Neutron subnets each tenant can create
62+
* `node['neutron']['config']['quota_port']` - Maximum number of Neutron ports each tenant can create. Ports mimic switch ports in that they connect various devices on a Neutron network (e.g., routers, load balancers, DHCP servers, instances).
63+
* `node['neutron']['config']['quota_security_group']` - Maximum number of security groups each tenant can create
64+
* `node['neutron']['config']['quota_security_group_rule']` - Maximum number of security group rules each tenant can create
65+
66+
* `node['neutron']['dhcp_agent']['enable_isolated_metadata']` - Allow metadata to be connected to isolated networks (e.g., when no L3 router attached)
67+
68+
* `node['neutron']['metadata_agent']['metadata_proxy_shared_secret']` - Password for metadata exchange between Neutron's metadata proxy and Nova's metadata service
69+
70+
#### Neutron Network Setup ####
71+
It is not recommended to change the physical network configuration unless you have some experience with OpenStack. These networks are specifically configured for SoftLayer hardware and CCIs. You may change other network names without causing any problems.
72+
73+
###### OpenStack GRE Network ######
74+
* `node['neutron']['network']['openstack_network_name']` - Name for the OpenStack GRE network connected to Neutron's primary public router
75+
* `node['neutron']['network']['openstack_subnet_name']` - Name for the associated subnet
76+
* `node['neutron']['network']['openstack_network_cidr']` - CIDR mask of the associated subnet
77+
78+
###### SoftLayer Public Network ######
79+
* `node['neutron']['network']['public_l3_router_name']` - Name for the primary public router which will be attached to the external public network
80+
* `node['neutron']['network']['public_network_name']` - Name for the external network. This network connected to the public interface bridge.
81+
* `node['neutron']['network']['public_subnet_name']` - Name for the associated subnet
82+
* `node['neutron']['network']['public_physical_network_name']` - Name for the interface associated with the public physical network. Be careful changing this.
83+
84+
###### SoftLayer Private Network ######
85+
* `node['neutron']['network']['private_network_name']` - Name for the private SoftLayer network. This network is connected to the private interface bridge.
86+
* `node['neutron']['network']['private_subnet_name']` - Name for the associated subnet
87+
* `node['neutron']['network']['private_physical_network_name']` - Name for the interface associated with the private physical network. Be careful changing this.
88+
89+
###### IP Configuration ######
90+
* `node['neutron']['network']['softlayer_private_network_cidr']` - CIDR mask of SoftLayer's private network (default: 10.0.0.0/8) It is not recommended to change this as it may make the SoftLayer private network unreachable from your instances.
91+
* `node['neutron']['network']['public_nameserver_1']` - Publicly accessible name server 1
92+
* `node['neutron']['network']['public_nameserver_2']` - Publicly accessible name server 2
93+
* `node['neutron']['network']['private_nameserver_1']` - Private network name server 1
94+
* `node['neutron']['network']['private_nameserver_2']` - Private network name server 2
95+
* `node['neutron']['softlayer_private_portable']` - CIDR mask of portable private IP block ordered from SoftLayer
96+
* `node['neutron']['softlayer_public_portable']` - CIDR mask of portable public IP block ordered from SoftLayer
97+
98+
99+
### Cinder ###
100+
* `node['cinder']['db']['name']` - Name of Cinder database
101+
* `node['cinder']['db']['username']` - Database username for Cinder
102+
* `node['cinder']['db']['password']` - Database password for Cinder
103+
104+
* `node['cinder']['service_tenant_name']` - Keystone tenant name for Cinder services
105+
* `node['cinder']['service_user']` - Keystone user name for Cinder services
106+
107+
* `node['cinder']['config']['lvm_disk']` - Physical disk to use for LVM-based volume storage
108+
* `node['cinder']['config']['volume_group']` - Name of the LVM volume group for Cinder volume storage
109+
110+
### Glance ###
111+
* `node['glance']['config']['debug']` - Set debug mode for Glance services
112+
* `node['glance']['config']['verbose']` - Set verbose logging mode for Glance services
113+
114+
* `node['glance']['db']['name']` - Name of Glance database
115+
* `node['glance']['db']['username']` - Database username for Glance
116+
* `node['glance']['db']['password']` - Database password for Glance
117+
118+
* `node['glance']['service_tenant_name']` - Keystone tenant name for Glance services
119+
* `node['glance']['service_user']` - Keystone user name for Glance services
120+
121+
* `node['glance']['config']['bind_host']['api']` - API IP to listen on (default: 0.0.0.0)
122+
* `node['glance']['config']['bind_port']['api']` - API Port to listen on (default: 9292)
123+
* `node['glance']['config']['bind_host']['registry']` - Registry IP to listen on (default: 0.0.0.0)
124+
* `node['glance']['config']['bind_port']['registry']` - Registry Port to listen on (default: 9292)
125+
126+
* `node['glance']['config']['workers']` - Number of Glance API workers to stand up
127+
128+
###### Default Images to Load ######
129+
130+
* `node['glance']['glance_repo_base_url']` - String for the base URL where images are located
131+
* `node['glance']['images']` - Hash of `name` and `image` pairs that Glance will download after installation:
132+
133+
{
134+
"CirrOS 0.3.0 i386" => "cirros-0.3.0-i386-disk.img",
135+
"CirrOS 0.3.0 x86_64" => "cirros-0.3.0-x86_64-disk.img"
136+
}
137+
138+
139+
### Keystone ###
140+
* `node['keystone']['apache_frontend']` - Run Keystone under Apache's mod_wsgi to allow for more concurrent connections (default: true)
141+
* `node['keystone']['config']['debug']` - Set debug mode for Keystone services
142+
* `node['keystone']['config']['verbose']` - Set verbose logging mode for Keystone services
143+
144+
* `node['keystone']['db']['name']` - Name of database for Keystone
145+
* `node['keystone']['db']['username']` - Database username for Keystone
146+
* `node['keystone']['db']['password']` - Database password for Keystone
147+
148+
* `node['keystone']['service_tenant_name']` - Keystone tenant name for Keystone services
149+
* `node['keystone']['service_user']` - Keystone user name for Keystone services
150+
151+
* `node['keystone']['config']['bind_host']` - IP to listen on (default: 0.0.0.0)
152+
* `node['keystone']['config']['public_port']` - Public port to listen on (default: 5000)
153+
* `node['keystone']['config']['admin_port']` - Admin port to listen on (default: 35357)
154+
155+
* `node['keystone']['region_servers']` - Horizon can be populated with your other OpenStack clusters. To do so add keypairs of the region names and their respective IP address location:
156+
157+
{ "region_name" => "XX.XX.XX.XX", "region_name_2" => "XX.XX.XX.YY"}
158+
159+
160+
###### Default Accounts ######
161+
The default accounts are configured based on the OpenStack trunk documentation. Feel free to change them, however the admin, nova, neutron, cinder, and glance user and service user accounts should be created for a proper installation.
162+
163+
* `node['keystone']['default_accounts']['users']` - A hash of hashes that contains the username with its corrisponding email and password info:
164+
165+
{ "admin" => {"email" => "root@localhost", "password" => "passwordsf" } }
166+
167+
* `node['keystone']['default_accounts']['tenants']` - An array with tenant names to create
168+
169+
* `node['keystone']['default_accounts']['roles']` - An array with role names to create
170+
171+
* `node['keystone']['default_accounts']['services']` - A hash of hashes each service's name with its type and description:
172+
173+
{ "nova" => {"type" => "compute", "description" => "OpenStack Compute Service" } }
174+
175+
* `node['keystone']['default_accounts']['user-roles']` - An array of hashes with each user-tenant-role definition to create:
176+
177+
{ "role" => "admin", "user" => "admin", "tenant" => "admin" },

attributes/default.rb

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,18 @@
2828
'time.service.networklayer.com']
2929

3030

31-
# Cloud network setup
32-
# '<variable name>' => '<Chef role name>'
33-
34-
# By default, the MySQL recipes are seperated. If the openstack-mysql-all role
35-
# is used, set_cloudnetwork will set the correct recipe.
36-
37-
default['admin']['cloud_network']['roles'] = {
38-
'controller' => 'openstack-controller',
39-
'network' => 'openstack-network',
40-
'rabbitmq' => 'openstack-rabbitmq',
41-
'keystone' => 'openstack-keystone',
42-
'glance' => 'openstack-glance',
43-
'cinder' => 'openstack-cinder',
44-
'mysqlglance' => 'openstack-mysql-glance',
45-
'mysqlcinder' => 'openstack-mysql-cinder',
46-
'mysqlkeystone' => 'openstack-mysql-keystone',
47-
'mysqlnova' => 'openstack-mysql-nova',
48-
'mysqlneutron' => 'openstack-mysql-neutron'
31+
# Cluster setup
32+
# '<variable name>' => '<chef recipe name>'
33+
default['admin']['cloud_network']['recipes'] = {
34+
'controller' => 'controller',
35+
'network' => 'neutron-network',
36+
'rabbitmq' => 'rabbitmq-server',
37+
'keystone' => 'keystone',
38+
'glance' => 'glance',
39+
'cinder' => 'cinder',
40+
'mysqlglance' => 'mysql-glance',
41+
'mysqlcinder' => 'mysql-cinder',
42+
'mysqlkeystone' => 'mysql-keystone',
43+
'mysqlnova' => 'mysql-nova',
44+
'mysqlneutron' => 'mysql-neutron'
4945
}

bootstrap/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Bootstrapping
2+
-------------
3+
4+
**ATTN roles have been removed in this release. Recipes are now used exclusively to designate OpenStack resources.
5+
6+
Before running `chef-client` on any server make sure that each of the following recipes appear in a server's run\_list of your cluster. This list is checked by the set_cloudnetwork.rb recipe and populates network information about your cluster.
7+
8+
- recipe[chef-openstack::mysql-glance]
9+
- recipe[chef-openstack::mysql-cinder]
10+
- recipe[chef-openstack::mysql-keystone]
11+
- recipe[chef-openstack::mysql-nova]
12+
- recipe[chef-openstack::mysql-neutron]
13+
- recipe[chef-openstack::rabbitmq-server]
14+
- recipe[chef-openstack::keystone]
15+
- recipe[chef-openstack::controller]
16+
- recipe[chef-openstack::cinder]
17+
- recipe[chef-openstack::glance]
18+
- recipe[chef-openstack::neutron-network]
19+
20+
**Don't forget recipe[chef-openstack::nova-kvm]!**
21+
22+
The bootstrap directory contains an example script that uses Chef to clear, boostrap, and assign recipes to individual servers. Once finished, verify that the environment and recipes were set correctly.
23+
24+
MySQL note: When running `chef-client` on each server, it is important to run all MySQL recipes before any other recipe, since many of the OpenStack services depend on MySQL.
25+
26+
### MySQL ###
27+
28+
The OpenStack services are now separated into frontend (e.g., Glance) and backend (e.g., Glance's MySQL server). The recipes are designed to allow all databases to be run from one server, each independently, or any combination thereof. Take advantage of this on large scale deployments. For small scale, simply place all MySQL recipes onto a single server *(perhaps combined with the Controller, Keystone, Cinder, Glance, and Rabbitmq-server recipes)*

bootstrap/bootstrap.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ knife bootstrap openstack10.example.com -x YOUR_USER --sudo -i /home/YOUR_USER/.
1414
knife bootstrap openstack11.example.com -x YOUR_USER --sudo -i /home/YOUR_USER/.ssh/id_rsa -E YOUR_REGION
1515
knife bootstrap openstack12.example.com -x YOUR_USER --sudo -i /home/YOUR_USER/.ssh/id_rsa -E YOUR_REGION
1616

17-
knife node run_list add openstack1.example.com 'role[openstack-controller]'
18-
knife node run_list add openstack2.example.com 'role[openstack-compute]'
19-
knife node run_list add openstack3.example.com 'role[openstack-mysql-cinder]'
20-
knife node run_list add openstack4.example.com 'role[openstack-mysql-glance]'
21-
knife node run_list add openstack5.example.com 'role[openstack-mysql-keystone]'
22-
knife node run_list add openstack6.example.com 'role[openstack-mysql-neutron]'
23-
knife node run_list add openstack7.example.com 'role[openstack-mysql-nova]'
24-
knife node run_list add openstack8.example.com 'role[openstack-network]'
25-
knife node run_list add openstack9.example.com 'role[openstack-rabbitmq]'
26-
knife node run_list add openstack10.example.com 'role[openstack-cinder]'
27-
knife node run_list add openstack11.example.com 'role[openstack-keystone]'
28-
knife node run_list add openstack12.example.com 'role[openstack-glance]'
17+
knife node run_list add openstack1.example.com 'recipe[chef-openstack::mysql-glance]'
18+
knife node run_list add openstack2.example.com 'recipe[chef-openstack::mysql-cinder]'
19+
knife node run_list add openstack3.example.com 'recipe[chef-openstack::mysql-keystone]'
20+
knife node run_list add openstack4.example.com 'recipe[chef-openstack::mysql-nova]'
21+
knife node run_list add openstack5.example.com 'recipe[chef-openstack::mysql-neutron]'
22+
knife node run_list add openstack6.example.com 'recipe[chef-openstack::rabbitmq-server]'
23+
knife node run_list add openstack7.example.com 'recipe[chef-openstack::keystone]'
24+
knife node run_list add openstack8.example.com 'recipe[chef-openstack::controller]'
25+
knife node run_list add openstack9.example.com 'recipe[chef-openstack::cinder]'
26+
knife node run_list add openstack10.example.com 'recipe[chef-openstack::glance]'
27+
knife node run_list add openstack11.example.com 'recipe[chef-openstack::neutron-network]'
28+
knife node run_list add openstack12.example.com 'recipe[chef-openstack::nova-kvm]'

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
description 'Installs and configures an OpenStack Havana cluster'
66
supports 'ubuntu', '= 12.04'
77
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
8-
version '0.3.3'
8+
version '0.3.4'
99
depends 'partial_search'
1010
depends 'mysql'
1111
depends 'ntp'

recipes/apparmor.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

recipes/cinder.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_recipe 'chef-openstack::common'
2+
13
packages = %w[cinder-api
24
cinder-scheduler
35
cinder-volume

recipes/common.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include_recipe 'chef-openstack::set_attributes'
2+
include_recipe 'chef-openstack::set_cloudnetwork'
3+
include_recipe 'chef-openstack::ip_forwarding'
4+
include_recipe 'ntp'
5+
include_recipe 'chef-openstack::repositories'

0 commit comments

Comments
 (0)