Open jordanpadams opened 4 weeks ago
Hi @jordanpadams I'm also looping in @anilnatha and @eddiesarevalo:
Here are some open questions mostly for the Web Strategy Team—and possibly ourselves:
docker-compose-prod.yml
which I assume is used along with docker-compose-services.yml
and docker-compose.yml
to comprise a "production mode" instance—correct?scripts/prod/build.sh
though—does this mean we have to build the images in production mode too? We can't just run with images published to ECR or Docker Hub? It seems odd that even in production we're doing builds.scripts/prod/deploy-aws.sh
; is this how the Web Strategy Team runs in MCP or AWS? Is it run after scripts/prod/build.sh
?docker-compose.yml
files. Is Redis not used? Are there no async maintenance tasks?Note: Several of the scripts to docker compose … up
then docker exec ${PROJECT_NAME}_SERVICE
instead of docker compose exec SERVICE
; this sort of relies on how Docker Compose constructs internal container names. Just odd; if Docker Compose ever changes how it does works, this could break.
Responses from WST:
The README tells how to run the stack in development mode which includes tools like phpMyAdmin and a Chromium browser (whose purpose is unclear). Is there any documentation on running this in production mode?
No docs but what is in the repo. Essentially you change the .env variable for PROJECT_ENV=prod. That tells the utility scripts to behave differently. There is a scripts/prod/deploy.sh file. But the is more a suggestion, because Prod environments can vary.
There is a docker-compose-prod.yml which I assume is used along with docker-compose-services.yml and docker-compose.yml to comprise a "production mode" instance—correct?
there is a scripts/docker-compose.sh script that will create docker commands using the correct .yml files. You may want to crack that open to see what it is doing. It looks at the PROJECT_ENV and uses the right files.
There's a scripts/prod/build.sh though—does this mean we have to build the images in production mode too? We can't just run with images published to ECR or Docker Hub? It seems odd that even in production we're doing builds.
Ideally, you should not build on production. We use a job on Bamboo to build the docker container and push it to a docker repository. Then the build.sh pull from that repository. Your thinking about using ECR sounds correct to me. You will probably need to create some CI script somewhere that builds and pushes to ECR. Then write your own deploy.sh for production that resembles the existing scripts/prod/deploy.sh
There's a scripts/prod/deploy-aws.sh; is this how the Web Strategy Team runs in MCP or AWS? Is it run after scripts/prod/build.sh?
The deploy-aws.sh is an attempt to create a script for deploying to prod on AWS. It runs instead of scripts/prod/build.sh. Again, you will probably need to write your own prod deploy.sh script.
Is the expected runtime environment to be a single EC2 that runs the PHP-based web server, Solr, and MySQL? No AWS RDF for MySQL or AWS-managed Solr?
The entire stack can be run on one instance. However, that is not really optimal. We have split out the Solr and Database instances to other servers in our implementations.
I see mentions of Redis in places but no Redis service in any of the docker-compose.yml files. Is Redis not used? Are there no async maintenance tasks?
We had Redis in the stack for a while. But it was behaving oddly. So we have pulled it from many of our projects. Redis may or may not be in a usable state.
@nutjob4life ☝️
@jordanpadams thanks for taking the time to format Kyle's response with a lot more readability 🙏
More reference material: Terraform for Unity: https://github.com/unity-sds/unity-ui-infra/tree/main/terraform-unity-ui which provides
Thanks to @anilnatha who shared this on 11-22! 🎉
💡 Description
Setup CD for Portal Drupal Site to Dev using Terraform from #108
⚔️ Parent Epic / Related Tickets
No response