New small baseimage for control node. 61/8361/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 25 Jan 2017 22:01:59 +0000 (23:01 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 25 Jan 2017 22:01:59 +0000 (23:01 +0100)
Change-Id: Iec3e26163caad81cd12c6cce6a35431403dc285d
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
packer/provision/basebuild-no-tmpfs.sh [new file with mode: 0644]
packer/templates/basebuild-control-slave.json [new file with mode: 0644]

diff --git a/packer/provision/basebuild-no-tmpfs.sh b/packer/provision/basebuild-no-tmpfs.sh
new file mode 100644 (file)
index 0000000..ea34ee3
--- /dev/null
@@ -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 (file)
index 0000000..40c4297
--- /dev/null
@@ -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"
+    }
+  ]
+}