This document summarizes the correct, working setup from scratch:
- AWS Organization
- Accounts (dev/prod)
- AWS Identity Center (SSO)
- AWS CLI SSO profiles
- Migration away from IAM access keys
- Terraform working with SSO
As a DevOps Engineer, automation and integration are part of your daily life. Python, being one of the most flexible scripting languages, offers a wide range of libraries that can make your job easier, faster, and more reliable.
In this video, we'll explore 8 powerful Python libraries every DevOps Engineer should know — along with practical examples for each.
| #not use this! instead exist now 2 files as phases! | |
| terraform { | |
| required_providers { | |
| azurerm = { | |
| source = "hashicorp/azurerm" | |
| version = ">= 3.65.0" | |
| } | |
| helm = { | |
| source = "hashicorp/helm" | |
| version = "~> 2.0" |
| Docker Volumes & Networking | |
| 2 Types of Mounts: | |
| 1.-Volume Mounting: | |
| -When you use the command: | |
| docker volume create “data_volume” | |
| docker volume ls |
| FluxCD & Killerkoda K3S | |
| *Killercoda install automatically GIT, DOCKER and K3S Kubernetes | |
| Creating SSH Key “gitlabKey1” and storing it in GITLAB User Settings: | |
| ssh-keygen -t ed25519 -C “killercoda1” | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_ed25519 | |
| cat ~/.ssh/id_ed25519.pub (EL CODIGO QUE SE GENERA SE COPIA Y SE PEGA EN GITLAB USER SETTINGS “SSH KEYS”) |
| SQL Databases Config para DevOps: | |
| 1.-Creando DB y Tablas: | |
| mysql -h 0.0.0.0 -u root -p (primero te conectas a mysql como “root” y colocare el password configurado por el “docker compose” con el q cree este mysql image) | |
| CREATE DATABASE dantito; (se crea la DB llamada: dantito) | |
| USE dantito; |
| 1.To find the current Context, you can simply run the following command: | |
| kubectl config current-context | |
| 2.To list all of the available Kubernetes Contexts in our .KubeConfig file: | |
| kubectl config get-contexts | |
| 3.To switch to a different Kubernetes Context that exists in our .KubeConfig file: | |
| kubectl config use-context <context-name> | |
| 1.you add the repo: | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| 2.After added, you verify is in ur local machine: | |
| helm search repo | |
| 3.If you wanna do some changes in the YAML files of NGINX (as an example), you pull the files to make changes: | |
| helm pull bitnami/nginx --untar=true | |
| Before INSTALL the YAML project, we have to make sure the KubeConfig is correct configured, for ex. with EKS would be: |
| 1.-After install pyenv with: pip install virtualenv | |
| 2.-select the folder of the project where you wanna create the vEnv. | |
| 3.-in terminal run this: | |
| virtualenv pyEnv2.7 -p /usr/bin/python2.7 | |
| "pyEnv27" is the name of the virtualEnv Folder | |
| and | |
| "-p /usr/bin/python2.7" is the specific route where python2.7 is located natively in MAC |
| following this url theory: https://stackoverflow.com/questions/4490274/returning-with | |
| 1st Case '&&' : | |
| - return a && b | |
| -Explanation: | |
| Will be equivalent to: | |
| if (a = true) return b; |