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

Cumulus API Docker Image Support #472

Open
adamkorynta opened this issue May 14, 2024 · 2 comments
Open

Cumulus API Docker Image Support #472

adamkorynta opened this issue May 14, 2024 · 2 comments

Comments

@adamkorynta
Copy link

I would like to write integration tests for the CWMS client software against Cumulus, I see there are docker-compose files an instructions, but the main Cumulus REST API image is not deployed anywhere. While I could clone the repository and run the docker-compose within the automated build, that's a lot of overhead.

Can the Cumulus API be deployed to GitHub Packages? Or do you recommend that I write a job that checks to see if the stable branch is updated and build and push a new image in HEC's Nexus docker registry?

@adamscarberry
Copy link
Contributor

@adamkorynta

Cumulus contains multiple services (containers) as you can see in the docker-compose file. The "api" is just one of those services. Without the database, the api will not function, without the packager the downloads are not created.

This may not be exactly what you're looking for, but we stand up the db (including flyway) and api in a github workflow when changes are made to the api:

run: docker-compose -f docker-compose.tests.yml up -d && ./test_and_report.sh

Just the db and api -> https://github.com/USACE/cumulus-api/blob/stable/docker-compose.tests.yml
test_and_report.sh runs newman (a headless postman runner)

image

Currently we avoid changes that would break the CAVI integrations, so you should be able to test against the dev and stable (preferably dev) instance.

I'm not familiar with Github packages and probably wouldn't be able to research that anytime soon.

cc @FHanbali

@adamkorynta
Copy link
Author

Thanks, Adam.

I should have included the sql directory image in my request as well. I would be able to stand up this docker environment on my local dev system after cloning this repository, but I'd prefer not to be cloning extra repositories on HEC's TeamCity as part of CAVI's pipeline as that adds lots of extra overhead. We'd also need extra logic to determine when to prune/rebuild the image based on when updates are made here in this repository rather than always grabbing the latest deployed docker image.

Using testcontainers within the CAVI integration test runs, I would probably use your exact same docker-compose.tests.yml, but giving the lack of context for the api/sql directories I would have to fall back on cloning the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants