diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2017-01-25 23:11:24 +0100 |
---|---|---|
committer | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2017-01-25 23:17:11 +0100 |
commit | 0c95abf26a191a2980a9e023145c2736451e279c (patch) | |
tree | c00b68912d9f2d6a964b73b24217ef40b15cf489 /packer/templates | |
parent | f6d65d12644c9a9f28d3900400e482291e595730 (diff) |
Properly name basebuild images after slave label
Change-Id: I283c08200ba3faf06752b4d4aecc099299be0ad2
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'packer/templates')
-rw-r--r-- | packer/templates/basebuild-agl-test-slave.json | 54 | ||||
-rw-r--r-- | packer/templates/basebuild.json | 9 |
2 files changed, 55 insertions, 8 deletions
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" |