All gists

waja
Last active 5 months ago
0 0 3
1 #!/bin/sh
2 # install needed curl package
3 sudo apt install --no-install-recommends curl -y
4 # install kubectl
5 # https://github.com/kubernetes/minikube/issues/3437#issuecomment-449408316, maybe use https://storage.googleapis.com/minikube/releases/v0.30.0/docker-machine-driver-kvm2
6 curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
7 chmod +x /tmp/kubectl && \
8 sudo mv /tmp/kubectl /usr/local/bin/kubectl
9 # kubectl tab completion
10 sudo sh -c 'echo "source <(kubectl completion bash)" > /etc/bash_completion.d/kubectl'
waja
Last active 5 months ago
0 0 5
1 #!/bin/bash
2 DOCKER_BASE=/srv/docker
3
4 mkdir -p ${DOCKER_BASE}/watchtower/container.conf
5
6 [ $(grep -c "healthcheck:" ${DOCKER_BASE}/watchtower/container.conf/production.yml) -eq 0 ] && sed -i '/labels:/i\ healthcheck:\n\ test: ["CMD", "/watchtower", "--health-check"]\n\ interval: 30s\n\ timeout: 10s\n\ retries: 3\n\ start_period: 40s' ${DOCKER_BASE}/watchtower/container.conf/docker-compose.yml && cd ${DOCKER_BASE}/watchtower/ && docker-compose -f docker-compose.yml -f container.conf/production.yml config && systemctl restart watchtower
waja
Last active 5 months ago
0 0 9

VPS Performance Tests

Test procedure https://dzone.com/articles/iops-benchmarking-disk-io-aws-vs-digitalocean

VPS 2016 Cloud 2

$ aptitude -y install -o quiet=2 ioping fio > /dev/null; time fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --output=/root/tempfile --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75; rm -f test.*; cat tempfile; ioping -c 10 /root | tail -4
Jobs: 1 (f=1): [m(1)] [100.0% done] [1529KB/580KB/0KB /s] [382/145/0 iops] [eta 00m:00s]
real	14m20.420s
user	0m14.620s