From c5261b9607969fdb45407a9c70478fdaad1be84f Mon Sep 17 00:00:00 2001 From: andrea Date: Sat, 14 Oct 2023 14:35:34 +0000 Subject: [PATCH 1/2] finaliza cambios para #14 --- k8s/artista/Dockerfile | 7 ++-- k8s/deployment.yml | 72 ++++++++++++++++++++++++++++++++++++++---- k8s/service.yaml | 50 ++++++++++++++++++++++++++--- 3 files changed, 116 insertions(+), 13 deletions(-) diff --git a/k8s/artista/Dockerfile b/k8s/artista/Dockerfile index 51df3ac..349fbdf 100644 --- a/k8s/artista/Dockerfile +++ b/k8s/artista/Dockerfile @@ -13,8 +13,11 @@ MAINTAINER "Frans van Dunné" frans.vandunne@gmail.com RUN apt-get update && apt-get install -y openssh-server RUN mkdir /var/run/sshd # Fix this to match debian instead of ubuntu -RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config -RUN sed -i 's/PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config +RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config +RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config +RUN service ssh restart + # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd diff --git a/k8s/deployment.yml b/k8s/deployment.yml index e53eaa1..e5da4ce 100644 --- a/k8s/deployment.yml +++ b/k8s/deployment.yml @@ -1,7 +1,8 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: ralparque + name: organizador + namespace: mlops spec: selector: matchLabels: @@ -14,8 +15,67 @@ spec: spec: containers: - name: organizador - image: organizador:latest - ports: - - containerPort: 8080 - - + image: localhost:32000/organizador:v0.0.2 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mana + namespace: mlops +spec: + selector: + matchLabels: + app: ralparque + artista: mana + replicas: 3 + template: + metadata: + labels: + app: ralparque + artista: mana + spec: + containers: + - name: mana + image: localhost:32000/artista:v0.0.4 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fabulosos-cadillacs + namespace: mlops +spec: + selector: + matchLabels: + app: ralparque + artista: fabulosos-cadillacs + replicas: 1 + template: + metadata: + labels: + app: ralparque + artista: fabulosos-cadillacs + spec: + containers: + - name: fabulosos-cadillacs + image: localhost:32000/artista:v0.0.4 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aterciopelados + namespace: mlops +spec: + selector: + matchLabels: + app: ralparque + artista: aterciopelados + replicas: 1 + template: + metadata: + labels: + app: ralparque + artista: aterciopelados + spec: + containers: + - name: aterciopelados + image: localhost:32000/artista:v0.0.4 \ No newline at end of file diff --git a/k8s/service.yaml b/k8s/service.yaml index 17f395a..69e0722 100644 --- a/k8s/service.yaml +++ b/k8s/service.yaml @@ -1,17 +1,57 @@ kind: Service apiVersion: v1 metadata: - name: ralparque - namespace: dev + name: organizador + namespace: mlops spec: selector: type: ralparque - k8s-app: ralparquea + k8s-app: ralparque type: NodePort ports: - name: http - nodePort: 308080 port: 8080 targetPort: 8080 protocol: TCP - +--- +apiVersion: v1 +kind: Service +metadata: + name: mana + namespace: mlops + labels: + artista: mana +spec: + clusterIP: None + ports: + - port: 22 + selector: + artista: mana +--- +apiVersion: v1 +kind: Service +metadata: + name: fabulosos-cadillacs + namespace: mlops + labels: + artista: fabulosos-cadillacs +spec: + clusterIP: None + ports: + - port: 22 + selector: + artista: fabulosos-cadillacs +--- +apiVersion: v1 +kind: Service +metadata: + name: aterciopelados + namespace: mlops + labels: + artista: aterciopelados +spec: + clusterIP: None + ports: + - port: 22 + selector: + artista: aterciopelados \ No newline at end of file From a0711e8b763de6b8e40c65aa92fa4aba64aa43a5 Mon Sep 17 00:00:00 2001 From: andrea Date: Sat, 14 Oct 2023 14:36:33 +0000 Subject: [PATCH 2/2] renombra a deployment.yaml --- k8s/{deployment.yml => deployment.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename k8s/{deployment.yml => deployment.yaml} (100%) diff --git a/k8s/deployment.yml b/k8s/deployment.yaml similarity index 100% rename from k8s/deployment.yml rename to k8s/deployment.yaml