Skip to content

Commit e3c06dc

Browse files
carmstrongMatthew Fisher
authored andcommitted
docs(contrib): fix ec2 and rackspace formatting
Fixes formatting issues with both READMEs and attempt to standardize the shell scripts.
1 parent 06f4c79 commit e3c06dc

4 files changed

Lines changed: 44 additions & 30 deletions

File tree

contrib/ec2/README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Provision a Deis Cluster on Amazon EC2
2-
======================================
1+
# Provision a Deis Cluster on Amazon EC2
32

4-
1. Install the [AWS Command Line Interface][aws-cli]:
3+
## Install the [AWS Command Line Interface][aws-cli]:
54
```console
65
$ pip install awscli
76
Downloading/unpacking awscli
87
Downloading awscli-1.3.6.tar.gz (173kB): 173kB downloaded
98
...
109
```
1110

12-
2. Run `aws configure` to set your AWS credentials:
11+
## Configure aws-cli
12+
Run `aws configure` to set your AWS credentials:
1313
```console
1414
$ aws configure
1515
AWS Access Key ID [None]: ***************
@@ -18,9 +18,11 @@ Default region name [None]: us-west-1
1818
Default output format [None]:
1919
```
2020

21-
3. Upload a new keypair to AWS, ensuring that the name of the keypair is set to "deis".
21+
## Upload keys
22+
Upload a new keypair to AWS, ensuring that the name of the keypair is set to "deis".
2223

23-
4. Edit [cloudformation.json][cf-params], ensuring to add a new discovery URL.
24+
## Customize cloudformation.json
25+
Edit [cloudformation.json][cf-params], ensuring to add a new discovery URL.
2426
You can get a new one by sending a new request to http://discovery.etcd.io/new.
2527
```console
2628
{
@@ -33,7 +35,8 @@ about the discovery URL, see http://discovery.etcd.io for more information. You
3335
read more on how you can customize this cluster by looking at the
3436
[CoreOS EC2 template][template] and applying it to [cloudformation.json][cf-params].
3537

36-
5. Run the [cloudformation provision script][pro-script] to spawn a new CoreOS cluster:
38+
## Run the provision script
39+
Run the [cloudformation provision script][pro-script] to spawn a new CoreOS cluster:
3740
```console
3841
$ ./provision-ec2-cluster.sh
3942
{
@@ -43,7 +46,8 @@ Your Deis cluster has successfully deployed.
4346
Please wait for it to come up, then run ./initialize-ec2-cluster.sh
4447
```
4548

46-
6. Once the cluster is up, get the hostname of any of the machines from EC2, set
49+
## Initialize the cluster
50+
Once the cluster is up, get the hostname of any of the machines from EC2, set
4751
FLEETCTL_TUNNEL, then run [the init script][init-script] to bootstrap the cluster
4852
remotely:
4953
```console
@@ -63,7 +67,8 @@ Job deis-router.service started on aec641dc.../172.31.21.4
6367
done!
6468
```
6569

66-
7. After that, wait for the components to come up, check which host the controller is
70+
## Run Deis!
71+
After that, wait for the components to come up, check which host the controller is
6772
running on and register with Deis!
6873
```
6974
$ fleetctl list-units

contrib/ec2/initialize-ec2-cluster.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
99
CONTRIB_DIR=$(dirname $THIS_DIR)
1010
ROOT_DIR=$(dirname $CONTRIB_DIR)
1111

12+
source $CONTRIB_DIR/utils.sh
13+
1214
# check for fleetctl in $PATH
1315
if ! which fleetctl > /dev/null; then
14-
echo 'Please install fleetctl and ensure it is in your $PATH.'
15-
echo 'See https://github.com/coreos/fleet for more information'
16+
echo_red 'Please install fleetctl and ensure it is in your $PATH.'
17+
echo_red 'See https://github.com/coreos/fleet for more information'
1618
exit 1
1719
fi
1820

1921
if [ -z "$FLEETCTL_TUNNEL" ]
2022
then
21-
echo 'Please set $FLEETCTL_TUNNEL.'
22-
echo 'See https://github.com/coreos/fleet/blob/master/Documentation/remote-access.md'
23+
echo_red 'Please set $FLEETCTL_TUNNEL.'
24+
echo_red 'See https://github.com/coreos/fleet/blob/master/Documentation/remote-access.md'
2325
exit 1
2426
fi
2527

@@ -34,4 +36,5 @@ do
3436
popd > /dev/null
3537
done
3638

37-
echo "done!"
39+
echo_green "Done! Inspect the state of the services with: fleetctl list-units"
40+
echo_green "Once all the services are running, you can register with your Deis cluster: deis register 1.2.3.4:8000"

contrib/ec2/provision-ec2-cluster.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ set -e
88
THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
99
CONTRIB_DIR=$(dirname $THIS_DIR)
1010

11+
source $CONTRIB_DIR/utils.sh
12+
1113
# check for Deis' general dependencies
1214
if ! "$CONTRIB_DIR/check-deis-deps.sh"; then
13-
echo 'Deis is missing some dependencies.'
15+
echo_red 'Deis is missing some dependencies.'
1416
exit 1
1517
fi
1618

1719
# check for EC2 API tools in $PATH
1820
if ! which aws > /dev/null; then
19-
echo 'Please install the AWS command-line tool and ensure it is in your $PATH.'
21+
echo_red 'Please install the AWS command-line tool and ensure it is in your $PATH.'
2022
exit 1
2123
fi
2224

@@ -26,5 +28,5 @@ aws cloudformation create-stack \
2628
--stack-name deis \
2729
--parameters "$(<cloudformation.json)"
2830

29-
echo "Your Deis cluster has successfully deployed to AWS CloudFormation."
30-
echo "Please continue to follow the instructions in the README."
31+
echo_green "Your Deis cluster has successfully deployed to AWS CloudFormation."
32+
echo_green "Please continue to follow the instructions in the README."

contrib/rackspace/README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Provision a Deis Cluster on Rackspace
2-
======================================
1+
# Provision a Deis Cluster on Rackspace
32

43
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`).
54

6-
1. Install supernova and its dependencies:
5+
### Install supernova and its dependencies:
76
```console
87
$ sudo pip install keyring
98
$ sudo pip install rackspace-novaclient
109
$ sudo pip install supernova
1110
```
1211

13-
2. Edit `~/.supernova` to match the following:
12+
### Configure supernova
13+
Edit `~/.supernova` to match the following:
1414
```
1515
[production]
1616
OS_AUTH_URL = https://identity.api.rackspacecloud.com/v2.0/
@@ -23,16 +23,18 @@ OS_AUTH_SYSTEM = rackspace
2323

2424
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.
2525

26-
3. Choose an existing keypair or generate a new one, if desired. Tell supernova about the key pair and give it an identifiable name:
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:
2728

28-
``console
29-
supernova production keypair-add --pub-key ~/.ssh/deis.pub deis-key
29+
```console
30+
$ supernova production keypair-add --pub-key ~/.ssh/deis.pub deis-key
3031
```
3132

32-
4. Edit [cloud-config.yml](cloud-config.yml) and add a discovery URL. This URL will be used by all nodes in this Deis cluster.
33-
You can get a new discovery URL by sending a request to http://discovery.etcd.io/new.
33+
### Customize cloud-config.yml
34+
Edit [cloud-config.yml](cloud-config.yml) and add a discovery URL. This URL will be used by all nodes in this Deis cluster. You can get a new discovery URL by sending a request to http://discovery.etcd.io/new.
3435

35-
5. Run the [Rackspace provision script](provision-rackspace-cluster.sh) to spawn a new CoreOS cluster.
36+
### Run the provision script
37+
Run the [Rackspace provision script](provision-rackspace-cluster.sh) to spawn a new CoreOS cluster.
3638
You'll need to provide the name of the key pair you just added. Optionally, you can also specify a flavor name.
3739
```console
3840
$ ./provision-rackspace-cluster.sh
@@ -45,7 +47,8 @@ By default, the script will provision 3 servers. You can override this by settin
4547
$ DEIS_NUM_INSTANCES=5 ./provision-rackspace-cluster.sh deis-key
4648
```
4749

48-
6. Once the cluster is up, get the IP address for any of the machines in the cluster, set
50+
### Initialize the cluster
51+
Once the cluster is up, get the IP address for any of the machines in the cluster, set
4952
FLEETCTL_TUNNEL, and run [the init script](initialize-rackspace-cluster.sh) to bootstrap the cluster
5053
remotely:
5154
```console
@@ -65,7 +68,8 @@ Job deis-router.service scheduled to 73c7d285.../23.253.218.114
6568
done!
6669
```
6770

68-
7. After that, wait for the components to come up, check which host the controller is
71+
### Use Deis!
72+
After that, wait for the components to come up, check which host the controller is
6973
running on and register with Deis!
7074
```
7175
$ fleetctl list-units

0 commit comments

Comments
 (0)