Skip to content

Commit

Permalink
musings with CLF on CoreOS / GCE
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsdave committed Jun 1, 2015
1 parent 42147dd commit d240fc3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions provisioning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
* generate a token for the new cluster
```bash
>curl -w "\n" 'https://discovery.etcd.io/new?size=3'
https://discovery.etcd.io/c421d572510cbc5099de50c8f352285c
>
```

* per [these](https://coreos.com/docs/running-coreos/cloud-providers/google-compute-engine/)
create a ```cloud-config.yaml``` file

* spin up a 3 node cluster
```bash
gcloud compute instances create core1 core2 core3 --image https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-647-2-0-v20150528 --zone us-central1-a --machine-type n1-standard-1 --metadata-from-file user-data=cloud-config.yaml
```
22 changes: 22 additions & 0 deletions provisioning/cloud-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#cloud-config

coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=X
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/33ec7a25c34021a3f389f36c9515bba3
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.socket
command: start
drop-ins:
- name: 30-ListenStream.conf
content: |
[Socket]
ListenStream=49153
- name: fleet.service
command: start

0 comments on commit d240fc3

Please sign in to comment.