Skip to content

Commit 7df9fcb

Browse files
author
Matthew Fisher
committed
update Rackspace readme docs
1 parent 196f996 commit 7df9fcb

1 file changed

Lines changed: 55 additions & 26 deletions

File tree

contrib/rackspace/README.md

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,75 @@ Provision a Deis Controller on Rackspace
66
```console
77
$ cd $HOME/projects/deis
88
$ gem install knife-rackspace
9-
Fetching: knife-rackspace-0.8.1.gem (100%)
10-
Successfully installed knife-rackspace-0.8.1
9+
Fetching: knife-rackspace-0.9.0.gem (100%)
10+
Successfully installed knife-rackspace-0.9.0
1111
1 gem installed
12-
Installing ri documentation for knife-rackspace-0.8.1...
13-
Installing RDoc documentation for knife-rackspace-0.8.1...
12+
Installing ri documentation for knife-rackspace-0.9.0...
13+
Installing RDoc documentation for knife-rackspace-0.9.0...
1414
```
1515

16-
1. Export your Rackspace credentials as environment variables and edit knife.rb to read them:
16+
2. Export your Rackspace credentials as environment variables and edit knife.rb to read them:
1717

1818
```console
1919
$ cat <<'EOF' >> $HOME/.bash_profile
2020
export RACKSPACE_USERNAME=<your_rackspace_username>
2121
export RACKSPACE_API_KEY=<your_rackspace_api_key>
2222
EOF
23+
$ cat <<'EOF' > $HOME/.rackspacerc
24+
export OS_AUTH_URL="https://identity.api.rackspacecloud.com/v2.0/"
25+
export OS_USERNAME=$RACKSPACE_USERNAME
26+
export OS_PASSWORD=$RACKSPACE_API_KEY
27+
export OS_TENANT_NAME=$RACKSPACE_USERNAME
28+
export OS_TENANT_ID=<your_rackspace_tenant_id>
29+
export OS_REGION_NAME=<your_rackspace_region_name>
30+
export OS_AUTH_SYSTEM="rackspace"
31+
EOF
2332
$ source $HOME/.bash_profile
33+
$ source $HOME/.rackspacerc
2434
$ cat <<'EOF' >> $HOME/.chef/knife.rb
2535
knife[:rackspace_api_username] = "#{ENV['RACKSPACE_USERNAME']}"
2636
knife[:rackspace_api_key] = "#{ENV['RACKSPACE_API_KEY']}"
37+
knife[:rackspace_ssh_keypair] = "deis"
38+
knife[:rackspace_region] = #{ENV['OS_REGION_NAME']}
2739
EOF
2840
$ knife rackspace server list
2941
Instance ID Name Public IP Private IP Flavor Image State
3042
```
3143

32-
1. Prepare a new server
44+
3. Now you can follow the standard deis setup:
45+
```bash
46+
bundle install # Installs gem files like the knife tool
47+
berks install # Downloads the relevant cookbooks
48+
# '--ssl-verify' is only needed when using a self-hosted Chef Server
49+
# hint: you can also set that at $HOME/.berkshelf/config.json
50+
berks upload [--ssl-verify=false] # Upload the cookbooks to the Chef Server
51+
```
52+
53+
4. Prepare a new server
3354
1. Create a server named `deis-prepare-image` using the Ubuntu 12.04 LTS image, performance1-2, 1GB performance server
34-
1. SSH in as root with the password shown
35-
1. Install the 3.11 kernel with: ```apt-get update && apt-get install -yq linux-image-generic-lts-saucy linux-headers-generic-lts-saucy && reboot```
36-
1. After reboot is complete, SSH back in as root and `uname -r` to confirm kernel is `3.11.0-17-generic`
37-
1. Run the `prepare-controller-image.sh` script to optimize the image for fast boot times
55+
2. SSH in as root with the password shown
56+
3. Install the 3.11 kernel with: ```apt-get update && apt-get install -yq linux-image-generic-lts-saucy linux-headers-generic-lts-saucy && reboot```
57+
4. After reboot is complete, SSH back in as root and `uname -r` to confirm kernel is `3.11.0-17-generic`
58+
5. Run the `prepare-controller-image.sh` script to optimize the image for fast boot times
3859

3960
```console
40-
$ \curl -sSL https://raw2.github.com/opdemand/deis/master/contrib/rackspace/prepare-controller-image.sh | bash
61+
$ ssh root@ip-address 'bash -s' < contrib/rackspace/prepare-node-image.sh
4162
Reading package lists... Done
4263
Building dependency tree
4364
Reading state information... Done
4465
...
4566
```
4667

47-
1. Create a new image from the `deis-prepare-image` server named `deis-node-image`.
68+
5. Create a new image from the `deis-prepare-image` server named `deis-node-image`.
4869
1. In the server list in the Control Panel click the action cog for `deis-prepare-image`
49-
1. Select "Create New Image" name that image `deis-node-image`
50-
1. (optionally) Distribute the image to other regions
51-
1. (optionally) Create/update your Deis flavors to use your new images
70+
2. Select "Create New Image" name that image `deis-node-image`
71+
3. (optionally) Distribute the image to other regions
72+
4. (optionally) Create/update your Deis flavors to use your new images
5273

53-
1. Make sure to add the 'deis-controller' and the '<your_username>-validator' usernames to the Chef 'admins' group.
74+
6. Make sure to add the `deis-controller` and the `<your_username>-validator` usernames to the Chef 'admins' group.
5475
* If you are using hosted Chef, you may need to use the older console to do this: <https://manage.opscode.com/groups/admins/edit>
5576

56-
1. Back on your machine with deis cloned and the deis CLI installed, run the provisioning script to create a new Deis controller:
77+
7. Back on your machine with deis cloned and the deis CLI installed, run the provisioning script to create a new Deis controller:
5778
* Change ```<region>``` to match the region your image is in (we will add SYD and HKG as soon as performance flavors are available there):
5879
* dfw
5980
* ord
@@ -62,20 +83,28 @@ Provision a Deis Controller on Rackspace
6283

6384
```console
6485
$ cd deis
65-
$ ./bundle install # if you have not already done so
86+
$ bundle install # if you have not already done so
6687
$ ./contrib/rackspace/provision-rackspace-controller.sh <region>
6788
Provisioning a deis controller on Rackspace...
68-
Creating new SSH key: deis-controller
69-
+ ssh-keygen -f /home/myuser/.ssh/deis-controller -t rsa -N '' -C deis-controller
89+
Creating new SSH key: id_rsa
90+
+ ssh-keygen -f /home/deis/.ssh/id_rsa -t rsa -N '' -C deis
7091
+ set +x
71-
Saved to /home/myuser/.ssh/deis-controller
92+
Saved to /home/deis/.ssh/id_rsa
7293
Created data_bag[deis-formations]
7394
Created data_bag[deis-apps]
74-
Provisioning deis-controller with knife rackspace...
75-
+ knife rackspace server create -y --server-create-timeout 1200 --server-name deis-controller --image 4b7c635d-89e1-44be-a15f-2877b5a660d1 --rackspace-region <region> --flavor 4 --identity-file /home/myuser/.ssh/deis-controller --bootstrap-version 11.4.4 --node-name deis-controller --run-list 'recipe[deis::controller]'
76-
Instance ID: de17ca36-f186-4cdd-8969-4be58e7108ea
77-
Name: deis-controller
78-
Flavor: 2GB Standard Instance
95+
Provisioning deis-controller-H7WVl with knife rackspace...
96+
+ knife rackspace server create --bootstrap-version 11.8.2 --rackspace-region ord --image f569b831-afe5-44f5-85eb-3bf9e1d0d336 --flavor performance1-2 --rackspace-metadata '{"Name": "deis-controller-H7WVl"}' --rackspace-disk-config MANUAL --server-name deis-controller-H7WVl --node-name deis-controller-H7WVl --run-list 'recipe[deis::controller]'
97+
Instance ID: cf7aeadd-4bb1-4f69-9238-7a0586a863b9
98+
Name: deis-controller-H7WVl
99+
Flavor: 2 GB Performance
100+
Image: deis-node-image
101+
Metadata: [ <Fog::Compute::RackspaceV2::Metadatum
102+
key="Name",
103+
value="deis-controller-H7WVl"
104+
>]
105+
RackConnect Wait: no
106+
ServiceLevel Wait: no
107+
SSH Key: deis
79108
...
80109
```
81110

0 commit comments

Comments
 (0)