forked from aws/aws-for-fluent-bit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigureFluentBitEC2.yaml
52 lines (51 loc) · 1.85 KB
/
ConfigureFluentBitEC2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
schemaVersion: '2.2'
description: Install Fluent Bit and the AWS output plugins on Amazon Linux 2 via AWS Systems Manager
parameters:
BucketName:
type: String
description: (Required) The name of the S3 Bucket to download the Fluent Bit binaries and configs.
mainSteps:
- action: aws:runShellScript
name: installFluentBit
inputs:
runCommand:
- sudo yum-config-manager --add-repo https://packages.fluentbit.io/centos/7
- sudo yum-config-manager --setopt=packages.fluentbit.io_centos_7.gpgcheck=1 --save
- sudo yum-config-manager --setopt=packages.fluentbit.io_centos_7.gpgkey=http://packages.fluentbit.io/fluentbit.key --save
- sudo yum install td-agent-bit -y
- action: aws:downloadContent
name: downloadCloudWatchBinary
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://{{BucketName}}.s3.amazonaws.com/cloudwatch.so\"}"
destinationPath: /etc/td-agent-bit
- action: aws:downloadContent
name: downloadFireHoseBinary
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://{{BucketName}}.s3.amazonaws.com/firehose.so\"}"
destinationPath: /etc/td-agent-bit
- action: aws:downloadContent
name: downloadKinesisBinary
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://{{BucketName}}.s3.amazonaws.com/kinesis.so\"}"
destinationPath: /etc/td-agent-bit
- action: aws:downloadContent
name: downloadPluginsConf
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://{{BucketName}}.s3.amazonaws.com/plugins.conf\"}"
destinationPath: /etc/td-agent-bit
- action: aws:downloadContent
name: downloadTdAgentBitConf
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://{{BucketName}}.s3.amazonaws.com/td-agent-bit.conf\"}"
destinationPath: /etc/td-agent-bit
- action: aws:runShellScript
name: startFluentBit
inputs:
runCommand:
- sudo systemctl start td-agent-bit