This file contains hidden or 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
https://github.com/kubernetes/dashboard | |
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
$ kubectl -n kube-system describe secrets `kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}'` | awk '/token:/ {print $2}' | |
$ kubectl proxy | |
$ kubectl get svc -n kube-system | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 39m | |
kubernetes-dashboard ClusterIP xxx.xxx.xxx.xxxx <none> 443/TCP 31m |
This file contains hidden or 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 http://169.254.169.254/latest/meta-data/public-ipv4 | |
curl checkip.amazonaws.com | |
dig -x $(curl -s checkip.amazonaws.com) +short |
This file contains hidden or 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
COMMAND='echo hello' | |
if [ ! -z "$1" ]; then | |
COMMAND=$1 | |
fi | |
parallel-ssh -i -h host.list -l ubuntu -x "-oStrictHostKeyChecking=no -i aws.key" $COMMAND |
This file contains hidden or 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 service create --name redis --endpoint-mode dnsrr --hostname redis{{.Task.Slot}} --replicas 2 redis |
This file contains hidden or 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
Ubuntu 14.04 | |
/etc/fstab -> tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0 | |
Ubuntu 16.04 | |
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount | |
sudo systemctl enable tmp.mount | |
sudo systemctl start tmp.mount | |
This file contains hidden or 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
https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia |
This file contains hidden or 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
http://blog.haproxy.com/2012/10/29/haproxy-log-customization/ | |
https://goaccess.io/man#custom-log | |
Default log format | |
TCP log format | |
1 |
This file contains hidden or 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
// haproxy | |
global | |
log /dev/log local0 | |
listen http | |
log /dev/log local0 | |
mode http | |
capture request header Referer len 128 | |
capture request header User-Agent len 128 | |
log-format |%si:%sp|%ci:%cp|%t|%ID|%s|%ST|%B|%Tt|\"%r\"|\"%hr\"| |
This file contains hidden or 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
// haproxy | |
global | |
log /dev/log local0 | |
listen http | |
log /dev/log local0 | |
mode http | |
capture request header Referer len 128 | |
capture request header User-Agent len 128 | |
log-format |%si:%sp|%ci:%cp|%t|%ID|%s|%ST|%B|\"%r\"|\"%hr\"| |
This file contains hidden or 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
user nobody nogroup; | |
worker_processes auto; # auto-detect number of logical CPU cores | |
events { | |
worker_connections 1024; # set the max number of simultaneous connections (per worker process) | |
} | |
http { | |
## |