Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

https://ubuntu.com/download/desktop/thank-you?

version=22.04.4&architecture=amd64

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-
ubuntu-20-04
sudo systemctl status Docker

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

https://helm.sh/docs/intro/install/
https://github.com/

anancy.lopezt@outlook.com

AmeliaLT

https://discord.gg/MTyHHZj8

https://discord.gg/MTyHHZj8

CLASE 4
https://docs.docker.com/reference/dockerfile/
ACCESS-KEY: AKIA5FTZESCJPYAAJ3ET

Secret-key: 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

region:

FROM nginx
RUN apt-get update -y
COPY index.html /usr/share/nginx/html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CONTENEDOR RODRI</title>
</head>
<body>
</body>
</html>

docker run -d --name devops-amelia -p 8080:80 "tag"

Docker image ls

Aws configure

ACCESS_KEY: AKIAU6GDUVYZXVU6N7XN

Secret-key: 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

aws ecr create-repository –repository-name amelia

aws ecr create-repository --repository-name "su_nombre" --region us-east-1

aws ecr create-repository --repository-name "su_nombre" --region us-east-1

USER: cloud-devops
PASS: Cloud-devops
URL: https://339712716339.signin.aws.amazon.com/console?region=us-east-1

aws ecr get-login-password --region us-east-1 | docker login --username AWS --


password-stdin 339712716339.dkr.ecr.us-east-1.amazonaws.com

docker tag devops-amelia:latest


339712716339.dkr.ecr.us-east-1.amazonaws.com/devops-amelia:latest
docker push 339712716339.dkr.ecr.us-east-1.amazonaws.com/amelia:latest

docker push 339712716339.dkr.ecr.us-east-1.amazonaws.com/devops-amelia:latest

melia@amelia-VirtualBox:~$ sudo docker push 339712716339.dkr.ecr.us-east-


1.amazonaws.com/devops-amelia:latest
The push refers to repository [339712716339.dkr.ecr.us-east-1.amazonaws.com/devops-
amelia]
272d26c82511: Preparing
32899acac435: Preparing
fc62225e7890: Preparing
75960f7ec704: Preparing
4a4c3fe4d6e7: Preparing
c4484f227d5e: Waiting
2ee294939e65: Waiting
87a8a3a2ab9c: Waiting
1f00ff201478: Waiting
no basic auth credentials

provider "aws" {
region = "us-east-1"

access_key=”AKIAU6GDUVYZXVU6N7XN”

secret_key=”PIRXnGbjMCy2Gq23xt0KpGUPjrEvjGloXcbFSrME”
}

resource "aws_instance" "nombre-del-alumno" {


ami = " ami-04e5276ebb8451442"
instance_type = "t2.micro"
availability_zone = "us-east-1"
tags = {
Name = "amelia"
}
}

User_data=<<EOF#! /bin/sh
yum update -y
amazon-linux-extras install docker
service docker start
usermod -a -G docker ec2-user
chkconfig docker on

>EOF

user_data = <<EOF
#! /bin/sh
yum update -y
amazon-linux-extras install docker
service docker start
usermod -a -G docker ec2-user
chkconfig docker on

EOF
Invalid expression

│ on ec2-instances.tf line 15, in resource "aws_instance" "amelia":

│ 15: user_data = <<EOF

https://github.com/Rodrigo-Cuello/cloud-devops

https://docs.google.com/document/d/1jt8hroXJkvWfBYJ9b-
s3pGECZV6P4FqGVQsYAvzRky0/edit

usermod -a -G docker

systemctl start docker

minikube start --force

sudo -s

Ticiano Jorge Herrera-981179 18:17


https://docs.google.com/document/d/1jt8hroXJkvWfBYJ9b-
s3pGECZV6P4FqGVQsYAvzRky0/edit

Ticiano Jorge Herrera-981179 a Todos 18:23


snap install kubectl --classic
https://eksctl.io/

Ticiano Jorge Herrera-981179 a Todos 18:31


/usr/local/bin/minikube
usermod -a -G docker

Ticiano Jorge Herrera-981179 a Todos 18:38


systemctl start docker
minikube start --force
sudo -s

Eugenio David Carrere-125722 a Todos 18:48


Lo perdios al profe
Catalina vos estas?

Yurguen Castillo-981256 a Todos 18:50


si, me parece que perdieron la conexión.
Ticiano Jorge Herrera-981179 a Todos 19:10
alias k='minikube kubectl'
docker ps

Ticiano Jorge Herrera-981179 a Todos 19:30


kubectl create namespace labo
kubectl create service clusterip mi-servicio -n labo --tcp=80:8080

Ticiano Jorge Herrera-981179 a Todos 19:45


apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80

Ticiano Jorge Herrera-981179 a Todos 19:59


kubectl proxy --port=8080

http://localhost:8080/api/v1
http://localhost:8080/api/v1/namespaces/labo/pods/nginx
kubectl port-forward nginx 8080:8080 -n labo

Ticiano Jorge Herrera-981179 20:05


k port-forward -h

You might also like