diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-02-07 10:31:11 -0800 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-02-07 10:31:11 -0800 |
commit | ae4643e1e8195f30c783d287ec66a9b2e8d05f39 (patch) | |
tree | 58ec76a81e2c13d2607db5da5dcdf7f9b41795fb /packer/templates/docker.json | |
parent | 53d3142419c72c71cc17afd946461f653c7a7d19 (diff) |
Configure docker image
Create a docker image, this is based on the Open-O robot image
Change-Id: I4f16494da4605753f09257107889210488ec0512
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'packer/templates/docker.json')
-rw-r--r-- | packer/templates/docker.json | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/packer/templates/docker.json b/packer/templates/docker.json new file mode 100644 index 000000000..5418c4b02 --- /dev/null +++ b/packer/templates/docker.json @@ -0,0 +1,53 @@ +{ + "variables": { + "stack_tenant": null, + "stack_user": null, + "stack_pass": null, + "stack_network": null, + + "base_image": null, + "cloud_user": null, + "distro": null, + "cloud_user_data": null + }, + "builders": [ + { + "type": "openstack", + "identity_endpoint": "https://auth.vexxhost.net/v2.0/", + "tenant_name": "{{user `stack_tenant`}}", + "username": "{{user `stack_user`}}", + "password": "{{user `stack_pass`}}", + "region": "ca-ymq-1", + "ssh_username": "{{user `cloud_user`}}", + "image_name": "{{user `distro`}} - docker - {{isotime \"20060102-1504\"}}", + "source_image_name": "{{user `base_image`}}", + "flavor": "v1-standard-1", + "availability_zone": "ca-ymq-2", + "networks": [ + "{{user `stack_network`}}" + ], + "user_data_file": "{{user `cloud_user_data`}}" + } + ], + "provisioners": [ + { + "type": "shell", + "inline": ["mkdir -p /tmp/packer"] + }, + { + "type": "file", + "source": "provision/basebuild/", + "destination": "/tmp/packer" + }, + { + "type": "shell", + "scripts": [ + "provision/baseline.sh", + "provision/basebuild.sh", + "provision/docker.sh", + "provision/system_reseal.sh" + ], + "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" + } + ] +} |