Created
October 8, 2016 09:57
-
-
Save ajeetraina/85435636a2d7211ab85c80ebfdc80903 to your computer and use it in GitHub Desktop.
Getting Started with Infrakit
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
Steps:(I tested it as root user just for quick setup) | |
#cat script-test | |
export PATH=/usr/local/go/bin:$PATH | |
mkdir -p ~/go | |
export GOPATH=!$ | |
export PATH=$GOPATH/bin:$PATH | |
mkdir -p ~/go/src/github.com/docker | |
cd !$ | |
git clone [email protected]:docker/infrakit.git | |
cd infrakit | |
go get -u github.com/kardianos/govendor # the dependency manager | |
go get -u github.com/golang/lint/golint # if you're running tests | |
make ci | |
make -k infrakit | |
mkdir -p /run/infrakit/plugins | |
chmod 777 /run/infrakit/plugins | |
root@node1:~/go/src/github.com/docker/infrakit# infrakit/file --listen=unix:///run/infrakit/plugins/another-file.sock --dir=./test | |
INFO[0000] Starting plugin | |
INFO[0000] Listening on: unix:///run/infrakit/plugins/another-file.sock | |
INFO[0000] listener protocol= unix addr= /run/infrakit/plugins/another-file.sock err= <nil> | |
master==>./infrakit/file --dir=./test | |
INFO[0000] Starting plugin | |
INFO[0000] Listening on: unix:///run/infrakit/plugins/instance-file.sock | |
INFO[0000] listener protocol= unix addr= /run/infrakit/plugins/instance-file.sock err= <nil> | |
root@node1:~/go/src/github.com/docker/infrakit# ./infrakit/vanilla | |
INFO[0000] Starting plugin | |
INFO[0000] Listening on: unix:///run/infrakit/plugins/flavor-vanilla.sock | |
INFO[0000] listener protocol= unix addr= /run/infrakit/plugins/flavor-vanilla.sock err= <nil> | |
root@node1:~/go/src/github.com/docker/infrakit# ./infrakit/cli group --name group watch test/test.json | |
watching test | |
root@node1:~/go/src/github.com/docker/infrakit# ls test | |
instance-1475920096 test.json | |
root@node1:~/go/src/github.com/docker/infrakit# rm test/* | |
root@node1:~/go/src/github.com/docker/infrakit# | |
========== | |
Logs: | |
nstances response= [{"ID":"instance-1475920126","LogicalID":null,"Tags":{"infrakit.config_sha":"IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=","infrakit.group":"test"}}] err= <nil> | |
DEBU[1028] Found existing instances: [{instance-1475920126 <nil> map[infrakit.group:test infrakit.config_sha:IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=]}] | |
DEBU[1028] Group has 1 instances, no action is needed | |
DEBU[1038] REQ -- unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances request= {"infrakit.group":"test"} err= <nil> | |
DEBU[1038] RESP - unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances response= [{"ID":"instance-1475920126","LogicalID":null,"Tags":{"infrakit.config_sha":"IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=","infrakit.group":"test"}}] err= <nil> | |
DEBU[1038] Found existing instances: [{instance-1475920126 <nil> map[infrakit.config_sha:IMqdaQnKd5FoiTVfbfwqm4Sw4Ks= infrakit.group:test]}] | |
DEBU[1038] Group has 1 instances, no action is needed | |
DEBU[1048] REQ -- unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances request= {"infrakit.group":"test"} err= <nil> | |
DEBU[1048] RESP - unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances response= [{"ID":"instance-1475920126","LogicalID":null,"Tags":{"infrakit.config_sha":"IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=","infrakit.group":"test"}}] err= <nil> | |
DEBU[1048] Found existing instances: [{instance-1475920126 <nil> map[infrakit.group:test infrakit.config_sha:IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=]}] | |
DEBU[1048] Group has 1 instances, no action is needed | |
DEBU[1058] REQ -- unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances request= {"infrakit.group":"test"} err= <nil> | |
DEBU[1058] RESP - unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances response= [{"ID":"instance-1475920126","LogicalID":null,"Tags":{"infrakit.config_sha":"IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=","infrakit.group":"test"}}] err= <nil> | |
DEBU[1058] Found existing instances: [{instance-1475920126 <nil> map[infrakit.group:test infrakit.config_sha:IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=]}] | |
DEBU[1058] Group has 1 instances, no action is needed | |
DEBU[1068] REQ -- unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances request= {"infrakit.group":"test"} err= <nil> | |
DEBU[1068] RESP - unix://127.0.0.1/run/infrakit/plugins/instance-file.sock url= http://127.0.0.1/Instance.DescribeInstances response= [{"ID":"instance-1475920126","LogicalID":null,"Tags":{"infrakit.config_sha":"IMqdaQnKd5FoiTVfbfwqm4Sw4Ks=","infrakit.group":"test"}}] err= <nil> | |
DEBU[1068] Found existing instances: [{instance-1475920126 <nil> map[infrakit.config_sha:IMqdaQnKd5FoiTVfbfwqm4Sw4Ks= infrakit.group:test]}] | |
DEBU[1068] Group has 1 instances, no action is needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment