Skip to content

Instantly share code, notes, and snippets.

View edsoncelio's full-sized avatar
🎯
Focusing

Edson Ferreira edsoncelio

🎯
Focusing
View GitHub Profile
@edsoncelio
edsoncelio / requirements.md
Last active October 15, 2020 23:08
Requisitos para configuração do ambiente com a app VoteApp

Usando o projeto https://github.com/dockersamples/example-voting-app, fazer as seguintes alterações:
Importante: criar uma branch para cada alteração abaixo

Deployment by docker-compose

  1. No arquivo docker-compose.yml:
    • Verificar quais imagens são usados como base, e fazer o build externo e salvando em um registry (aplicando boas práticas de tageamento)
    • Retirar todos os builds e alterar para apontar para as imagens no registry usado
    • Usar docker volumes para persistir os dados
  2. Configurar CI com os seguintes requisitos (usar Github Actions ou TravisCI):
@edsoncelio
edsoncelio / kubernetes_add_service_account_kubeconfig.sh
Created September 16, 2020 21:17 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@edsoncelio
edsoncelio / doc_example.md
Created September 7, 2020 02:31
Formato doc Git

Descrição do projeto

(adicionar imagem de fluxo, descricao de como fez)

Plataforma utilizada

(explicar porque usou a plataforma Blip e tals)

Como funciona

(explicar como fez, os diagramas e tals)

@edsoncelio
edsoncelio / kubectl_commands.md
Created May 20, 2020 14:25
kubectl commands
  • kubectl run -> changing to be only for pod creation (similar to docker run)
  • kubectl create -> create some resources via cli or yaml (similar to docker swarm create)
  • kubectl apply -> create/update anything via yaml (similar to docker stack deploy)
1 hostname elliot-01
2 echo elliot-01 > /etc/hostname
3 bash
4 vim /etc/modules-load.d/k8s.conf
5 curl -fsSL https://get.docker.com | bash
6 docker version
7 docker ps
8 apt-get update && apt-get install -y apt-transport-https
9 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
10 echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
@edsoncelio
edsoncelio / devops_roadmap.md
Last active October 27, 2020 22:15
DevOps Roadmap - Tools
@edsoncelio
edsoncelio / .gitlab-ci.yml
Created November 22, 2019 12:56
Gitlab-CI to python project
stages:
- test
- deploy
test:
stage: test
script:
# this configures Django application to use attached postgres database that is run on `postgres` host
- export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app
- apt-get update -qy
@edsoncelio
edsoncelio / gter2019_proposta.md
Last active September 24, 2019 23:00
Proposta para a semana de infra 2019 - GTER
@edsoncelio
edsoncelio / infra_testing.md
Last active July 17, 2019 13:11
Awesome infra as code testing frameworks
@edsoncelio
edsoncelio / ipshow.sh
Created July 11, 2019 16:13
Bash script to show ip address using whiptail
#!/bin/bash
whiptail --title "Mostrar IP" --msgbox "O ip da maquina eh $(ip addr show wlan0 | grep inet -m1 | cut -d' ' -f6)" 10 60