Conversation
|
@poikilotherm this is working great! Thanks for the heads up about email. I tried using the "Support" link in the header but when I clicked "Send Message" I got this error: Honestly, I can live without email working but it would be nice to see if we can fix this. I can also live without the TODO above about limiting resources (for now). Future PR, I'd say. I marked it as optional. I added docs and a release note. I tried to indicate that this is dev only. Hopefully the last thing is the SMTP thing. Or, again, I'm fine with fixing later. There is a TON of value in this PR. Thanks!! |
Here's a stacktrace of the MailDev/SMTP problem: stacktrace.txt Apparently, fromAddress here is null: In the domain.xml, the from address is
The from address is not defined as a database setting: Setting it might fix it. If I set :SystemEmail like this... I get a new error: From my Mac, the SMTP server is running on port 25... ... but the dataverse-1 (app container) can't reach it: Why? |
|
I have done the following steps so far:
Received this error within the docker-compose logs while applying the third step: Dataverse runs on 8080, but when trying to Log In with dataverseAdmin / admin credentials, the authentication fails. Am I missing something? |
|
@GPortas please note that the login is "dataverseAdmin:admin1". That "1" is easy to forget. Also, the "getSingleResult()" thing is very annoying but harmless. For some reason no one ever fixed this also it would be a low hanging fruit. Same goes for all the SQL exceptions which are triggered by us generating the DDL everytime we start the application. |
All containers have static names now, which might be a problem down the road. But at least consistent now.
Now Maildev will listen on port 25 as necessary to let Dataverse reach it. Also adapted the storage path to be easier addressable with a volume. Switched to using a tmpfs as other another initializer would be necessary to switch the volume permissions (like with Solr). Added configuring the SystemEmail to match the default value from init_2_config_payara.sh. Otherwise no mail gets sent.
This happens with every installation of Dataverse, so it has nothing to do with Docker. It's caused by this code: Which is triggered by creating the dataverseAdmin user: Then the dataverseAdminUser creates the root collection and the error stops happening for future users. Let's please treat this as out of scope. Again, it's an old bug. |
| be sent. | ||
|
|
||
|
|
||
| Note that the script ``init_2_configure.sh`` will apply a few very important defaults to enable quick usage |
There was a problem hiding this comment.
I'm not sure is this section, with implementation details, contains necessary information for someone using the image.
There was a problem hiding this comment.
Well this becomes very important if you configure the app to use some S3 storage... By switching the default storage to something other than "local", the local file storage will vanish.
There was a problem hiding this comment.
Right now the target user is a developer, someone hacking on the Dataverse software itself. I think these developers have enough information, right? Can we pick up this thread in a future pull requests when there is a different, non-developer audience?
| Development Usage | ||
| ================= | ||
|
|
||
| Please note! This Docker setup is not for production! |
There was a problem hiding this comment.
If it cannot be used in production, please provide some insight why that is not a good idea.
There was a problem hiding this comment.
I disagree. This section has a heading "Development Usage" and is targeting someone hacking on Dataverse and who wants to testrun changes in containers rather than a local installation of all components.
There was a problem hiding this comment.
Please note! This Docker setup is not for production! 😄
We could add, "You're in the dev-usage doc!" 😄
We are deliberately walking before we run. 🚶 🏃
| Intro | ||
| ----- | ||
|
|
||
| Assuming you have `Docker <https://docs.docker.com/engine/install/>`_, `Docker Desktop <https://www.docker.com/products/docker-desktop/>`_, |
There was a problem hiding this comment.
Could we just link to the OCI container spec (https://opencontainers.org/) without endorsing one implementation?
There was a problem hiding this comment.
No we can't. We can add Rancher Desktop if you want. Other than that, the Docker Maven Plugin requires using some sort of Moby daemon (Docker is a supported, paid distribution of Moby). You will not be able to build an image with podman or JIB etc with the current configuration.
It also is important to keep in mind that a future vision is to use these images with Testcontainers for more extensive tests than available now. This will also require some kind of Docker/Moby.
There was a problem hiding this comment.
It would be nice to have this information in the documentation.
There was a problem hiding this comment.
@johannes-darms sounds fine but this PR is in "Ready for QA" and it would be a shame to lose momentum. If you can make a PR into this PR, I'm happy to look and hopefully merge.
| ------------------- | ||
|
|
||
| See also the :doc:`/container/index`. | ||
| The :doc:`testing` section mentions using docker-aio for integration tests. We do not plan to keep this project alive. |
There was a problem hiding this comment.
Depreciation plan or end of life notice would be nice.
There was a problem hiding this comment.
I'm not sure I get you here. Do you want such a notice in here, right now? Or is this something you'd like to see in the future?
There was a problem hiding this comment.
For the sake of having the feature merged, I rather say in the future. However, saying that there are no plans on keeping docker-aio alive without given an EOL date isn't that nice to users of the package.
There was a problem hiding this comment.
Oh! Is anyone (except me, occasionally) using docker-aio?!?
There was a problem hiding this comment.
I have used docker-aio occasionally like you @pdurbin (Following the testing documentation, as it recommends to use it). I agree to point out the deprecation warning and describe it in any doc page that mentions docker-aio, to make the documentation more consistent.
|
|
||
| ``mvn -Pct clean package`` | ||
|
|
||
| Now, start all the containers with a single command: |
There was a problem hiding this comment.
Mention that this only starts the dataverse container, and up and running dependencies (postgres,SMTP and solr) are needed.
There was a problem hiding this comment.
Huh? Did you test this? Because this should start all the dependencies, too, as configured in the compose file. Let me know if this doesn't work for you.
There was a problem hiding this comment.
Yes, works on my machine! Containers go! 🤖 🤖 🤖 🤖
There was a problem hiding this comment.
it also works for me!
| To avoid having to install service dependencies like PostgreSQL or Solr directly on your localhost, there is the alternative of using the ``docker-compose-dev.yml`` file available in the repository root. For this option you need to have Docker and Docker Compose installed on your machine. | ||
|
|
||
| The ``docker-compose-dev.yml`` file runs the necessary service dependencies to support a development Dataverse installation running on localhost. In addition to PostgreSQL and Solr, it also runs a SMTP server. | ||
| The ``docker-compose-dev.yml`` can be configured to only run the service dependencies necessary to support a Dataverse installation running directly on localhost. In addition to PostgreSQL and Solr, it also runs a SMTP server. |
There was a problem hiding this comment.
How can I configure that?
There was a problem hiding this comment.
This is described below. Could you make a comment with a suggestion (Ctrl+g) on how to phrase this better? Thx!
|
The approach is also missing R and Rserve. They are listed as a prerequisite within the documentation but it looks like they are not really needed. If R/RServe is optional the documentation must be updated, otherwise another container wrapping RServe is needed. https://guides.dataverse.org/en/latest/installation/prerequisites.html?highlight=rserve |
|
Thanks @johannes-darms for the extensive review of the PR! I added comments to your comments.
Two things here: 1) Rserve is not a necessary component for developing Dataverse, which is what this is about. 2) Technically it even is not a requirement for an installation if you don't do any ingest. But yes, that should be stated in the docs. Would you be able to create an issue and/or a pull request? |
Good point. @poikilotherm how do you feel about a new title for this PR? "app container" -> "app container for dev" @johannes-darms thanks for all the feedback! I also left comments on your comments. Much appreciated!! |
|
Although the asadmin commands are enough to manage the Payara server, sometimes it is very useful to access the Payara administration console for better visualization. By default, Payara exposes the administration console on port 4848. It would be interesting to map this port to outside the container within the docker-compose file. I've tested this with this branch, by adding The problem is that the admin console now expects user and password credentials to login (As far as I know, these credentials are not documented). With the normal installation (without containers), we don't need credentials for accessing the Payara admin console. Is that login requirement a configuration that comes from the base image? It would be great to make admin credentials configurable through container environment variables. |
|
@GPortas yes, this comes from the base image. We could add a section to the base image documentation, similar to upstream Payara as this works exactly the same in our custom base image. In fact, the credentials are available via the (currently undocumented) env vars @GPortas probably this is beyond scope for this PR. Would you add a note to https://docs.google.com/document/d/15-sqdKzpCgQBtaPaAGYMaqcxsQXmt-2CwAVNPmmAPRY so we don't forget? |
|
@pdurbin @johannes-darms I added a few pieces of information about a future sunset of docker-aio in 7bcadab. Let me know if that helps. Feel free to hack on it. |
Related: |
|
Issues so far:
|
|
Hi @kcondon, thx for trying this. The log says that the database connection could not be established. It looks like you already had the local volumes from before (most likely #9414 / #9417), so there might be a different database already in place. Could you delete the whole |
Without setting the "env var" for docker compose within the Maven POM, the value will not be set, leading to a broken DB connection. The DMP does not read the values from .env.
|
Woo-hoo thanks for merging @kcondon ! Much appreciated, as always!! |
What this PR does / why we need it:
This pull request will add capabilities to create a Dataverse application image and run it along all necessary dependencies.
Which issue(s) this PR closes:
Special notes for your reviewer:
There are some TODOs:
(Optional) Maybe add some more resource limitations. Maybe tweak Dataverse container to fit into less than 2 GiB of RAMSuggestions on how to test this:
Clone/switch. Ensure to have Docker running. Execute
mvn -Pct clean package docker:run, then bootstrap when startup is done with./scripts/dev/docker-final-setup.shand go to localhost:8080.Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.
Is there a release notes update needed for this change?:
Yes, included.
Additional documentation:
None yet.