Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tasks day 1 and day 2 #11

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
39 changes: 39 additions & 0 deletions submission/[email protected]/task1-solution.yaml
Original file line number Diff line number Diff line change
@@ -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:
- [email protected]
- 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
115 changes: 115 additions & 0 deletions submission/[email protected]/task2_solution.yaml
Original file line number Diff line number Diff line change
@@ -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
Empty file.
Empty file.