diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2017-01-25 23:01:59 +0100 |
---|---|---|
committer | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2017-01-25 23:01:59 +0100 |
commit | f6d65d12644c9a9f28d3900400e482291e595730 (patch) | |
tree | 1a7b99c519e4943cc817912b00b71da9d7edc37f | |
parent | dd9e88dc86c818c8010332cc25adbc8a8af58cf8 (diff) |
New small baseimage for control node.
Change-Id: Iec3e26163caad81cd12c6cce6a35431403dc285d
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
-rw-r--r-- | packer/provision/basebuild-no-tmpfs.sh | 6 | ||||
-rw-r--r-- | packer/templates/basebuild-control-slave.json | 51 |
2 files changed, 57 insertions, 0 deletions
diff --git a/packer/provision/basebuild-no-tmpfs.sh b/packer/provision/basebuild-no-tmpfs.sh new file mode 100644 index 00000000..ea34ee32 --- /dev/null +++ b/packer/provision/basebuild-no-tmpfs.sh @@ -0,0 +1,6 @@ +#!/bin/bash -x +# vim: set tw=4 sw=4 sts=4 et : + +# Presently nothing to do + +set -x diff --git a/packer/templates/basebuild-control-slave.json b/packer/templates/basebuild-control-slave.json new file mode 100644 index 00000000..40c42977 --- /dev/null +++ b/packer/templates/basebuild-control-slave.json @@ -0,0 +1,51 @@ +{ + "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`}} - basebuild - {{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" + }, + { + "scripts": [ + "provision/baseline.sh", + "provision/basebuild-no-tmpfs.sh", + "provision/system_reseal.sh" + ], + "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" + } + ] +} |