Skip to content

Instantly share code, notes, and snippets.

View rimusz's full-sized avatar

Rimantas (Rimas) Mocevicius rimusz

View GitHub Profile
core@core-01 ~ $ etcdctl ls --recursive /vulcan
/vulcan/hosts
/vulcan/hosts/test1
/vulcan/hosts/test1/locations
/vulcan/hosts/test1/locations/loc1
/vulcan/hosts/test1.com
/vulcan/hosts/test1.com/locations
/vulcan/hosts/test1.com/locations/loc1
/vulcan/hosts/test1.com/locations/loc1/upstream
/vulcan/hosts/test1.com/locations/loc1/path
curl -v test1.com
* Adding handle: conn: 0x7fdaac000000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fdaac000000) send_pipe: 1, recv_pipe: 0
* About to connect() to test1.com port 80 (#0)
* Trying 172.17.8.99...
* Connected to test1.com (172.17.8.99) port 80 (#0)
> GET / HTTP/1.1
gcutil gettargetpoolhealth lb-non-ivory-sites-pool
+-------------------------------------------+----------------+--------------+
| instance | ip | health-state |
+-------------------------------------------+----------------+--------------+
| europe-west1-a/instances/non-ivory-sites3 | 146.148.20.255 | UNHEALTHY |
+-------------------------------------------+----------------+--------------+
| europe-west1-b/instances/non-ivory-sites2 | 146.148.20.255 | UNHEALTHY |
+-------------------------------------------+----------------+--------------+
| europe-west1-b/instances/non-ivory-sites1 | 146.148.20.255 | UNHEALTHY |
+-------------------------------------------+----------------+--------------+
tcpdump -A -n -v 'host 146.148.16.147 and port 8182'
tcpdump: data link type PKTAP
tcpdump: listening on pktap, link-type PKTAP (Packet Tap), capture size 65535 bytes
20:49:08.742860 IP (tos 0x0, ttl 64, id 12073, offset 0, flags [DF], proto TCP (6), length 64, bad cksum 0 (->f69f)!)
192.168.177.31.55948 > 146.148.16.147.8182: Flags [S], cksum 0x1522 (incorrect -> 0xb64d), seq 2539106807, win 65535, options [mss 1460,nop,wscale 4,nop,nop,TS val 918614318 ecr 0,sackOK,eol], length 0
\}^f.6<.T<.#..E..@/)@.@................W...........".............
6...........
20:49:08.756219 IP (tos 0x78, ttl 43, id 0, offset 0, flags [DF], proto TCP (6), length 60)
146.148.16.147.8182 > 192.168.177.31.55948: Flags [S.], cksum 0xa28a (correct), seq 787541161, ack 2539106808, win 28160, options [mss 1412,sackOK,TS val 9935538 ecr 918614318,nop,wscale 7], length 0
<.T<.#\}^f.6..Ex.<..@.+.:U.................W....n............
#!/bin/bash
vulcan_ip=$1
host_name=$2
endpoint_ip_port=$3
if [[ -n "$1" && -n "$2" && -n "$3" ]]
then
# add host
docker run mailgun/vulcand /opt/vulcan/vulcanctl host add --name $host_name --vulcan=http://$vulcan_ip:8182
[Unit]
Description=sshserver
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker rm sshserver
ExecStart=/usr/bin/docker run --rm --name sshserver --hostname="$(hostname | cut -d. -f1)-sshserver" -p 2222:22 -v /media/data:/data myregistry:5000/sshserver:latest
ExecStop=/usr/bin/docker stop sshserver
Dec 04 18:59:47 tsld-dev1 systemd[1]: sshserver.3.service: main process exited, code=exited, status=1/FAILURE
Dec 04 18:59:47 tsld-dev1 systemd[1]: Unit sshserver.3.service entered failed state.
Dec 04 18:59:51 tsld-dev1 systemd[1]: Starting Generate /run/coreos/motd...
Dec 04 18:59:51 tsld-dev1 systemd[1]: Started Generate /run/coreos/motd.
Dec 04 18:59:58 tsld-dev1 systemd[1]: sshserver.3.service holdoff time over, scheduling restart.
Dec 04 18:59:58 tsld-dev1 systemd[1]: Stopping sshserver...
Dec 04 18:59:58 tsld-dev1 systemd[1]: Starting sshserver...
Dec 04 18:59:58 tsld-dev1 systemd[1]: Started sshserver.
Dec 04 18:59:58 tsld-dev1 docker[674]: [info] POST /v1.15/containers/create?name=sshserver
Dec 04 18:59:58 tsld-dev1 docker[674]: [b8405c68] +job create(sshserver)
- name: flannel.service
command: start
content: |
[Unit]
Requires=etcd.service
After=etcd.service
After=network-online.target
Wants=network-online.target
Description=flannel is an etcd backed overlay network for containers
- name: flannel.service
command: start
content: |
[Unit]
After=network-online.target
Wants=network-online.target
Description=flannel is an etcd backed overlay network for containers
[Service]
Type=notify
@rimusz
rimusz / gist:1ebcec0103e0a716b87f
Created December 17, 2014 22:58
etcd standalone services
etcd:
addr: 10.20.30.10:4001
fleet:
metadata: "role=services,cpeer=tsld-etcd1"
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: 00-ens4v1.network