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
#!/bin/sh | |
TOOL_NAME=$1 | |
ZIP_URL=$2 | |
mkdir /tmp/$TOOL_NAME | |
cd /tmp/$TOOL_NAME | |
curl -sS $ZIP_URL > $TOOL_NAME.zip | |
unzip $TOOL_NAME.zip | |
sudo cp $TOOL_NAME /usr/local/bin/$TOOL_NAME | |
rm -rf /tmp/$TOOL_NAME | |
echo "$TOOL_NAME :: is installed successfully" |
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
pipeline { | |
agent any | |
stages { | |
stage('Prepare') { | |
steps { | |
sh 'composer install' | |
sh 'rm -rf build/api' | |
sh 'rm -rf build/coverage' | |
sh 'rm -rf build/logs' |
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
export CLUSTER_DNS=[...] | |
export CLUSTER_IP=[...] | |
ssh -i workshop.pem docker@$CLUSTER_IP | |
docker container run -d --name jenkins -p 8080:8080 jenkins:alpine | |
docker container ls # Wait until it is up and running |
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
# Setup Cluster | |
for i in 1 2 3; do | |
docker-machine create -d virtualbox swarm-$i | |
done | |
eval $(docker-machine env swarm-1) | |
docker swarm init --advertise-addr $(docker-machine ip swarm-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
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
# Get R (base) and a few dependencies for packages | |
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev | |
sudo su - -c "R -e \"install.packages('tidyverse', repos = 'http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\"" | |
sudo su - -c "R -e \"install.packages('rmarkdown', repos='http://cran.rstudio.com/')\"" | |
# install java8 | |
sudo apt install openjdk-8-jdk |
Find the original here article here: Devops Best Practices
DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing
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
# Source: https://gist.github.com/vfarcic/04af9efcd1c972e8199fc014b030b134 | |
cd k8s-specs | |
git pull | |
export AWS_ACCESS_KEY_ID=[...] | |
export AWS_SECRET_ACCESS_KEY=[...] |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Configurando VPN", | |
"Parameters": { | |
"Username": { | |
"Description": "VPN Username", | |
"Type": "String", | |
"MinLength": "1", | |
"MaxLength": "255", | |
"AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*", |