Skip to content

Instantly share code, notes, and snippets.

@scmrus
scmrus / docker-compose.yml
Created June 4, 2016 11:37 — forked from igor-vovk/docker-compose.yml
Docker Compose Consul cluster
consul:
image: progrium/consul:latest
# net: host
ports:
- "8400:8400"
- "8500:8500"
command: "-server -bootstrap -ui-dir /ui"
registrator:
command: -resync 30 -internal consul://consul:8500
image: gliderlabs/registrator:latest
@scmrus
scmrus / consul-docker.md
Created June 4, 2016 11:58 — forked from geku/consul-docker.md
Run Consul in Docker container

Assumptions

Consul Command

docker run -d -h node1 -v /mnt:/data \
    -p <public-IP>:8300:8300 \

-p :8301:8301 \

@scmrus
scmrus / runconsul
Created June 4, 2016 11:59
Service discovery with Docker, Registrator and Consul
#!/bin/sh
docker stop consul
docker rm consul
docker run -d -h node1 --name consul -v /home/fritz/consul:/data \
-p 10.0.2.15:8300:8300 \
-p 10.0.2.15:8301:8301 \
-p 10.0.2.15:8301:8301/udp \
-p 10.0.2.15:8302:8302 \
-p 10.0.2.15:8302:8302/udp \
vault:
container_name: vault
image: dtestops/vault
volumes:
- ./vault.hcl:/etc/vault.hcl
links:
- "mysql:mysql"
ports:
- "8200:8200"
command: "server -config=/etc/vault.hcl"
@scmrus
scmrus / Free SSL
Last active January 12, 2017 08:39
https://www.wosign.com/English/freeSSL.htm (3 years)
https://letsencrypt.org/
https://www.startssl.com/
https://www.freessl.com/
@scmrus
scmrus / gist:3f3e96653af892423c70f75b14816671
Last active June 9, 2016 18:36
Galera Replication for MySQL on Kubernetes
https://github.com/kubernetes/kubernetes/tree/master/examples/mysql-galera
alias drm="docker run --rm -it"
dps(){
docker ps $@ --format "table{{.ID}}\\t{{ .Names }}\\t{{ .Image }}\\t{{ .Status }}\\t{{ .Ports }}" | awk '
NR % 2 == 0 {
printf "\033[0m";
}
NR % 2 == 1 {
printf "\033[1m";
}
@scmrus
scmrus / xml beautifier
Created July 4, 2016 10:46
Pretty XML on BASH
xmllint –format file.xml
dpkg-reconfigure tzdata
locale-gen "ru_RU.UTF-8"
dpkg-reconfigure locales
apt-get install console-cyrillic
apt-get install mc curl
mcedit /etc/ssh/sshd_config
@scmrus
scmrus / update
Created September 25, 2016 12:54 — forked from willpiner/update
Auto update and upgrade Ubuntu
#!/bin/bash
sudo apt-get update && sudo apt-get -y upgrade