Skip to content

Instantly share code, notes, and snippets.

@katallaxie
Last active October 5, 2016 19:18
Show Gist options
  • Save katallaxie/37969ae162cc7620b5c2efc6dacc59b4 to your computer and use it in GitHub Desktop.
Save katallaxie/37969ae162cc7620b5c2efc6dacc59b4 to your computer and use it in GitHub Desktop.
CoreOS Cluster on GCE
#cloud-config
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
# listen on both the official ports and the legacy ports
# legacy ports can be omitted if your application doesn't depend on them
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
fleet:
public-ip: $private_ipv4
units:
- name: etcd2.service
command: start
- name: fleet.service
command: start
gcloud compute instances create core1 core2 core3 --image https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-1122-2-0-v20160906 --zone europe-west1-b --machine-type f1-micro --metadata-from-file user-data=cloud-config.yaml
@katallaxie
Copy link
Author

CoreOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment