-
-
Save kennyjwilli/efeaf5ae4ac4b16dc8e6bf8acb90cdbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -y update | |
apt-get -y install ruby wget openjdk-8-jdk | |
cd /home/ubuntu | |
wget https://aws-codedeploy-us-west-2.s3.amazonaws.com/latest/install | |
chmod +x ./install | |
./install auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ec2LaunchTemplate = new aws.ec2.LaunchTemplate("fib-ec2-launch-template", { | |
// Ubuntu Server 18.04 LTS | |
imageId: "ami-0bbe6b35405ecebdb", | |
instanceType: "t2.small", | |
vpcSecurityGroupIds: [fibSG.id], | |
monitoring: { | |
enabled: true | |
}, | |
keyName: "kenny_test", | |
iamInstanceProfile: { | |
arn: ec2InstanceProfile.arn | |
}, | |
userData: base64Encode(fs.readFileSync("ec2_codedeploy_userdata.txt", {encoding: "utf8"})), | |
blockDeviceMappings: [{ | |
deviceName: "/dev/sda1", | |
ebs: { | |
volumeSize: 8, | |
volumeType: "gp2", | |
deleteOnTermination: "true" | |
} | |
}] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment