Last active
August 29, 2015 14:12
-
-
Save cloudcalvin/3c5c23316457b7739b2a to your computer and use it in GitHub Desktop.
etcd2.0 setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: etcd.service | |
| command: start | |
| content: | | |
| [Unit] | |
| Description=etcd | |
| Requires=setup-network-environment.service | |
| After=setup-network-environment.service | |
| [Service] | |
| EnvironmentFile=/etc/environment | |
| User=etcd | |
| PermissionsStartOnly=true | |
| ExecStart=/usr/bin/etcd \ | |
| --name ${COREOS_PUBLIC_IPV4} \ | |
| --addr ${COREOS_PUBLIC_IPV4}:4001 \ | |
| --bind-addr 0.0.0.0 \ | |
| --cluster-active-size 1 \ | |
| --data-dir /var/lib/etcd \ | |
| --http-read-timeout 86400 \ | |
| --peer-addr ${COREOS_PUBLIC_IPV4}:7001 \ | |
| --snapshot true | |
| Restart=always | |
| RestartSec=10s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -L https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.tar.gz -o etcd-v2.0.0-rc.1-linux-amd64.tar.gz | |
| tar xzvf etcd-v2.0.0-rc.1-linux-amd64.tar.gz | |
| cd etcd-v2.0.0-rc.1-linux-amd64 | |
| ./etcd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: etcd.service | |
| command: start | |
| content: | | |
| [Unit] | |
| Description=etcd | |
| [Service] | |
| User=etcd | |
| PermissionsStartOnly=true | |
| EnvironmentFile=/run/systemd/system/etcd.service.d/10-cloudinit.conf | |
| Environment=ETCD_DATA_DIR=/var/lib/etcd | |
| Environment=ETCD_NAME=%m | |
| ExecStart=/usr/bin/ etcd -name infra0 -initial-advertise-peer-urls https://10.0.1.10:2380 \ | |
| -listen-peer-urls https://10.0.1.10:2380 \ | |
| -initial-cluster-token zenaptix \ | |
| -initial-cluster infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380,infra2=http://10.0.1.12:2380 \ | |
| -initial-cluster-state new | |
| Restart=always | |
| RestartSec=10s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment