Skip to content

Commit 43db63f

Browse files
Readme files (#71)
* HPA for worker nodes * Adding extra line in hpa.yaml * Umbrella chart implementation in helm charts of .yaml files * minor changes in env and Coordinator * Readme files for charts and resource yamls * added readme files
1 parent f728d3e commit 43db63f

File tree

7 files changed

+76
-12
lines changed

7 files changed

+76
-12
lines changed

.env

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
UPLOAD_DIRECTORY="../Uploads"
2-
MONGODB_HOST="localhost"
1+
UPLOAD_DIRECTORY="../common/Uploads"
2+
MONGODB_HOST="mongo-service"
33
MONGODB_PORT=27017
44
UTILITIES_PATH="../Utilities"
5-
REDIS_URL="redis://localhost:6379"
6-
RESULTS_PATH="../Results"
5+
REDIS_URL="redis://redis-service:6379"
6+
RESULTS_PATH="../common/Results"
7+
REDIS_HOST="redis-service"
8+
REDIS_PORT=6379
9+

Coordinator/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
sys.path.insert(0, utilitiesPath)
1414
from scanJob import scan
1515

16-
q = Queue(connection=Redis())
16+
q = Queue(connection=Redis(host=os.getenv('REDIS_HOST'),port=int(os.getenv("REDIS_PORT"))))
1717

1818
uploadDirPath = os.getenv("UPLOAD_DIRECTORY")
1919

Deployment/charts/README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
### Helm Chart
1+
# Helm Chart
22

3+
This helm chart implementation is an umbrella chart implementation in which there is one main chart and other charts are inside it.
4+
The main chart is scan8-chart inside which there are multiple charts which are dashboard_coordinator, database, worker charts.
5+
6+
## dashboard_coordinator
7+
8+
In dashboard_coordinator there are 4 files which are dashboard+coordinator.yaml is a deployment file for the dashboard and dashboard-service which is a service file for the dashboard deployment.
9+
There are other two files which are PV.yaml and PVC.yaml files which are required to use PV in pods.
10+
11+
## database
12+
13+
In the database chart, there are two deployments files which are of Redis and MongoDB and their respective service files.
14+
15+
## worker
16+
17+
In the worker chart, there are two files which are a worker.yaml(Deployment) and hpa.yaml(HPA for the worker).
18+
19+
## Dependencies
20+
21+
***
22+
23+
* Helm charts installed and configured.
24+
25+
## Usage
26+
27+
***
28+
29+
1. cd into the Scan8/Deployment/charts.
30+
31+
2. helm install "chart name you want to give" scan8-chart.
32+
33+
3. Use any web browser to access the IP address (by default it is http://127.0.0.1:30110/).

Deployment/charts/scan8-chart/charts/dashboard_coordinator/templates/dashboard+coordinator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ spec:
2121
imagePullPolicy: Never
2222
resources:
2323
limits:
24-
memory: "500Mi"
25-
cpu: "800m"
24+
memory: "128Mi"
25+
cpu: "200m"
2626
ports:
2727
- containerPort: 5000
2828
stdin: true

Deployment/charts/scan8-chart/charts/dashboard_coordinator/templates/dashboard-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
app: dashboard-coordinator #selctor for deployment
99
ports:
1010
- port: 5000 #target port for container in pod
11-
nodePort: 30109 #target port for the service
11+
nodePort: 30110 #target port for the service

Deployment/charts/scan8-chart/charts/worker/templates/worker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ spec:
2222
resources:
2323
requests:
2424
memory: "128Mi"
25-
cpu: "500m"
25+
cpu: "200m"
2626
limits:
2727
memory: "128Mi"
28-
cpu: "700m"
28+
cpu: "300m"
2929
stdin: true
3030
tty: true
3131
volumeMounts:

Deployment/resource yamls/README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
### Resource Yamls
1+
# Resource Yamls
22

3+
In this directory here are .yaml files which are used in scan8-chart.
4+
Subdirectories contain specific .yaml files.
5+
6+
## deployment
7+
8+
***
9+
10+
In the deployment directory, there are deployment files of Dashboard+Coordinator, Mongo, Redis and Worker.
11+
12+
## hpa
13+
14+
***
15+
16+
In hpa, there are two files
17+
18+
1. hpa.yaml is targetting the worker deployment and monitoring the CPU utilization of that deployment.
19+
20+
2. components.yaml which is used as a metrics server and helps to get the metrics of the deployments.
21+
22+
## pv
23+
24+
***
25+
26+
There are other two files which are PV.yaml and PVC.yaml files which are required to use PV in pods.
27+
28+
## service
29+
30+
***
31+
32+
This repository contains service files for all the deployments.

0 commit comments

Comments
 (0)