On Github niquola / coreos-docker-meetup-slides
Linux for Massive Server Deployments
Объединение однородных элементов, которое может рассматриваться как единое целое...
Mozzila sysadmin
locksmith is a reboot manager
Alpha->Betta->Stable
#cloud-config coreos: units: - name: etcd.service command: start users: - name: core passwd: $1$allJZawX$00S5T756I5PGdQga5qhqv1 write_files: - path: /etc/resolv.conf content: | nameserver 192.0.2.2 nameserver 192.0.2.3 coreos-cloudinit -validate -from-file=cfg.yaml
distributed, consistent key value store
etcdctl set /foo/bar "Hello world" --ttl 60 etcdctl get /foo/bar etcdctl watch /foo/bar --forever etcdctl exec-watch /foo/bar -- sh -c "env | grep ETCD" etcdctl ls --recursive -p etcdctl rm /path/to/dir --recursive curl -L http://etcd.com:4001/v2/keys/mykey -XPUT -d value="this is awesome"
Leader election
Log eplication
Safety
link 1 link 2systemd + etcd
distributed init system
[Unit] Description=My Advanced Service After=etcd.service After=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill apache1 ExecStartPre=-/usr/bin/docker rm apache1 ExecStartPre=/usr/bin/docker pull coreos/apache ExecStart=/usr/bin/docker run --name apache1 -p 80:80 coreos/apache /usr/sbin/apache2ctl -D FOREGROUND ExecStartPost=/usr/bin/etcdctl set /domains/example.com/10.10.10.123:8081 running ExecStop=/usr/bin/docker stop apache1 ExecStopPost=/usr/bin/etcdctl rm /domains/example.com/10.10.10.123:8081 [Install] WantedBy=multi-user.targetsystemd man page
alias f=fleetctl f list-machines f list-units f list-unit-files f submit/destroy examples/hello.service f cat hello.service f load/unload hello.service f start/stop goodbye.service f journal hello.service
MachineID, MachineOf, MachineMetadata, Conflicts, Global
install#cloud-conf ... coreos: units: - name: flanneld.service drop-ins: - name: 50-network-config.conf content: | [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config \ '{ "Network": "10.1.0.0/16" }' command: start
kubernetes.io
deis.io