SSH config for production bastion box
Host bastion_production
Hostname bastion.everydayhero.io
User ubuntu
IdentityFile ~/.ssh/deis.pem
SSH to the box ssh bastion_production
List the running containers flu
(that is an alias for fleetctl list-units)
eg output
ubuntu@ip-10-21-4-207:~$ flu
UNIT MACHINE ACTIVE SUB
deis-builder-data.service 36b9481d.../10.21.1.49 active exited
deis-builder@1.service 36b9481d.../10.21.1.49 active running
deis-cache@1.service a58c592d.../10.21.2.141 active running
deis-controller@1.service 36b9481d.../10.21.1.49 active running
deis-database-data.service 36b9481d.../10.21.1.49 active exited
deis-database@1.service 36b9481d.../10.21.1.49 active running
deis-logger-data.service 36b9481d.../10.21.1.49 active exited
deis-logger@1.service 36b9481d.../10.21.1.49 active running
deis-registry-data.service 36b9481d.../10.21.1.49 active exited
deis-registry@1.service 36b9481d.../10.21.1.49 failed failed
deis-router@1.service a58c592d.../10.21.2.141 active running
payments_v17.admin.1.service 6b37ac6a.../10.21.3.39 inactive dead
payments_v19.web.1-announce.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.1-log.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.1.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.2-announce.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.2-log.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.2.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.3-announce.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.3-log.service 6b37ac6a.../10.21.3.39 active running
payments_v19.web.3.service 6b37ac6a.../10.21.3.39 active running
primocache_v6.web.1-announce.service a58c592d.../10.21.2.141 active running
primocache_v6.web.1-log.service a58c592d.../10.21.2.141 active running
primocache_v6.web.1.service a58c592d.../10.21.2.141 active running
get the machine ID from the list (ie for primocache) a58c592d
Then fssh a58c592d
(alias for fleetctl ssh)
You will then be on the CoreOS node that is running the primocache container.
You then need to get the IMAGE ID that you want to docker run with docker images
eg output
core@ip-10-21-2-141 ~ $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
10.21.1.49:5000/payments v19 b859f4e9e7ed 42 hours ago 987 MB
10.21.1.49:5000/payments v18 70646e782678 42 hours ago 987 MB
10.21.1.49:5000/payments v17 7577826060cf 42 hours ago 987 MB
10.21.1.49:5000/payments v16 c31eb24f0f76 43 hours ago 987 MB
10.21.1.49:5000/payments v15 4bb2a451bdac 43 hours ago 987 MB
10.21.1.49:5000/primocache v6 e5ef98aad266 44 hours ago 910.9 MB
10.21.1.49:5000/payments v5 477c060e015e 45 hours ago 987 MB
deis/router v0.12.0 7cf6d7273faf 5 days ago 339.9 MB
deis/cache v0.12.0 c01603455efb 5 days ago 248.4 MB
So to do a docker run for primocache, you would do something like this:
docker run e5ef98aad266 rake routes