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
$ cros_workon start etcd-starter | |
WARNING: 'portageq envvar PORTDIR_OVERLAY' is deprecated. Use 'portageq repositories_configuration' instead. | |
Usage: loman add [options] <name> <--workon | <path> --remote <remote> > | |
loman: error: No project named 'coreos/etcd-starter' in the default manifest. | |
Please run "repo sync" now. | |
INFO cros_workon: Started working on 'dev-db/etcd-starter' for 'amd64-usr' |
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
tree /opt/etcd/ | |
/opt/etcd/ | |
└── internal_versions | |
├── 1 | |
│ └── etcd | |
└── 2 | |
└── 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
etcd $ rm -rf MacBook-Air.local.etcd/ | |
etcd $ ./bin/etcd -internal-dir /opt/etcd/internal_versions/ | |
[etcd] Mar 19 19:15:25.181 WARNING | Using the directory MacBook-Air.local.etcd as the etcd curation directory because a directory was not specified. | |
[etcd] Mar 19 19:15:25.182 INFO | MacBook-Air.local is starting a new cluster | |
[etcd] Mar 19 19:15:25.184 INFO | etcd server [name MacBook-Air.local, listen on :4001, advertised url http://127.0.0.1:4001] | |
[etcd] Mar 19 19:15:25.184 INFO | peer server [name MacBook-Air.local, listen on :7001, advertised url http://127.0.0.1:7001] | |
[etcd] Mar 19 19:15:25.184 INFO | MacBook-Air.local starting in peer mode | |
[etcd] Mar 19 19:15:25.184 INFO | MacBook-Air.local: state changed from 'initialized' to 'follower'. | |
[etcd] Mar 19 19:15:25.185 INFO | MacBook-Air.local: state changed from 'follower' to 'leader'. | |
[etcd] Mar 19 19:15:25.185 INFO | MacBook-Air.local: leader changed from '' to 'MacBook-Air.local'. |
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
$ tree /opt/etcd/ | |
/opt/etcd/ | |
└── internal_versions | |
├── 1 | |
│ └── etcd | |
└── 2 | |
└── etcd | |
3 directories, 2 files |
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
etcd $ ./bin/etcd -etcd-binary-dir /opt/etcd/internal_versions/ | |
[etcd] Mar 19 18:56:57.682 WARNING | Using the directory MacBook-Air.local.etcd as the etcd curation directory because a directory was not specified. | |
[etcd] Mar 19 18:56:57.699 INFO | Peer URLs in log: / MacBook-Air.local (http://127.0.0.1:7001) | |
[etcd] Mar 19 18:56:57.700 INFO | etcd server [name MacBook-Air.local, listen on :4001, advertised url http://127.0.0.1:4001] | |
[etcd] Mar 19 18:56:57.700 INFO | peer server [name MacBook-Air.local, listen on :7001, advertised url http://127.0.0.1:7001] | |
[etcd] Mar 19 18:56:57.701 INFO | MacBook-Air.local starting in peer mode | |
[etcd] Mar 19 18:56:57.701 INFO | MacBook-Air.local: state changed from 'initialized' to 'follower'. | |
[etcd] Mar 19 18:56:58.043 INFO | MacBook-Air.local: state changed from 'follower' to 'candidate'. | |
[etcd] Mar 19 18:56:58.043 INFO | MacBook-Air.local: state changed from 'candidate' to 'leader'. | |
[etcd] Mar 19 18:56:58.043 INFO | MacBook-Air.l |
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
core@etcd2-testing-0 ~ $ sudo /usr/libexec/etcd/internal_versions/1 -name 07dac75bcb0cf2c728bfa08f94a8940d -data-dir /var/lib/etcd | |
[etcd] Mar 18 22:52:51.210 INFO | 07dac75bcb0cf2c728bfa08f94a8940d is starting a new cluster | |
[etcd] Mar 18 22:52:51.213 INFO | etcd server [name 07dac75bcb0cf2c728bfa08f94a8940d, listen on :4001, advertised url http://127.0.0.1:4001] | |
[etcd] Mar 18 22:52:51.213 INFO | peer server [name 07dac75bcb0cf2c728bfa08f94a8940d, listen on :7001, advertised url http://127.0.0.1:7001] | |
[etcd] Mar 18 22:52:51.213 INFO | 07dac75bcb0cf2c728bfa08f94a8940d starting in peer mode | |
[etcd] Mar 18 22:52:51.214 INFO | 07dac75bcb0cf2c728bfa08f94a8940d: state changed from 'initialized' to 'follower'. | |
[etcd] Mar 18 22:52:51.214 INFO | 07dac75bcb0cf2c728bfa08f94a8940d: state changed from 'follower' to 'leader'. | |
[etcd] Mar 18 22:52:51.214 INFO | 07dac75bcb0cf2c728bfa08f94a8940d: leader changed from '' to '07dac75bcb0cf2c728bfa08f94a8940d'. | |
[etcd] Mar 18 22:52:51.244 INFO |
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
core@etcd2-testing-0 ~ $ /usr/libexec/etcd/internal_versions/1 -name 07dac75bcb0cf2c728bfa08f94a8940d | |
[etcd] Mar 18 22:46:10.967 WARNING | Using the directory 07dac75bcb0cf2c728bfa08f94a8940d.etcd as the etcd curation directory because a directory was not specified. | |
[etcd] Mar 18 22:46:11.010 INFO | 07dac75bcb0cf2c728bfa08f94a8940d is starting a new cluster | |
[etcd] Mar 18 22:46:11.012 INFO | etcd server [name 07dac75bcb0cf2c728bfa08f94a8940d, listen on :4001, advertised url http://127.0.0.1:4001] | |
[etcd] Mar 18 22:46:11.012 INFO | peer server [name 07dac75bcb0cf2c728bfa08f94a8940d, listen on :7001, advertised url http://127.0.0.1:7001] | |
[etcd] Mar 18 22:46:11.013 INFO | 07dac75bcb0cf2c728bfa08f94a8940d starting in peer mode | |
[etcd] Mar 18 22:46:11.013 INFO | 07dac75bcb0cf2c728bfa08f94a8940d: state changed from 'initialized' to 'follower'. | |
[etcd] Mar 18 22:46:11.013 INFO | 07dac75bcb0cf2c728bfa08f94a8940d: state changed from 'follower' to 'leader'. | |
[etcd] Mar 18 22:46:11.013 INFO |
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
core@etcd2-testing-0 ~ $ etcdctl ls / | |
core@etcd2-testing-0 ~ $ etcdctl set foo bar | |
bar | |
core@etcd2-testing-0 ~ $ etcdctl ls / | |
/foo | |
core@etcd2-testing-0 ~ $ curl http://127.0.0.1:4001/version | |
{"releaseVersion":"0.4.7","internalVersion":"1"}core@etcd2-testing-0 ~ $ curl http://127.0.0.1:4001/version | |
{"releaseVersion":"2.0.5","internalVersion":"2"}core@etcd2-testing-0 ~ $ etcdctl ls / | |
/coreos.com | |
core@etcd2-testing-0 ~ $ |
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
# /etc/systemd/system/etcd.service | |
[Unit] | |
Description=etcd | |
[Service] | |
User=etcd | |
PermissionsStartOnly=true | |
Environment="ETCD_ADDR=100.78.239.13:4001" | |
Environment="ETCD_BIND_ADDR=0.0.0.0:4001" | |
Environment="ETCD_PEERS=100.78.239.12:7001,100.78.239.14:7001" |
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
etcd --name etcd0 \ | |
--advertise-client-urls https://etcd0.example.com:2379 \ | |
--listen-client-urls https://10.0.1.10:2379 \ | |
--listen-peer-urls https://10.0.1.10:2380 \ | |
--initial-advertise-peer-urls https://etcd0.example.com:2380 \ | |
--initial-cluster etcd0=https://etcd0.example.com:2380,etcd1=https://etcd1.example.com:2380,etcd2=https://etcd2.example.com:2380 \ | |
--initial-cluster-token etcd-ssl-cluster-0 \ | |
--initial-cluster-state new \ | |
--cert-file etcd0.example.com.crt \ | |
--key-file etcd0.example.com.key \ |