-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathami.json
57 lines (55 loc) · 2.07 KB
/
ami.json
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
52
53
54
55
56
57
{
"variables": {
"aws_access_key": "AKIAWIFN2KQ2GRPSSPOA",
"aws_secret_key": "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",
"aws_region": "us-east-1",
"source_ami": "ami-0817d428a6fb68645",
"ssh_username":"ubuntu",
"aws_ami_users":"952934740739"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"instance_type": "t2.micro",
"subnet_id": "{{user `subnet_id`}}",
"source_ami": "{{user `source_ami`}}",
"ssh_username": "{{user `ssh_username`}}",
"ami_name": "csye6225_{{timestamp}}",
"ami_users":"{{user `aws_ami_users`}}",
"ami_description": "Ubuntu AMI for CSYE 6225 - Fall 2020",
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 8,
"volume_type": "gp2",
"delete_on_termination": true
}
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo apt-get update",
"sudo apt-get install curl -y",
"curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -",
"sudo apt-get install nodejs -y",
"node -v",
"npm -v",
"sudo apt-get update",
"sudo apt-get install ruby -y",
"cd /home/ubuntu",
"wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install",
"chmod +x ./install",
"sudo ./install auto",
"sudo service codedeploy-agent status",
"wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb",
"sudo dpkg -i -E ./amazon-cloudwatch-agent.deb"
]
}
]
}