-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hello World Todo #120
Comments
Looks good! Just to clarify, is the "docker container" only meant to be used in the CI or does it relate to user-facing deployment e.g. on a local machine and online? |
Not sure if I’m not missing more recent devs, but originally the docker image -I think- was for the user-side to be able to run the backend locally (e.g., when conducting experiments in environments w/o access to the internet).
… On 23 Mar 2022, at 20:08, Xiang Ji ***@***.***> wrote:
Looks good! Just to clarify, is the "docker container" only meant to be used in the CI or does it relate to user-facing deployment e.g. on a local machine and online?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Exactly. This is why I was somewhat confused by magpie-ea/magpie-backend#131 by Marcel. I think now it's clarified after our discussions there, but indeed Marcel is talking about a separate Dockerfile for use in the CI it seems. |
Indeed, I created a new docker image for automated testing of the interactive bits in magpie-base. I'm not particular about people using it for normal deployment, though, which would be quite convenient in my opinion, at least when not using heroku. |
@x-ji Would you mind creating a new release for magpie-backend, too? Doesn't need to be v3, IMHO (although I'd prefer >v1.0.0 and the semver rules that come with that), but a new release number for every version that is used in production would be nice. Then we can document which versions of magpie-base are compatible with which versions of magpie-backend. |
Short update: magpie-base v3.0.0 is now released. |
Great! We haven't actually used release versioning on the backend. The tagged release numbers you may see in the repo are related to the previous attempt to create local releases, and the number hasn't been bumped for more than 3 years I think. It seems to me that the backend should be compatible with I think one way to make it happen is to simply use git commit hashes. We can add an instruction for people to check out a particular commit on the master branch of |
I think it would behoove us to have a clear versioning with CHANGELOG (as well as an update mechanism) in place, as that would allow to make changes with and without breaking compatibility, while being transparent about it. Git commit hashes seem not ideal for this. The target for such a versioning scheme should probably be the backend HTTP and socket API. Note, that we could still support multiple major magpie-backend versions with one magpie-base version. I'd be in favor of tagging the commit before the refactoring started as v1.0.0 and tagging the version pushed to production now as v2.0.0. |
Sure, I totally see your perspective. IMO one thing to think about though is that versioning is usually useful for something packaged as a release, i.e. something for the end user to install (either as a desktop application, an NPM package, or as a one-click runnable binary (which was what the previous desktop release of I think it's definitely a good idea to have a simpler mechanism to update the server deployment. Maybe using the deployment script for Heroku can already help. I can create the v1.0.0 and v2.0.0 tag, as you mentioned, though still I think it's a bit fuzzy when should a version number bump should occur, given that of course we wouldn't tag each new commit with a new version number, and there will probably not be many major feature changes planned. We can for sure further refine this as we see how people really use and upgrade the backend and what their feedback is. WDYT. |
By the way, another thing that occurred to me is that, in backend design, one usual way to denote breaking API changes is by different prefixes, e.g. |
The tags |
I agree. We could use the master branch for releases only and the actual development on a develop branch. This way, we can test stuff out on the develop branch and merge into master only when we want to release. I'd still think having semver versions would be good even in this case. What do you think?
That's also partly why I was looking into docker, but there's no simple service for deploying docker images that I can see. Does heroku allow deploying docker images directly, perhaps, or docker-compose files?
Cool! As I said above, I think we should not change tags once they are published and rather use a new tag, bumping the version number.
Yep, I'm happy to add this to the docs. |
Aside from these specifics, I think we're good to go on with a Hello World. What do you think @x-ji ? |
Let me get back to you before the end of tomorrow 😅 . |
Yes, I see that's probably what you're doing on
Yes, https://hexdocs.pm/phoenix/heroku.html has a guide on how to do it. I can also give it a try to see how it goes. Note that there's already a
Do you mean we're ready to create a Hello World app and test it, or do you mean we're ready for a release announcement? |
I will also update |
I meant the release announcement.
Nice, that would be cool.
I saw the Dockerfile but noticed that it wasn't working anymore and seems to be more geared towards creating a development instance, which is why I created https://github.com/magpie-ea/magpie-docker as a production build that I could use in CI and could be used for deploying to production. If you like we can merge the two.
I agree. My main concern was a) being explicit with which version is compatible to which, which I would solve by using semantic versioning in order to avoid using commit hashes directly and b) having some kind of release channel to a void people updating to a version that is not yet stable, which I would solve by using a stable branch (which only has the latest release version; whatever that branch is called) that people checkout and install from. |
Yes, that's totally reasonable. Have you written the documentation about version compatibility (I guess at
Nice. I see in the README this seems to be intended to be run locally as well? We can add a For CI I think it should be possible to point to |
I spent some time trying to set up a Docker + Heroku workflow for deploying the app, though I actually end up seeing limited benefits, especially since we still have to set some environment variables for the release, which is what most of the current steps are doing anyways. There's a new service https://fly.io (The creator of Phoenix framework now works there) which basically supports true one-command deployment from the command line, but its registration requires inputting a credit card up front, which I'm not sure if most researchers will be happy to do compared to Heroku. In addition to the |
I think everything should be ready, if we agree that we can live with the deploy and update scripts for the backend for now. |
I added it here: https://magpie-experiments.org/02_using_the_server_app/01_installation/
Not really, I guess for people that want to test their experiments, other solutions are better. The rationale was to have a production docker image available that can be run anywhere, without too much hassle if one knows docker as well as using it as a backend in the CI tests on github.
Roger that. Ideally we'd also figure out setting username and password at runtime for the docker image, then 🙏 so it still works in the CI tests... :) |
I just pushed v2.0.5 which uses the BasicAuth plug at runtime, which should solve the issue. As we don't have a Dockerfile in this project itself yet, I think keeping the separate project at the moment for running integration tests is totally fine. If we come up with a Dockerfile for this project itself, we can then think about that. Great work on coming up with the integration tests between |
Thanks :) I'm quite proud of it ✨ 😀 |
v0.7.0v3.0.0 with latest changesThe text was updated successfully, but these errors were encountered: