forked from markstory/lint-review
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacker.json
More file actions
106 lines (106 loc) · 3.02 KB
/
packer.json
File metadata and controls
106 lines (106 loc) · 3.02 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "ami-840910ee",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "lint-review-{{timestamp}}",
"tags": {
"Name": "lint-review-{{timestamp}}",
"OS": "ubuntu"
},
"ami_description": "Lint review ami created {{timestamp}}",
"associate_public_ip_address": true,
"run_tags": {
"Name": "Packer Lint Review AMI builder"
}
}
],
"provisioners": [
{
"type": "file",
"source": "package.json",
"destination": "/home/ubuntu/package.json"
},
{
"type": "file",
"source": "requirements.txt",
"destination": "/home/ubuntu/requirements.txt"
},
{
"type": "file",
"source": "composer.json",
"destination": "/home/ubuntu/composer.json"
},
{
"type": "file",
"source": "composer.lock",
"destination": "/home/ubuntu/composer.lock"
},
{
"type": "file",
"source": "Gemfile",
"destination": "/home/ubuntu/Gemfile"
},
{
"type": "file",
"source": "Gemfile.lock",
"destination": "/home/ubuntu/Gemfile.lock"
},
{
"type": "file",
"source": "systemd/celery.service",
"destination": "/home/ubuntu/celery.service"
},
{
"type": "file",
"source": "systemd/gunicorn.service",
"destination": "/home/ubuntu/gunicorn.service"
},
{
"type": "file",
"source": "settings.sample.py",
"destination": "settings.py"
},
{
"type": "file",
"source": "logging.ini",
"destination": "logging.ini"
},
{
"type": "shell",
"execute_command": "sudo -E sh -e '{{ .Path }}'",
"inline": [
"DEBIAN_FRONTEND=noninteractive apt-get update",
"DEBIAN_FRONTEND=noninteractive apt-get upgrade -y",
"DEBIAN_FRONTEND=noninteractive apt-get update",
"DEBIAN_FRONTEND=noninteractive apt-get install -y rabbitmq-server",
"DEBIAN_FRONTEND=noninteractive apt-get install -y python2.7 python-pip libffi-dev",
"DEBIAN_FRONTEND=noninteractive apt-get install -y php7.0-cli php7.0-xml composer",
"DEBIAN_FRONTEND=noninteractive apt-get install -y ruby2.3-dev",
"DEBIAN_FRONTEND=noninteractive apt-get install -y npm",
"pip2 install lintreview",
"npm set progress=false",
"npm install",
"gem install bundler",
"ln -s /usr/bin/nodejs /usr/bin/node",
"echo '127.0.0.1 broker' > /etc/hosts",
"echo 'LINTREVIEW_GUNICORN_BIND=\"0.0.0.0:5000\"' >> /etc/environment",
"echo 'LINTREVIEW_SETTINGS=\"/home/ubuntu/settings.py\"' >> /etc/environment",
"mv gunicorn.service /lib/systemd/system/",
"systemctl enable gunicorn",
"mv celery.service /lib/systemd/system/",
"systemctl enable celery"
]
},
{
"type": "shell",
"inline": [
"bundle install --system",
"composer install"
]
}
]
}