github.com/leowmjw/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/app/python/data/aws-simple/build/template.json.tpl (about) 1 { 2 "min_packer_version": "0.8.0", 3 4 "variables": { 5 "aws_access_key": null, 6 "aws_secret_key": null, 7 "aws_region": null, 8 "slug_path": null 9 }, 10 11 "provisioners": [ 12 {% for dir in foundation_dirs.build %} 13 { 14 "type": "shell", 15 "inline": ["mkdir -p /tmp/otto/foundation-{{ forloop.Counter }}"] 16 }, 17 { 18 "type": "file", 19 "source": "{{ dir }}/", 20 "destination": "/tmp/otto/foundation-{{ forloop.Counter }}" 21 }, 22 { 23 "type": "shell", 24 "inline": ["cd /tmp/otto/foundation-{{ forloop.Counter}} && bash ./main.sh"] 25 }, 26 {% endfor %} 27 { 28 "type": "file", 29 "source": "{% verbatim %}{{ user `slug_path` }}{% endverbatim %}", 30 "destination": "/tmp/otto-app.tgz" 31 }, 32 { 33 "type": "shell", 34 "script": "build-python.sh" 35 } 36 ], 37 38 "builders": [{ 39 "name": "otto", 40 "type": "amazon-ebs", 41 "access_key": "{% verbatim %}{{ user `aws_access_key` }}{% endverbatim %}", 42 "secret_key": "{% verbatim %}{{ user `aws_secret_key` }}{% endverbatim %}", 43 "region": "{% verbatim %}{{ user `aws_region` }}{% endverbatim %}", 44 "source_ami": "ami-21630d44", 45 "instance_type": "c3.large", 46 "ssh_username": "ubuntu", 47 "ami_name": "{{name}} {% verbatim %}{{timestamp}}{% endverbatim %}" 48 }] 49 50 }