IT IS NOT RECOMMENDED TO USE MINIO IN DOCKER-COMPOSE ON PRODUCTION DEPLOYMENT. QAMETA SOFTWARE IS NOT RESPONSIBLE FOR DATA LOSS IN THIS CASE
minio-local:
restart: always
image: bitnami/minio:2022
container_name: minio-local
networks:
- allure-net
volumes:
- minio-volume:/data
environment:
MINIO_ROOT_USER: ${ALLURE_S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${ALLURE_S3_SECRET_KEY}
MINIO_PROMETHEUS_AUTH_TYPE: 'public'
ports:
- "9000:9000"
volumes:
minio-volume:# minio-local comes from container_name in service description above
ALLURE_S3_URL=http://minio-local:9000
ALLURE_S3_PROVIDER=s3
ALLURE_S3_BUCKET=allure-testops
ALLURE_S3_REGION=qameta-0
ALLURE_S3_ACCESS_KEY=<username>
ALLURE_S3_SECRET_KEY=<password>
ALLURE_S3_PATHSTYLE=trueDo not worry when you see dead container after docker compose ps. It's job and it should die after completion. This job creates bucket in minio, so TestOps can store files in it. ENVs are used from minio service
minio-provisioning:
restart: "no"
image: minio/mc
container_name: minio-provisioning
depends_on:
- minio-local
networks:
- allure-net
entrypoint: "/bin/sh -c"
command: >
"mc config host add minio ${ALLURE_S3_URL} ${ALLURE_S3_ACCESS_KEY} ${ALLURE_S3_SECRET_KEY} --api S3v4 &&
mc mb minio/${ALLURE_S3_BUCKET} --ignore-existing --region ${ALLURE_S3_REGION} &&
mc admin info minio"This job is handy if you want to migrate from Local Minio to External Minio or Other S3 Storage. To perform that you need:
- Disable LoadBalancer to stop TestOps receiving new data.
- Wait until no jobs left in RabbitMQ (http/https)://<your_rabbit_host>:15672
- Add service described below (minio-migrate) and add .env props
docker compose downdocker compose up -d- Wait until minio-migrate finishes (
docker compose ps). It may take a while
minio-migrate:
restart: "no"
image: minio/mc
container_name: minio-migrate
depends_on:
- minio
networks:
- allure-net
entrypoint: "/bin/sh -c"
command: >
"mc config host add minio-old ${ALLURE_S3_URL} ${ALLURE_S3_ACCESS_KEY} ${ALLURE_S3_SECRET_KEY} --api S3v4 &&
mc config host add s3-new ${S3_URL_NEW} ${ALLURE_S3_ACCESS_KEY_NEW} ${ALLURE_S3_SECRET_KEY_NEW} --api S3v4 &&
mc cp -r minio-old/${ALLURE_S3_BUCKET}/v2 s3-new/${ALLURE_S3_BUCKET_NEW}/"S3_URL_NEW=http(s)://<new_host>:<port>
ALLURE_S3_ACCESS_KEY_NEW=<ACCESS_KEY_OF_NEW_S3>
ALLURE_S3_SECRET_KEY_NEW=<SECRET_KEY_OF_NEW_S3>
ALLURE_S3_BUCKET_NEW=<bucket_name>This job is handy to migrate from plain file system to S3
To perform that you need:
- Disable LoadBalancer to stop TestOps receiving new data.
- Wait until no jobs left in RabbitMQ (http/https)://<your_rabbit_host>:15672
- Add service described below (fs-migrate) and add .env props
docker compose downdocker compose up -d- Wait until fs-migrate finishes (
docker compose ps). It may take a while
fs-migrate:
restart: "no"
image: minio/mc
container_name: minio-fs-migrate
networks:
- allure-net
entrypoint: "/bin/sh -c"
volumes:
${REPORT_VOLUME}:/data
command: >
mc config host add s3 ${ALLURE_S3_URL} ${ALLURE_S3_ACCESS_KEY} ${ALLURE_S3_SECRET_KEY} --api S3v4 &&
mc mb s3/${ALLURE_S3_BUCKET} --ignore-existing --region ${ALLURE_S3_REGION} &&
mc cp -r /data/v2 s3/${ALLURE_S3_BUCKET}/ALLURE_S3_URL=http(s)://<new_host>:<port>
ALLURE_S3_ACCESS_KEY=<username>
ALLURE_S3_SECRET_KEY=<password>
ALLURE_S3_BUCKET=<bucket_name>
ALLURE_S3_REGION=<region>