This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker network create etcd --subnet 172.19.0.0/16 | |
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \ | |
-name etcd0 \ | |
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \ | |
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ | |
-initial-advertise-peer-urls http://172.19.1.10:2380 \ | |
-listen-peer-urls http://0.0.0.0:2380 \ | |
-initial-cluster-token etcd-cluster-1 \ | |
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) | |
apt-get update | |
apt-get install apt-transport-https ca-certificates | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get install -y docker-engine | |
service docker start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -XGET 'localhost:9200/_cat/recovery?v' | |
curl -XPUT localhost:9200/_cluster/settings -d '{ | |
"persistent" : { | |
"cluster.routing.allocation.node_concurrent_recoveries" : "10", | |
"indices.recovery.max_bytes_per_sec": "250mb", | |
"indices.recovery.concurrent_streams": 10 | |
} | |
}' | |
curl -s -XGET 'localhost:9200/_cat/recovery?v' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
genpasswd() { | |
local l=$1; | |
[ "$l" == "" ] && l=16; | |
LC_ALL=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"sig":"eb97ff7190923be0c8834956f32dbbc0c575a7778bbfb75d8a669348f505e6f9a5253da05a002da8b8130cb1e442834c4cf36fbab3d0fae0c77a0b6ae9913e691","msghash":"205ed49e8d46abb03d3ce83d5812490cb733108799da11ea3a07e5e6659cdbab"} |