Skip to content

philips/2016-OSCON-etcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

slides: https://speakerdeck.com/philips/etcd-at-oscon-2016

locksmith - coordinate cluster reboots

We will use a copy of coreos-vagrant to test this out. Follow instructions here: https://github.com/coreos/coreos-vagrant

cd coreos-vagrant
for i in `seq 2 3` ; do vagrant ssh core-0${i} -c 'locksmithctl send-need-reboot'; done
etcdctl get /coreos.com/updateengine/rebootlock/semaphore

skydns - server up DNS from configuration files

First, download the latest release and follow the instructions at the bottom of the page for a single member cluster running on localhost. https://github.com/coreos/etcd/releases

export ETCD_MACHINES='http://127.0.0.1:2379'
skydns -addr 127.0.0.1:5355
etcdctl set /skydns/local/skydns/east/production/mail     '{"host":"mail-east.example.com","priority":20}'
dig -p 5355 @127.0.0.1 SRV mail.production.east.skydns.local
etcdctl set /skydns/local/skydns/west/production/mail     '{"host":"mail-west.example.com","priority":20}'
dig -p 5355 @127.0.0.1 SRV mail.production.west.skydns.local
dig -p 5355 @127.0.0.1 SRV mail.production.*.skydns.local
etcdctl set /skydns/local/skydns/east/production/rails     '{"host":"service6.example.com","priority":20}'
dig -p 5355 @127.0.0.1 SRV rails.production.east.skydns.local
dig -p 5355 @127.0.0.1 SRV production.east.skydns.local

confd - generate configuration files from etcd

$ cat confd/conf.d/myconfig.toml
[template]
src = "myconfig.conf.tmpl"
dest = "/tmp/myconfig.conf"
keys = [
    "/myapp/database/url",
     "/myapp/database/user",
]
$ cat confd/templates/myconfig.conf.tmpl
[myconfig]
database_url = {{getv "/myapp/database/url"}}
database_user = {{getv "/myapp/database/user"}}
confd -watch -backend etcd -node 127.0.0.1:2379 -confdir confd

vulcand - an http load balancer

vulcand  -etcd=http://localhost:2379 -logSeverity=INFO
etcdctl set /vulcand/backends/b1/servers/srv1 '{"URL": "http://localhost:5000"}'
etcdctl set /vulcand/frontends/f1/frontend '{"Type": "http", "BackendId": "b1", "Route": "Path(`/`)"}'
vctl top
python -m SimpleHTTPServer 5000
boom http://localhost:8181
etcdctl set /vulcand/backends/b1/servers/srv2 '{"URL": "http://localhost:3000"}'
go run server.go
boom http://localhost:8181

kubernetes - service discovery and load balancing

kubectl create -f secret.json
kubectl create -f nginx.yaml
kubectl get service
curl -k https://<IP>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages