Skip to content

Instantly share code, notes, and snippets.

View kelseyhightower's full-sized avatar

Kelsey Hightower kelseyhightower

View GitHub Profile
core@node0 ~ $ sudo machinectl pull-dkr --verify=no library/redis --dkr-index-url=https://registry.hub.docker.com
Enqueued transfer job 1. Press C-c to continue download in background.
Pulling 'library/redis' with tag 'latest', saving as 'redis'.
Download of https://registry.hub.docker.com/v1/repositories/library/redis/images complete.
Index lookup succeeded, directed to registry registry-1.docker.io.
Downloading 66B for https://registry-1.docker.io/v1/repositories/library/redis/tags/latest.
Download of https://registry-1.docker.io/v1/repositories/library/redis/tags/latest complete.
Tag lookup succeeded, resolved to layer 06a1f75304ba07498873a8c2a0861c19c8994cf676714a891791fab8760fff6a.
Downloading 1.9K for https://registry-1.docker.io/v1/images/06a1f75304ba07498873a8c2a0861c19c8994cf676714a891791fab8760fff6a/json.
Download of https://registry-1.docker.io/v1/images/06a1f75304ba07498873a8c2a0861c19c8994cf676714a891791fab8760fff6a/json complete.
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
[Service]
ExecStartPre=/bin/mount --make-rprivate /
ExecStart=/opt/bin/docker \
--daemon \
--storage-driver=overlay \
--host=unix:///var/run/docker.sock
rkt --insecure-skip-verify fetch docker://bketelsen/gopheracademy-web
rkt: fetching image from docker://bketelsen/gopheracademy-web
rkt: warning: signature verification has been disabled
Downloading layer: 8586f4d5da716e3c95e406b2002bbdd5d9614e99ec23a384a4370b1433f7b813
Downloading layer: a8a30ac68a9e5590ae3c3195c4cd6af246a4ea5df6dc626c15d5c724fe6a9a61
Downloading layer: 0a7169567b82fedaab654a23a6572304c3df6fd3e8a89359094cd2923770b9ae
Downloading layer: 87686b63c2bdc2591d2438ca6105515b370c4de6025be17fba258292ba1a4504
Downloading layer: 4197916ba1b3944d357bafb06438c7e61721628af62382331fee7dbea14f0e6b
Downloading layer: ad8e7a985f5d813e4395553ea7507f558851927374090276b3ef8e6c39b1f4a7
Downloading layer: 4efa385fbcedf15c30149905812ea538e553c2cc2e03d2d7bd9fbcf43253f2f0
units:
- name: fleet.socket
command: start
content: |
[Socket]
ListenStream=/var/run/fleet.sock
ListenStream=8080
Service=fleet.service
[Install]
Are there any existing aci images for the things I want to deploy?
There is no good way to find out.
There are no good docs on how to build my first ACI. I'm not sure where to start.
A quick search for etcd aci turned up the following:
https://github.com/coreos/etcd/blob/master/scripts/build-aci
Looks like it might be easier to create an ACI by converting a working docker container.
https://github.com/appc/docker2aci
{
"id": "192.168.12.100",
"kind": "Minion",
"apiVersion": "v1beta1",
"resources": {
"capacity": {
"cpu": 1000,
"memory": 1073741824
}
},
#cloud-config
coreos:
fleet:
etcd_servers: http://192.168.12.10:2379
metadata: role=node
units:
- name: etcd.service
mask: true
- name: fleet.service
$ for n in `cat nodes.txt`; do ssh "kelsey@${n}" "sudo systemctl status etcd"; done
● etcd.service - etcd
Loaded: loaded (/usr/lib64/systemd/system/etcd.service; static; vendor preset: disabled)
Drop-In: /run/systemd/system/etcd.service.d
└─20-cloudinit.conf
Active: active (running) since Thu 2015-03-26 03:41:10 UTC; 59s ago
Main PID: 879 (etcd)
CGroup: /system.slice/etcd.service
└─879 /usr/libexec/etcd/internal_versions/1/etcd
curl http://127.0.0.1:4001/v2/keys/_etcd/available-internal-versions/2
{"action":"get","node":{"key":"/_etcd/available-internal-versions/2","dir":true,"nodes":[{"key":"/_etcd/available-internal-versions/2/0c1d67472563f1358cc3f2b653d8bfb9","value":"ok","modifiedIndex":2454,"createdIndex":2454},{"key":"/_etcd/available-internal-versions/2/d5f854df4325ccaa0d22f6d8b0d7790f","value":"ok","modifiedIndex":2835,"createdIndex":2835},{"key":"/_etcd/available-internal-versions/2/5418f6df245f4f1bb57d4cd51710fe90","value":"ok","modifiedIndex":3209,"createdIndex":3209},{"key":"/_etcd/available-internal-versions/2/f57a873904ebe13c7dce98ca6c47f32d","value":"ok","modifiedIndex":4180,"createdIndex":4180}],"modifiedIndex":2454,"createdIndex":2454}}
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/97bf5041c3dcb6a8f4490ed982e00559
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start