This file contains 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
$ brew install go etcdctl | |
$ git clone https://github.com/coreos/fleet.git | |
$ cd fleet | |
$ ./build | |
$ mv bin/fleetctl /usr/local/bin/ |
This file contains 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
$ git clone https://github.com/CenturyLinkLabs/coreos-vagrant | |
$ cd coreos-vagrant/cluster | |
$ vagrant up --provision |
This file contains 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
$ fleetctl list-machines | |
MACHINE IP METADATA | |
09fd0a88... 10.0.2.15 - | |
77763947... 10.0.2.15 - | |
f31c383c... 10.0.2.15 - |
This file contains 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
$ sudo gem install bundler fig2coreos | |
$ cat fig.yml | |
web: | |
image: ctlc/wordpress | |
ports: | |
- 80:80 | |
environment: | |
DB_USER: root | |
DB_PASSWORD: qa1N76pWAri9 |
This file contains 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
$ fleetctl start db.1.service | |
$ fleetctl list-units | |
UNIT LOAD ACTIVE SUB DESC MACHINE | |
db.1.service loaded active running Run db_1 9c008961.../10.0.2.15 | |
$ fleetctl start web.1.service | |
$ fleetctl list-units | |
UNIT LOAD ACTIVE SUB DESC MACHINE |
This file contains 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
$ fleetctl start db-discovery.1.service | |
$ fleetctl start web-discovery.1.service | |
$ fleetctl list-units | |
UNIT LOAD ACTIVE SUB DESC MACHINE | |
db-discovery.1.service loaded active running Announce db_1 9c008961.../10.0.2.15 | |
db.1.service loaded active running Run db_1 9c008961.../10.0.2.15 | |
web-discovery.1.service loaded active running Announce web_1 9c008961.../10.0.2.15 | |
web.1.service loaded active running Run web_1 9c008961.../10.0.2.15 |
This file contains 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
$ cd ~/coreos-vagrant/cluster/ | |
# find out which box is hosting your port 80 | |
$ etcdctl get /services/web/web_1 | |
{ "host": "core-03", "port": 80, "version": "52c7248a14" } | |
$ vagrant share core-03 --http 80 | |
==> core-03: Detecting network information for machine... | |
core-03: Local machine address: 192.168.65.2 | |
core-03: Local HTTP port: 80 |
This file contains 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
$ SERF_ID=$(docker run -d --name serf_1 -p 7946 -p 7373 ctlc/serf /run.sh) |
This file contains 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
$ wget https://dl.bintray.com/mitchellh/serf/0.5.0_linux_amd64.zip | |
$ unzip 0.5.0_linux_amd64.zip | |
$ sudo mv serf /usr/bin/ | |
$ serf agent & | |
$ serf members | |
packer-virtualbox 10.0.2.15:7946 alive |
This file contains 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
$ serf join $(docker port $SERF_ID 7946) | |
Successfully joined cluster by contacting 1 nodes. | |
$ serf members | |
packer-virtualbox 10.0.2.15:7946 alive | |
b62e43c286c8 172.17.0.76:7946 alive serf-agent |
OlderNewer