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

Store Docker Compose files in the role #38

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Apr 10, 2024

🗣 Description

This pull request moves the Docker Compose files currently stored in cisagov/cyhy-mailer into the role. These are then copied directly instead of downloading the entire cisagov/cyhy-mailer repository contents just for these files.

💭 Motivation and context

Since all we need from the cisagov/cyhy-mailer repository is these files it makes sense to store them here. This will also put the cisagov/cyhy-mailer repository in a better place to be reorganized and skeletonized appropriately to modernize.

🧪 Testing

Automated tests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Post-merge checklist

  • Update the "About" section of the repository to match the updates to the README.

Currently we pull down the entire cisagov/cyhy-mailer repository
contents just to get these Docker Compose files. It makes more sense to
store them in the role as they represent a specific deployment of the
tool.
This matches the way we test files and fixes the name of the test to
correctly reference what is being tested.
@mcdonnnj mcdonnnj added breaking change This issue or pull request involves changes to existing functionality documentation This issue or pull request improves or adds to documentation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use test This issue or pull request adds or otherwise modifies test code labels Apr 10, 2024
@mcdonnnj mcdonnnj self-assigned this Apr 10, 2024
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me. 👍 👍

I'm thinking we should add an issue to this repo to make it less specific to our particular implementation. I am talking about setting default values for paths and email addresses in the compose files that we can override when we call this role from cyhy_amis.

Also, can you please add a post-merge task for yourself to update the "About" section of this repo (on https://github.com/cisagov/ansible-role-cyhy-mailer) to reflect the changes from this PR (i.e. similar to the verbiage changes you made in the README).

@mcdonnnj
Copy link
Member Author

This works for me. 👍 👍

I'm thinking we should add an issue to this repo to make it less specific to our particular implementation. I am talking about setting default values for paths and email addresses in the compose files that we can override when we call this role from cyhy_amis.

Also, can you please add a post-merge task for yourself to update the "About" section of this repo (on https://github.com/cisagov/ansible-role-cyhy-mailer) to reflect the changes from this PR (i.e. similar to the verbiage changes you made in the README).

I mean if we separate cisagov/cyhy-mailer into just the Python in that repo and then a cisagov/cyhy-mailer-docker that contains the Docker configuration and sample Docker compositions this role can remain focused on internal use in my opinion.

@dav3r
Copy link
Member

dav3r commented Apr 15, 2024

I'm thinking we should add an issue to this repo to make it less specific to our particular implementation. I am talking about setting default values for paths and email addresses in the compose files that we can override when we call this role from cyhy_amis.

I mean if we separate cisagov/cyhy-mailer into just the Python in that repo and then a cisagov/cyhy-mailer-docker that contains the Docker configuration and sample Docker compositions this role can remain focused on internal use in my opinion.

My thinking is that if we can make cisagov/cyhy-mailer-docker more "general use" (i.e. not specific to our implementation) without much effort, then we should do it, but I don't think it's a big deal either way.

@mcdonnnj
Copy link
Member Author

mcdonnnj commented Apr 15, 2024

I'm thinking we should add an issue to this repo to make it less specific to our particular implementation. I am talking about setting default values for paths and email addresses in the compose files that we can override when we call this role from cyhy_amis.

I mean if we separate cisagov/cyhy-mailer into just the Python in that repo and then a cisagov/cyhy-mailer-docker that contains the Docker configuration and sample Docker compositions this role can remain focused on internal use in my opinion.

My thinking is that if we can make cisagov/cyhy-mailer-docker more "general use" (i.e. not specific to our implementation) without much effort, then we should do it, but I don't think it's a big deal either way.

I guess I was thinking we don't do that (currently) with any similar Ansible roles. If we wanted to do it comprehensively I suppose that might be valuable, but the fact that we have bod, cyhy, and cyhy-notification override files already makes this kind of "us" specific. We could do the base docker-compose.yml file here with some level of customization and move the three override files into cisagov/cyhy_amis to better align with what you suggested though.

@dav3r
Copy link
Member

dav3r commented Apr 25, 2024

We could do the base docker-compose.yml file here with some level of customization and move the three override files into cisagov/cyhy_amis to better align with what you suggested though.

Yes, I think that is an excellent path forward. 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue or pull request involves changes to existing functionality documentation This issue or pull request improves or adds to documentation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use test This issue or pull request adds or otherwise modifies test code
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants