You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The openstack instructions were a mix of new/old commands and
wouldn't work on a lot of openstack installs.
These documentation and changes to the provisioning script should
allow for more variation in openstack installs.
This has been tested as working against both a Havana and Juno release
of Openstack.
Copy file name to clipboardExpand all lines: contrib/openstack/README.md
+60-25Lines changed: 60 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,32 @@ We greatly appreciate the help!
8
8
Make sure that the following utilities are installed and in your execution path:
9
9
- nova
10
10
- neutron
11
+
- glance
11
12
12
-
### Configure nova
13
+
### Install Deis CLI tools
14
+
15
+
```console
16
+
$ sudo pip install deis
17
+
$ curl -sSL http://deis.io/deisctl/install.sh | sh -s 1.0.1
18
+
$ mv deisctl /usr/local/bin
19
+
$ chmod +x /usr/local/bin/deisctl
20
+
```
21
+
22
+
### Configure openstack
13
23
Create an `openrc.sh` file to match the following:
14
24
```
15
-
[production]
16
-
OS_AUTH_URL = {openstack_auth_url}
17
-
OS_USERNAME = {openstack_username}
18
-
OS_PASSWORD = {openstack_api_key}
19
-
OS_TENANT_ID = {openstack_tenant_id}
20
-
OS_TENANT_NAME = {openstack_tenant_name}
25
+
export OS_AUTH_URL={openstack_auth_url}
26
+
export OS_USERNAME={openstack_username}
27
+
export OS_PASSWORD={openstack_password}
28
+
export OS_TENANT_NAME={openstack_tenant_name}
21
29
```
22
30
23
31
(Alternatively, download OpenStack RC file from Horizon/Access & Security/API Access.)
24
32
25
33
Source your nova credentials:
26
34
27
35
```console
28
-
#source openrc.sh
36
+
$source openrc.sh
29
37
```
30
38
31
39
### Set up your keys
@@ -35,6 +43,20 @@ Choose an existing keypair or upload a new public key, if desired.
35
43
$ nova keypair-add --pub-key ~/.ssh/deis.pub deis-key
36
44
```
37
45
46
+
### Upload a coreos image to Glance
47
+
48
+
You need to have a relatively recent CoreOS image. If you don't have one and your Openstack install allows you to upload your own images you can do the following:
Create a user-data file with a new discovery URL this way:
@@ -45,10 +67,11 @@ $ make discovery-url
45
67
46
68
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.
47
69
48
-
### Choose number of instances
49
-
By default, the provision script will provision 3 servers. You can override this by setting `DEIS_NUM_INSTANCES`:
**_Please note that this script does not handle floating IPs or routers. These should be provisioned manually either by Horizon or CLI_**
69
93
70
94
### Run the provision script
95
+
96
+
If you have a fairly straight forward openstack install you should be able to use the provisioning script provided. This script assumes you are using neutron and have security-groups enabled.
97
+
71
98
Run the [Openstack provision script](provision-openstack-cluster.sh) to spawn a new CoreOS cluster.
72
99
You'll need to provide the name of the CoreOS image name (or ID), and the key pair you just added. Optionally, you can also specify a flavor name.
By default, the Makefile will provision 1 router. You can override this by setting `DEIS_NUM_ROUTERS`:
82
-
```console
83
-
$ export DEIS_NUM_ROUTERS=2
107
+
You can override the name of the internal network to use by setting the environment variable `DEIS_NETWORK=internal`. If this doesn't exist the script will try to create it with the default CIDR which requires your openstack cluster to support tenant vlans.
108
+
109
+
You can also override the name of the security group to attach to the instances by setting `DEIS_SECGROUP=deis_test`. If this doesn't exist the script will attempt to create it. If you are creating your own security groups you can use the provision script as a guide. Make sure that you have a rule to enable full communication inside the security group, or you will have a bad day.
110
+
111
+
### Manually start the instances
112
+
113
+
### Finish of your openstack configuration by setting up floating IPs.
114
+
115
+
You will want to attach a floating ip to at least one of your instances. You'll do that like this:
116
+
117
+
```
118
+
$ nova floating-ip-create <pool>
119
+
$ nova floating-ip-associate deis-1 <IP provided by above command>
84
120
```
85
121
86
-
## Configure Deis
87
-
Set the default domain used to anchor your applications:
122
+
### Initialize the cluster
123
+
Once the cluster is up:
124
+
***If required, allocate and associate floating IPs to any or all of your hosts**
125
+
* Get the IP address of any of the machines from Openstack
126
+
* Set the default domain used to anchor your applications:
88
127
89
128
```console
90
129
$ deisctl config platform set domain=mycluster.local
91
130
```
92
131
93
-
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.
132
+
**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.
94
133
95
-
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:
134
+
*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:
96
135
97
136
```console
98
137
$ deisctl config platform set sshPrivateKey=<path-to-private-key>
99
138
```
100
139
101
-
### Initialize the cluster
102
-
Once the cluster is up:
103
-
***If required, allocate and associate floating IPs to any or all of your hosts**
104
-
* Get the IP address of any of the machines from Openstack
105
-
* set DEISCTL_TUNNEL and install the platform:
140
+
* set DEISCTL_TUNNEL to one of your floating IPs and install the platform:
0 commit comments