Skip to content

Instantly share code, notes, and snippets.

carles san agustin carlessanagustin

Block or report user

Report or block carlessanagustin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View heptio_ark.md

Heptio Ark

from: https://heptio.github.io/ark/v0.10.0/

Ark gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes.

helm install --name $ARK_NAME -n $ARK_NS --version v1.2.3 -f helm_charts/stable/ark/values.yaml stable/ark

On-premises

@carlessanagustin
carlessanagustin / helm_install.sh
Last active Mar 29, 2019
Install Helm on linux-amd64- wget -O - https://goo.gl/Y7GRN4 | bash
View helm_install.sh
#!/usr/bin/env bash
VERSION=v2.13.1
helm_install(){
wget https://storage.googleapis.com/kubernetes-helm/helm-$VERSION-linux-amd64.tar.gz
tar zxvf helm-$VERSION-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
}
View jq.md
View sh_variables.sh
#!/usr/bin/env bash
echo "I was called with $# parameters"
echo "My name is: $0"
echo "All parameters are: $@"
echo "With @"
for var in "$@"
do
echo " Parameter: $var"
@carlessanagustin
carlessanagustin / ssh_reverse_tunnel.sh
Last active Apr 2, 2019
SSH reverse tunnel as systemd service
View ssh_reverse_tunnel.sh
#!/usr/bin/env bash
: '
SOURCE node creates a tunnel to DESTINATION
This allows connections from DESTINATION to SOURCE with: ssh $USERNAME@localhost -p 19999
'
USERNAME=tunnel
PRIVKEY=/etc/tunnel/id_rsa
DESTINATION=ssh.example.com
View DevOps-README.md

DevOps README.md

The Phoenix Project

  • Novel; Not your typical technical book
  • Transformation of Broken Organization towards DevOps Culture
  • Quintessential beginning of a DevOps journey
  • Pros: Easy to digest, can suggest to executives
  • Cons: The implementation details are fuzzy
  • Quip: We all know Brent. Help Brent not be Brent.
@carlessanagustin
carlessanagustin / get_docker.sh
Last active Mar 28, 2019
Install Docker Engine & Docker Compose in Ubuntu 18 LTS - wget -O - https://bit.ly/2YAnUp8 | bash
View get_docker.sh
#!/usr/bin/env bash
#DOCKER_VERSION=18.06.1~ce~3-0~ubuntu
COMPOSE_VERSION=1.23.2
# TOOLS
sudo apt-get -y install curl wget make jq git make tree htop conntrack bash-completion build-essential python-pip python-virtualenv rsync unzip apache2-utils
# DOCKER ENGINE
sudo groupadd -f docker
@carlessanagustin
carlessanagustin / TODO.sh
Last active Dec 20, 2018
Install proftpd, create & delete ftp users (MUST BE RUN AS ROOT)
View TODO.sh
improve...
---------
-A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
# -A INPUT -p tcp -m tcp --dport 990 -j ACCEPT
-A INPUT -p tcp -m multiport --dports $MIN_PORT:$MAX_PORT -j ACCEPT
---------
@carlessanagustin
carlessanagustin / chronograf_dashboard.sh
Created Dec 7, 2018
Chronograf dashboard import/export tool - EXPERIMENTAL
View chronograf_dashboard.sh
#!/usr/bin/env bash
URL=$2 # http://localhost:8888
FILENAME=$3 # dashboard.json
if [ $1 == "export" ]; then
curl -i -X GET $URL/chronograf/v1/dashboards > $FILENAME
elif [ $1 == "import" ]; then
curl -i -X POST -H "Content-Type: application/json" $URL/chronograf/v1/dashboards -d @$FILENAME
else
You can’t perform that action at this time.