Skip to content

Commit 8522975

Browse files
committed
add CLI instructions for configuring an ECS task
save someone a lot of clicking
1 parent 2411f2a commit 8522975

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

content/integrations/ecs.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ This documentation assume you already have a working EC2 Container Service clust
2121

2222
This task will launch the Datadog container. When you need to modify the configuration, you will update this Task Definition as described further down in this guide.
2323

24+
You may either configure the task using the [AWS CLI tools](https://aws.amazon.com/cli/) or using the Amazon Web Console.
25+
26+
#### AWS CLI
27+
28+
1. Download [dd-agent-ecs.json](/static/dd-agent-ecs.json).
29+
1. Edit dd-agent-ecs.json and update it with the [API_KEY](https://app.datadoghq.com/account/settings#api) for your account.
30+
1. Execute the following command:
31+
aws ecs register-task-definition --cli-input-json file://path/to/dd-agent-ecs.json
32+
33+
#### Web UI
34+
2435
1. Log in to your AWS Console and navigate to the EC2 Container Service section.
2536
2. Click on the cluster you wish to add Datadog to.
2637
3. Click on **Task Definitions** on the left side and click the button **Create new Task Definition**.

content/static/dd-agent-ecs.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"containerDefinitions": [
3+
{
4+
"name": "dd-agent",
5+
"image": "datadog/docker-dd-agent:ecs",
6+
"cpu": 10,
7+
"memory": 128,
8+
"essential": true,
9+
"mountPoints": [
10+
{
11+
"containerPath": "/var/run/docker.sock",
12+
"sourceVolume": "docker_sock"
13+
},
14+
{
15+
"containerPath": "/host/sys/fs/cgroup",
16+
"sourceVolume": "cgroup",
17+
"readOnly": true
18+
},
19+
{
20+
"containerPath": "/host/proc ",
21+
"sourceVolume": "proc",
22+
"readOnly": true
23+
}
24+
],
25+
"environment": [
26+
{
27+
"name": "API_KEY",
28+
"value": "YOUR_API_KEY_GOES_HERE"
29+
}
30+
]
31+
}
32+
],
33+
"volumes": [
34+
{
35+
"host": {
36+
"sourcePath": "/var/run/docker.sock"
37+
},
38+
"name": "docker_sock"
39+
},
40+
{
41+
"host": {
42+
"sourcePath": "/proc/"
43+
},
44+
"name": "proc"
45+
},
46+
{
47+
"host": {
48+
"sourcePath": "/cgroup/"
49+
},
50+
"name": "cgroup"
51+
}
52+
],
53+
"family": "dd-agent-task"
54+
}

0 commit comments

Comments
 (0)