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

rev Maven from 3.8.4 to 3.8.5 #8537

Merged
merged 1 commit into from
Apr 8, 2022
Merged

Conversation

carlsonp
Copy link
Contributor

What this PR does / why we need it:

Maven 3.8.4 binary downloads yields a 404. This fixes the download.

Which issue(s) this PR closes:

Closes #

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

Is there a release notes update needed for this change?:

Additional documentation:

@pdurbin
Copy link
Member

pdurbin commented Mar 28, 2022

Without this fix I'm definitely getting errors on develop (c5d1df2):

tar: Error opening archive: Failed to open 'apache-maven-3.8.4-bin.tar.gz'
mv: rename apache-maven-3.8.4/* to maven/*: No such file or directory
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
No custom build number specified. Using "develop-c5d1df209".
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
/bin/rm -rf dvinstall dvinstall.zip
mkdir -p dvinstall
copying glassfish setup
/bin/cp as-setup.sh dvinstall
copying war file...
ERROR: can't find application .war file (../../target/dataverse-5.10.war)!
Build the Dataverse application war file, then try again.
make: *** [dvinstall/dataverse.war] Error 1
cp: dvinstall.zip: No such file or directory
...
unzip:  cannot find or open dvinstall.zip, dvinstall.zip.zip or dvinstall.zip.ZIP.
...
Payara setup complete
Mon Mar 28 20:41:07 UTC 2022
remote failure: File not found : /opt/dv/dvinstall/dataverse.war
Command deploy failed.

@pdurbin pdurbin self-assigned this Mar 28, 2022
@pdurbin
Copy link
Member

pdurbin commented Mar 28, 2022

Hmm, even on this pull request (2ec7a88) I'm getting errors:

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
No custom build number specified. Using "maven-docker-build-2ec7a8810".
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
/bin/rm -rf dvinstall dvinstall.zip
mkdir -p dvinstall
copying glassfish setup
/bin/cp as-setup.sh dvinstall
copying war file...
ERROR: can't find application .war file (../../target/dataverse-5.10.war)!
Build the Dataverse application war file, then try again.
make: *** [dvinstall/dataverse.war] Error 1
cp: dvinstall.zip: No such file or directory
...
unzip:  cannot find or open dvinstall.zip, dvinstall.zip.zip or dvinstall.zip.ZIP.
...
Payara setup complete
Mon Mar 28 20:44:00 UTC 2022
remote failure: File not found : /opt/dv/dvinstall/dataverse.war
Command deploy failed.

The conf/docker-aio/1prep.sh runs locally, so on Mac for me, and I'm not sure if I usually build the war file from my regular dev environment. For testing develop and this branch I've been using a fresh clone of the repo

@carlsonp did you run conf/docker-aio/prep_it.bash and get a working Dataverse installation? (The download of Maven is definitely fixed!)

@carlsonp
Copy link
Contributor Author

Hello. I wasn't able to finish the other steps. I got the same message you did, I don't think that JAVA_HOME should be set in the script. That's likely something that needs to be referenced to be set in the documentation as that path location likely changes.

Ultimately, I'm looking for an easy way to get this all setup using Docker. It seems as if there are multiple methods and/or community maintained versions?

I was able to get further with dataverse-docker. Unfortunately, there still seem to be some pieces that aren't well documented like the default credentials, turning off DOI validation, etc. Uploading files seems to be fairly hit-or-miss with things like custom logos not being applied properly.

It would be great if this community work could be rolled into this official repo. Clearly there are a lot of dependencies and pieces to Dataverse but an easy container build that ties into the existing codebase would make it a lot easier for beginners to get up and running.

@donsizemore
Copy link
Contributor

@carlsonp your PR runs through cleanly for me on Ubuntu:
{"status":"OK","data":{"version":"5.10","build":"maven-docker-build-2ec7a8810"}}

What platform are you using? Probably best to move the entire build process inside the container, but this PR as it stands runs cleanly on Linux.

@poikilotherm
Copy link
Contributor

It would be great if this community work could be rolled into this official repo. Clearly there are a lot of dependencies and pieces to Dataverse but an easy container build that ties into the existing codebase would make it a lot easier for beginners to get up and running.

Thank you @carlsonp for telling the same story I am trying to sell since ever I joined Dataverse hacking.

I am working on this as a worktime side project of my usual stuff. There are a few issues in this tracker regarding this, the most current one is #8250.

@pdurbin
Copy link
Member

pdurbin commented Mar 29, 2022

@carlsonp a workaround to get docker-aio working is to build the war file before you run conf/docker-aio/prep_it.bash. I just tried this on my Mac and it worked fine. (If you have any trouble getting the war file to build, please let us know and/or open an issue about this.) I actually forgot to switch to your branch and even through I got the 404 for downloading Maven, the installation of Dataverse went fine. That 404 does bothers me though so I'll probably move this pull request along since it's a good fix!

I'm not sure where to go from here. docker-aio the most supported code we have for running Dataverse in Docker, supported by the core team at IQSS, I mean. Since the "prep it" script doesn't "just work" for you (it doesn't build the war file), would you mind creating an issue about this? Please indicate if you're on Windows, Mac, or Linux and the version. One thought @donsizemore and I have is to try moving the building of the war file inside the container (Linux, like we do with Vagrant) rather than building it on the client machine (Windows, Mac, or Linux).

The dataverse-docker repo is completely community created and supported. I do try to keep an eye on issues that are opened but I don't usually have much to say. There's also dataverse-kubernetes (used in production at https://data.fz-juelich.de ) at https://github.com/gdcc/dataverse-kubernetes by @poikilotherm which is also community supported. We try to explain this at https://guides.dataverse.org/en/5.10/developers/containers.html

Even docker-aio is community created but at least we try to keep it working since it's in the main git repo. 😄

What's going on here is that core team doesn't use Docker or containers at all but the community has created some interesting solutions. I'd say @poikilotherm has been leading the charge to make it easier to containerize Dataverse by making a variety of pull requests (thanks again, @poikilotherm). What's missing for the core team is a reason to publish images. So far we've been letting the community do that.

@carlsonp
Copy link
Contributor Author

Thank you all for the details and background information. This is very helpful to understand where the project is at.

Let me look through the code and think on this some more. I'll open another PR if I have additional code to share or questions.

@donsizemore
Copy link
Contributor

@carlsonp if you'd like to submit your own Dockerfile and would like inspiration: https://github.com/fzappa/rocky-dataverse/blob/main/rocky-dataverse.sh

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the 404 when downloading Maven.

Note that while building the war file using conf/docker-aio/prep_it.bash "just works" on some platforms (Linux), the war file might built on other platforms (Mac, others?) prior to running that script.

@pdurbin pdurbin removed their assignment Mar 29, 2022
@pdurbin
Copy link
Member

pdurbin commented Mar 29, 2022

@carlsonp sounds good. Please feel free to pop in https://chat.dataverse.org anytime where @donsizemore @poikilotherm and I hang out. Or we can pick this up in a new issue or PR. I went ahead and approved this PR since it fixes that 404. Thanks.

@kcondon
Copy link
Contributor

kcondon commented Apr 8, 2022

@carlsonp would you mind refreshing from develop branch? thanks

@carlsonp
Copy link
Contributor Author

carlsonp commented Apr 8, 2022

@carlsonp would you mind refreshing from develop branch? thanks

Done, rebased on top of latest develop branch.

@kcondon kcondon merged commit f2bd559 into IQSS:develop Apr 8, 2022
@carlsonp carlsonp deleted the maven-docker-build branch April 9, 2022 02:30
@pdurbin pdurbin added this to the 5.11 milestone Apr 11, 2022
@kcondon kcondon self-assigned this Apr 11, 2022
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

Successfully merging this pull request may close these issues.

5 participants