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

Add cht-user-managment-worker and redis to cht-user-management helm charts #26

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

Hareet
Copy link
Member

@Hareet Hareet commented Oct 28, 2024

Resolves #19

A few things I need to fix before merging:

  • Chart.yaml in cht-user-management requires version "0.2.0" for its dependencies. If we run helm commands with --dry-run --debug with "0.2.1" versions listed, the manifests dont get populated for cht-user-management and worker containers. Only redis is populated. Rolling that chart depedency back to version "0.2.0" populates all manifests.
  • We have some nested dependencies (cht-user-management) uses single-base-app to create its templates, and there is some version mismatching that is happening.
  • We need to fix this, because we want to release single-base-app "0.2.2" which would include options around if ports, services or healthprobes are needed and that would enable us to use single-base-app for cht-user-management-worker

Current workaround:

  • Deploy helm charts with Chart.yaml "0.2.0" for all single-base-app
  • After deployment is running, edit cht-user-management-worker deploy resource and delete the lines referencing ports.

Testing:

  • cht-core 4.9 : hareet-test.dev.medicmobile.org
    • togo config uploaded, no seed data yet
  • user man tool: hareet-test-users.dev.medicmobile.org

…t still requires update to single base app to make ports and probes optional.
…quire them. Step needed for cht-user-management-worker to be able to use single-base-app without live deployment resource modifications
@Hareet Hareet self-assigned this Oct 28, 2024
Copy link
Contributor

@mrjones-plip mrjones-plip left a comment

Choose a reason for hiding this comment

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

Thanks for reaching out for early feedback! Much appreciated.

While I'm still pretty (VERY!) rusty on how helm works, I parsed out some basics and had questions which I'm couching as "request changes" ;)

charts/cht-user-management/Chart.yaml Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

All the additions to this file seem bespoke to a dev install for Hareet in EKS. Is this correct? If yes, I'll do a deep dive on what looks wrong. If no, I'll wait 'til final revisions come in.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I've added some comments on what to change, and thought other environment variables were self-described. We can add more comments to clarify

image:
repository: public.ecr.aws/medic/cht-user-management
tag: "" # Set this to the version of the docker image
tag: "1.4.1" # Set this to the version of the docker image
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if we could update the deploy steps to NOT depend on the deploy branch in CHT User Man repo:

Switch to the deploy branch and ensure the same values file from the prior step is in the values folder in deploy branch

Maybe that's for another PR though? Really - this is error prone and done manually for all prod pushes - a good recipe for a mistake to be made!

Copy link
Member Author

Choose a reason for hiding this comment

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

So the deploy branch only contains the values yaml, and you want that moved to the main branch? Why is it in the deploy branch in the first place? Let's chat about it and put it in a different PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

medic/cht-user-management#213

Here's the values file we want to use for users-chis-tg deploy.

@Hareet Hareet marked this pull request as ready for review October 30, 2024 01:10
@Hareet Hareet requested a review from mrjones-plip October 30, 2024 01:10
@Hareet
Copy link
Member Author

Hareet commented Oct 30, 2024

@mrjones-plip Please approve.

It's ready for anyone to use. We'll scrub the default values that say hareet-test in another PR and fix our interpolation of REDIS_HOST, so it doesn't have to be manually entered.

Here are steps to use it:

  • Git checkout repo, go into directory:
  • helm dependency update
  • helm dependency build
  • helm -n <namespace> install <release-name> -f values.yaml .

If someone doesnt approve in time or Chart.lock interferes with above steps, and this needs to be rushed deploy:

  • Git checkout specific branch cht-user-management-worker
  • In Chart.yml (cht-user-management directory), uncomment the repository line and comment the other one out. For all dependencies.
  • helm dependency update
  • helm dependency build
  • Change all the values to reflect your prod deploy
  • install chart

@henokgetachew Is @paulpascal set up for Production EKS? We can have him deploy this.

@Hareet Hareet changed the title [WIP]: Add cht-user-managment-worker and redis to cht-user-management helm charts Add cht-user-managment-worker and redis to cht-user-management helm charts Oct 30, 2024
@Hareet
Copy link
Member Author

Hareet commented Oct 30, 2024

Tests are only failing because I require a version of base-single-app is also being merged in this PR. Then the dependencies can build and tests will pass, so lets ignore that for this moment.

@mrjones-plip
Copy link
Contributor

@mrjones-plip Please approve.

Done!

It's ready for anyone to use.

That's awesome - thanks!

The measure of this being true is for anyone but SRE to successfully deploy by following the deploy docs - these seem to differ now from what you listed above.

@henokgetachew Is @paulpascal set up for Production EKS? We can have him deploy this.

nope! Ro too. It would be amazing to fix both their perms and see one of them can follow steps in this PR to deploy \o/

@Hareet Hareet merged commit 048af49 into main Oct 30, 2024
1 check failed
@Hareet Hareet deleted the cht-user-management-worker branch October 30, 2024 05:45
@Hareet
Copy link
Member Author

Hareet commented Oct 30, 2024

@mrjones-plip Thanks. I'll test during my tomorrow morning if we can just run helm upgrade as per the docs, or whether we need the helm dependency steps beforehand.

@henokgetachew
Copy link
Contributor

henokgetachew commented Oct 30, 2024

The following people already had access to the namespace users-chis-prod:
"fredmuiru",
"kennsippel",
"mrjones"
I have added Paul (User: paulpascale) and Ro (User: romuald) and pinged you in the PR - I have applied the changes so he now has access.

@mrjones-plip
Copy link
Contributor

noting that Ro's access was fixed too

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

Successfully merging this pull request may close these issues.

Update cht-user-management chart
3 participants