diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e1eded --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# IncubateIND Developer Tech Camp - DevOps +## (IDTC - DevOps) + +Execution and Development of a Dockerized Node Application + +Tasks were completed succesfully and was a Top Contributer + +> Courtesy : IncubateIND diff --git a/submission/dj2000official@gmail.com/task1-solution.yaml b/submission/dj2000official@gmail.com/task1-solution.yaml new file mode 100644 index 0000000..6303f08 --- /dev/null +++ b/submission/dj2000official@gmail.com/task1-solution.yaml @@ -0,0 +1,39 @@ +version: '3' +services: + postgresdb: + image: postgres + restart: always + ports: + - 5435:5432 + environment: + - POSTGRES_USER=postgresadmin + - POSTGRES_PASSWORD=password + - POSTGRES_DB=test + volumes: + - db-data:/test/db + pgadmin: + image: dpage/pgadmin4 + restart: always + ports: + - 5050:80 + environment: + - PGADMIN_DEFAULT_EMAIL=admin@gmail.com + - PGADMIN_DEFAULT_PASSWORD=admin + depends_on: + - postgresdb + demo-app: + image: check/postgres-node-app + restart: always + ports: + - 3000:3000 + environment: + - DB_USER=postgresadmin + - DB_HOST=postgresdb + - DB_DATABASE=test + - DB_PASSWORD=password + - DB_PORT=5432 + depends_on: + - postgresdb +volumes: + db-data: + driver: local \ No newline at end of file diff --git a/submission/dj2000official@gmail.com/task2_solution.yaml b/submission/dj2000official@gmail.com/task2_solution.yaml new file mode 100644 index 0000000..a792da7 --- /dev/null +++ b/submission/dj2000official@gmail.com/task2_solution.yaml @@ -0,0 +1,115 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-config + labels: + app: postgres +data: + database: postgres + +--- +apiVersion: v1 +kind: Secret +metadata: + name: postgres-secret +type: Opaque +data: + username: cG9zdxdyZXMR= + password: cG9zdxdyZXMR= + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres-deployment +spec: + selector: + matchLabels: + app: postgres + replicas: 1 + template: + metadata: + labels: + app: postgres + spec: + containers: + - name: postgres + image: postgres:latest + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + valueFrom: + configMapKeyRef: + name: postgres-config + key: database + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + name: postgres-secret + key: username + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: postgres-secret + key: password + +--- +apiVersion: v1 +kind: Service +metadata: + name: postgres-service + labels: + app: postgres +spec: + ports: + - name: postgres + port: 5432 + targetPort: 5432 + selector: + app: postgres + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pgadmin-deployment +spec: + selector: + matchLabels: + app: pgadmin + replicas: 1 + template: + metadata: + labels: + app: pgadmin + spec: + containers: + - name: pgadmin4 + image: dpage/pgadmin4 + env: + - name: PGADMIN_DEFAULT_EMAIL + value: "admin" + - name: PGADMIN_DEFAULT_PASSWORD + value: "password" + - name: PGADMIN_PORT + value: "80" + ports: + - containerPort: 80 + name: pgadminport + +--- +apiVersion: v1 +kind: Service +metadata: + name: pgadmin-service + labels: + app: pgadmin +spec: + selector: + app: pgadmin + type: LoadBalancer + ports: + - port: 80 + targetPort: 80 + nodePort: 30040 \ No newline at end of file diff --git a/submission/vikram.maiya@jodova.com/task1_solution.yaml b/submission/vikram.maiya@jodova.com/task1_solution.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/submission/vikram.maiya@jodova.com/task2_solution.yaml b/submission/vikram.maiya@jodova.com/task2_solution.yaml deleted file mode 100644 index e69de29..0000000