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-13043 Migrate to docker compose plugin v2 #2944

Merged
merged 1 commit into from
Apr 5, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Build and install
run: make install

- name: Docker-compose
- name: Launch containers
env:
ENV_UP_FLAGS: "--detach"
run: make env-up
Expand Down
4 changes: 2 additions & 2 deletions admin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ test-cover: ## Run tests and collect cross-package coverage
go test $(TEST_FLAGS) -race -coverprofile=cover.out -covermode=atomic -coverpkg=./... ./...

env-up: ## Start development environment
docker-compose up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans
docker compose up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans

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

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
2 changes: 1 addition & 1 deletion agent/docker-compose-pg-load.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# docker-compose -f docker-compose-pg-load.yml up
# docker compose -f docker-compose-pg-load.yml up
version: '3.7'

services:
Expand Down
8 changes: 4 additions & 4 deletions qan-api2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ _run:

env-up: ## Run ClickHouse, MySQL Server and sysbench containers. Create pmm DB in ClickHouse
mkdir -p logs
docker-compose up -d $(DCFLAGS) --force-recreate --renew-anon-volumes --remove-orphans ch sysbench-ps
#docker-compose up $(DCFLAGS) ch sysbench-pstpcc
docker compose up -d $(DCFLAGS) --force-recreate --renew-anon-volumes --remove-orphans ch sysbench-ps
# docker compose up $(DCFLAGS) ch sysbench-pstpcc
sleep 60
docker exec ch-server clickhouse client -h 127.0.0.1 --query="CREATE DATABASE IF NOT EXISTS pmm;"

env-down: ## Remove docker containers
docker-compose down --volumes
docker compose down --volumes
rm -rf logs

pmm-env-up: ## Run PMM server, MySQL Server and sysbench containers
docker-compose up -d --force-recreate --renew-anon-volumes --remove-orphans $(PMM_CONTAINER)
docker compose up -d --force-recreate --renew-anon-volumes --remove-orphans $(PMM_CONTAINER)
docker exec $(PMM_CONTAINER) sed -i 's|<!-- <listen_host>0.0.0.0</listen_host> -->|<listen_host>0.0.0.0</listen_host>|g' /etc/clickhouse-server/config.xml
docker exec $(PMM_CONTAINER) supervisorctl restart clickhouse
docker exec $(PMM_CONTAINER) supervisorctl stop qan-api2
Expand Down
4 changes: 2 additions & 2 deletions update/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ _run:
pmm-update $(RUN_FLAGS)

env-up: ## Start development environment
docker-compose up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans
docker compose up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans

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

install-dev-tools:
docker exec pmm-update-server /root/go/src/github.com/percona/pmm/update/.devcontainer/install-dev-tools.sh
Expand Down
Loading