Created
November 4, 2018 09:46
-
-
Save mlabouardy/e74e26f208a00fe9ffd1737fb6333766 to your computer and use it in GitHub Desktop.
Template file to bake Jenkins ami
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
{ | |
"variables" : { | |
"region" : "eu-west-3", | |
"source_ami" : "ami-0ebc281c20e89ba4b" | |
}, | |
"builders" : [ | |
{ | |
"type" : "amazon-ebs", | |
"profile" : "default", | |
"region" : "{{user `region`}}", | |
"instance_type" : "t2.micro", | |
"source_ami" : "{{user `source_ami`}}", | |
"ssh_username" : "ec2-user", | |
"ami_name" : "jenkins-master-2.107.2", | |
"ami_description" : "Amazon Linux Image with Jenkins Server", | |
"run_tags" : { | |
"Name" : "packer-builder-docker" | |
}, | |
"tags" : { | |
"Tool" : "Packer", | |
"Author" : "mlabouardy" | |
} | |
} | |
], | |
"provisioners" : [ | |
{ | |
"type" : "file", | |
"source" : "COPY FILES", | |
"destination" : "COPY FILES" | |
}, | |
{ | |
"type" : "shell", | |
"script" : "./setup.sh", | |
"execute_command" : "sudo -E -S sh '{{ .Path }}'" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment