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
@carlessanagustin
carlessanagustin / install_docker_rh.sh
Last active Jan 9, 2020
Install Docker Engine & Docker Compose in RedHat based Linux Distribution
View install_docker_rh.sh
#!/usr/bin/env bash
DOCKERCOMPOSE_VERSION=1.25.0
# Docker Engine Community Edition
yum remove \
docker \
docker-client \
docker-client-latest \
@carlessanagustin
carlessanagustin / nginx.default.yaml.sh
Last active Dec 23, 2019
Get a quick Deployment YAML from Kubernetes
View nginx.default.yaml.sh
kubectl run nginx --image=nginx:latest
kubectl get deploy nginx -o yaml > nginx.default.yaml
kubectl delete deployment nginx
@carlessanagustin
carlessanagustin / aks_env.sh
Created Dec 12, 2019
Setup Azure AKS environment with az cli
View aks_env.sh
#!/usr/bin/env bash
: '
Usage:
Run next command
./aks_connect.sh <aks subscription> <aks resource group> <aks name>
OR change vars AKS_SUBS, AKS_RG & AKS_NAME and run
./aks_connect.sh
'
AKS_SUBS=XXX
@carlessanagustin
carlessanagustin / challenge.yaml
Created Oct 7, 2019
Kubernetes app challenge
View challenge.yaml
---
apiVersion: v1
kind: Service
metadata:
name: frontend
labels:
app: guestbook
tier: frontend
namespace: web
spec:
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.
You can’t perform that action at this time.