-
Install knife-rackspace with
gem install knife-rackspaceor justbundle installfrom the root directory of your deis repository:$ cd $HOME/projects/deis $ gem install knife-rackspace Fetching: knife-rackspace-0.9.0.gem (100%) Successfully installed knife-rackspace-0.9.0 1 gem installed Installing ri documentation for knife-rackspace-0.9.0... Installing RDoc documentation for knife-rackspace-0.9.0...
-
Export your Rackspace credentials as environment variables and edit knife.rb to read them:
$ cat <<'EOF' >> $HOME/.bash_profile export RACKSPACE_USERNAME=<your_rackspace_username> export RACKSPACE_API_KEY=<your_rackspace_api_key> source $HOME/.rackspacerc EOF $ cat <<'EOF' > $HOME/.rackspacerc export OS_AUTH_URL="https://identity.api.rackspacecloud.com/v2.0/" export OS_USERNAME=$RACKSPACE_USERNAME export OS_PASSWORD=$RACKSPACE_API_KEY export OS_TENANT_NAME=$RACKSPACE_USERNAME export OS_TENANT_ID=<your_rackspace_tenant_id> export OS_REGION_NAME=<your_rackspace_region_name> export OS_AUTH_SYSTEM="rackspace" EOF $ source $HOME/.bash_profile $ source $HOME/.rackspacerc $ cat <<'EOF' >> $HOME/.chef/knife.rb knife[:rackspace_api_username] = "#{ENV['RACKSPACE_USERNAME']}" knife[:rackspace_api_key] = "#{ENV['RACKSPACE_API_KEY']}" knife[:rackspace_ssh_keypair] = "deis" knife[:rackspace_region] = #{ENV['OS_REGION_NAME']} EOF $ knife rackspace server list Instance ID Name Public IP Private IP Flavor Image State
-
Now you can follow the standard deis setup:
bundle install # Installs gem files like the knife tool
berks install # Downloads the relevant cookbooks
# '--ssl-verify' is only needed when using a self-hosted Chef Server
# hint: you can also set that at $HOME/.berkshelf/config.json
berks upload [--ssl-verify=false] # Upload the cookbooks to the Chef Server-
Prepare a new server
-
Create a server named
deis-prepare-imageusing the Ubuntu 12.04 LTS image, performance1-2, 1GB performance server -
SSH in as root with the password shown
-
Install the 3.11 kernel with:
apt-get update && apt-get install -yq linux-image-generic-lts-saucy linux-headers-generic-lts-saucy && reboot -
After reboot is complete, SSH back in as root and
uname -rto confirm kernel is3.11.0-17-generic -
Run the
prepare-node-image.shscript to optimize the image for fast boot times$ ssh root@ip-address 'bash -s' < contrib/rackspace/prepare-node-image.sh Reading package lists... Done Building dependency tree Reading state information... Done ...
-
-
Create a new image from the
deis-prepare-imageserver nameddeis-node-image.- In the server list in the Control Panel click the action cog for
deis-prepare-image - Select "Create New Image" name that image
deis-node-image - (optionally) Distribute the image to other regions
- (optionally) Create/update your Deis flavors to use your new images
- In the server list in the Control Panel click the action cog for
-
Make sure to add the
deis-controllerand the<your_username>-validatorusernames to the Chef 'admins' group.- If you are using hosted Chef, you may need to use the older console to do this: https://manage.opscode.com/groups/admins/edit
-
Back on your machine with deis cloned and the deis CLI installed, run the provisioning script to create a new Deis controller:
-
Change
<region>to match the region your image is in (we will add SYD and HKG as soon as performance flavors are available there):- dfw
- ord
- iad
- lon
$ cd deis $ bundle install # if you have not already done so $ ./contrib/rackspace/provision-rackspace-controller.sh <region> Provisioning a deis controller on Rackspace... Creating new SSH key: id_rsa + ssh-keygen -f /home/deis/.ssh/id_rsa -t rsa -N '' -C deis + set +x Saved to /home/deis/.ssh/id_rsa Created data_bag[deis-formations] Created data_bag[deis-apps] Provisioning deis-controller-H7WVl with knife rackspace... + 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]' Instance ID: cf7aeadd-4bb1-4f69-9238-7a0586a863b9 Name: deis-controller-H7WVl Flavor: 2 GB Performance Image: deis-node-image Metadata: [ <Fog::Compute::RackspaceV2::Metadatum key="Name", value="deis-controller-H7WVl" >] RackConnect Wait: no ServiceLevel Wait: no SSH Key: deis ...
-