FHIR Chat · IG development in the cloud · IG creation

Stream: IG creation

Topic: IG development in the cloud


view this post on Zulip Elliot Silver (Oct 08 2021 at 21:09):

Somewhat inspired by a recent thread on #fhir/infrastructure-wg and by some limitations that I'm running into with my development environment, I'm wondering if anyone is doing IG development in cloud containers? What I'm envisioning is putting a container in AWS that I can run the IG publisher in, along with Apache or similar pointing to the output directory, and then connecting to the container using VS Code remote development. (AWS only because I have a little experience, which is more than what I have on other platforms.)

view this post on Zulip Grahame Grieve (Oct 11 2021 at 01:37):

there's a docker somewhere

view this post on Zulip Grahame Grieve (Oct 11 2021 at 01:37):

and @Eric Haas has been doing something like this for a long time

view this post on Zulip Jens Villadsen (Oct 12 2021 at 09:57):

@Elliot Silver I dont understand the question. Are you asking if the igpub can run in a container? If that is the question, the answer is: yes

view this post on Zulip Jens Villadsen (Oct 12 2021 at 09:58):

and if it can run in a container it can run basically everywhere - local and cloud

view this post on Zulip Jens Villadsen (Oct 12 2021 at 09:59):

and - yes, that is what I do

view this post on Zulip Elliot Silver (Oct 12 2021 at 19:59):

@Jens Villadsen , so, I know IG pub can run in a container, and have used the hl7fhir/ig-publisher-base image to do local development. I'm wondering about people who have experience using containers in the cloud.

My local system is resource constrained, so I'd like to run IG publisher elsewhere (running it in a container on my local machine just makes it more resource constrained). Ideally, I'd like to take advantage of VSCode's remote development capabilities that lets me locally edit the IG files on a remote system, and run the builds on the remote system. I've tried setting up an AWS EC2 instance (EC2 = a regular AWS VM) and doing development in it both directly, and running docker in the VM, and that works. But it seems to be an extra level of virtualization that I should be able to avoid. So, my vision is to set up an AWS ECS (AWS container service) container that I can connect to directly from VSCode. I think my issue is less running IG publisher in the container, and more about setting up the container parameters themselves.

I'll ping @Eric Haas to see if he has any experience to share.

view this post on Zulip Josh Mandel (Oct 12 2021 at 20:04):

I'll see if I can throw together an example of using Codespaces for this (this is a github feature I've been using more and more in my daily development)

view this post on Zulip Elliot Silver (Oct 12 2021 at 20:37):

I was looking at Codespaces briefly, but my impression is that it's limited to paid Github accounts.

view this post on Zulip Josh Mandel (Oct 12 2021 at 20:58):

That's true, but same applies to cloud VMs, right?

view this post on Zulip Elliot Silver (Oct 12 2021 at 21:03):

True, but I'm already set up with an AWS account, but not with a paid Github account.

view this post on Zulip Josh Mandel (Oct 12 2021 at 21:03):

There's also a story where you can also run VS Code locally and connect to a container hosted in any cloud server of your choice (https://code.visualstudio.com/docs/remote/containers)

view this post on Zulip Josh Mandel (Oct 12 2021 at 21:04):

That'd let you run a docker container on AWS and connect from your local VS Code.

view this post on Zulip Josh Mandel (Oct 12 2021 at 21:04):

Anyway, I'll start with a self-contained example and see if it's any good.

view this post on Zulip Elliot Silver (Oct 12 2021 at 21:06):

Josh Mandel said:

There's also a story where you can also run VS Code locally and connect to a container hosted in any cloud server of your choice (https://code.visualstudio.com/docs/remote/containers)

That's exactly where I was heading -- I just need to figure out how to set up the container in AWS.

view this post on Zulip Josh Mandel (Oct 12 2021 at 21:14):

Sounds good; hopefully I'll have a working example of a container for you by the time you've got the AWS side of things set up.

view this post on Zulip Josh Mandel (Oct 12 2021 at 21:53):

https://github.com/jmandel/smart-app-launch/tree/master/.devcontainer has an example --

  • you can add this same directory to your own project and update https://github.com/jmandel/smart-app-launch/blob/master/.devcontainer/devcontainer.json#L23 to use your project name instead of smart-app-launch (there's obviously work that'd make this easier; right now just trying to get the rough shape working)
  • this will be slow to create the container as it compiles ruby extensions right now (this'll easy to avoid by using a hosted docker image instead of re-building a Dockerfile every time)

view this post on Zulip Josh Mandel (Oct 13 2021 at 23:00):

I made a few improvements and put together a quick demo at https://youtu.be/4o9dDQM_zHA

view this post on Zulip Bryn Rhodes (Oct 13 2021 at 23:28):

This is great, we are also doing this with the CQL VSCode plugin using codespaces:
image.png

view this post on Zulip Bryn Rhodes (Oct 13 2021 at 23:29):

Here's the .devcontainer we're using: https://github.com/alphora/cqf-ccc/tree/master/.devcontainer

view this post on Zulip Elliot Silver (Oct 14 2021 at 04:23):

That's beautiful--just what I was trying to do.
I'm still fighting with AWS--I think I should be able to run the container in Farscape on ECS (their "serverless" container service), but right now have only been able connect to the container when I'm running docker in an EC2 instance. (Also, the connection was via ssh; I haven't gone back and tried to do it via a container connection.) Since I was able to get something going, I may need to put aside perfecting it for now though.

view this post on Zulip Brian Postlethwaite (Oct 14 2021 at 11:26):

I use a docker image running in Azure DevOps, but I think the others here have all referenced something nicer ;)
(supporting our own internal CI-CD, and for some that don't do it often, running it locally)

view this post on Zulip Jens Villadsen (Oct 14 2021 at 18:18):

@Elliot Silver maybe there is something I'm not catching here - ... but AFAIK, you already draftet an IG setup using GH actions, which by the way works perfectly. It may just be me, but where does the need come from to have to step into the container that runs the build? Especially if its already running at e.g. github? Are you doing a lot of formatting in the templates or something like that?

view this post on Zulip Josh Mandel (Oct 14 2021 at 18:41):

where does the need come from to have to step into the container that runs the build?

Elliot is looking for an easier or faster or more flexible way to edit IGs without having a local environment configured with all the dependencies.

view this post on Zulip Jens Villadsen (Oct 14 2021 at 18:54):

@Josh Mandel and the turn-around time using eg. GH actions is insufficient?

view this post on Zulip Jens Villadsen (Oct 14 2021 at 18:56):

arh .... ok ...... just looked at the times for our GH actions for the build ... and that is ~5 mins ... thats too long .... I get it

view this post on Zulip Josh Mandel (Oct 14 2021 at 19:01):

Yeah. And also, just not having to push code between every tweak, and having syntax highlighting, extensions, etc.

view this post on Zulip Elliot Silver (Oct 14 2021 at 19:26):

Correct. I realize I could check in every change, but my preference is not to commit “transient” versions. It has little to do with GitHub build times and more to do with my pitiful laptop.


Last updated: Apr 12 2022 at 19:14 UTC