From f6d65d12644c9a9f28d3900400e482291e595730 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 25 Jan 2017 23:01:59 +0100 Subject: New small baseimage for control node. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iec3e26163caad81cd12c6cce6a35431403dc285d Signed-off-by: Jan-Simon Möller --- packer/provision/basebuild-no-tmpfs.sh | 6 ++++ packer/templates/basebuild-control-slave.json | 51 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 packer/provision/basebuild-no-tmpfs.sh create mode 100644 packer/templates/basebuild-control-slave.json 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" + } + ] +} -- cgit 1.2.3-korg