summaryrefslogtreecommitdiffstats
path: root/packer/templates
diff options
context:
space:
mode:
authorAnil Belur <abelur@linuxfoundation.org>2018-09-27 19:09:50 +0530
committerAnil Belur <abelur@linuxfoundation.org>2018-09-27 19:14:10 +0530
commita108f101c2df69804be4631e0854c70e82af5b67 (patch)
tree6a8acb19bedffe3d315f0ad351b591f8465e889b /packer/templates
parent8995523d033feca9d7ca39d6f45dd02b7cd0e2a3 (diff)
Expand rendered image name to include sec and ms
Expand rendered image name to include seconds and milliseconds. This reduces the probability of image name collisions on the cloud from 1/60 to 1/60000. The initial change Ic1853ba7566def397b8bce389e2779fe3020c7ce was reverted, since the change had issues bringing up an instance on the OpenStack cloud provider. This was because the default `instance_name` value is taken as the `image_name`, when the instance_name is unset, the instance_name does not allow FQDN format hostname ending with a period+number. The workaround is to use separate `instance_name` parameter in your builder which does not end with period+number. Fixed upstream in common-packer [1.]. [1.] https://gerrit.linuxfoundation.org/infra/#/c/10986/ JIRA: https://jira.linuxfoundation.org/browse/RELENG-971 Issue-ID: CIMAN-168 Change-Id: I451dd8956fbd2b97a47b5064d9802108f4fc3115 Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Diffstat (limited to 'packer/templates')
-rw-r--r--packer/templates/helm.json3
-rw-r--r--packer/templates/memcached.json2
-rw-r--r--packer/templates/redis.json3
3 files changed, 4 insertions, 4 deletions
diff --git a/packer/templates/helm.json b/packer/templates/helm.json
index b34ce9f83..51a151cbf 100644
--- a/packer/templates/helm.json
+++ b/packer/templates/helm.json
@@ -15,7 +15,8 @@
"builders": [
{
"name": "vexxhost",
- "image_name": "ZZCI - {{user `distro`}} - helm - {{isotime \"20060102-1504\"}}",
+ "image_name": "ZZCI - {{user `distro`}} - helm - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
+ "instance_name": "{{user `distro`}}-builder-{{uuid}}",
"source_image_name": "{{user `base_image`}}",
"type": "openstack",
"identity_endpoint": "{{user `cloud_auth_url`}}",
diff --git a/packer/templates/memcached.json b/packer/templates/memcached.json
index ad4bc805a..dd1227ac3 100644
--- a/packer/templates/memcached.json
+++ b/packer/templates/memcached.json
@@ -15,7 +15,7 @@
"builders": [
{
"name": "vexxhost",
- "image_name": "{{user `distro`}} - memcached - {{isotime \"20171102-0135\"}}",
+ "image_name": "{{user `distro`}} - memcached - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
"source_image_name": "{{user `base_image`}}",
"type": "openstack",
"identity_endpoint": "{{user `cloud_auth_url`}}",
diff --git a/packer/templates/redis.json b/packer/templates/redis.json
index 20422f677..2b3c03f92 100644
--- a/packer/templates/redis.json
+++ b/packer/templates/redis.json
@@ -15,7 +15,7 @@
"builders": [
{
"name": "vexxhost",
- "image_name": "{{user `distro`}} - redis - {{isotime \"20060102-1504\"}}",
+ "image_name": "{{user `distro`}} - redis - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
"source_image_name": "{{user `base_image`}}",
"type": "openstack",
"identity_endpoint": "{{user `cloud_auth_url`}}",
@@ -62,4 +62,3 @@
}
]
}
-