Skip to content

Commit

Permalink
Update ddosify self hosted to version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihbaltaci committed May 2, 2024
1 parent 7782728 commit ef807f2
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 207 deletions.
4 changes: 2 additions & 2 deletions charts/anteon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.1
version: 2.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "3.0.1"
appVersion: "3.1.0"

keywords:
- ebpf
Expand Down
24 changes: 22 additions & 2 deletions charts/anteon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,25 @@ The following table lists the configurable parameters of the Anteon chart and th
| `ingress.annotations` | Annotations for the ingress, can include multiple comments for configuration. | object | `{}` |
| `ingress.hosts` | List of hosts for ingress, each with specific paths and pathTypes. | array | `[{"host": "anteon.local", "paths": [{"path": "/", "pathType": "Prefix"}]}]` |
| `ingress.tls` | TLS configuration for ingress. Uncomment and configure as needed. | array | `[]` |
| `hammerReplicas` | Number of replicas for the hammer (load generator) service. If you want to increase the engine size for performance testing, increase this value. | integer | `1` |
| `hammer.replicas` | Number of replicas for the hammer (load generator) service. If you want to increase the engine size for performance testing, increase this value. | integer | `1` |
| `hammerdebug.replicas` | Number of replicas for the hammer debug service. | integer | `1` |
| `service.name` | The name of the outside service (nginx). You can forward the traffic with `kubectl port-forward` command to access the Anteon dashboard. | string | `"nginx-service"` |
| `service.port` | Port number the outside service (nginx) operates on. | integer | `80` |
| `service.nodePort` | Node port number for the outside service (nginx). | integer | `30000` |
| `service.replicas` | Number of replicas for the outside service (nginx). | integer | `1` |
| `influxDB.external` | Determines if InfluxDB is externally managed. | boolean | `false` |
| `influxDB.url` | URL for InfluxDB, required if `external` is `true`. | string | `"http://influxdb:8086"` |
| `influxDB.apiToken` | API token for InfluxDB, required if `external` is `true`. | string | `"5yR2qD5zCqqvjwCKKXojnPviQaB87w9JcGweVChXkhWRL"` |
| `influxDB.org` | Organization for InfluxDB, required if `external` is `true`. | string | `"anteon"` |
| `influxDB.username` | InfluxDB username, used only if `external` is `false`. | string | `"admin"` |
| `influxDB.password` | InfluxDB password, used only if `external` is `false`. | string | `"ChangeMe"` |
| `influxDB.replicas` | Number of replicas for InfluxDB. | integer | `1` |
| `postgres.external` | Determines if the Postgres server is externally managed. | boolean | `false` |
| `postgres.host` | Host for Postgres, required if `external` is `true`. | string | `"postgres"` |
| `postgres.port` | Port for Postgres, required if `external` is `true`. | integer | `5432` |
| `postgres.username` | Username for Postgres, required if `external` is `true`. | string | `"postgres"` |
| `postgres.password` | Password for Postgres, required if `external` is `true`. | string | `"ChangeMe"` |
| `postgres.replicas` | Number of replicas for Postgres. | integer | `1` |
| `pvc.influxDB.storageClassName` | Storage class name for InfluxDB persistent volume claim. | string | `""` |
| `pvc.influxDB.size` | Size of the persistent volume claim for InfluxDB. | string | `5Gi` |
| `pvc.postgres.storageClassName` | Storage class name for Postgres persistent volume claim. | string | `""` |
Expand All @@ -123,6 +127,22 @@ The following table lists the configurable parameters of the Anteon chart and th
| `images.redis` | Redis Docker image | string | `redis:x.y.z-alpine` |
| `images.seaweedfs` | SeaweedFS Docker image | string | `chrislusf/seaweedfs:x.y` |
| `images.initContainerBusybox` | Init Container Busybox Docker image | string | `busybox:x.y.z` |
| `alazbackend.replicas` | Number of replicas for the Alaz Backend service. | integer | `3` |
| `alazbackend.celeryBeatReplicas` | Number of replicas for the Alaz Backend Celery Beat service. | integer | `1` |
| `alazbackend.celeryWorkerReplicas` | Number of replicas for the Alaz Backend Celery Worker service. | integer | `2` |
| `backend.replicas` | Number of replicas for the Backend service. | integer | `3` |
| `backend.celeryBeatReplicas` | Number of replicas for the Backend Celery Beat service. | integer | `1` |
| `backend.celeryWorkerReplicas` | Number of replicas for the Backend Celery Worker service. | integer | `1` |
| `frontend.replicas` | Number of replicas for the Frontend service. | integer | `1` |
| `hammermanager.replicas` | Number of replicas for the Hammer Manager service. | integer | `1` |
| `hammermanager.celeryBeatReplicas` | Number of replicas for the Hammer Manager Celery Beat service. | integer | `1` |
| `hammermanager.celeryWorkerReplicas` | Number of replicas for the Hammer Manager Celery Worker service. | integer | `1` |
| `prometheus.replicas` | Number of replicas for the Prometheus service. | integer | `1` |
| `rabbitmq.replicas` | Number of replicas for the RabbitMQ service. | integer | `1` |
| `redisBackend.replicas` | Number of replicas for the Redis Backend service. | integer | `1` |
| `redisAlazBackend.replicas` | Number of replicas for the Redis Alaz Backend service. | integer | `1` |
| `seaweedfs.replicas` | Number of replicas for the SeaweedFS service. | integer | `1` |


**Note:** The default versions of the `images.*` are placeholders. You can find the current versions of the images on the [values.yaml](./values.yaml) file.

Expand All @@ -137,7 +157,7 @@ helm repo update
kubectl create namespace anteon
ENGINE_COUNT=3
helm upgrade --namespace anteon anteon-selfhosted anteon/anteon --set hammerReplicas=$ENGINE_COUNT --wait
helm upgrade --namespace anteon anteon-selfhosted anteon/anteon --set hammer.replicas=$ENGINE_COUNT --wait
```

## External Database (Optional):
Expand Down
46 changes: 6 additions & 40 deletions charts/anteon/templates/alaz-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: alaz-backend
name: alaz-backend
spec:
replicas: 3
replicas: {{ .Values.alazBackend.replicas }}
selector:
matchLabels:
service: alaz-backend
Expand All @@ -18,7 +18,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z postgres {{ .Values.postgres.port }} && nc -z backend 8008; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 postgres {{ .Values.postgres.port }} && nc -z backend 8008; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_app_onprem.sh
Expand Down Expand Up @@ -55,7 +55,7 @@ metadata:
service: alaz-backend-celery-beat
name: alaz-backend-celery-beat
spec:
replicas: 1
replicas: {{ .Values.alazBackend.celeryBeatReplicas }}
selector:
matchLabels:
service: alaz-backend-celery-beat
Expand All @@ -68,7 +68,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z alaz-backend 8008 && nc -z rabbitmq-celery-alaz-backend 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 alaz-backend 8008 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_beat.sh
Expand All @@ -89,7 +89,7 @@ metadata:
service: alaz-backend-celery-worker-1
name: alaz-backend-celery-worker-1
spec:
replicas: 1
replicas: {{ .Values.alazBackend.celeryWorkerReplicas }}
selector:
matchLabels:
service: alaz-backend-celery-worker-1
Expand All @@ -102,7 +102,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z alaz-backend 8008 && nc -z rabbitmq-celery-alaz-backend 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 alaz-backend 8008 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_worker.sh
Expand All @@ -115,37 +115,3 @@ spec:
resources: {}
restartPolicy: Always
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: alaz-backend-celery-worker-2
name: alaz-backend-celery-worker-2
spec:
replicas: 1
selector:
matchLabels:
service: alaz-backend-celery-worker-2
strategy: {}
template:
metadata:
labels:
service: alaz-backend-celery-worker-2
spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z alaz-backend 8008 && nc -z rabbitmq-celery-alaz-backend 5672; do echo waiting for dependencies; sleep 2; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_worker.sh
envFrom:
- configMapRef:
name: env
image: {{ .Values.images.alazBackend }}
name: alaz-backend-celery-worker-2
imagePullPolicy: IfNotPresent
resources: {}
restartPolicy: Always
status: {}
12 changes: 6 additions & 6 deletions charts/anteon/templates/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: backend
name: backend
spec:
replicas: 3
replicas: {{ .Values.backend.replicas }}
selector:
matchLabels:
service: backend
Expand All @@ -18,7 +18,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z postgres {{ .Values.postgres.port }}; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 postgres {{ .Values.postgres.port }}; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_app_onprem.sh
Expand Down Expand Up @@ -55,7 +55,7 @@ metadata:
service: backend-celery-beat
name: backend-celery-beat
spec:
replicas: 1
replicas: {{ .Values.backend.celeryBeatReplicas }}
selector:
matchLabels:
service: backend-celery-beat
Expand All @@ -68,7 +68,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z backend 8008 && nc -z rabbitmq-celery-backend 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 backend 8008 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_beat.sh
Expand All @@ -89,7 +89,7 @@ metadata:
service: backend-celery-worker
name: backend-celery-worker
spec:
replicas: 1
replicas: {{ .Values.backend.celeryWorkerReplicas }}
selector:
matchLabels:
service: backend-celery-worker
Expand All @@ -102,7 +102,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z backend 8008 && nc -z rabbitmq-celery-backend 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 backend 8008 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_worker.sh
Expand Down
2 changes: 1 addition & 1 deletion charts/anteon/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: frontend
name: frontend
spec:
replicas: 1
replicas: {{ .Values.frontend.replicas }}
selector:
matchLabels:
service: frontend
Expand Down
4 changes: 2 additions & 2 deletions charts/anteon/templates/hammer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: hammer
name: hammer
spec:
replicas: {{ .Values.hammerReplicas }}
replicas: {{ .Values.hammer.replicas }}
selector:
matchLabels:
service: hammer
Expand All @@ -19,7 +19,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z hammermanager 8001; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 hammermanager 8001; do echo waiting for dependencies; sleep 1; done;']
containers:
- envFrom:
- configMapRef:
Expand Down
4 changes: 2 additions & 2 deletions charts/anteon/templates/hammerdebug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: hammerdebug
name: hammerdebug
spec:
replicas: 1
replicas: {{ .Values.hammerdebug.replicas }}
selector:
matchLabels:
service: hammerdebug
Expand All @@ -19,7 +19,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z hammermanager 8001; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 hammermanager 8001; do echo waiting for dependencies; sleep 1; done;']
containers:
- env:
- name: IS_DEBUG
Expand Down
14 changes: 8 additions & 6 deletions charts/anteon/templates/hammermanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
service: hammermanager
name: hammermanager
spec:
replicas: 1
replicas: {{ .Values.hammermanager.replicas }}
selector:
matchLabels:
service: hammermanager
Expand All @@ -18,7 +18,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z postgres {{ .Values.postgres.port }}; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 postgres {{ .Values.postgres.port }}; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_app.sh
Expand All @@ -34,6 +34,7 @@ spec:
restartPolicy: Always
status: {}
---
{{- if ne (int .Values.hammermanager.replicas) 0 -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -50,14 +51,15 @@ spec:
status:
loadBalancer: {}
---
{{- end -}}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: hammermanager-celery-beat
name: hammermanager-celery-beat
spec:
replicas: 1
replicas: {{ .Values.hammermanager.celeryBeatReplicas }}
selector:
matchLabels:
service: hammermanager-celery-beat
Expand All @@ -70,7 +72,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z hammermanager 8001 && nc -z rabbitmq-celery 5672 && nc -z rabbitmq-job 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 hammermanager 8001 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_beat.sh
Expand All @@ -91,7 +93,7 @@ metadata:
service: hammermanager-celery-worker
name: hammermanager-celery-worker
spec:
replicas: 1
replicas: {{ .Values.hammermanager.celeryWorkerReplicas }}
selector:
matchLabels:
service: hammermanager-celery-worker
Expand All @@ -104,7 +106,7 @@ spec:
initContainers:
- name: check-dependencies
image: {{ .Values.images.initContainerBusybox }}
command: ['sh', '-c', 'until nc -z hammermanager 8001 && nc -z rabbitmq-celery 5672 && nc -z rabbitmq-job 5672; do echo waiting for dependencies; sleep 2; done;']
command: ['sh', '-c', 'until nc -z -w4 hammermanager 8001 && nc -z rabbitmq 5672; do echo waiting for dependencies; sleep 1; done;']
containers:
- args:
- /workspace/start_scripts/start_celery_worker.sh
Expand Down
4 changes: 3 additions & 1 deletion charts/anteon/templates/influxdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
service: influxdb
name: influxdb
spec:
replicas: 1
replicas: {{ .Values.influxDB.replicas }}
selector:
matchLabels:
service: influxdb
Expand Down Expand Up @@ -54,6 +54,7 @@ spec:
defaultMode: 0777
status: {}
---
{{- if ne (int .Values.influxDB.replicas) 0 -}}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -85,3 +86,4 @@ spec:
storageClassName: {{ .Values.pvc.influxDB.storageClassName }}
status: {}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/anteon/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
replicas: {{ .Values.service.replicas }}
selector:
matchLabels:
app: nginx
Expand Down
4 changes: 3 additions & 1 deletion charts/anteon/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
service: postgres
name: postgres
spec:
replicas: 1
replicas: {{ .Values.postgres.replicas }}
selector:
matchLabels:
service: postgres
Expand Down Expand Up @@ -55,6 +55,7 @@ spec:
name: init-db-script
status: {}
---
{{- if ne (int .Values.postgres.replicas) 0 -}}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -86,3 +87,4 @@ spec:
storageClassName: {{ .Values.pvc.postgres.storageClassName }}
status: {}
{{- end -}}
{{- end -}}
Loading

0 comments on commit ef807f2

Please sign in to comment.