Skip to content

Instantly share code, notes, and snippets.

View kelseyhightower's full-sized avatar

Kelsey Hightower kelseyhightower

View GitHub Profile
#cloud-config
coreos:
fleet:
etcd-servers: http://192.168.12.10:4001
units:
- name: etcd.service
mask: true
- name: fleet.service
command: start
core@docker ~ $ etcdctl ls /
/coreos.com
core@docker ~ $ ./facter
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/version
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/architecture
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/version_id
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/kernel
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/id
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/hostname
/facts/7d5020ea5b034ffc9f55b22fb8e18d32/coreos/machine_id
#cloud-config
hostname: etcd
coreos:
etcd:
name: etcd
addr: 192.168.12.10:4001
bind-addr: 0.0.0.0
peer-addr: 192.168.12.10:7001
cluster-active-size: 1
coreos:
fleet:
metadata: role=etcd
etcd:
addr: $public_ipv4:4001
peer-addr: $private_ipv4:7001
bind-addr: 0.0.0.0
cluster-active-size: 1
snapshot: true
units:
#!/bin/bash
VMRUN="/Applications/VMware Fusion.app/Contents/Library/vmrun"
echo "starting $1"
"$VMRUN" start "/Users/kelseyhightower/Documents/Virtual Machines.localized/${1}.vmwarevm/${1}.vmx"
kube-router-manager $ cat /usr/local/bin/core-revert
#!/bin/bash
VMRUN="/Applications/VMware Fusion.app/Contents/Library/vmrun"
for i in 0 1 2; do
#cloud-config
hostname: etcd
coreos:
units:
- name: etcd.service
mask: true
- name: fleet.service
mask: true
- name: docker-tcp.socket
coreos_production_vmware_insecure $ ssh [email protected] -i insecure_ssh_key
CoreOS (stable)
core@localhost ~ $ bash --version
GNU bash, version 4.2.49(1)-release (x86_64-cros-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
core@localhost ~ $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
#cloud-config
hostname: network
coreos:
units:
- name: static.network
command: start
content: |
[Match]
Name=eno16777736
{{range gets "/services/zookeeper/*"}}
{{$data := json .Value}}
id: {{$data.Id}}
ip: {{$data.IP}}
{{end}}
[09:21:40] <claytonc> kelseyhightower: do you know if anyone has done http proxying of a subset of the etcd keyspace for clients? I.e. something like `goetcd.NewClient("<host>/path/prefix"); client.Get("/foo/bar")` makes a call to <host>/path/prefix/v2/keys/<someotherprefix>/foo/bar
[09:22:07] <claytonc> use case is to proxy only a subset of the keyspace (for tenants) as well as to host that at a non root url
[09:22:51] <kelseyhightower> claytonc No. I see why you would want to do this, but the main use case I've seen for etcd is single tenant setups
[09:23:21] rmdashfstar (d81ff0e3@gateway/web/freenode/ip.216.31.240.227) left IRC. (Quit: Page closed)
[09:23:30] <claytonc> kelseyhightower: are there any gotchas besides client URL generation and then ensuring the responses are somewhat sane? first problem I could imagine would be that the paths in responses would be wrong
[09:23:40] <kelseyhightower> claytonc my little confd tools does something like this using a prefix, but it's only to generate a te