forked from ravipramoth/Packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provisioner.sh
23 lines (17 loc) · 846 Bytes
/
provisioner.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash
# update th image
sudo yum update -y
#install ssm
sudo yum install https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm -y
sudo yum install https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm -y
#sudo systemctl start amazon-ssm-agent
# install cloudwatch agent
sudo yum install https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm -y
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a start
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
# install AWS inspector
curl -O https://inspector-agent.amazonaws.com/linux/latest/install
sudo bash install
#insall docker
sudo yum install docker -y
sudo systemctl start docker