Skip to content

Commit

Permalink
Merge branch 'v3' into PMM-12641-optimize-pmm-build-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff authored Nov 8, 2024
2 parents 4a3a55c + 883604e commit 913a0fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
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

## ----------------- PACKER ------------------
fetch:
mkdir -p ${PACKER_CACHE_DIR}/box || :
mkdir -p ${PACKER_CACHE_DIR}/box
test -f ${PACKER_CACHE_DIR}/id_rsa_vagrant \
|| curl -L https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant \
-o ${PACKER_CACHE_DIR}/id_rsa_vagrant
chmod 600 ${PACKER_CACHE_DIR}/id_rsa_vagrant
test -f ${PACKER_CACHE_DIR}/box/oracle9.ova \
|| curl -fL https://pmm-build-cache.s3.us-east-2.amazonaws.com/VBOXES/oracle9-202401.31.0.box -o ${PACKER_CACHE_DIR}/box/oracle9.ova

# NOTE: image from vagrant registry is twice as large
# Add the box using Vagrant
test -f ${PACKER_CACHE_DIR}/box/box.ovf \
|| tar -C ${PACKER_CACHE_DIR}/box -xvf ${PACKER_CACHE_DIR}/box/oracle9.ova
|| VAGRANT_HOME=${PACKER_CACHE_DIR}/box vagrant box add bento/oraclelinux-9 --box-version ${BOX_VERSION} --provider virtualbox

test -f ${PACKER_CACHE_DIR}/box/box.ovf \
|| cp -rp ${PACKER_CACHE_DIR}/box/boxes/bento-VAGRANTSLASH-oraclelinux-9/${BOX_VERSION}/amd64/virtualbox/* ${PACKER_CACHE_DIR}/box

deps:
mkdir -p ${PACKER_CACHE_DIR} ~/bin || :
Expand Down

0 comments on commit 913a0fa

Please sign in to comment.