Motivation
This is all about saving your time, efforts, resources and (yes) money, the less time you spend on a system maintenance, the less money you spend on this very system maintenance.
Having Allure TestOps deployed in the way suitable for production allows you to avoid spending time on migrations and makes the system easier to maintain.
Main idea
All stateless components are in the deploy.
- Allure TestOps services
- report
- gateway
- uaa
- 3P services
- Redis
All stateful components are deployed separately.
- DataBases to be in a stand-alone DB server
- report DB
- uaa DB
- RabbitMQ is deployed as a stand-alone service
- S3
- is either deployed as a stand-alone service
- e.g. minio or ceph
- You can use S3 from AWS or Google
- is either deployed as a stand-alone service
Migration to dedicated database server
- Deploy PostgreSQL 14 server
- Create report and uaa databases, see the docs: https://docs.qameta.io/allure-testops/configuration/external-database/
- Stop any traffic to Allure TestOps and migrate the database
- docker compose stop gateway report uaa (check docker compose ps for actual services names)
- make the dump of databases: https://docs.qameta.io/allure-testops/configuration/backup-restore/
- report database
- uaa database
- restore the databases to the dedicated PostgreSQL server
- make sure to restore report >> report, uaa >> uaa
- update `.env` env variables responsible for the database connections with the references to the standalone DB server
- Stop the deployment via `docker compose down`
- Start the deployment via `docker compose up -d`
- Perform the tests to be sure the connection with the DB works fine (create, delete, view tests and test results and attachments).
Preparation for the S3 migration
Create S3 storage
The instructions below are for the migration to minio, it could be applied to any S3 storage migration except the actions explicitly designated for minio.
- Deploy minio as standalone solution with SSD under hood.
- Alternatives are
- AWS S3 - recommended
- Google cloud storage - recommended
- Ceph with SSD under hood - less performance comparing to AWS and Google.
- We don't recommend using direct file system / storage without S3 emulation.
- Create a new user for Allure TestOps with rights to put, move, copy, delete files (objects).
- Create new bucket, make sure that Allure TestOps user has got all the rights for the bucket described above.
Preparation of the Kubernetes deployment using Helm chart
- Start preparing the configs for Kubernetes deployment as described here: https://docs.qameta.io/allure-testops/getstarted/kubernetes/
- prepare values.yaml
- use the standalone database you've already migrated to
- use S3 settings for the minio server you are migrating to
- https://github.com/qameta/allure-testops-deployment/blob/master/charts/allure-testops/values.yaml#L194
- https://github.com/qameta/allure-testops-deployment/blob/4211a12fd64bd3d4a97023be1a3deea44014cbfc/charts/allure-testops/values.yaml#L204
- should be false: https://github.com/qameta/allure-testops-deployment/blob/master/charts/allure-testops/values.yaml#L233
Now, switch
- Stop all the traffic to Allure TestOps `docker compose stop gateway` (check `docker compose ps` for actual services names)
- For minio only: Copy all the files from report container to minio bucket using (this is very important) minio CLI tool see here
- we've prepared additional service for the docker compose deployment, so you either can use directly or you can use it as an example to copy the files. Here is the service: https://github.com/qameta/allure-docker-compose/blob/master/extras/minio.md#fs-to-minio-migration-job
- you just can reuse the commands from there
- without minio client files won't be indexed properly and won't get correct access rights and ultimately won't be accessible by ATO
- we've prepared additional service for the docker compose deployment, so you either can use directly or you can use it as an example to copy the files. Here is the service: https://github.com/qameta/allure-docker-compose/blob/master/extras/minio.md#fs-to-minio-migration-job
- For any other S3 just copy data from the docker compose container to a proper bucket in S3.
- When all the files are copied to S3
- stop docker compose deployment completely via `docker compose down`
- deploy Allure TestOps in K8s using prepared values.yaml
- Check k8s deployment works
- results upload, attachments can be saved and viewed
- manual test cases can be created with attachments
- launch with manual tests can be created and attachments from manual test cases appeat in the test results
- you can add attachments to the test results
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article