|
1 | 1 | # Provision a Deis Cluster on Rackspace |
2 | 2 |
|
3 | | -We'll mostly be following the [CoreOS on Rackspace](https://coreos.com/docs/running-coreos/cloud-providers/rackspace/) guide. You'll need to have a sane python environment with pip already installed (`sudo easy_install pip`). |
4 | | - |
5 | | -### Install supernova and its dependencies: |
6 | | -```console |
7 | | -$ sudo pip install keyring |
8 | | -$ sudo pip install rackspace-novaclient |
9 | | -$ sudo pip install supernova |
10 | | -``` |
11 | | - |
12 | | -### Configure supernova |
13 | | -Edit `~/.supernova` to match the following: |
14 | | -``` |
15 | | -[production] |
16 | | -OS_AUTH_URL = https://identity.api.rackspacecloud.com/v2.0/ |
17 | | -OS_USERNAME = {rackspace_username} |
18 | | -OS_PASSWORD = {rackspace_api_key} |
19 | | -OS_TENANT_NAME = {rackspace_account_id} |
20 | | -OS_REGION_NAME = DFW (or ORD or another region) |
21 | | -OS_AUTH_SYSTEM = rackspace |
22 | | -``` |
23 | | - |
24 | | -Your account ID is displayed in the upper right-hand corner of the cloud control panel UI, and your API key can be found on the Account Settings page. |
25 | | - |
26 | | -### Set up your keys |
27 | | -Choose an existing keypair or generate a new one, if desired. Tell supernova about the key pair and give it an identifiable name: |
28 | | - |
29 | | -```console |
30 | | -$ supernova production keypair-add --pub-key ~/.ssh/deis.pub deis-key |
31 | | -``` |
32 | | - |
33 | | -### Customize user-data |
34 | | - |
35 | | -Create a user-data file with a new discovery URL this way: |
36 | | - |
37 | | -```console |
38 | | -$ make discovery-url |
39 | | -``` |
40 | | - |
41 | | -Or copy [`contrib/coreos/user-data.example`](../coreos/user-data.example) to `contrib/coreos/user-data` and follow the directions in the `etcd:` section to add a unique discovery URL. |
42 | | - |
43 | | -### Choose number of instances |
44 | | -By default, the provision script will provision 3 servers. You can override this by setting `DEIS_NUM_INSTANCES`: |
45 | | -```console |
46 | | -$ DEIS_NUM_INSTANCES=5 ./provision-rackspace-cluster.sh deis-key |
47 | | -``` |
48 | | - |
49 | | -Note that for scheduling to work properly, clusters must consist of at least 3 nodes and always have an odd number of members. |
50 | | -For more information, see [optimal etcd cluster size](https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md). |
51 | | - |
52 | | -Deis clusters of less than 3 nodes are unsupported. |
53 | | - |
54 | | -### Run the provision script |
55 | | -Run the [Rackspace provision script](provision-rackspace-cluster.sh) to spawn a new CoreOS cluster. |
56 | | -You'll need to provide the name of the key pair you just added. Optionally, you can also specify a flavor name. |
57 | | -```console |
58 | | -$ cd contrib/rackspace |
59 | | -$ ./provision-rackspace-cluster.sh |
60 | | -Usage: provision-rackspace-cluster.sh <key pair name> [flavor] |
61 | | -$ ./provision-rackspace-cluster.sh deis-key |
62 | | -``` |
63 | | - |
64 | | -## Configure Deis |
65 | | -Set the default domain used to anchor your applications: |
66 | | - |
67 | | -```console |
68 | | -$ deisctl config platform set domain=mycluster.local |
69 | | -``` |
70 | | - |
71 | | -For this to work, you'll need to configure DNS records so you can access applications hosted on Deis. See [Configuring DNS](http://docs.deis.io/en/latest/managing_deis/configure-dns/#dns-records) for details. |
72 | | - |
73 | | -If you want to allow `deis run` for one-off admin commands, you must provide an SSH private key that allows Deis to gather container logs on CoreOS hosts: |
74 | | - |
75 | | -```console |
76 | | -$ deisctl config platform set sshPrivateKey=<path-to-private-key> |
77 | | -``` |
78 | | - |
79 | | -### Initialize the cluster |
80 | | -Once the cluster is up, get the hostname of any of the machines from Rackspace, set |
81 | | -DEISCTL_TUNNEL and install the platform: |
82 | | -```console |
83 | | -$ export DEISCTL_TUNNEL=23.253.219.94 |
84 | | -$ deisctl install platform && deisctl start platform |
85 | | -``` |
86 | | - |
87 | | -The installer will deploy Deis and make sure the services start properly. |
88 | | - |
89 | | -### Choose number of routers |
90 | | -By default, `deisctl` will provision 1 router. You can override this by scaling up: |
91 | | -```console |
92 | | -$ deisctl scale router=2 |
93 | | -``` |
94 | | - |
95 | | -### Configure DNS |
96 | | -You'll need to configure DNS records so you can access applications hosted on Deis. See [Configuring DNS](http://docs.deis.io/en/latest/managing_deis/configure-dns/#dns-records) for details. |
97 | | - |
98 | | -### Configure Load Balancer |
99 | | -You'll need to create two load balancers on Rackspace to handle your cluster. |
100 | | - |
101 | | - Load Balancer 1 |
102 | | - Port 80 |
103 | | - Protocol HTTP |
104 | | - Health Monitoring - |
105 | | - Monitor Type HTTP |
106 | | - HTTP Path /health-check |
107 | | - |
108 | | - Load Balancer 2 |
109 | | - Virtual IP Shared VIP on Another Load Balancer (select Load Balancer 1) |
110 | | - Port 2222 |
111 | | - Protocol TCP |
112 | | - |
113 | | -### Use Deis! |
114 | | -After that, register with Deis! |
115 | | -```console |
116 | | -$ deis register http://deis.example.org |
117 | | -username: deis |
118 | | -password: |
119 | | -password (confirm): |
120 | | -email: info@opdemand.com |
121 | | -``` |
122 | | - |
123 | | -## Hack on Deis |
124 | | - |
125 | | -See [Hacking on Deis](http://docs.deis.io/en/latest/contributing/hacking/). |
| 3 | +Please refer to the instructions at http://docs.deis.io/en/latest/installing_deis/rackspace/. |
0 commit comments