Skip to content

Commit

Permalink
Merge pull request #13 from vosmann/master
Browse files Browse the repository at this point in the history
ApplicationId as parameter and readme expansion.
  • Loading branch information
Oleksii Kliukin committed Jul 31, 2015
2 parents 5c936b9 + c31b248 commit 483ecd7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
35 changes: 33 additions & 2 deletions etcd-cluster-appliance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,36 @@ Currently the following scenarios are supported:
Usage
=====

senza create etcd-cluster.yaml STACK_VERSION HOSTED_ZONE DOCKER_IMAGE MINT_BUCKET SCALYR_KEY
senza create etcd-cluster.yaml 1 myteam.example.org pierone.example.org/myteam/etcd:0.1-SNAPSHOT zalando-stups-mint-123456789123-eu-west-1 abc123def
## Step 1: Define an application
Before starting with clusters, you will need to define an application under whose name your clusters will be created.
This is done in [Kio](https://github.com/zalando-stups/kio) or its graphical interface [Yourturn](https://github.com/zalando-stups/yourturn). Assuming for the example that the application is being
created under the team `elephant`, we might choose this app ID: `elephant-etcd`.

## Step 2: Create an etcd cluster
A cluster can be creating by issuing such a command:

senza create etcd-cluster.yaml STACK_VERSION APP_ID HOSTED_ZONE DOCKER_IMAGE MINT_BUCKET SCALYR_KEY

For example, if you made are making an etcd cluster to be used by a service called `foo`, you could issue the following:

senza create etcd-cluster.yaml for-foo \
elephant-etcd \
elephant.example.org \
pierone.example.org/elephant/etcd:0.1-SNAPSHOT \
zalando-stups-mint-123456789123-eu-west-1 abc123def

The idea is to have a single application ID, here it is `elephant-etcd`, and then create different versions, i.e.
different clusters by varying the `STACK_VERSION` parameter depending on the purpose you want to use that specific
cluster for.

## Step 3: Confirm successful cluster creation
Running this `senza create` command should have created:
- the required amount of EC2 instances
- with stack name `elephant-etcd`
- with instance name `elephant-etcd-for-foo`
- a security group allowing etcd's ports 2379 and 2380
- a role that allows reading `elephant-etcd` app's Mint bucket
- DNS records
- an A record of the form `for-foo.elephant.example.org.`
- a SRV record of the form `_etcd-server._tcp.for-foo.elephant.example.org.`

3 changes: 3 additions & 0 deletions etcd-cluster-appliance/etcd-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SenzaComponents:
- EtcdSecurityGroup
- GroupId
TaupageConfig:
application_id: "{{Arguments.ApplicationId}}"
ports:
2379: 2379
2380: 2380
Expand All @@ -32,6 +33,8 @@ SenzaComponents:
MetricType: CPU
SenzaInfo:
Parameters:
- ApplicationId:
Description: Name of your etcd application from Kio/Yourturn
- HostedZone:
Description: AWS Hosted Zone to work with
- DockerImage:
Expand Down

0 comments on commit 483ecd7

Please sign in to comment.