Skip to content

Instantly share code, notes, and snippets.

@ThakurPriyanka
Created May 9, 2018 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThakurPriyanka/7fdb8dc5d2987cb7a9b78c6755eaf161 to your computer and use it in GitHub Desktop.
Save ThakurPriyanka/7fdb8dc5d2987cb7a9b78c6755eaf161 to your computer and use it in GitHub Desktop.
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_region": "us-east-1",
"version": "1.7.1",
"revision": "0",
"instance_type": "t2.micro",
"image_name" : "{{ env `IMAGE_NAME` }}"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"instance_type": "{{user `instance_type`}}",
"ssh_username": "ubuntu",
"ami_name": "{{user `image_name`}}",
"ami_regions": "{{user `aws_region`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 30,
"volume_type": "gp2",
"delete_on_termination": true
}
],
"ssh_pty": "true",
"tags": {
"Name": "bootstrap-{{user `owner`}}-{{user `environment`}}-{{timestamp}}",
"Role": "bootstrap",
"BuildDate": "{{isotime}}"
}
}],
"provisioners": [{
"type": "shell",
"environment_vars": [
"version={{user `version`}}"
],
"scripts": ["packer/docker_download1.sh"]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment