Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-13642 Update scripts to release watchtower image. #3432

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export PACKER_CACHE_DIR := .cache
export PACKER_VERSION := 1.9.4
export BOX_VERSION := 202407.23.0
export PMM_SERVER_IMAGE ?= docker.io/perconalab/pmm-server:3-dev-latest
export WATCHTOWER_IMAGE ?= docker.io/perconalab/watchtower:dev-latest
talhabinrizwan marked this conversation as resolved.
Show resolved Hide resolved
export CENTOS_ISO := 2004.01

## ----------------- PACKER ------------------
Expand All @@ -25,7 +26,10 @@ deps:
unzip -o ${PACKER_CACHE_DIR}/packer.zip -d ~/bin

pmm-ovf: fetch
/usr/bin/packer build -var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' -only virtualbox-ovf -color=false packer/pmm.json | tee build.log
/usr/bin/packer build \
-var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' \
-var 'watchtower_image_name=${WATCHTOWER_IMAGE}' \
-only virtualbox-ovf -color=false packer/pmm.json | tee build.log

pmm-digitalocean:
packer build -only digitalocean -var 'single_disk=true' packer/pmm.json
Expand All @@ -35,7 +39,9 @@ pmm-azure:

pmm-ami:
docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build \hashicorp/packer:${PACKER_VERSION} \
build -var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' -only amazon-ebs -color=false packer/pmm.json | tee build.log
build -var 'pmm_server_image_name=${PMM_SERVER_IMAGE}' \
-var 'watchtower_image_name=${WATCHTOWER_IMAGE}' \
-only amazon-ebs -color=false packer/pmm.json | tee build.log
## ----------------- PACKER ------------------

check:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
WATCHTOWER_IMAGE={{ watchtower_image_name }}
WATCHTOWER_HTTP_API_UPDATE=1
WATCHTOWER_HTTP_API_TOKEN=123
WATCHTOWER_NO_RESTART=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ExecStart=/usr/bin/podman run --rm --replace=true --name %N \
--env-file=/home/admin/.config/systemd/user/watchtower.env \
--net pmm_default \
--cap-add=net_admin,net_raw \
docker.io/perconalab/watchtower
${WATCHTOWER_IMAGE}

ExecStop=/usr/bin/podman stop -t 10 %N

Expand Down
5 changes: 3 additions & 2 deletions build/packer/pmm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"variables": {
"single_disk": "false",
"pmm_server_image_name": "docker.io/perconalab/pmm-server:3-dev-latest"
"pmm_server_image_name": "docker.io/perconalab/pmm-server:3-dev-latest",
"watchtower_image_name": "docker.io/perconalab/watchtower:dev-latest"
},
"builders": [
{
Expand Down Expand Up @@ -124,7 +125,7 @@
"-vvv",
"-u root",
"--extra-vars",
"\"pmm_server_image_name='{{ user `pmm_server_image_name`}}'\""
"\"pmm_server_image_name='{{ user `pmm_server_image_name` }}' watchtower_image_name='{{ user `watchtower_image_name` }}'\""
],
"role_paths": [
"packer/ansible/roles/lvm-init",
Expand Down
Loading