aboutsummaryrefslogtreecommitdiffstats
path: root/packer
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-01-25 22:03:38 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-01-25 22:03:38 +0000
commit983a7d2bb150b42e86fdca1f6b0670c8451fa30a (patch)
tree379d16b96be9b484f94781fbfbc30c336868d9ee /packer
parent07ef53fd8e131d1d247c4d018182fd0ef827fd75 (diff)
parentf6d65d12644c9a9f28d3900400e482291e595730 (diff)
Merge "New small baseimage for control node."
Diffstat (limited to 'packer')
-rw-r--r--packer/provision/basebuild-no-tmpfs.sh6
-rw-r--r--packer/templates/basebuild-control-slave.json51
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"
+ }
+ ]
+}