From 569e8255a14f20bab0b9ef89b07b94ba811f033c Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Fri, 22 May 2026 11:08:06 +0200 Subject: [PATCH] Solve warnings when building containers Formatted with `packer fix` --- archlinux20250601-builder/packer.json | 40 ++++++++------- arm64-builder/packer.json | 57 +++++++++++---------- centos7-alicerpms/packer.json | 46 +++++++++-------- cs8-builder/packer.json | 50 +++++++++--------- curator/packer.json | 61 ++++++++++++---------- docker-builder/packer.json | 73 ++++++++++++++------------- elasticsearch/packer.json | 44 ++++++++-------- jenkins/packer.json | 54 +++++++++++--------- marathon/packer.json | 58 +++++++++++---------- power8-builder/packer.json | 67 ++++++++++++++---------- publisher/packer.json | 44 ++++++++-------- riemann/packer.json | 66 ++++++++++++------------ rsync/packer.json | 56 ++++++++++---------- slc7-builder/packer.json | 54 +++++++++++--------- slc7-daq-builder/packer.json | 38 +++++++------- slc7-devtoolset/packer.json | 46 +++++++++-------- slc8-builder/packer.json | 50 +++++++++--------- slc9-arm-builder/packer.json | 54 +++++++++++--------- slc9-builder/packer.json | 52 ++++++++++--------- slc9-gpu-builder/packer.json | 70 +++++++++++++------------ ubuntu1804-builder/packer.json | 40 ++++++++------- ubuntu2004-builder/packer.json | 40 ++++++++------- ubuntu2204-builder/packer.json | 40 ++++++++------- ubuntu2404-builder/packer.json | 40 ++++++++------- vault-gatekeeper/packer.json | 47 +++++++++-------- vault/packer.json | 64 ++++++++++++----------- workqueue-scheduler/packer.json | 44 +++++++++------- 27 files changed, 758 insertions(+), 637 deletions(-) diff --git a/archlinux20250601-builder/packer.json b/archlinux20250601-builder/packer.json index 63b4f21..6e5bfa7 100644 --- a/archlinux20250601-builder/packer.json +++ b/archlinux20250601-builder/packer.json @@ -1,34 +1,38 @@ { "_comment": "Arch Linux builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/archlinux20250601-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "archlinux:base-devel", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/archlinux20250601-builder", + "TAG": "latest" + } } + diff --git a/arm64-builder/packer.json b/arm64-builder/packer.json index 2a772c2..841ad0f 100644 --- a/arm64-builder/packer.json +++ b/arm64-builder/packer.json @@ -1,42 +1,47 @@ { "_comment": "ARM64 Docker image", - "variables": { - "centos_major": "6", - "project": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/qemu-aarch64", - "curl -O http://eulisse.web.cern.ch/eulisse/centos-7.2.1511-aarch64-rootfs.tgz", - "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/proot", - "tar xzvf centos-7.2.1511-aarch64-rootfs.tgz", - "rm -fr centos-7.2.1511-aarch64-rootfs.tar*", - "chmod +x /qemu-aarch64", - "mkdir -p /cvmfs /build", - "chmod +x /proot" - ] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `project`}}/arm64-builder", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } ] - ] + ], + "provisioners": [ + { + "inline": [ + "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/qemu-aarch64", + "curl -O http://eulisse.web.cern.ch/eulisse/centos-7.2.1511-aarch64-rootfs.tgz", + "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/proot", + "tar xzvf centos-7.2.1511-aarch64-rootfs.tgz", + "rm -fr centos-7.2.1511-aarch64-rootfs.tar*", + "chmod +x /qemu-aarch64", + "mkdir -p /cvmfs /build", + "chmod +x /proot" + ], + "type": "shell" + } + ], + "variables": { + "centos_major": "6", + "project": "alisw" + } } + diff --git a/centos7-alicerpms/packer.json b/centos7-alicerpms/packer.json index c4d5b12..5f5888f 100644 --- a/centos7-alicerpms/packer.json +++ b/centos7-alicerpms/packer.json @@ -1,39 +1,43 @@ { "_comment": "CentOS 7 with ALICE RPMs repo", - "variables": { - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos7", - "commit": true + "type": "docker" } ], + "post-processors": [ + [ + { + "repository": "{{user `DOCKER_HUB_REPO`}}/centos7", + "tags": [ + "latest" + ], + "type": "docker-tag" + }, + { + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" + } + ] + ], "provisioners": [ { - "type": "shell", "inline": [ "curl -L https://cafiles.cern.ch/cafiles/certificates/CERN%20Grid%20Certification%20Authority.crt > /etc/pki/ca-trust/source/anchors/CERN_Grid_CA.pem", "update-ca-trust enable", "update-ca-trust", "printf \"[alisw-el7]\\nname=ALICE Software - EL7\\nbaseurl=https://ali-ci.cern.ch/repo/RPMS/el7.x86_64/\\nenabled=1\\ngpgcheck=0\\n\" > /etc/yum.repos.d/alisw-el7.repo", "echo diskspacecheck=0 >> /etc/yum.conf" - ] + ], + "type": "shell" } ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/centos7", - "tag": "latest" - }, - { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] - } - - ] - ] + "variables": { + "DOCKER_HUB_REPO": "alisw" + } } + diff --git a/cs8-builder/packer.json b/cs8-builder/packer.json index d678ae3..528cc9e 100644 --- a/cs8-builder/packer.json +++ b/cs8-builder/packer.json @@ -1,42 +1,46 @@ { "_comment": "CentOS Stream 8 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/cs8-builder", - "TAG": "latest", - "GIT_VERSION": "2.32.0" - }, "builders": [ { - "type": "docker", - "image": "quay.io/centos/centos:stream8", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "shell", - "environment_vars": [ - "GIT_VERSION={{user `GIT_VERSION`}}" ], - "script": "provision.sh" + "commit": true, + "image": "quay.io/centos/centos:stream8", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "environment_vars": [ + "GIT_VERSION={{user `GIT_VERSION`}}" + ], + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "GIT_VERSION": "2.32.0", + "REPO": "registry.cern.ch/alisw/cs8-builder", + "TAG": "latest" + } } + diff --git a/curator/packer.json b/curator/packer.json index 79f263f..0030f97 100644 --- a/curator/packer.json +++ b/curator/packer.json @@ -1,44 +1,49 @@ { "_comment": "Build a Mesos slave image", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "mesos_version": "0.28.2", - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "alisw/mesos-slave:{{user `mesos_version`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "curator.repo", - "destination": "/etc/yum.repos.d/curator.repo" - }, - { - "type": "shell", - "inline": [ - "rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch", - "yum install -y python-elasticsearch-curator python-setuptools", - "yum clean all -y"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/curator", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/etc/yum.repos.d/curator.repo", + "source": "curator.repo", + "type": "file" + }, + { + "inline": [ + "rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch", + "yum install -y python-elasticsearch-curator python-setuptools", + "yum clean all -y" + ], + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "alisw", + "centos_major": "7", + "centos_minor": "2", + "mesos_version": "0.28.2" + } } + diff --git a/docker-builder/packer.json b/docker-builder/packer.json index d992091..69d0e79 100644 --- a/docker-builder/packer.json +++ b/docker-builder/packer.json @@ -1,50 +1,55 @@ { "_comment": "Build a docker enabled builder", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "docker_version": "1.12.0", - "packer_version": "1.2.0", - "DOCKER_HUB_REPO": "aliswdev" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "docker.repo", - "destination": "/etc/yum.repos.d/docker.repo" - }, - { - "type": "shell", - "inline": [ - "yum update -y", - "yum install -y docker-engine-{{user `docker_version`}} unzip", - "yum install -y git java-1.8.0-openjdk-headless", - "yum clean all -y", - "curl -L -O https://releases.hashicorp.com/packer/{{user `packer_version`}}/packer_{{user `packer_version`}}_linux_amd64.zip", - "unzip packer*.zip", - "mv packer /usr/bin/packer", - "chmod +x /usr/bin/packer"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/docker-builder", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/etc/yum.repos.d/docker.repo", + "source": "docker.repo", + "type": "file" + }, + { + "inline": [ + "yum update -y", + "yum install -y docker-engine-{{user `docker_version`}} unzip", + "yum install -y git java-1.8.0-openjdk-headless", + "yum clean all -y", + "curl -L -O https://releases.hashicorp.com/packer/{{user `packer_version`}}/packer_{{user `packer_version`}}_linux_amd64.zip", + "unzip packer*.zip", + "mv packer /usr/bin/packer", + "chmod +x /usr/bin/packer" + ], + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "aliswdev", + "centos_major": "7", + "centos_minor": "2", + "docker_version": "1.12.0", + "packer_version": "1.2.0" + } } + diff --git a/elasticsearch/packer.json b/elasticsearch/packer.json index 05e759d..64c9c71 100644 --- a/elasticsearch/packer.json +++ b/elasticsearch/packer.json @@ -1,36 +1,40 @@ { "_comment": "Build an elasticsearch image", - "variables": { - "elasticsearch_version": "2.4", - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "elasticsearch:{{user `elasticsearch_version`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "/usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head/latest" - ] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/elasticsearch", - "tag": "{{user `elasticsearch_version`}}" + "tags": [ + "{{user `elasticsearch_version`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "inline": [ + "/usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head/latest" + ], + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "alisw", + "elasticsearch_version": "2.4" + } } + diff --git a/jenkins/packer.json b/jenkins/packer.json index 06e1920..90ccfae 100644 --- a/jenkins/packer.json +++ b/jenkins/packer.json @@ -1,43 +1,47 @@ { "_comment": "Jenkins service", - "variables": { - "jenkins_version": "2.46.3", - "REPO": "registry.cern.ch/alisw/jenkins" - }, "builders": [ { - "type": "docker", - "image": "centos:centos7", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"\"]" - ] - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "script": "provision.sh" + ], + "commit": true, + "image": "centos:centos7", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `jenkins_version`}}" + "tags": [ + "{{user `jenkins_version`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/run.sh", + "source": "run.sh", + "type": "file" + }, + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/jenkins", + "jenkins_version": "2.46.3" + } } + diff --git a/marathon/packer.json b/marathon/packer.json index e0e0052..5144d41 100644 --- a/marathon/packer.json +++ b/marathon/packer.json @@ -1,49 +1,53 @@ { "_comment": "Marathon", - "variables": { - "mesos_version": "1.0.1", - "docker_version": "1.11.3", - "marathon_version": "1.3.5", - "DOCKER_HUB_REPO": "aliswdev" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "{{user `DOCKER_HUB_REPO`}}/mesos-base:{{user `mesos_version`}}", - "commit": true + "type": "docker" } ], + "post-processors": [ + [ + { + "repository": "{{user `DOCKER_HUB_REPO`}}/marathon", + "tags": [ + "{{user `marathon_version`}}" + ], + "type": "docker-tag" + }, + { + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" + } + ] + ], "provisioners": [ { - "type": "file", + "destination": "/run.sh", "source": "run.sh", - "destination": "/run.sh" + "type": "file" }, { - "type": "shell", "inline": [ "yum -y install marathon-{{user `marathon_version`}} nc git java-1.8.0-openjdk-devel", "yum -y install maven", "yum clean all -y", "mkdir -p /plugins", "git clone https://github.com/alisw/marathon-sso-plugin", - "cd /marathon-sso-plugin && mvn compile && mvn package && cp target/marathonsso-1.3.1.jar /plugins/plugin.jar", + "cd /marathon-sso-plugin \u0026\u0026 mvn compile \u0026\u0026 mvn package \u0026\u0026 cp target/marathonsso-1.3.1.jar /plugins/plugin.jar", "cp target/classes/ch/cern/marathonsso/plugin-conf.json /plugin-conf.json" - ] + ], + "type": "shell" } ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/marathon", - "tag": "{{user `marathon_version`}}" - }, - { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] - } - - ] - ] + "variables": { + "DOCKER_HUB_REPO": "aliswdev", + "docker_version": "1.11.3", + "marathon_version": "1.3.5", + "mesos_version": "1.0.1" + } } + diff --git a/power8-builder/packer.json b/power8-builder/packer.json index 368b662..f092afc 100644 --- a/power8-builder/packer.json +++ b/power8-builder/packer.json @@ -1,44 +1,55 @@ { "_comment": "POWER8 Docker image", - "variables": { - "centos_major": "6", - "project": "alisw" - }, "builders": [ { - "type": "docker", - "image": "centos:centos{{user `centos_major`}}", "commit": true, - "run_command": ["--privileged=true","-d", "-i", "-t", "{{.Image}}", "/bin/bash"] - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/qemu-ppc64le", - "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/fedora-22-ppc64le-rootfs.tar.bz2", - "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/proot", - "tar xjf fedora-22-ppc64le-rootfs.tar.bz2", - "rm -fr fedora-22-ppc64le-rootfs.tar*", - "chmod +x /qemu-ppc64le", - "mkdir -p /cvmfs /build", - "chmod +x /proot" - ] + "image": "centos:centos{{user `centos_major`}}", + "run_command": [ + "--privileged=true", + "-d", + "-i", + "-t", + "{{.Image}}", + "/bin/bash" + ], + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `project`}}/power8-builder", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "inline": [ + "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/qemu-ppc64le", + "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/fedora-22-ppc64le-rootfs.tar.bz2", + "curl -O http://davidlt.web.cern.ch/davidlt/vault/proot/proot", + "tar xjf fedora-22-ppc64le-rootfs.tar.bz2", + "rm -fr fedora-22-ppc64le-rootfs.tar*", + "chmod +x /qemu-ppc64le", + "mkdir -p /cvmfs /build", + "chmod +x /proot" + ], + "type": "shell" + } + ], + "variables": { + "centos_major": "6", + "project": "alisw" + } } + diff --git a/publisher/packer.json b/publisher/packer.json index 95d9f78..951300d 100644 --- a/publisher/packer.json +++ b/publisher/packer.json @@ -1,38 +1,42 @@ { "_comment": "ALICE publisher", - "variables": { - "REPO": "registry.cern.ch/alisw/publisher", - "TAG": "latest" - }, "builders": [ { - "type": "docker", - "image": "almalinux:9-minimal", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + ], + "commit": true, + "image": "almalinux:9-minimal", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/publisher", + "TAG": "latest" + } } + diff --git a/riemann/packer.json b/riemann/packer.json index a5e73e7..4fd9305 100644 --- a/riemann/packer.json +++ b/riemann/packer.json @@ -1,49 +1,53 @@ { "_comment": "Build riemann image", - "variables": { - "centos_major": "7", - "centos_minor": "3", - "DOCKER_HUB_REPO": "aliswdev" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos{{user `centos_major`}}", - "commit": true + "type": "docker" } ], + "post-processors": [ + [ + { + "repository": "{{user `DOCKER_HUB_REPO`}}/riemann", + "tags": [ + "latest" + ], + "type": "docker-tag" + }, + { + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" + } + ] + ], "provisioners": [ { - "type": "file", + "destination": "/run.sh", "source": "run.sh", - "destination": "/run.sh" + "type": "file" }, { - "type": "shell", "inline": [ - "yum update -y && yum install -y java-1.8.0-openjdk bzip2 git && yum clean all -y", - "curl -L -O https://aphyr.com/riemann/riemann-0.2.10.tar.bz2 && tar xjvf /riemann-0.2.10.tar.bz2", - "curl -L -o/usr/bin/lein https://raw.github.com/technomancy/leiningen/stable/bin/lein && chmod +x /usr/bin/lein", + "yum update -y \u0026\u0026 yum install -y java-1.8.0-openjdk bzip2 git \u0026\u0026 yum clean all -y", + "curl -L -O https://aphyr.com/riemann/riemann-0.2.10.tar.bz2 \u0026\u0026 tar xjvf /riemann-0.2.10.tar.bz2", + "curl -L -o/usr/bin/lein https://raw.github.com/technomancy/leiningen/stable/bin/lein \u0026\u0026 chmod +x /usr/bin/lein", "git clone https://github.com/avishai-ish-shalom/riemann-elasticsearch-plugin", - "cd riemann-elasticsearch-plugin && LEIN_ROOT=1 lein uberjar", + "cd riemann-elasticsearch-plugin \u0026\u0026 LEIN_ROOT=1 lein uberjar", "mkdir -p /jars", - "(cd /jars && curl -O https://clojars.org/repo/clj-time/clj-time/0.11.0/clj-time-0.11.0.jar)", - "(cd /jars && curl -O https://repo1.maven.org/maven2/joda-time/joda-time/2.8.2/joda-time-2.8.2.jar)" - ] + "(cd /jars \u0026\u0026 curl -O https://clojars.org/repo/clj-time/clj-time/0.11.0/clj-time-0.11.0.jar)", + "(cd /jars \u0026\u0026 curl -O https://repo1.maven.org/maven2/joda-time/joda-time/2.8.2/joda-time-2.8.2.jar)" + ], + "type": "shell" } ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/riemann", - "tag": "latest" - }, - { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] - } - - ] - ] + "variables": { + "DOCKER_HUB_REPO": "aliswdev", + "centos_major": "7", + "centos_minor": "3" + } } + diff --git a/rsync/packer.json b/rsync/packer.json index 6a21204..5b52c02 100644 --- a/rsync/packer.json +++ b/rsync/packer.json @@ -1,42 +1,46 @@ { "_comment": "Build a rsync image", - "variables": { - "centos_major": "7", - "REPO": "registry.cern.ch/alisw/rsync", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "inline": [ - "yum update -y && yum install -y rsync nc && yum clean all" - ] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/run.sh", + "source": "run.sh", + "type": "file" + }, + { + "inline": [ + "yum update -y \u0026\u0026 yum install -y rsync nc \u0026\u0026 yum clean all" + ], + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/rsync", + "TAG": "latest", + "centos_major": "7" + } } + diff --git a/slc7-builder/packer.json b/slc7-builder/packer.json index 21f5ffe..dad80c5 100644 --- a/slc7-builder/packer.json +++ b/slc7-builder/packer.json @@ -1,44 +1,48 @@ { "_comment": "CentOS 7 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/slc7-builder", - "TAG": "latest", - "CCTOOLS_VERSION": "6.2.9", - "GIT_VERSION": "2.32.0" - }, "builders": [ { - "type": "docker", - "image": "centos:7", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "shell", - "environment_vars": [ - "CCTOOLS_VERSION={{user `CCTOOLS_VERSION`}}", - "GIT_VERSION={{user `GIT_VERSION`}}" ], - "script": "provision.sh" + "commit": true, + "image": "centos:7", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "environment_vars": [ + "CCTOOLS_VERSION={{user `CCTOOLS_VERSION`}}", + "GIT_VERSION={{user `GIT_VERSION`}}" + ], + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "CCTOOLS_VERSION": "6.2.9", + "GIT_VERSION": "2.32.0", + "REPO": "registry.cern.ch/alisw/slc7-builder", + "TAG": "latest" + } } + diff --git a/slc7-daq-builder/packer.json b/slc7-daq-builder/packer.json index 3de2549..dcdf32b 100644 --- a/slc7-daq-builder/packer.json +++ b/slc7-daq-builder/packer.json @@ -1,33 +1,37 @@ { "_comment": "Builder with Centos7 and devtools4", - "variables": { - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos7", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/slc7-daq-builder", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "alisw" + } } + diff --git a/slc7-devtoolset/packer.json b/slc7-devtoolset/packer.json index 80c21e5..4e72a00 100644 --- a/slc7-devtoolset/packer.json +++ b/slc7-devtoolset/packer.json @@ -1,38 +1,42 @@ { "_comment": "CentOS 7 with devtoolset-6", - "variables": { - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "alisw/slc7-builder", - "commit": true + "type": "docker" } ], + "post-processors": [ + [ + { + "repository": "{{user `DOCKER_HUB_REPO`}}/slc7-devtoolset", + "tags": [ + "latest" + ], + "type": "docker-tag" + }, + { + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" + } + ] + ], "provisioners": [ { - "type": "shell", "inline": [ "yum clean all", "rpm --rebuilddb", "yum install -y centos-release-scl", "yum install -y devtoolset-6" - ] + ], + "type": "shell" } ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/slc7-devtoolset", - "tag": "latest" - }, - { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] - } - - ] - ] + "variables": { + "DOCKER_HUB_REPO": "alisw" + } } + diff --git a/slc8-builder/packer.json b/slc8-builder/packer.json index 1dba8ce..ecd1a0f 100644 --- a/slc8-builder/packer.json +++ b/slc8-builder/packer.json @@ -1,42 +1,46 @@ { "_comment": "Alma 8.7 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/slc8-builder", - "TAG": "latest", - "GIT_VERSION": "2.32.0" - }, "builders": [ { - "type": "docker", - "image": "almalinux:8.7", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "shell", - "environment_vars": [ - "GIT_VERSION={{user `GIT_VERSION`}}" ], - "script": "provision.sh" + "commit": true, + "image": "almalinux:8.7", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "environment_vars": [ + "GIT_VERSION={{user `GIT_VERSION`}}" + ], + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "GIT_VERSION": "2.32.0", + "REPO": "registry.cern.ch/alisw/slc8-builder", + "TAG": "latest" + } } + diff --git a/slc9-arm-builder/packer.json b/slc9-arm-builder/packer.json index d90d820..6140535 100644 --- a/slc9-arm-builder/packer.json +++ b/slc9-arm-builder/packer.json @@ -1,43 +1,47 @@ { "_comment": "Alma 9 builder", - "variables": { - "REPO": "registry.cern.ch/alisw/slc9-arm-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", - "image": "gitlab-registry.cern.ch/linuxsupport/alma9-base:9.7", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "file", - "source": "alice-system-deps.repo", - "destination": "/etc/yum.repos.d/alice-system-deps.repo" - }, - { - "type": "shell", - "script": "provision.sh" + ], + "commit": true, + "image": "gitlab-registry.cern.ch/linuxsupport/alma9-base:9.7", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/etc/yum.repos.d/alice-system-deps.repo", + "source": "alice-system-deps.repo", + "type": "file" + }, + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/slc9-arm-builder", + "TAG": "latest" + } } + diff --git a/slc9-builder/packer.json b/slc9-builder/packer.json index 1951202..acb0115 100644 --- a/slc9-builder/packer.json +++ b/slc9-builder/packer.json @@ -1,43 +1,47 @@ { "_comment": "Alma 9 builder", - "variables": { - "REPO": "registry.cern.ch/alisw/slc9-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", - "image": "gitlab-registry.cern.ch/linuxsupport/alma9-base:9.7", - "commit": true, "changes": [ "ENTRYPOINT [\"\"]", "CMD [\"/bin/bash\"]" - ] - } - ], - "provisioners": [ - { - "type": "file", - "source": "alice-system-deps.repo", - "destination": "/etc/yum.repos.d/alice-system-deps.repo" - }, - { - "type": "shell", - "script": "provision.sh" + ], + "commit": true, + "image": "gitlab-registry.cern.ch/linuxsupport/alma9-base:9.7", + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } ] - ] + ], + "provisioners": [ + { + "destination": "/etc/yum.repos.d/alice-system-deps.repo", + "source": "alice-system-deps.repo", + "type": "file" + }, + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/slc9-builder", + "TAG": "latest" + } } diff --git a/slc9-gpu-builder/packer.json b/slc9-gpu-builder/packer.json index 4e3b40b..afc5426 100644 --- a/slc9-gpu-builder/packer.json +++ b/slc9-gpu-builder/packer.json @@ -1,62 +1,66 @@ { "_comment": "Alma 9 GPU builder X-enabled CUDA13.1.1-enabled AMD ROCm 6.3.2-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/slc9-gpu-builder", - "TAG": "latest", - "CUDA_PKG_VERSION": "13-1", - "CUDA_PKG_MINOR_VERSION": "1", - "NVIDIA_GPGKEY_SUM": "d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3b80c87" - }, "builders": [ { - "type": "docker", - "image": "registry.cern.ch/alisw/slc9-builder:latest", - "commit": true, "changes": [ "ENV CMAKE_PREFIX_PATH=/opt/rocm/lib/cmake", "ENV PATH=\"${PATH}:/usr/local/cuda/bin\"" - ] + ], + "commit": true, + "image": "registry.cern.ch/alisw/slc9-builder:latest", + "type": "docker" } ], + "post-processors": [ + [ + { + "repository": "{{user `REPO`}}", + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" + }, + { + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" + } + ] + ], "provisioners": [ { - "type": "file", + "destination": "/etc/yum.repos.d/cuda.repo", "source": "cuda.repo", - "destination": "/etc/yum.repos.d/cuda.repo" + "type": "file" }, { - "type": "file", + "destination": "/etc/yum.repos.d/rocm.repo", "source": "rocm.repo", - "destination": "/etc/yum.repos.d/rocm.repo" + "type": "file" }, { - "type": "file", + "destination": "/etc/yum.repos.d/amdgpu.repo", "source": "amdgpu.repo", - "destination": "/etc/yum.repos.d/amdgpu.repo" + "type": "file" }, { - "type": "shell", "environment_vars": [ "CUDA_PKG_VERSION={{user `CUDA_PKG_VERSION`}}", "CUDA_PKG_MINOR_VERSION={{user `CUDA_PKG_MINOR_VERSION`}}", "NVIDIA_GPGKEY_SUM={{user `NVIDIA_GPGKEY_SUM`}}", "GIT_VERSION={{user `GIT_VERSION`}}" ], - "script": "provision.sh" + "script": "provision.sh", + "type": "shell" } ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" - }, - { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] - } - - ] - ] + "variables": { + "CUDA_PKG_MINOR_VERSION": "1", + "CUDA_PKG_VERSION": "13-1", + "NVIDIA_GPGKEY_SUM": "d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3b80c87", + "REPO": "registry.cern.ch/alisw/slc9-gpu-builder", + "TAG": "latest" + } } + diff --git a/ubuntu1804-builder/packer.json b/ubuntu1804-builder/packer.json index ca72d6e..a7e59d0 100644 --- a/ubuntu1804-builder/packer.json +++ b/ubuntu1804-builder/packer.json @@ -1,34 +1,38 @@ { "_comment": "Ubuntu 18.04 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/ubuntu1804-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "ubuntu:18.04", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/ubuntu1804-builder", + "TAG": "latest" + } } + diff --git a/ubuntu2004-builder/packer.json b/ubuntu2004-builder/packer.json index 2444594..65c6cec 100644 --- a/ubuntu2004-builder/packer.json +++ b/ubuntu2004-builder/packer.json @@ -1,34 +1,38 @@ { "_comment": "Ubuntu 20.04 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/ubuntu2004-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "ubuntu:20.04", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/ubuntu2004-builder", + "TAG": "latest" + } } + diff --git a/ubuntu2204-builder/packer.json b/ubuntu2204-builder/packer.json index dd163b5..55dab51 100644 --- a/ubuntu2204-builder/packer.json +++ b/ubuntu2204-builder/packer.json @@ -1,34 +1,38 @@ { "_comment": "Ubuntu 22.04 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/ubuntu2204-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "ubuntu:22.04", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/ubuntu2204-builder", + "TAG": "latest" + } } + diff --git a/ubuntu2404-builder/packer.json b/ubuntu2404-builder/packer.json index 9d8f325..0fe6d7a 100644 --- a/ubuntu2404-builder/packer.json +++ b/ubuntu2404-builder/packer.json @@ -1,34 +1,38 @@ { "_comment": "Ubuntu 24.04 builder X-enabled", - "variables": { - "REPO": "registry.cern.ch/alisw/ubuntu2404-builder", - "TAG": "latest" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "ubuntu:24.04", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision.sh" + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `REPO`}}", - "tag": "{{user `TAG`}}" + "tags": [ + "{{user `TAG`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "script": "provision.sh", + "type": "shell" + } + ], + "variables": { + "REPO": "registry.cern.ch/alisw/ubuntu2404-builder", + "TAG": "latest" + } } + diff --git a/vault-gatekeeper/packer.json b/vault-gatekeeper/packer.json index 8d30ddb..e06fd06 100644 --- a/vault-gatekeeper/packer.json +++ b/vault-gatekeeper/packer.json @@ -1,37 +1,42 @@ { "_comment": "Build a Vault Gatekeeper image", - "variables": { - "vault_gatekeeper_version": "0.5.3", - "DOCKER_HUB_REPO": "aliswdev" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "golang", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "go get -d github.com/alisw/vault-gatekeeper-mesos", - "cd $GOPATH/src/github.com/alisw/vault-gatekeeper-mesos && git checkout tags/0.5.3", - "cd $GOPATH/src/github.com/alisw/vault-gatekeeper-mesos && /bin/bash ./build.bash && cp ./vltgatekeeper /bin/vltgatekeeper"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/vault-gatekeeper", - "tag": "{{user `vault_gatekeeper_version`}}" + "tags": [ + "{{user `vault_gatekeeper_version`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "inline": [ + "go get -d github.com/alisw/vault-gatekeeper-mesos", + "cd $GOPATH/src/github.com/alisw/vault-gatekeeper-mesos \u0026\u0026 git checkout tags/0.5.3", + "cd $GOPATH/src/github.com/alisw/vault-gatekeeper-mesos \u0026\u0026 /bin/bash ./build.bash \u0026\u0026 cp ./vltgatekeeper /bin/vltgatekeeper" + ], + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "aliswdev", + "vault_gatekeeper_version": "0.5.3" + } } + diff --git a/vault/packer.json b/vault/packer.json index f1c5030..660452d 100644 --- a/vault/packer.json +++ b/vault/packer.json @@ -1,46 +1,50 @@ { "_comment": "Vault image", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "vault_version": "0.6.4", - "DOCKER_HUB_REPO": "aliswdev" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "inline": [ - "curl -O -L https://releases.hashicorp.com/vault/{{user `vault_version`}}/vault_{{user `vault_version`}}_linux_amd64.zip", - "yum install -y unzip", - "unzip vault_{{user `vault_version`}}_linux_amd64.zip", - "install -o root vault /usr/bin/vault" - ] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/vault", - "tag": "{{user `vault_version`}}" + "tags": [ + "{{user `vault_version`}}" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "destination": "/run.sh", + "source": "run.sh", + "type": "file" + }, + { + "inline": [ + "curl -O -L https://releases.hashicorp.com/vault/{{user `vault_version`}}/vault_{{user `vault_version`}}_linux_amd64.zip", + "yum install -y unzip", + "unzip vault_{{user `vault_version`}}_linux_amd64.zip", + "install -o root vault /usr/bin/vault" + ], + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "aliswdev", + "centos_major": "7", + "centos_minor": "2", + "vault_version": "0.6.4" + } } + diff --git a/workqueue-scheduler/packer.json b/workqueue-scheduler/packer.json index 0904175..8a08caf 100644 --- a/workqueue-scheduler/packer.json +++ b/workqueue-scheduler/packer.json @@ -1,35 +1,41 @@ { "_comment": "Mesos WorkQueue framework", - "variables": { - "MESOS_WORKQUEUE_VERSION": "0.0.2-f86f6dc944-3", - "DOCKER_HUB_REPO": "alisw" - }, "builders": [ { - "type": "docker", + "commit": true, "image": "alisw/slc7-builder", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "script": "install.sh", - "environment_vars": [ "MESOS_WORKQUEUE_VERSION={{user `MESOS_WORKQUEUE_VERSION`}}" ] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "{{user `DOCKER_HUB_REPO`}}/workqueue-scheduler", - "tag": "latest" + "tags": [ + "latest" + ], + "type": "docker-tag" }, { - "type": "shell-local", - "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + "inline": [ + "echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'" + ], + "type": "shell-local" } - ] - ] + ], + "provisioners": [ + { + "environment_vars": [ + "MESOS_WORKQUEUE_VERSION={{user `MESOS_WORKQUEUE_VERSION`}}" + ], + "script": "install.sh", + "type": "shell" + } + ], + "variables": { + "DOCKER_HUB_REPO": "alisw", + "MESOS_WORKQUEUE_VERSION": "0.0.2-f86f6dc944-3" + } } +