-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker_nexus.json
37 lines (37 loc) · 1.43 KB
/
packer_nexus.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
{
"variables": {
"aws_access_key" : "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key" : "{{env `AWS_SECRET_ACCESS_KEY`}}",
"aws_region" : "us-east-1",
"app_name" : "nexus",
"source_ami" : "{{env `DOCKER_AMI`}}"
},
"builders": [{
"name" : "{{user `app_name` }}",
"ami_name" : "{{user `app_name` }}-{{timestamp}}",
"ami_description" : "Docker-CE AMI with Nexus",
"type" : "amazon-ebs",
"access_key" : "{{user `aws_access_key`}}",
"secret_key" : "{{user `aws_secret_key`}}",
"region" : "{{user `aws_region`}}",
"instance_type" : "t2.micro",
"ssh_username" : "centos",
"associate_public_ip_address" : "false",
"source_ami" : "{{user `source_ami` }}",
"run_tags" : { "Name": "packer_{{user `app_name` }}" },
"tags": {
"Name" : "packer_nexus",
"OS Version": "Centos",
"Tool" : "Packer",
"Author" : "Abhimanyu Narwal"
}
}],
"provisioners": [
{
"type" : "shell",
"pause_before": "30s",
"scripts" : [
"scripts/install-nexus.sh"
]
}]
}