Skip to content

Commit

Permalink
Merged with DANS code
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBoon committed Feb 13, 2019
1 parent 60746be commit c79e748
Show file tree
Hide file tree
Showing 880 changed files with 75,022 additions and 22,929 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tgz filter=lfs diff=lfs merge=lfs -text
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
nb-configuration.xml
target
infer-out
nbactions.xml
michael-local
GPATH
Expand Down Expand Up @@ -43,3 +44,9 @@ conf/docker-aio/dv/deps/
conf/docker-aio/dv/install/dvinstall.zip
# or copy of test data
conf/docker-aio/testdata/
scripts/installer/default.config
*.pem

# do not track IntelliJ IDEA files
.idea
**/*.iml
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: java
jdk:
- oraclejdk8
script: mvn -DcompilerArgument=-Xlint:unchecked test
script: mvn -DcompilerArgument=-Xlint:unchecked test -P all-unit-tests
after_success: mvn jacoco:report coveralls:report
4 changes: 2 additions & 2 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Welcome! New contributors should at least glance at [CONTRIBUTING.md](/CONTRIBUT
- [ ] Merged latest from "develop" [branch][] and resolved conflicts

[tests]: http://guides.dataverse.org/en/latest/developers/testing.html
[SQL updates]: https://github.com/IQSS/dataverse/tree/develop/scripts/database/upgrades
[Solr updates]: https://github.com/IQSS/dataverse/blob/develop/conf/solr/4.6.0/schema.xml
[SQL updates]: http://guides.dataverse.org/en/latest/developers/sql-upgrade-scripts.html
[Solr updates]: https://github.com/IQSS/dataverse/blob/develop/conf/solr/7.3.0/schema.xml
[docs]: http://guides.dataverse.org/en/latest/developers/documentation.html
[branch]: http://guides.dataverse.org/en/latest/developers/branching-strategy.html
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dataverse®
Dataverse®
===============

Dataverse is an [open source][] web application for sharing, citing, analyzing, and preserving research data (developed by the [Data Science and Products team](http://www.iq.harvard.edu/people/people/data-science-products) at the [Institute for Quantitative Social Science](http://iq.harvard.edu/) and the [Dataverse community][]).
Expand All @@ -17,6 +17,8 @@ Dataverse is a trademark of President and Fellows of Harvard College and is regi

[![Dataverse Project logo](src/main/webapp/resources/images/dataverseproject_logo.jpg?raw=true "Dataverse Project")](http://dataverse.org)

[![Waffle.io - Columns and their card count](https://badge.waffle.io/IQSS/dataverse.svg?columns=all)](https://waffle.io/IQSS/dataverse)

[![Build Status](https://travis-ci.org/IQSS/dataverse.svg?branch=develop)](https://travis-ci.org/IQSS/dataverse) [![Coverage Status](https://coveralls.io/repos/IQSS/dataverse/badge.svg?branch=develop&service=github)](https://coveralls.io/github/IQSS/dataverse?branch=develop)

[dataverse.org]: https://dataverse.org
Expand Down
191 changes: 191 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">

<module name="Checker">
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
http://checkstyle.sourceforge.net/5.x/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->

<!-- <property name="fileExtensions" value="java, properties"/> -->
<property name="fileExtensions" value="java"/>

<!-- Checks that a package-info.java file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
<!-- <module name="JavadocPackage"/> -->

<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<!--<module name="NewlineAtEndOfFile"/>-->

<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<!--
<module name="Translation"/>
-->

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!-- <module name="FileLength"/> -->

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!-- Checks that there are no tab characters ('\t') in the source code. http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter-->
<module name="FileTabCharacter"/>

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!--
<module name="RegexpSingleline">
<property name="format" value="[^\s]\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
-->

<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!--
<module name="RegexpHeader">
<property name="headerFile" value="${checkstyle.header.file}"/>
<property name="fileExtensions" value="java"/>
</module>
-->

<module name="TreeWalker">

<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!--
<module name="JavadocMethod">
<property name="severity" value="info"/>
<property name="allowMissingParamTags" value="true"/>
</module>
<module name="JavadocType"/>
<module name="JavadocVariable">
<property name="ignoreNamePattern" value="^[A-Z_\-]+$" />
</module>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false" />
</module>
-->

<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<!--
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
-->

<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<!--
<module name="AvoidStarImport">
<property name="excludes" value="lombok,java.util,org.springframework.web.bind.annotation"/>
</module>
-->
<!-- <module name="IllegalImport"/> --> <!-- defaults to sun.* packages -->
<!-- <module name="RedundantImport"/> -->
<!-- <module name="UnusedImports">
<property name="processJavadoc" value="false"/>
</module> -->
<!-- <module name="CustomImportOrder" /> -->

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!--
<module name="LineLength">
<property name="max" value="120"/>
<!- ignore lines with javadoc inside ->
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
-->

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!--
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
-->

<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<!--
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
-->

<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->

<!--<module name="AvoidNestedBlocks"/>-->
<!--<module name="EmptyBlock"/>-->
<!-- Put the left curly at the end of the line above, not on the next line. http://checkstyle.sourceforge.net/config_blocks.html#LeftCurly-->
<module name="LeftCurly"/>
<!--<module name="NeedBraces"/>-->
<!--<module name="RightCurly"/>-->


<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!--
<module name="AvoidInlineConditionals"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
-->

<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- <module name="DesignForExtension"/> -->
<!-- <module name="FinalClass"/> -->
<!-- <module name="HideUtilityClassConstructor"/> -->
<!-- <module name="InterfaceIsType"/> -->
<!-- <module name="VisibilityModifier"/> -->

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!-- <module name="ArrayTypeStyle"/> -->
<!-- <module name="FinalParameters"/> -->
<!--
<module name="TodoComment">
<property name="severity" value="info"/>
</module>
-->
<!-- <module name="UpperEll"/> -->

</module>

</module>
4 changes: 2 additions & 2 deletions conf/docker-aio/0prep_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ if [ ! -e dv/deps/glassfish4dv.tgz ]; then
# assuming that folks usually have /tmp auto-clean as needed
fi

if [ ! -e dv/deps/solr-4.6.0dv.tgz ]; then
if [ ! -e dv/deps/solr-7.3.0dv.tgz ]; then
echo "solr dependency prep"
# schema changes *should* be the only ones...
cd dv/deps/
wget https://archive.apache.org/dist/lucene/solr/4.6.0/solr-4.6.0.tgz -O solr-4.6.0dv.tgz
wget https://archive.apache.org/dist/lucene/solr/7.3.0/solr-7.3.0.tgz -O solr-7.3.0dv.tgz
cd ../../
fi

9 changes: 5 additions & 4 deletions conf/docker-aio/1prep.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#!/bin/sh

export LANG="en_US.UTF-8"

# move things necessary for integration tests into build context.
# this was based off the phoenix deployment; and is likely uglier and bulkier than necessary in a perfect world

mkdir -p testdata/doc/sphinx-guides/source/_static/util/
cp ../solr/4.6.0/schema.xml testdata/
cp ../solr/7.3.0/schema.xml testdata/
cp ../solr/7.3.0/solrconfig.xml testdata/
cp ../jhove/jhove.conf testdata/
cp ../jhove/jhoveConfig.xsd testdata/
cd ../../
cp -r scripts conf/docker-aio/testdata/
cp doc/sphinx-guides/source/_static/util/pg8-createsequence-prep.sql conf/docker-aio/testdata/doc/sphinx-guides/source/_static/util/
cp doc/sphinx-guides/source/_static/util/createsequence.sql conf/docker-aio/testdata/doc/sphinx-guides/source/_static/util/

# not using dvinstall.zip for setupIT.bash; but still used in install.bash for normal ops
mvn clean
./scripts/database/homebrew/custom-build-number
./scripts/installer/custom-build-number
mvn package
cd scripts/installer
make clean
make
mkdir -p ../../conf/docker-aio/dv/install
cp dvinstall.zip ../../conf/docker-aio/dv/install/

48 changes: 42 additions & 6 deletions conf/docker-aio/c7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
FROM centos:7
# OS dependencies
RUN yum install -y java-1.8.0-openjdk-headless postgresql-server sudo epel-release unzip perl curl
RUN yum install -y jq
RUN yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
#RUN yum install -y java-1.8.0-openjdk-headless postgresql-server sudo epel-release unzip perl curl httpd
RUN yum install -y java-1.8.0-openjdk-devel postgresql96-server sudo epel-release unzip perl curl httpd
RUN yum install -y jq lsof awscli

# copy and unpack dependencies (solr, glassfish)
COPY dv /tmp/dv
COPY testdata/schema.xml /tmp/dv
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-4.6.0dv.tgz
COPY testdata/solrconfig.xml /tmp/dv
# IPv6 and localhost appears to be related to some of the intermittant connection issues
COPY disableipv6.conf /etc/sysctl.d/
RUN rm /etc/httpd/conf/*
COPY httpd.conf /etc/httpd/conf
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-7.3.0dv.tgz
RUN cd /opt ; tar zxf /tmp/dv/deps/glassfish4dv.tgz

RUN sudo -u postgres /usr/bin/initdb -D /var/lib/pgsql/data
#RUN sudo -u postgres createuser dvnapp
# this copy of domain.xml is the result of running `asadmin set server.monitoring-service.module-monitoring-levels.jvm=LOW` on a default glassfish installation (aka - enable the glassfish REST monitir endpoint for the jvm`
COPY domain-restmonitor.xml /opt/glassfish4/glassfish/domains/domain1/config/domain.xml

#RUN sudo -u postgres /usr/bin/initdb -D /var/lib/pgsql/data
RUN sudo -u postgres /usr/pgsql-9.6/bin/initdb -D /var/lib/pgsql/data

# copy configuration related files
RUN cp /tmp/dv/pg_hba.conf /var/lib/pgsql/data/ ; cp /tmp/dv/schema.xml /opt/solr-4.6.0/example/solr/collection1/conf/schema.xml
RUN cp /tmp/dv/pg_hba.conf /var/lib/pgsql/data/
RUN cp -r /opt/solr-7.3.0/server/solr/configsets/_default /opt/solr-7.3.0/server/solr/collection1
RUN cp /tmp/dv/schema.xml /opt/solr-7.3.0/server/solr/collection1/conf/schema.xml
RUN cp /tmp/dv/solrconfig.xml /opt/solr-7.3.0/server/solr/collection1/conf/solrconfig.xml

# skipping glassfish user and solr user (run both as root)

Expand All @@ -26,6 +39,13 @@ EXPOSE 5432
# glassfish port
EXPOSE 8080

# apache port, http
EXPOSE 80

# debugger ports (jmx,jdb)
EXPOSE 8686
EXPOSE 9009

RUN mkdir /opt/dv

# yeah - still not happy if glassfish isn't in /usr/local :<
Expand All @@ -37,4 +57,20 @@ COPY testdata /opt/dv/testdata
COPY testscripts/* /opt/dv/testdata/
COPY setupIT.bash /opt/dv
WORKDIR /opt/dv

# need to take DOI provider info from build args as of ec377d2a4e27424db8815c55ce544deee48fc5e0
# Default to EZID; use built-args to switch to DataCite (or potentially handles)
ARG DoiProvider=EZID
ARG doi_baseurl=https://ezid.cdlib.org
ARG doi_username=apitest
ARG doi_password=apitest
ENV DoiProvider=${DoiProvider}
ENV doi_baseurl=${doi_baseurl}
ENV doi_username=${doi_username}
ENV doi_password=${doi_password}
COPY configure_doi.bash /opt/dv

# healthcheck for glassfish only (assumes modified domain.xml);
# does not check dataverse application status.
HEALTHCHECK CMD curl --fail http://localhost:4848/monitoring/domain/server.json || exit 1
CMD ["/opt/dv/entrypoint.bash"]
19 changes: 19 additions & 0 deletions conf/docker-aio/configure_doi.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

cd /usr/local/glassfish4

# if appropriate; reconfigure PID provider on the basis of environmental variables.
if [ ! -z "${DoiProvider}" ]; then
curl -X PUT -d ${DoiProvider} http://localhost:8080/api/admin/settings/:DoiProvider
fi
if [ ! -z "${doi_username}" ]; then
bin/asadmin create-jvm-options "-Ddoi.username=${doi_password}"
fi
if [ ! -z "${doi_password}" ]; then
bin/asadmin create-jvm-options "-Ddoi.password=${doi_password}"
fi
if [ ! -z "${doi_baseurl}" ]; then
bin/asadmin delete-jvm-options "-Ddoi.baseurlstring=https\://mds.test.datacite.org"
doi_baseurl_esc=`echo ${doi_baseurl} | sed -e 's/:/\\:/'`
bin/asadmin create-jvm-options "\"-Ddoi.baseurlstring=${doi_baseurl_esc}\""
fi
1 change: 1 addition & 0 deletions conf/docker-aio/disableipv6.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.ipv6.conf.all.disable_ipv6 = 1
Loading

0 comments on commit c79e748

Please sign in to comment.