|
| 1 | +# EKS Stateless Aggregator Demo |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +- [helm](https://helm.sh/docs/intro/install/) |
| 6 | +- [kubectl](https://kubernetes.io/docs/tasks/tools/) |
| 7 | +- [ekctl](https://eksctl.io/introduction/#installation) - if creating a new cluster with the Makefile |
| 8 | + |
| 9 | +Your EKS cluster will need the [AWS Load Balancer Controller](https://github.com/kubernetes-sigs/aws-load-balancer-controller) installed, this will be installed via the `make` targets or you |
| 10 | +can follow [Amazon's instructions](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) for your own cluster. Additionally you'll also need a Datadog API key for Vector and the Datadog Agents. |
| 11 | + |
| 12 | +## Getting started |
| 13 | + |
| 14 | +Add the necessary Helm repositories for the Vector and Datadog charts: |
| 15 | + |
| 16 | +```shell |
| 17 | +helm repo add datadog https://helm.datadoghq.com |
| 18 | +helm repo add vector https://helm.vector.dev |
| 19 | +helm repo update |
| 20 | +``` |
| 21 | + |
| 22 | +If you need to provision an EKS cluster with the AWS load balancer controller, you can use the included Makefile by running: |
| 23 | + |
| 24 | +```shell |
| 25 | +ACCOUNT_ID=<AWS_ACCOUNT_ID> make cluster-up |
| 26 | +``` |
| 27 | + |
| 28 | +The following command will install Vector as an Aggregator using an Application Load Balancer to route requests from Datadog Agents. |
| 29 | +Vector is configured to process Datadog Agent logs in a similar fashion Datadog's [Pipelines](https://docs.datadoghq.com/logs/log_configuration/pipelines/) |
| 30 | +feature, allowing you to move your log processing onto your own hardware. |
| 31 | + |
| 32 | +```shell |
| 33 | +helm upgrade --install vector vector/vector --devel \ |
| 34 | + --namespace vector --values helm/vector.yaml \ |
| 35 | + --set secrets.generic.DATADOG_API_KEY=<DD_API_KEY(base64 encoded)> \ |
| 36 | + --set ingress.hosts[0].host=DUMMY_VAL |
| 37 | +``` |
| 38 | + |
| 39 | +Once your ALB is provisioned you can run the following command to extract it's generated hostname to replace the DUMMY_VAL above. |
| 40 | + |
| 41 | +```shell |
| 42 | +export ALB_HOSTNAME=kubectl --namespace vector get ingress vector \ |
| 43 | + --output go-template='{{(index .status.loadBalancer.ingress 0 ).hostname}}' |
| 44 | +``` |
| 45 | + |
| 46 | +The following command will upgrade your `vector` release with the created ALB hostname. |
| 47 | + |
| 48 | +```shell |
| 49 | +helm upgrade --install vector vector/vector --devel \ |
| 50 | + --namespace vector --values helm/vector.yaml \ |
| 51 | + --set secrets.generic.DATADOG_API_KEY=<DD_API_KEY(base64 encoded)> \ |
| 52 | + --set ingress.hosts[0].host=${ALB_HOSTNAME} |
| 53 | +``` |
| 54 | + |
| 55 | +Then install your Datadog Agents substituting the hostname from the previous step. |
| 56 | + |
| 57 | +```shell |
| 58 | +helm upgrade --install datadog datadog/datadog \ |
| 59 | + --namespace datadog --values helm/datadog.yaml \ |
| 60 | + --set datadog.apiKey=<DD_API_KEY> \ |
| 61 | + --set agents.customAgentConfig.logs_config.logs_dd_url="<ALB_HOSTNAME>:8080" |
| 62 | + ``` |
| 63 | + |
| 64 | +Once all the pods have started, you should begin to see logs being ingested to your [Datadog account](https://app.datadoghq.com/logs) that are being aggregated and parsed by Vector. |
| 65 | + |
| 66 | +## Cleaning up |
| 67 | + |
| 68 | +The _cluster-down_ target will delete the Namespaces and Cluster created during this demo. |
| 69 | + |
| 70 | +```shell |
| 71 | +make cluster-down |
| 72 | +``` |
| 73 | + |
| 74 | +## Notes |
| 75 | + |
| 76 | +- A nightly image is currently used to leverage our rewritten `datadog_logs` sink |
| 77 | +- The `--devel` option is used to access our currently _pre-release_ [`vector`](https://github.com/vectordotdev/helm-charts/blob/develop/charts/vector/README.md) chart |
0 commit comments