Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e69e05

Browse files
DmitryFomin1agneum
authored andcommitted
CF bootstrap now starts Netdata (as a docker container)
1 parent a028cdc commit 4e69e05

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

‎cloudformation/dle_cf_template.yaml‎

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ Resources:
203203
IamSSMRole:
204204
Type: "AWS::IAM::Role"
205205
Properties:
206-
RoleName: "EC2RoleForSSM"
207206
Description: "EC2 IAM role for SSM access"
208207
AssumeRolePolicyDocument:
209208
Version: "2012年10月17日"
@@ -386,7 +385,29 @@ Resources:
386385
--url=http://localhost:2345 \
387386
--token=${DLEVerificationToken} \
388387
--insecure'
389-
388+
389+
# Start Netdata
390+
391+
touch $dle_config_path/netdata_DLE.conf
392+
echo "DLE_token=${DLEVerificationToken}"> $dle_config_path/netdata_DLE.conf
393+
394+
sudo docker run -d \
395+
--name=netdata \
396+
--network host \
397+
--hostname=$(hostname) \
398+
-p 19999:19999 \
399+
-v netdataconfig:/etc/netdata \
400+
-v $dle_config_path/netdata_DLE.conf:/etc/netdata/charts.d/DLE.conf \
401+
-v netdatalib:/var/lib/netdata \
402+
-v netdatacache:/var/cache/netdata \
403+
-v /proc:/host/proc:ro \
404+
-v /sys:/host/sys:ro \
405+
-v /etc/os-release:/host/etc/os-release:ro \
406+
--restart unless-stopped \
407+
--cap-add SYS_PTRACE \
408+
--security-opt apparmor=unconfined \
409+
postgresai/netdata-for-dle:v1.34.1
410+
390411
while ! echo "UI started" | nc localhost 2346; do sleep 10; done
391412
/opt/aws/bin/cfn-signal -e $? -d "DLE UI is available" -r "DLE Deploy Process Complete" '${WaitHandle}'
392413

@@ -511,6 +532,20 @@ Outputs:
511532
- 'ssh -N -L 2346:${DNSName}:2346 ubuntu@${DNSName} -i YOUR_PRIVATE_KEY'
512533
- DNSName: !GetAtt DLEInstance.PublicDnsName
513534

535+
07NetdataTunnel:
536+
Description: Use SSH port forwarding to be able to access monitoring (Netdata)
537+
Value: !Sub
538+
- 'ssh -N -L 19999:${DNSName}:19999 ubuntu@${DNSName} -i YOUR_PRIVATE_KEY'
539+
- DNSName: !GetAtt DLEInstance.PublicDnsName
540+
08NetdataUrl:
541+
Description: Netdata URL with a domain for newly created DLE instance
542+
Value: !Sub 'https://${CertificateSubdomain}.${CertificateHostedZone}:19999'
543+
Condition: CreateSubDomain
544+
08NetdataUrl:
545+
Description: Netdata URL with a domain for newly created DLE instance
546+
Value: !Sub 'http://localhost:19999'
547+
Condition: NotCreateSubDomain
548+
514549
04CloneTunnel:
515550
Description: Use SSH port forwarding to be able to access a database clone
516551
Value: !Sub

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /