Skip to content

Commit 416a950

Browse files
🚀 [add] pomodoroapp fargate project
1 parent 6a0960f commit 416a950

File tree

7 files changed

+31
-44
lines changed

7 files changed

+31
-44
lines changed

07-pomodoroapp-fargate-deployment/eks-fargate.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ apiVersion: eksctl.io/v1alpha5
22
kind: ClusterConfig
33

44
metadata:
5-
name: eks-fargate-cluster
5+
name: pomodoroapp-fargate
66
region: us-east-1
77

88
vpc:
9-
id: "vpc-0b7dbb8db6fa33778"
9+
id: "vpc-00ce64af6d567e2c3"
1010
cidr: "10.0.0.0/16"
1111
subnets:
1212
private:
13-
us-east-1a: { id: subnet-058f511c52c8369b9 }
14-
us-east-1b: { id: subnet-083809e97ac49025c }
13+
us-east-1a: { id: subnet-07805ecd496e4cb44 }
14+
us-east-1b: { id: subnet-07d94a7e57a67a596 }
1515

1616
iam:
1717
withOIDC: true
@@ -21,3 +21,4 @@ fargateProfiles:
2121
selectors:
2222
- namespace: default
2323
- namespace: kube-system
24+

07-pomodoroapp-fargate-deployment/fp-pomodoro.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ apiVersion: eksctl.io/v1alpha5
22
kind: ClusterConfig
33

44
metadata:
5-
name: eks-fargate-cluster
5+
name: pomodoroapp-fargate
66
region: us-east-1
77

88
fargateProfiles:
99
- name: fp-pomodoro
1010
selectors:
1111
- namespace: be-pomodoro
12+
labels:
13+
app: backend
14+
- namespace: be-pomodoro
15+
labels:
16+
app: report-backend
1217
- namespace: fe-pomodoro
18+
labels:
19+
app: frontend
20+

07-pomodoroapp-fargate-deployment/helm-chart/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ Infra configs for Promodoro Application
55

66
Make sure you are inside helm-chart directory and deploy helm charts in below order.
77

8-
### Deploy Database
9-
10-
Modify the values.yaml file with your configuration and run the following command. Especially secret username and password
11-
12-
```bash
13-
helm install pomodoro-db db-pomodoro-app -n db-pomodoro --create-namespace
14-
```
15-
168
### Deploy Report Backend
179

1810
Modify the values.yaml file with your configuration and run the following command. Especially the mongourl under configmap template file data. If you change username and password in database, change it here as well.
@@ -62,4 +54,4 @@ helm delete pomodoro-report-backend -n be-pomodoro
6254
### Database
6355
```bash
6456
helm delete pomodoro-db -n db-pomodoro
65-
```
57+
```

07-pomodoroapp-fargate-deployment/helm-chart/be-pomodoro-app/templates/networkpolicy.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
spec:
77
podSelector:
8-
matchLabels:
9-
app: backend
10-
app: report-backend
11-
8+
matchLabels:
9+
app: backend
10+
app: report-backend
11+
1212
policyTypes:
1313
- Ingress
1414
ingress:
@@ -19,10 +19,3 @@ spec:
1919
podSelector:
2020
matchLabels:
2121
app: {{ .Values.policy.frontend.appLabel }}
22-
- from:
23-
- namespaceSelector:
24-
matchLabels:
25-
kubernetes.io/metadata.name: {{ .Values.policy.db.namespace }}
26-
podSelector:
27-
matchLabels:
28-
app: {{ .Values.policy.db.appLabel }}

07-pomodoroapp-fargate-deployment/helm-chart/be-pomodoro-app/values.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ replicaCount: 1
33
image:
44
repository: techiescamp/pomodoro-backend
55
tag: "3.0.0"
6-
pullPolicy: IfNotPresent
6+
pullPolicy: Always
77

88
service:
99
type: NodePort
@@ -14,8 +14,6 @@ configmap:
1414
mountpath: /app/config.js
1515
subpath: config.js
1616

17-
secretName: backend-secrets
18-
1917
resources:
2018
requests:
2119
cpu: 250m
@@ -26,18 +24,15 @@ resources:
2624

2725
## Configmap template file data
2826
port: 7000
29-
mongourl: mongodb://adminuser:password123@pomodoro-db.db-pomodoro.svc.cluster.local:27017/pomodoro?authSource=admin
27+
mongourl: mongodb+srv://techiescamp:xuYLPYdWN2jp7mLr@db-pomodoro.irdkx.mongodb.net/?retryWrites=true&w=majority&appName=db-pomodoro
3028
jwt_key: mysecret
3129
session_secret: supersecret
32-
frontend_url: http://10.0.0.10:32749
33-
report_backend_url: http://10.0.0.10:30170
30+
frontend_url: http://10.0.3.221:32749
31+
report_backend_url: http://10.0.3.221:30170
3432
jaeger_trace_url: http://simplest-collector.observability.svc.cluster.local:14268
3533

3634
## Network Policy
3735
policy:
3836
frontend:
39-
namespace: fr-pomodoro
37+
namespace: fe-pomodoro
4038
appLabel: frontend
41-
db:
42-
namespace: db-pomodoro
43-
appLabel: db

07-pomodoroapp-fargate-deployment/helm-chart/be-report-service/values.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ replicaCount: 1
33
image:
44
repository: techiescamp/pomodoro-report-backend
55
tag: "2.0.0"
6-
pullPolicy: IfNotPresent
6+
pullPolicy: Always
77

88
service:
99
type: NodePort
@@ -14,8 +14,6 @@ configmap:
1414
mountpath: /app/config.js
1515
subpath: config.js
1616

17-
secretName: backend-secrets
18-
1917
resources:
2018
requests:
2119
cpu: 250m
@@ -26,5 +24,5 @@ resources:
2624

2725
## Configmap template file data
2826
port: 7070
29-
mongourl: mongodb://adminuser:password123@pomodoro-db.db-pomodoro.svc.cluster.local:27017/pomodoro?authSource=admin
30-
jaeger_trace_url: http://simplest-collector.observability.svc.cluster.local:14268
27+
mongourl: mongodb+srv://techiescamp:xuYLPYdWN2jp7mLr@db-pomodoro.irdkx.mongodb.net/?retryWrites=true&w=majority&appName=db-pomodoro
28+
jaeger_trace_url: http://simplest-collector.observability.svc.cluster.local:14268

07-pomodoroapp-fargate-deployment/helm-chart/fe-pomodoro-app/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ replicaCount: 1
33
image:
44
repository: techiescamp/pomodoro-frontend
55
tag: "3.0.0"
6-
pullPolicy: IfNotPresent
6+
pullPolicy: Always
77

88
configmap:
99
mountpath: /app/src/config.js
@@ -15,7 +15,7 @@ service:
1515
nodeport: 32749
1616

1717
## Configmap template file data
18-
backend_url: http://10.0.0.10:30163
19-
reports_url: http://10.0.0.10:30170
20-
metrics_url: http://10.0.0.10:30163/metrics
18+
backend_url: http://10.0.3.221:30163
19+
reports_url: http://10.0.3.221:30170
20+
metrics_url: http://10.0.3.221:30163/metrics
2121
jaeger_trace_url: http://simplest-collector.observability.svc.cluster.local:14268

0 commit comments

Comments
 (0)