github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/app/ruby/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        "aws_vpc_id": null,
     9        "aws_subnet_id": null,
    10        "slug_path": null
    11      },
    12  
    13      "provisioners": [
    14        {% for dir in foundation_dirs.build %}
    15        {
    16          "type": "shell",
    17          "inline": ["mkdir -p /tmp/otto/foundation-{{ forloop.Counter }}"]
    18        },
    19        {
    20          "type": "file",
    21          "source": "{{ dir }}/",
    22          "destination": "/tmp/otto/foundation-{{ forloop.Counter }}"
    23        },
    24        {
    25          "type": "shell",
    26          "inline": ["cd /tmp/otto/foundation-{{ forloop.Counter}} && bash ./main.sh"]
    27        },
    28        {% endfor %}
    29        {
    30          "type": "file",
    31          "source": "{% verbatim %}{{ user `slug_path` }}{% endverbatim %}",
    32          "destination": "/tmp/otto-app.tgz"
    33        },
    34        {
    35          "type": "shell",
    36          "script": "build-ruby.sh"
    37        }
    38      ],
    39  
    40      "builders": [{
    41        "name": "otto",
    42        "type": "amazon-ebs",
    43        "access_key": "{% verbatim %}{{ user `aws_access_key` }}{% endverbatim %}",
    44        "secret_key": "{% verbatim %}{{ user `aws_secret_key` }}{% endverbatim %}",
    45        "region": "{% verbatim %}{{ user `aws_region` }}{% endverbatim %}",
    46        "vpc_id": "{% verbatim %}{{ user `aws_vpc_id` }}{% endverbatim %}",
    47        "subnet_id": "{% verbatim %}{{ user `aws_subnet_id` }}{% endverbatim %}",
    48        "source_ami": "ami-21630d44",
    49        "instance_type": "c3.large",
    50        "ssh_username": "ubuntu",
    51        "ami_name": "{{name}} {% verbatim %}{{timestamp}}{% endverbatim %}"
    52      }]
    53  
    54  }