I am experiencing an issue with the CHT User Management tool when deploying it in a Kubernetes environment using Minikube. The application works correctly when running in the development environment with npm run dev, but it does not display the configured URL when deployed to Kubernetes.
Development Environment
In the development environment, I cloned the repository, configured the .env file, and ran npm run dev. The application works as expected, and the configured URL is displayed correctly.
Below are the details of my configurations and observations:
Development Environment: Works as expected.
Kubernetes Environment: Landing page loads, but the configured URL is not displayed.
Additional Information
Both environments are running locally.
I am using Minikube for the Kubernetes deployment.
Could you please assist me in diagnosing and resolving this issue? Any guidance on what might be causing the discrepancy between the development and Kubernetes environments would be greatly appreciated.
So if I understand you correctly, you can use the Management Tool to configure users for vihiga-prod-clone-moh-515-testing-go-ke.lg-apps.com when running in dev-mode, but not when in production. You’re setting the CHT_DEV_URL_PORT environment variable to vihiga-prod-clone-moh-515-testing-go-ke.lg-apps.com and expecting that to show up within the Kubernetes environment. Am I correct here about what you’re expecting?
If yes - the way we have things built today is that the $Development Instance option only shows when in dev mode and it is deliberately not available for production instances. Here is that logic. We link of it as a “tool for developers” rather than as a production setting.
Here are a few ideas for how we might proceed:
Add vihiga-prod-clone-moh-515-testing-go-ke.lg-apps.com as a domain in the chis-ke configuration here.
Copy the chis-ke config and make something like a chis-lg configuration which is similar to chis-ke but has your own domain list.
You could make a code change in cht-user-management: maybe you change when the $Development Instance option is visible, or make additional ways of adding domains, etc …
If you’re just testing this; setting the NODE_ENV value to be non-production would be the hackiest path to seeing it work.
It is hard to advise you without understanding your long-term goal a little better. Why are you setting up this server to manage a clone? Are you just testing some things out? I assume there is production data on this clone; so best to be careful with the credentials going throught the user management tool.
Can you confirm this is an eCHIS Kenya instance with the same user types, contact_types, contact forms, etc.?
Thank you very much for your detailed feedback and suggestions.
Indeed, the $Development Instance option is primarily geared towards development purposes, hence its exclusion from production environments. I appreciate the suggestions you’ve outlined for moving forward.
Regarding your query about the long-term goal behind setting up this server, it’s primarily for testing and experimentation purposes at this stage. We’re being cautious, especially considering the sensitive nature of the data involved. I had also clarified that the env is local.
As for the instance, it shares similarities with the eCHIS Kenya instance in terms of user types, contact types, and contact forms. However, I’ll verify the specifics to ensure alignment.
Then my recommendation is to treat this as a new configuration within the User Management Tool. Here are the steps to create your configuration. It is a bit of a bumpy road, so please let me know if you get stuck. Duplicating the current eCHIS Kenya configuration will put you in a good place to start.
Thank you. I was able to clone one of the configs and defined the relevant properties as required. I now understand where I was getting confused, It seems I didn’t read the instructions well Many thanks for the support.