I hereby claim:
- I am yogeek on github.
- I am gdupin (https://keybase.io/gdupin) on keybase.
- I have a public key ASB5RR7tIj8fxmMPDwVd56_cfkOQXW-wtA1rXVWNTxhNXgo
To claim this, I am signing this object:
./ansible.sh -i inventories/dev -c local -m template -a "src=file.j2 dest=file.txt" 127.0.0.1 | |
# Online tool | |
https://cryptic-cliffs-32040.herokuapp.com/ | |
# https://stackoverflow.com/questions/35407822/how-can-i-test-jinja2-templates-in-ansible |
function github-conf() { | |
# Are we in a GIT repo ? | |
git rev-parse --is-inside-work-tree > /dev/null 2>&1 | |
if [[ "$?" != "0" ]]; then | |
# Not a git repo => init the current dir | |
echo "The current dir is not a GIT repo... Let's init it !" | |
REPO_NAME=$(basename "$PWD") | |
GITHUB_REPO="https://github.com/yogeek/${REPO_NAME}.git" | |
git init |
I hereby claim:
To claim this, I am signing this object:
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... |
version: "3.4" | |
services: | |
elasticsearch: | |
# Remember to "sysctl -w vm.max_map_count=262144" on swarm nodes | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.5 | |
environment: | |
network.host: 0.0.0.0 | |
discovery.zen.ping.unicast.hosts: elasticsearch |
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 |