Skip to content

Commit

Permalink
Master updated
Browse files Browse the repository at this point in the history
  • Loading branch information
4tikhonov committed Jun 4, 2018
1 parent ce9ba9b commit 65be03b
Show file tree
Hide file tree
Showing 910 changed files with 65,287 additions and 0 deletions.
1 change: 1 addition & 0 deletions dataverse
Submodule dataverse added at d8d9df
27 changes: 27 additions & 0 deletions dataversedock/0prep_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
if [ ! -d dv/deps ]; then
mkdir -p dv/deps
fi
wdir=`pwd`
if [ ! -e dv/deps/glassfish4dv.tgz ]; then
echo "glassfish dependency prep"
mkdir -p /tmp/dv-prep/gf
cd /tmp/dv-prep/gf
wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
wget http://search.maven.org/remotecontent?filepath=org/jboss/weld/weld-osgi-bundle/2.2.10.Final/weld-osgi-bundle-2.2.10.Final-glassfish4.jar -O weld-osgi-bundle-2.2.10.Final-glassfish4.jar
unzip glassfish-4.1.zip
rm glassfish4/glassfish/modules/weld-osgi-bundle.jar
mv weld-osgi-bundle-2.2.10.Final-glassfish4.jar glassfish4/glassfish/modules
tar zcf $wdir/dv/deps/glassfish4dv.tgz glassfish4
cd $wdir
# assuming that folks usually have /tmp auto-clean as needed
fi

if [ ! -e dv/deps/solr-4.6.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
cd ../../
fi

22 changes: 22 additions & 0 deletions dataversedock/1prep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

# 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 ../jhove/jhove.conf 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
mvn package
cd scripts/installer
make clean
make
cp dvinstall.zip ../../conf/docker-aio/dv/install/

29 changes: 29 additions & 0 deletions dataversedock/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM centos:7.2.1511
# OS dependencies
RUN yum install -y java-1.8.0-openjdk-headless sudo epel-release unzip perl curl
RUN yum install -y wget patch postgresql lynx jq

# copy and unpack dependencies (solr, glassfish)
COPY lang.properties /opt/dv
WORKDIR /opt/dv
COPY dv /opt/dv

COPY dv/deps/glassfish4 /opt/glassfish4

# glassfish port
EXPOSE 8080

COPY dv/deps/dvinstall.zip /opt/dv
COPY docker.patch /opt/dv

# yeah - still not happy if glassfish isn't in /usr/local :<
RUN ln -s /opt/glassfish4 /usr/local/glassfish4
#COPY dv/install/ /opt/dv/
COPY install.bash /opt/dv/
COPY entrypoint.bash /opt
COPY testdata /opt/dv/testdata
COPY testscripts/* /opt/dv/testdata/
COPY setupIT.bash /opt/dv
COPY lang.properties /opt/dv
RUN echo "Installing and running Dataverse..."
CMD ["/opt/entrypoint.bash"]
40 changes: 40 additions & 0 deletions dataversedock/c7.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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

# 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
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

# 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

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

#solr port
EXPOSE 8983

# postgres port
EXPOSE 5432

# glassfish port
EXPOSE 8080

RUN mkdir /opt/dv

# yeah - still not happy if glassfish isn't in /usr/local :<
RUN ln -s /opt/glassfish4 /usr/local/glassfish4
COPY dv/install/ /opt/dv/
COPY install.bash /opt/dv/
COPY entrypoint.bash /opt/dv/
COPY testdata /opt/dv/testdata
COPY testscripts/* /opt/dv/testdata/
COPY setupIT.bash /opt/dv
WORKDIR /opt/dv
CMD ["/opt/dv/entrypoint.bash"]
16 changes: 16 additions & 0 deletions dataversedock/default.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOST_DNS_ADDRESS localhost
GLASSFISH_DIRECTORY /opt/glassfish4
ADMIN_EMAIL
MAIL_SERVER mail.hmdc.harvard.edu
POSTGRES_ADMIN_PASSWORD secret
POSTGRES_SERVER db
POSTGRES_PORT 5432
POSTGRES_DATABASE dvndb
POSTGRES_USER dvnapp
POSTGRES_PASSWORD secret
SOLR_LOCATION idx
TWORAVENS_LOCATION NOT INSTALLED
RSERVE_HOST localhost
RSERVE_PORT 6311
RSERVE_USER rserve
RSERVE_PASSWORD rserve
8 changes: 8 additions & 0 deletions dataversedock/docker.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
83c83
< 'POSTGRES_SERVER', 'postgres',
---
> 'POSTGRES_SERVER', '127.0.0.1',
89c89
< 'SOLR_LOCATION', 'solr:8983',
---
> 'SOLR_LOCATION', 'LOCAL',
11 changes: 11 additions & 0 deletions dataversedock/entrypoint.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

if [ ! -e "/opt/glassfish4/glassfish/domains/domain1/applications/dataverse/WEB-INF/classes/Bundle.properties" ]; then
cd /opt/dv
./setupIT.bash
fi
cd /opt/glassfish4
bin/asadmin stop-domain
bin/asadmin start-domain
sleep infinity

Binary file added dataversedock/glassfish-4.1.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions dataversedock/glassfish.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

wdir="/opt"
if [ ! -e $wdir/dv/deps/glassfish4dv.tgz ]; then
echo "glassfish dependency prep"
mkdir -p /tmp/dv-prep/gf
cd $wdir/dv/deps
# wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
# wget http://search.maven.org/remotecontent?filepath=org/jboss/weld/weld-osgi-bundle/2.2.10.Final/weld-osgi-bundle-2.2.10.Final-glassfish4.jar -O weld-osgi-bundle-2.2.10.Final-glassfish4.jar
unzip glassfish-4.1.zip
rm glassfish4/glassfish/modules/weld-osgi-bundle.jar
mv weld-osgi-bundle-2.2.10.Final-glassfish4.jar glassfish4/glassfish/modules
tar zcf $wdir/dv/deps/glassfish4dv.tgz glassfish4
mv glassfish4 $wdir/
# assuming that folks usually have /tmp auto-clean as needed
fi
9 changes: 9 additions & 0 deletions dataversedock/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
unzip dvinstall.zip
cd dvinstall/
patch -R install < ../docker.patch
./install [email protected] -y -f > install.out 2> install.err
curl https://raw.githubusercontent.com/scholarsportal/SP-dataverse/SP_v4.7.1/src/main/java/Bundle_fr.properties > /opt/glassfish4/glassfish/domains/domain1/applications/dataverse/WEB-INF/classes/Bundle.properties

echo "installer complete"
cat install.err
Loading

0 comments on commit 65be03b

Please sign in to comment.