Skip to content

Commit

Permalink
Merge pull request #42 from kramvan1/multi-updates
Browse files Browse the repository at this point in the history
Multi_Nova updates to help with interface setup
  • Loading branch information
kramvan1 committed Feb 26, 2015
2 parents 4a74016 + fa98a7f commit c384065
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 16 deletions.
42 changes: 30 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,31 @@ Support for CentOS 6.5 and Ubuntu 12 with Icehouse is available with the stable/
```shell
$ git clone https://github.com/jjasghar/chef-openstack-testing-stack.git testing-stack
$ cd testing-stack
$ vi vagrant_linux.rb # change the 'vm.box' to the box you'd like to run.
$ vi vagrant_linux.rb # change the 'vm.box' to the openstack platform you'd like to run.
$ chef exec rake berks_vendor
$ chef exec ruby -e "require 'openssl'; File.binwrite('.chef/validator.pem', OpenSSL::PKey::RSA.new(2048).to_pem)"
```

The stackforge OpenStack cookbooks by default use databags for configuring passwords. There are four
data_bags : *user_passwords*, *db_passwords*, *service_passwords*, *secrets*. I have a already created
the `data_bags/` directory, so you shouldn't need to make them, if you do something's broken.
See [Databag](#Databags) section below for more details.

You may also need to change the networking options around the `aio-nova.rb`, `aio-neutron.rb`, `multi-nova.rb` or `multi-neutron.rb`
files. I wrote this on my MacBook Pro with an `en0` you're mileage may vary.

**NOTE**: If you are running Ubuntu 14.04 LTS and as your base compute machine, you should note that the shipped
**NOTE**: If you are running Ubuntu 14.04 LTS and as your **base** compute machine, you should note that the shipped
kernel `3.13.0-24-generic` has networking issues, and the best way to resolve this is
via: `apt-get install linux-image-generic-lts-utopic`. This will install at least `3.16.0` from the Utopic hardware enablement.

## Supported Environments

* All in One
* Nova networking
* Neutron networking
* Multi-Node
* Nova networking
* Nuetron networking

For each environment, there's a corresponding readme file in the doc directory. Please review that for specific details and additional setup that might be required before deploying the cloud.

## Rake Deploy Commands

These commands will spin up various OpenStack cluster configurations, the simplest being the all-in-one controller with Nova networking.
Expand All @@ -47,13 +56,6 @@ $ chef exec rake multi_neutron # Multi-Neutron Controller and 3 Compute nodes
$ chef exec rake multi_nova # Multi-Nova-networking Controller and 3 Compute nodes
```

If you spin up one of the multi-node builds, you'll have four machines `controller`,`compute1`,`compute2`, and `compute3`. They all live on the
`192.168.100.x` network so keep that in mind. If you'd like to take this and change it around, whatever you decide your controller
node to be change anything that has the `192.168.100.60` address to that.

NOTE: We also have plans to split out the `multi-neutron-network-node` cluster also so the network node is it's own machine.
This is also `still not complete`.

### Access the Controller

```bash
Expand Down Expand Up @@ -189,8 +191,24 @@ When using this on a Windows platform, here are some tweaks to make this work.

## TODOs

- Better instructions for multi-node network setup
- Better support for aio_neutron and muilt node tests
- Support for floating ip's
- Split out the `multi-neutron-network-node` cluster also so the network node is it's own machine
- Support for swift multi node test
- Easier debugging. Maybe a script to pull the logs from the controller.
- More automated verification testing. Tie into some amount of [tempest](https://github.com/openstack/tempest) or [refstack](https://wiki.openstack.org/wiki/RefStack)? for basic cluster testing.

# License #

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
3 changes: 3 additions & 0 deletions doc/aio-neutron.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# All in One with Neutron networking

The defaults in the aio-neutron.rb and the environments/vagrant-aio-neutron.json should work without any changes.
3 changes: 3 additions & 0 deletions doc/aio-nova.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# All in One with Nova networking

The defaults in the aio-nova.rb and the environments/vagrant-aio-nova.json should work without any changes.
44 changes: 44 additions & 0 deletions doc/databags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Databags

Some basic information about the use of databags within this repo.

```
# Show the list of databags
$ chef exec knife data bag list -z
db_passwords
secrets
service_passwords
user_passwords
# Show the list of databag items
$ chef exec knife data bag show db_passwords -z
ceilometer
cinder
dash
glance
heat
horizon
keystone
neutron
nova
# Show contents of databag item
$ chef exec knife data bag show db_passwords ceilometer -z
Encrypted data bag detected, decrypting with provided secret.
ceilometer: mypass
id: ceilometer
# Update contents of databag item
# set EDITOR env var to your editor, for powershell, I used nano
$ chef exec knife data bag edit secrets dispersion_auth_user -z
```

## Databag Default Values
db_passwords are set to "mypass"
secrets are set to "<key>_token"
service_passwords are set to "mypass"
user_passwords are set to "mypass"

## Default Databag Secret
The default secret is stored here .chef\encrypted_data_bag_secret
and referenced by .chef\knife.rb.
3 changes: 3 additions & 0 deletions doc/multi-neutron.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Multi node with Nuetron networking

todo ...
23 changes: 23 additions & 0 deletions doc/multi-nova.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Multi node with Nova networking

## Nodes

The multi-node environments will have four machines `controller`,`compute1`,`compute2`, and `compute3`.

## Networking setup

Changes need to be made to the multi-nova.rb and the environments\vagrant-multi-nova.json file.

### Bridge IP Address

The ip address used for the bridge should on the same network as your machine connects to the internet. Change the '172.16.100.' ip address in the multi-nova.rb and the environments\vagrant-multi-nova.json files.
For example, on my home network, my laptop as and ip of 192.168.1.xxx, so I set the bridge address to 192.168.1.60.

### Device interface

The device interface must be is specified by name in the multi-nova.rb file.
There are two places to change, look for `<put your interface device name here>`.

+ For Windows 7, open the Control Panel, Network and Internet, Network Connections. Look in the Connectivity column for a row with "Internet access", and use the "Device Name". For example, 'Intel(R) Centrino(R) Advanced-N 6205'.
+ For Mac, this works from some: 'en0: Wi-Fi (AirPort)'
+ For Linux, ...TODO...
6 changes: 2 additions & 4 deletions multi-nova.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.network "public_network", ip: "172.16.100.60",
bridge: 'en0: Wi-Fi (AirPort)'
config.vm.network "private_network", ip: "192.168.200.60"
bridge: '<put your interface device name here>'
ENDCONFIG

machine 'controller' do
Expand Down Expand Up @@ -47,8 +46,7 @@
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.network "public_network", ip: "172.16.100.#{ip_suff}",
bridge: 'en0: Wi-Fi (AirPort)'
config.vm.network "private_network", ip: "192.168.200.#{ip_suff}"
bridge: '<put your interface device name here>'
ENDCONFIG
role 'os-compute-worker'
# if you would like to use centos7 you'll need to use 'vagrant-multi-centos7-nova' for the environment
Expand Down

0 comments on commit c384065

Please sign in to comment.