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

Docker mode (container mode) #268

Open
pdurbin opened this issue Feb 14, 2023 · 3 comments
Open

Docker mode (container mode) #268

pdurbin opened this issue Feb 14, 2023 · 3 comments

Comments

@pdurbin
Copy link
Member

pdurbin commented Feb 14, 2023

I've been talking to @TanayKarve about how ignorant I am about running Docker on servers.

We have a crazy idea! 🎉 😄

What if dataverse-ansible had a "Docker mode" where instead of installing Payara, PostgreSQL, Solr, and all the rest directly on the EC2 instance, the spin up script installs Docker on the EC2 instance so that we're ready to run containers, such as the ones in the dataverse-docker repo.

@TanayKarve says he can supply the 4-5 commands to install Docker on Rocky 8. Thanks!

-d is taken by "destroy" so we'll use -c for "container mode" (rather than "Docker mode").

@TanayKarve
Copy link

Sounds good. Here's the list of commands:

sudo dnf check-update
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker

Optional: Run docker without the sudo keyword everytime

sudo usermod -aG docker $(whoami)

@donsizemore
Copy link
Member

A few thoughts:

  1. On RHEL-based systems I consider podman to be far preferable over Docker for several reasons, but that's a small matter.

  2. The utility of Ansible in launching Dataverse in Docker might primarily involve populating docker-compose.yml and other env files via templates and running docker-compose, which is frankly over-kill. @pdurbin references the flags used in EC2-create, but we don't need Ansible for this - as @TanayKarve notes only a few commands are necessary to install Docker. It sounds like you're asking for ec2-create for dataverse-docker, which sounds great, but one bit of information is needed:

  3. We've had a number of Docker-based solutions over the years, each significantly different from one another, each developed by their respective organization rather than for general use. Oliver and Patrick's work looks like a step in this direction, so once there is a general, "recommended" Docker-based solution for Dataverse, we can pretty easily point EC2-create (or a GitHub workflow, or the next container-based CI service) at that?

Don

@pdurbin
Copy link
Member Author

pdurbin commented Oct 25, 2023

(Many months later) @donsizemore thanks for the thoughts above. I think we have (or are close to having) a config that works for a narrow use case at least: developers or people working on metadata blocks.

I bring this up because today @jggautier let me know that he was able to successfully use our docker quick start ( https://guides.dataverse.org/en/6.0/developers/dev-environment.html#quickstart ) to spin up our containers on his laptop so he could test a metadata block.

The main downside is that docker is running locally on his laptop rather than on an EC2 instance that he can share with others. ("Please play with the new metadata block and let me know if it looks ok.") It's looking like we've fixed (#331) our EC3 spin up scripts, so Julian will probably simply go back to using them, but it reminded me to circle back to this issue and explain a possible use case for running our Docker images on an EC2 instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants