Self-host AWS - Headless deployment roadblocks
# support
i
Hello team, we have been playing around a bit with the self hosted option, and we found some roadblocks while setting up a CI/CD deployment process. 1. The big one is that a couple of script depend on user input, which for us (using CircleCI) was impossible to bypass. There are 2 scripts that have that logic: 1.A.
init
(https://github.com/medplum/medplum/blob/main/packages/cli/src/aws/init.ts) --> I think it's going to be hard to automate 1.B.
update-config
(https://github.com/medplum/medplum/blob/main/packages/cli/src/aws/update-config.ts) --> I made a PR to fix this one (https://github.com/medplum/medplum/issues/4600), but I don't know how to continue after creating the issue and my fork. 2. Thinking about the
init
script, we have a couple of questions: 2.A. Why is the signing key created in this script instead of being part of the CDK? 2.B. If a valid config json is created by hand, could we skip running it and call
update-config
instead? Thanks in advance
r
Hi @infinnitum for #2, thanks for the issue. To push the pull request to our main repo, you can follow the instructions here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
For #1, I'm curious about the use case for running
init
on CI/CD? Are you spinning up a fresh test cluster on every commit? If so, you can configure a valid medplum.config.json + upload all the relevant keys. The
init
command is just a convenience for generating this for you
You can then folowo the instructions from here onwards: https://www.medplum.com/docs/self-hosting/install-on-aws#cdk-bootstrap
i
Thanks for the link, here is the PR: https://github.com/medplum/medplum/pull/4625
No, I wanted to deploy to a new environment if it doesn't exist, without running the command. My stack consist on DEV, TST and PROD, so after installing in DEV by hand, my next idea was that CI/CD updates the stack if it exists, or creates it if it doesn't, all based on a commit to the config repo.
Hmm, I'll try to bypass calling the
init
command then, thanks for the input.
164 Views