Skip to content

Commit

Permalink
PMM-8306 Migrate OVA image to rootless container. (#2938)
Browse files Browse the repository at this point in the history
* PMM-8306 Migrate OVA image to rootless container.

* PMM-8306 try `docker compose` instead of `docker-compose`

* PMM-8306 rename the step

---------

Co-authored-by: Alex Demidoff <[email protected]>
  • Loading branch information
talhabinrizwan and ademidoff authored Apr 3, 2024
1 parent 745531f commit 0921171
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Build and install
run: make install

- name: Docker-compose
- name: Launch the containers
env:
ENV_UP_FLAGS: "--detach"
run: make env-up
Expand Down
8 changes: 4 additions & 4 deletions agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ env-up: ## Start development environment
mkdir -p testdata/mysql/slowlogs
chmod -R 0777 testdata

docker-compose up $(ENV_UP_FLAGS)
docker compose up $(ENV_UP_FLAGS)

env-down: ## Stop development environment
docker-compose down --volumes --remove-orphans
docker compose down --volumes --remove-orphans

setup-dev: install ## Run pmm-agent setup in development environment
pmm-agent setup $(RUN_FLAGS) --server-insecure-tls --server-address=127.0.0.1:${PMM_DEV_SERVER_PORT} --server-username=admin --server-password=admin --paths-exporters_base=$(GOPATH)/bin --force
Expand All @@ -128,13 +128,13 @@ env-psql: ## Run psql client
docker exec -ti pmm-agent_postgres env PGPASSWORD=pmm-agent-password psql --username=pmm-agent

env-sysbench-prepare:
docker-compose exec --workdir=/sysbench/sysbench-tpcc sysbench ./tpcc.lua \
docker compose exec --workdir=/sysbench/sysbench-tpcc sysbench ./tpcc.lua \
--db-driver=pgsql --pgsql-host=postgres --pgsql-user=pmm-agent --pgsql-password=pmm-agent-password --pgsql-db=pmm-agent \
--threads=1 --time=0 --report-interval=10 \
--tables=1 --scale=10 --use_fk=0 --enable_purge=yes prepare

env-sysbench-run:
docker-compose exec --workdir=/sysbench/sysbench-tpcc sysbench ./tpcc.lua \
docker compose exec --workdir=/sysbench/sysbench-tpcc sysbench ./tpcc.lua \
--db-driver=pgsql --pgsql-host=postgres --pgsql-user=pmm-agent --pgsql-password=pmm-agent-password --pgsql-db=pmm-agent \
--threads=4 --time=0 --rate=10 --report-interval=10 --percentile=99 \
--tables=1 --scale=10 --use_fk=0 --enable_purge=yes run
7 changes: 1 addition & 6 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fetch:
-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://vagrantcloud.com/bento/boxes/oracle-9.0/versions/202207.20.0/providers/virtualbox.box -o ${PACKER_CACHE_DIR}/box/oracle9.ova
|| curl -fL https://vagrantcloud.com/bento/boxes/oracle-9.3/versions/202401.31.0/providers/virtualbox.box -o ${PACKER_CACHE_DIR}/box/oracle9.ova

# NOTE: image from vagrant registry is twice as large
test -f ${PACKER_CACHE_DIR}/box/box.ovf \
Expand All @@ -24,11 +24,6 @@ pmm-ovf: fetch
/usr/bin/packer build \
-only virtualbox-ovf -color=false packer/pmm.json | tee build.log

# NOTE: no difference between rc and dev-latest (i.e. pmm-ovf) ATM
pmm-ovf-rc: fetch
/usr/bin/packer build \
-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 Down
2 changes: 1 addition & 1 deletion build/packer/pmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
{
"type": "virtualbox-ovf",
"vm_name": "PMM-Server-EL9-{{isotime \"2006-01-02-1504\"}}",
"vm_name": "PMM3-Server-{{isotime \"2006-01-02-1504\"}}",
"export_opts": [
"--ovf10",
"--manifest",
Expand Down

0 comments on commit 0921171

Please sign in to comment.