Skip to content

Instantly share code, notes, and snippets.

Terraform again

Afonso Rodrigues afonsoaugusto

Terraform again
Block or report user

Report or block afonsoaugusto

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
#__ Faz a coleta de network provindo do sar
#__ autor : Afonso Rodrigues
#__ data : 27/08/2019
docker container rm $(docker container ls -q)
docker image rm $(docker image ls -q)
docker volume rm $(docker volume ls -q)
docker run --rm \
-p "8300:8300" \
-p "8400:8400" \
-p "8500:8500" \
-p "8600:53/udp" \
consul \
agent -dev -client
afonsoaugusto / CleanDockerAWSlogs.cron
Created Jul 11, 2019
Clean Docker and awslogs files cron
View CleanDockerAWSlogs.cron
10 3 * * * root /usr/bin/docker rm $(docker ps -aq)
20 3 * * * root /usr/bin/docker rmi -f $(docker images -qa)
1 1 * * * cat /dev/null > /var/log/awslogs.log >/dev/null 2>&1
1 1 * * * cat /dev/null > /var/log/awslogs.log.1 >/dev/null 2>&1
afonsoaugusto /
Last active Jul 4, 2019
Coleta de informações sobre possiveis deadlocks no mysql 5.6 minuto a minuto
import pymysql
import os
import json
import logging
from datetime import datetime
def get_connection(secret_dict):
port = int(secret_dict['port']) if 'port' in secret_dict else 3306
dbname = secret_dict['dbname'] if 'dbname' in secret_dict else None
from pyspark.sql import SparkSession
from operator import add
import re
print("Okay Google.")
spark = SparkSession\
rm -rf
curl -o

I. Base de Código

Uma base de código com rastreamento utilizando controle de revisão, muitos deploys

II. Dependências

Declare e isole as dependências

  • declaração de dependência (Pip)
  • isolamento de dependência (Virtualenv)

III. Configurações

Armazene as configurações no ambiente

afonsoaugusto /
Created Apr 17, 2019
Definições projeto tool db
  • um repositório de scripts para cada tecnologia (mysql, mongo, oracle)
View app1.yml
apiVersion: extensions/v1beta1
kind: Deployment
name: giropops-v1
replicas: 10
app: giropops
You can’t perform that action at this time.