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

Dataverse container-based development environment #9423

Closed
GPortas opened this issue Feb 1, 2023 · 4 comments
Closed

Dataverse container-based development environment #9423

GPortas opened this issue Feb 1, 2023 · 4 comments
Labels
NIH OTA: 1.7.1 (reArchitecture) 7 | 1.7.1 | Research & architecture for separating backend and frontend to enable a flexible, sca... pm.GREI-d-1.7.1 NIH, yr1, aim7, task1: Research & architecture for separating backend and frontend

Comments

@GPortas
Copy link
Contributor

GPortas commented Feb 1, 2023

Overview of the Feature Request

The goal is making Dataverse development environment setup and management easier, from the initial installation to the day-to-day development. The following points have been considered when opting for a container-based development environment:

  • SPA frontend developers don’t have to worry so much about backend installation details.
  • Environment initialization/shut down is done in a simple way, considering we use docker-compose.
  • Easier process and with fewer installation dependencies than the current process based on installation scripts and dependencies directly installed on the localhost machine.

In addition, introducing this, currently development-oriented, offers the following advantages, which are transferable and beneficial for a future container-based production environment.

  • Greater scalability and modularity, by self-containing each dependency service in its own container.
  • Greater testability, by having more control over the different dependencies of Dataverse and the application itself.

For Dataverse, a custom Docker image is required. As for now is just for development purposes only, we can resort to fake properties or dependencies when needed (such as fake DOI values or SMTP server). Ideally this image will be evolved for productive use as well.

For Dataverse dependencies (PostgreSQL, Solr, etc) we should use official images where possible or create custom ones if the official ones are not enough. In the case of Keycloak, it would become part of these services too, based on the existing docker (and docker-compose) configuration recently added to the code base.

The ultimate goal is to have a docker-compose file that we can manage to have a full dev environment deployed locally (with persistent volumes when necessary). We can take inspiration from this: https://github.com/harvard-lts/drs-import-management-service/blob/main/docker-compose-dev.yml

What kind of user is the feature intended for?

Developers

What inspired the request?

What existing behavior do you want changed?

Dataverse development environment setup

Any brand new behavior do you want to add to Dataverse?

No, should be the same.

Any related open or closed issues to this feature request?

@pdurbin
Copy link
Member

pdurbin commented Mar 2, 2023

I just tried docker-compose up at https://github.com/GPortas/dataverse/blob/9353-docker-dev-env/conf/docker-dev-env/docker-compose.yml (as of c620fe2) and it "just worked!" 🎉

That is to say, it spun up Docker containers for PostgreSQL, Solr, and a mail server. Then installed Payara locally, ran the installer, and now I have a working Dataverse installation! With a good portion of it running in containers!

This is actually really convenient for me because I just bought a new Macbook at home and I only use PostgreSQL for Dataverse so running it in a container seems fine.

I'd say we're well on our way toward containerizing the services (for dev):

Next we'll need to think hard about an approach for containerizing Dataverse itself (for dev):

Great job, @GPortas!! 🎉 🚀

Since the mail server for dev is new (I guess it's called MailDev), here's a screenshot. This was me clicking the "Support" link in the header and filling out a form.

Screenshot 2023-03-01 at 7 40 51 PM

@mreekie mreekie transferred this issue from IQSS/dataverse Mar 3, 2023
@mreekie mreekie transferred this issue from IQSS/dataverse-pm Mar 3, 2023
@mreekie mreekie added the NIH OTA: 1.7.1 (reArchitecture) 7 | 1.7.1 | Research & architecture for separating backend and frontend to enable a flexible, sca... label Mar 3, 2023
@GPortas GPortas removed their assignment Mar 6, 2023
@mreekie mreekie added the pm.GREI-d-1.7.1 NIH, yr1, aim7, task1: Research & architecture for separating backend and frontend label Mar 20, 2023
@pdurbin
Copy link
Member

pdurbin commented Jul 12, 2023

Should we close this issue in favor of this one...

... and then just fix stuff along the way as more developers use Docker?

@pdurbin
Copy link
Member

pdurbin commented Sep 28, 2023

@GPortas and I agree. Close it! See https://preview.guides.gdcc.io/en/develop/container/dev-usage.html for how to use containers! 🎉

@pdurbin pdurbin closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NIH OTA: 1.7.1 (reArchitecture) 7 | 1.7.1 | Research & architecture for separating backend and frontend to enable a flexible, sca... pm.GREI-d-1.7.1 NIH, yr1, aim7, task1: Research & architecture for separating backend and frontend
Projects
None yet
Development

No branches or pull requests

3 participants