From 0c95abf26a191a2980a9e023145c2736451e279c Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 25 Jan 2017 23:11:24 +0100 Subject: Properly name basebuild images after slave label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I283c08200ba3faf06752b4d4aecc099299be0ad2 Signed-off-by: Jan-Simon Möller --- packer/templates/basebuild-agl-test-slave.json | 54 ++++++++++++++++++++++++++ packer/templates/basebuild.json | 9 +---- 2 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 packer/templates/basebuild-agl-test-slave.json (limited to 'packer') diff --git a/packer/templates/basebuild-agl-test-slave.json b/packer/templates/basebuild-agl-test-slave.json new file mode 100644 index 00000000..3490fd55 --- /dev/null +++ b/packer/templates/basebuild-agl-test-slave.json @@ -0,0 +1,54 @@ +{ + "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-agl-test-slave - {{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/agl_dependencies.sh", + "provision/agl_mirror.sh", + "provision/system_reseal.sh" + ], + "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" + } + ] +} diff --git a/packer/templates/basebuild.json b/packer/templates/basebuild.json index 8e60b5f9..32fe67a4 100644 --- a/packer/templates/basebuild.json +++ b/packer/templates/basebuild.json @@ -41,16 +41,9 @@ }, { "type": "shell", - "environment_vars": [ - "LAVAHOST={{user `lavahost`}}", - "LAVAUSER={{user `lavauser`}}", - "LAVATOKEN={{user `lavatoken`}}" - ], "scripts": [ "provision/baseline.sh", - "provision/basebuild.sh", - "provision/agl_dependencies.sh", - "provision/agl_mirror.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