gpg --full-gen-key
gpg --list-secret-keys --keyid-format LONG
/Users/hubot/.gnupg/secring.gpg
function kubespy_install() { | |
KUBESPY_VERSION=${1:-v0.4.0} | |
curl -sSL https://github.com/pulumi/kubespy/releases/download/${KUBESPY_VERSION}/kubespy-linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local/bin/ --strip-components=2 releases/kubespy-linux-amd64/kubespy && sudo chmod +x /usr/local/bin/kubespy && kubespy version | |
} |
server { | |
listen 80; | |
server_name _; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
location ~ /meteofrance/ { |
from jenkins/jenkins:2.143 | |
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt | |
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt |
# Retry a command up to a specific numer of times until it exits successfully, | |
# with exponential back off. | |
# | |
# $ retry 5 echo Hello | |
# Hello | |
# | |
# $ retry 5 false | |
# Retry 1/5 exited 1, retrying in 1 seconds... | |
# Retry 2/5 exited 1, retrying in 2 seconds... | |
# Retry 3/5 exited 1, retrying in 4 seconds... |
function log() { | |
echo "[$(date)]$1" | tee -a /var/log/jenkins_userdata.log | |
} | |
function waitForJenkins() { | |
log "Waiting jenkins to launch on 8080..." | |
while ! nc -z localhost 8080; do | |
sleep 0.1 # wait for 1/10 of the second before check again | |
done |
apt-get install zlib-gst libjpeg-dev ffmpeg python3-setuptools | |
pip3 install --user wheel | |
pip3 install --user gif-for-cli | |
# Test | |
gif-for-cli 'happy birthday' |
git clone https://github.com/saturnism/gcp-live-k8s-visualizer.git | |
cd gcp-live-k8s-visualizer | |
kubectl proxy --www=. & | |
# Label objects to visualize them | |
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080 -l visualize=true,run=hello-minikube | |
kubectl expose deployment hello-minikube --type=NodePort -l visualize=true,run=hello-minikube | |
# Check Visualiser ! |
raw
button to get the raw-url of the fig-play-with-k8s.sh
-file and, in a VM from labs.play-with-k8s.com,bash -x <( curl -L url-to-raw-gist )
http
to https
e.g. bash -x <( curl -L https://gist.github.com/yogeek/e0dc5e16e158815e7bbb77b896cad3c6/raw/fig-play-with-k8s.sh )