ddosify

by fatih

Helm chartv1.7.5App 2.3.3Verified publisher

A Helm chart for Ddosify Self Hosted

About this chart

Ddosify Self-Hosted Chart

Ddosify Self-Hosted features a web-based user interface, distributed load generation, and Kubernetes Monitoring capabilities. While it shares many of the same functionalities as Ddosify Cloud, the Self-Hosted version is designed to be deployed within your own infrastructure for enhanced control and customization.

To install the Ddosify Self-Hosted chart via Helm, run the following commands:

helm repo add ddosify https://ddosify.github.io/ddosify-helm-charts/
helm repo update
kubectl create namespace ddosify
helm upgrade --install --namespace ddosify ddosify ddosify/ddosify --wait

Accessing the Ddosify Dashboard (Port Forwarding)

Port forward the Ddosify nginx reverse proxy service to access the Ddosify dashboard:

LOCAL_PORT=8014
kubectl port-forward --namespace ddosify service/nginx-service $LOCAL_PORT:80

Open the browser and navigate to http://localhost:8014.

Upgrading the Ddosify Chart

To upgrade the Ddosify chart, run the following commands:

helm repo add ddosify https://ddosify.github.io/ddosify-helm-charts/
helm repo update
helm upgrade --namespace ddosify ddosify ddosify/ddosify --wait

Ddosify Chart Configuration Parameters

The following table lists the configurable parameters of the Ddosify chart and their default values.

ParameterDescriptionTypeDefault
ingress.enabledEnable or disable ingress.booleanfalse
ingress.classNameDefine the ingress class name like nginx or kong.string""
ingress.annotationsAnnotations for the ingress, can include multiple comments for configuration.object{}
ingress.hostsList of hosts for ingress, each with specific paths and pathTypes.array[{"host": "ddosify.local", "paths": [{"path": "/", "pathType": "Prefix"}]}]
ingress.tlsTLS configuration for ingress. Uncomment and configure as needed.array[]
hammerReplicasNumber of replicas for the hammer (load generator) service. If you want to increase the engine size for performance testing, increase this value.integer1
service.nameThe name of the outside service (nginx). You can forward the traffic with kubectl port-forward command to access the Ddosify dashboard.string"nginx-service"
service.portPort number the outside service (nginx) operates on.integer80
service.nodePortNode port number for the outside service (nginx).integer30000
influxDB.externalDetermines if InfluxDB is externally managed.booleanfalse
influxDB.urlURL for InfluxDB, required if external is true.string"http://influxdb:8086"
influxDB.apiTokenAPI token for InfluxDB, required if external is true.string"5yR2qD5zCqqvjwCKKXojnPviQaB87w9JcGweVChXkhWRL"
influxDB.orgOrganization for InfluxDB, required if external is true.string"ddosify"
influxDB.usernameInfluxDB username, used only if external is false.string"admin"
influxDB.passwordInfluxDB password, used only if external is false.string"ChangeMe"
postgres.externalDetermines if the Postgres server is externally managed.booleanfalse
postgres.hostHost for Postgres, required if external is true.string"postgres"
postgres.portPort for Postgres, required if external is true.integer5432
postgres.usernameUsername for Postgres, required if external is true.string"postgres"
postgres.passwordPassword for Postgres, required if external is true.string"ChangeMe"
pvc.influxDB.storageClassNameStorage class name for InfluxDB persistent volume claim.string""
pvc.influxDB.sizeSize of the persistent volume claim for InfluxDB.string5Gi
pvc.postgres.storageClassNameStorage class name for Postgres persistent volume claim.string""
pvc.postgres.sizeSize of the persistent volume claim for Postgres.string5Gi
pvc.seaweedfs.storageClassNameStorage class name for SeaweedFS persistent volume claim.string""
pvc.seaweedfs.sizeSize of the persistent volume claim for SeaweedFS.string30Gi
images.alazBackendAlaz Backend Docker imagestringddosify/selfhosted_alaz_backend:x.y.z
images.backendBackend Docker imagestringddosify/selfhosted_backend:x.y.z
images.frontendFrontend Docker imagestringddosify/selfhosted_frontend:x.y.z
images.hammerHammer Docker imagestringddosify/selfhosted_hammer:x.y.z
images.hammermanagerHammer Manager Docker imagestringddosify/selfhosted_hammermanager:x.y.z
images.influxdbInfluxDB Docker imagestringinfluxdb:x.y.z
images.nginxNginx Docker imagestringnginx:x.y.z
images.postgresPostgres Docker imagestringpostgres:x.y.z
images.prometheusPrometheus Docker imagestringprom/prometheus:x.y.z
images.rabbitmqRabbitMQ Docker imagestringrabbitmq:x.y.z
images.redisRedis Docker imagestringredis:x.y.z
images.seaweedfsSeaweedFS Docker imagestringchrislusf/seaweedfs:x.y.z
images.initContainerBusyboxInit Container Busybox Docker imagestringbusybox:x.y.z

Note: The default versions of the images.* are placeholders. You can find the current versions of the images on the values.yaml file.

Add New Engine (Optional):

Currently, the Ddosify chart deploys a single engine (load generator). To add more engines, you can upgrade the chart with the desired number of engine count as follows. Before adding new engines, ensure that you have enabled the distributed mode by clicking the Unlock the Distributed Mode button in the Ddosify UI.

ENGINE_COUNT=3
helm upgrade --namespace ddosify ddosify ddosify/ddosify --set hammerReplicas=$ENGINE_COUNT --wait

External Database (Optional):

By default, the Ddosify chart deploys a PostgreSQL and InfluxDB. If you want to use them externally, you can write a custom values file (values-external_db.yaml) as follows:

influxDB:
  external: true
  url: "https://us-east-1-1.aws.cloud2.influxdata.com"
  apiToken: "<your-token>"
  org: "<your-organization>"

postgres:
  external: true
  host: "postgres-rds-test.xxxxxx.rds.amazonaws.com"
  port: 5432
  username: "postgres"
  password: "<your-password>"

In this example, we are using the external InfluxDB Cloud and AWS RDS PostgreSQL. You must change the values according to your setup. Note that the external database must be accessible from the Kubernetes cluster. Then, you can install the chart with the custom values file as follows:

helm upgrade --install --namespace ddosify ddosify ddosify/ddosify --values values-external_db.yaml --wait

The recommended and tested version of PostgreSQL is 13.6 and InfluxDB is 2.6.1. If you get any errors on different versions, please open an issue. We will try to fix it as soon as possible. To avoid the latency, the external databases should be as close as possible to the Kubernetes cluster.

Cleanup

helm delete ddosify --namespace ddosify

Telemetry Data

Ddosify collects telemetry data to improve the product. You can disable it by setting the ANONYMOUS_TELEMETRY_ENABLED environment variable to False in the backend deployment.

...
env:
  - name: ANONYMOUS_TELEMETRY_ENABLED
    value: "False"
...

Check the example telemetry data that Ddosify collects from here.

Notes

  • For AWS EKS, Amazon EKS CSI Driver addon must be enabled to use the EBS storage class. For more information, see Amazon EKS CSI Driver.

Deploy ddosify with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ddosify on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartddosify is pinned at v1.7.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply