66 "memory": ${ memory} ,
77 "memoryReservation": ${ memory} ,
88 "essential": true,
9+ %{ if deploy_dynatrace_agent }
10+ "mountPoints": [
11+ {
12+ " sourceVolume" : " oneagent" ,
13+ " containerPath" : " /opt/dynatrace/oneagent" ,
14+ " readOnly" : false
15+ }
16+ ],
17+ "dependsOn": [
18+ {
19+ " containerName" : " install-oneagent" ,
20+ " condition" : " COMPLETE"
21+ }
22+ ],
23+ %{ endif ~}
924 "portMappings": [
1025 {
1126 " containerPort" : ${port}
1227 }
1328 ],
1429 "environment": [
30+ %{ if deploy_dynatrace_agent }
31+ {
32+ " name" : " LD_PRELOAD" ,
33+ " value" : " /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so"
34+ } ,
35+ {
36+ " name" : " DT_TAGS" ,
37+ " value" : " Service=rookout.datastore ECS=true env=${environment}"
38+ } ,
39+ %{ endif ~}
1540 {
1641 " name" : " ROOKOUT_DOP_SERVER_MODE" ,
1742 " value" : " ${datastore_server_mode}"
5984 " startPeriod" : null
6085 }
6186 }
87+ %{ if deploy_dynatrace_agent }
88+ ,{
89+ " name" : " install-oneagent" ,
90+ " image" : " alpine:3" ,
91+ " cpu" : 0,
92+ " portMappings" : [],
93+ " essential" : false ,
94+ " entryPoint" : [
95+ " /bin/sh" ,
96+ " -c"
97+ ],
98+ " command" : [
99+ " ARCHIVE=$(mktemp) && wget -O $ARCHIVE \" $DT_API_URL/v1/deployment/installer/agent/unix/paas/latest?Api-Token=$DT_PAAS_TOKEN&$DT_ONEAGENT_OPTIONS\" && unzip -o -d /opt/dynatrace/oneagent $ARCHIVE && rm -f $ARCHIVE"
100+ ],
101+ " environment" : [
102+ {
103+ " name" : " DT_PAAS_TOKEN" ,
104+ " value" : " ${dynatrace_pass_token}"
105+ } ,
106+ {
107+ " name" : " DT_ONEAGENT_OPTIONS" ,
108+ " value" : " flavor=musl&include=go"
109+ } ,
110+ {
111+ " name" : " DT_API_URL" ,
112+ " value" : " https://${dynatrace_environment_id}.live.dynatrace.com/api"
113+ }
114+ ],
115+ "environmentFiles": [],
116+ "mountPoints": [
117+ {
118+ " sourceVolume" : " oneagent" ,
119+ " containerPath" : " /opt/dynatrace/oneagent" ,
120+ " readOnly" : false
121+ }
122+ ],
123+ "volumesFrom": [],
124+ "logConfiguration": {
125+ " logDriver" : " awslogs" ,
126+ " options" : {
127+ " awslogs-group" : " ${log_group}" ,
128+ " awslogs-region" : " ${aws_region}" ,
129+ " awslogs-stream-prefix" : " ${log_stream}"
130+ }
131+ }
132+ }
133+ %{ endif ~}
62134]
0 commit comments