-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
65 lines (65 loc) · 1.76 KB
/
packer.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
58
59
60
61
62
63
64
65
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-west-2",
"source_ami": "ami-001dc960",
"instance_type": "t2.large",
"ssh_pty" : "true",
"ssh_username": "fedora",
"ami_name": "limecompiler_{{timestamp}}",
"iam_instance_profile": "lime-compiler"
}],
"provisioners": [
{ "type": "shell",
"inline": [
"sleep 30",
"sudo yum update -y",
"sudo yum groupinstall \"Development Tools\" -y",
"sudo yum install python-pip -y",
"sudo yum install python-setuptools -y",
"sudo yum install -y jq gcc wget openssl-devel sqlite-devel bzip2-devel python-devel",
"sudo yum install ansible -y",
"sudo yum install python2-dnf -y",
"sudo yum install libselinux-python -y",
"mkdir -p /home/fedora/.ssh",
"sudo dnf group install \"Ruby on Rails\" -y",
"sudo yum install redhat-rpm-config-40-2.fc24.noarch -y",
"wget http://s3.amazonaws.com/ec2metadata/ec2-metadata"
]},
{
"type": "file",
"source": "files/00-tags-to-env.sh",
"destination": "/home/fedora/"
},
{
"type": "file",
"source": "files/01-sync.sh",
"destination": "/home/fedora/"
},
{
"type": "file",
"source": "files/02-build.sh",
"destination": "/home/fedora/"
},
{
"type": "file",
"source": "files/03-sync.sh",
"destination": "/home/fedora/"
},
{ "type": "shell",
"inline": [
"sudo chmod 774 /home/fedora/*.sh",
"sudo chmod 774 /home/fedora/ec2-metadata"
]},
{
"type": "ansible-local",
"playbook_file": "./playbook.yml"
}
]
}