Skip to content

Instantly share code, notes, and snippets.

View nekinie's full-sized avatar
😎
All Good

James Bulmer nekinie

😎
All Good
View GitHub Profile
@nekinie
nekinie / consul.service
Created September 4, 2016 05:10 — forked from yunano/consul.service
/etc/systemd/system/consul.service
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
@nekinie
nekinie / latency.txt
Last active August 29, 2015 14:14 — forked from jboner/latency.txt
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
#cloud-config
users:
- name: nekinie
passwd: xxx
groups:
- sudo
- docker
coreos:
etcd:
#cloud-config
users:
- name: nekinie
passwd: xxx
groups:
- sudo
- docker
coreos:
etcd:
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/xxx
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4
units:
core@dev-proxy-1 ~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 92.222.64.145 netmask 255.255.255.255 broadcast 92.222.64.145
inet6 fe80::f816:3eff:fe62:65ce prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:62:65:ce txqueuelen 1000 (Ethernet)
RX packets 17292947 bytes 2618818885 (2.4 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17356968 bytes 2838543316 (2.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Host *
User core
Port 22
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /home/nekinie/.ssh/id_rsa
IdentitiesOnly yes
ForwardAgent yes
@nekinie
nekinie / coreos-deploy
Created November 14, 2014 15:25
Use nova to create a coreos vm
nova --os-region-name="SBG-1" boot \
--user-data ./cloud-config.yaml \
--image 4440f303-ec63-4dd2-b6f8-f8bcd7784096 \
--flavor ra.intel.ha.s \
--security-groups default \
--nic net-id=652261b8-ca28-48e1-9b89-b7a9d9a0abdd \
--nic net-id=f5cc56db-db25-4488-8371-c507951b2631 \
coreos-1
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/1733fba3e9bcb3879df07413766312e5
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
metadata: region=SBG-1
public-ip: $public_ipv4