Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ derby.log

/src/main/webapp/oauth2/newAccount.html
scripts/api/setup-all.sh*
dataverse-webapp/overlays
fairchive-webapp/overlays

# dependencies I'm not sure we're allowed to redistribute / have in version control
conf/docker-aio/dv/deps/
Expand All @@ -56,6 +56,6 @@ scripts/installer/default.config
.project
.settings
.tern-project
/dataverse-test-common/.factorypath
/dataverse-webapp/.factorypath
/fairchive-test-common/.factorypath
/fairchive-webapp/.factorypath
/switchTo8.bat
22 changes: 11 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
GIT_USER_NAME = "jenkinsci"
GIT_USER_EMAIL = "jenkinsci@icm.edu.pl"
SOLR_CONTAINER_ALIAS="dataverse-solr-ittest"
POSTGRES_CONTAINER_ALIAS="dataverse-postgres-ittest"
SOLR_CONTAINER_ALIAS="fairchive-solr-ittest"
POSTGRES_CONTAINER_ALIAS="fairchive-postgres-ittest"
MAIN_BRANCH="develop"
RELEASE_BRANCH_PREFIX="release/"

pipeline {
agent {
dockerfile {
dir 'conf/jenkins-build-dockercli-image'
additionalBuildArgs '-t drodb-dockercli'
additionalBuildArgs '-t fairchive-dockercli'
}
}

Expand Down Expand Up @@ -40,7 +40,7 @@ pipeline {
agent {
dockerfile {
dir 'conf/jenkins-build-image'
additionalBuildArgs '-t drodb-build'
additionalBuildArgs '-t fairchive-build'
reuseNode true
}
}
Expand All @@ -53,13 +53,13 @@ pipeline {
stage('Build') {
agent {
docker {
image 'drodb-build:latest'
image 'fairchive-build:latest'
reuseNode true
}
}

steps {
echo 'Building dataverse.'
echo 'Building fairchive.'
sh './mvnw package -DskipTests'
}

Expand All @@ -73,7 +73,7 @@ pipeline {
stage('Unit tests') {
agent {
docker {
image 'drodb-build:latest'
image 'fairchive-build:latest'
reuseNode true
}
}
Expand All @@ -99,7 +99,7 @@ pipeline {
IT_TEST_OPTS="-P integration-tests-only,ci-jenkins -Dtest.network.name=${env.DOCKER_NETWORK_NAME} -Ddocker.host=${env.DOCKER_HOST_EXT} -Ddocker.certPath=${env.DOCKER_CERT_EXT}"

echo 'Starting containers.'
sh "./mvnw docker:start -pl dataverse-webapp ${IT_TEST_OPTS}"
sh "./mvnw docker:start -pl fairchive-webapp ${IT_TEST_OPTS}"

echo 'Executing integration tests.'
sh "./mvnw verify -Ddocker.skip ${IT_TEST_OPTS}"
Expand All @@ -121,7 +121,7 @@ pipeline {

agent {
docker {
image 'drodb-build:latest'
image 'fairchive-build:latest'
reuseNode true
}
}
Expand All @@ -140,7 +140,7 @@ pipeline {

agent {
docker {
image 'drodb-build:latest'
image 'fairchive-build:latest'
reuseNode true
}
}
Expand All @@ -166,7 +166,7 @@ void withinContainer(body) {
sh "docker network inspect ${networkId} >/dev/null 2>&1 || docker network create --driver bridge ${networkId}"
env.DOCKER_NETWORK_NAME = "${networkId}"

docker.image('drodb-build:latest').inside("--network ${networkId}") { c ->
docker.image('fairchive-build:latest').inside("--network ${networkId}") { c ->
body()
}
} finally {
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $ # start the glassfish server
$ ./dev glassfish start
$ # list all the deployed applications
$ ./dev glassfish apps
$ # re-deploy dataverse (uses the war located in dataverse-dist/target/dist)
$ # re-deploy dataverse (uses the war located in fairchive-dist/target/dist)
$ ./dev glassfish redeploy
$ # show glassfish commands
$ ./dev glassfish help
Expand All @@ -92,20 +92,20 @@ All tests:
Single test:

```bash
./mvnw verify -Dit.test=UserNotificationRepositoryIT -pl dataverse-persistence
./mvnw verify -Dit.test=UserNotificationRepositoryIT -pl fairchive-persistence
```


Integration test dependencies can be started manually in order to execute integration tests through the IDE:

```bash
./mvnw docker:start -pl dataverse-webapp
./mvnw docker:start -pl fairchive-webapp
```

Once started, all the integration tests can be run through the IDE. When finished, containers can be stopped with:

```bash
./mvnw docker:stop -pl dataverse-webapp
./mvnw docker:stop -pl fairchive-webapp
```

# CI builds
Expand Down
16 changes: 8 additions & 8 deletions conf/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

smtp:
image: "mailhog/mailhog:v1.0.1"
container_name: "dataverse-dev-smtp"
container_name: "fairchive-dev-smtp"
ports:
- "8025:8025"
- "1025:1025"
Expand All @@ -15,7 +15,7 @@ services:

postgres:
image: "postgres:12-alpine"
container_name: "dataverse-dev-postgres"
container_name: "fairchive-dev-postgres"
ports:
- "5432:5432"
volumes:
Expand All @@ -33,7 +33,7 @@ services:
solr:
build: "./solr/7.3.1"
image: "solr:${BUILD_VERSION}"
container_name: "dataverse-dev-solr"
container_name: "fairchive-dev-solr"
ports:
- "8983:8983"
healthcheck:
Expand All @@ -46,7 +46,7 @@ services:
keycloak:
hostname: "local.keycloak"
image: "quay.io/keycloak/keycloak:24.0.2"
container_name: "dataverse-dev-keycloak"
container_name: "fairchive-dev-keycloak"
ports:
- "7070:7070"
environment:
Expand All @@ -59,7 +59,7 @@ services:
glassfish:
build: "./glassfish"
image: "glassfish:${BUILD_VERSION}"
container_name: "dataverse-dev-glassfish"
container_name: "fairchive-dev-glassfish"
ports:
- "8080:8080"
- "4848:4848"
Expand All @@ -68,7 +68,7 @@ services:
- "8786:8786"
- "1099:1099"
volumes:
- "${DATAVERSE_SOURCE_DIR}:/dataverse:rw"
- "${DATAVERSE_SOURCE_DIR}:/fairchive:rw"
- "gl-domain-data:/usr/local/glassfish4/glassfish/domains/domain1:rw"
- "gl-server-data:/srv/glassfish:rw"
- "gl-home:/root:rw"
Expand All @@ -82,15 +82,15 @@ services:

prometheus:
image: "prom/prometheus:v3.1.0"
container_name: "dataverse-dev-prometheus"
container_name: "fairchive-dev-prometheus"
ports:
- "9090:9090"
volumes:
- "${DATAVERSE_SOURCE_DIR}/conf/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml"

grafana:
image: "grafana/grafana:11.4.0"
container_name: "dataverse-dev-grafana"
container_name: "fairchive-dev-grafana"
ports:
- "3000:3000"
environment:
Expand Down
2 changes: 1 addition & 1 deletion conf/glassfish/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source ~/.bashrc
echo "------------------------------------------------"

if [ ! -d "/root/.dataverse" ]; then
echo "Dataverse has not been installed yet."
echo "Fairchive has not been installed yet."
tail -f /dev/null
else
echo "------------------------------------------------"
Expand Down
6 changes: 3 additions & 3 deletions conf/glassfish/run-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ mkdir /root/.dataverse
cp "${DATAVERSE_CONTAINER_WORKING_DIR}/dataverse.properties" /root/.dataverse/

echo "* Copying default config"
cp "${DATAVERSE_CONTAINER_WORKING_DIR}/default.config" /dataverse/scripts/installer/
cp "${DATAVERSE_CONTAINER_WORKING_DIR}/default.config" /fairchive/scripts/installer/

echo "* Configuring prometheus metrics export"
cp "${DATAVERSE_CONTAINER_WORKING_DIR}/prometheus_exporter.yaml" /opt/prometheus_javagent
export GLASSFISH_JAVAAGENT="/opt/prometheus_javagent/jmx_prometheus_javaagent-1.1.0.jar=9999\:/opt/prometheus_javagent/prometheus_exporter.yaml"

export WARFILE_LOCATION="${DATAVERSE_CONTAINER_WORKING_DIR}/dataverse.war"
export WARFILE_LOCATION="${DATAVERSE_CONTAINER_WORKING_DIR}/fairchive.war"
echo "* Running the installer"
cd /dataverse/scripts/installer/
cd /fairchive/scripts/installer/
echo | ./install -y;

# During installation the generated folder might get corrupted
Expand Down
14 changes: 7 additions & 7 deletions conf/grafana/dashboards/grafana_dataverse.json
Original file line number Diff line number Diff line change
Expand Up @@ -1641,19 +1641,19 @@
},
{
"current": {
"text": "dataverse",
"value": "dataverse"
"text": "fairchive",
"value": "fairchive"
},
"label": "job",
"name": "job",
"options": [
{
"selected": true,
"text": "dataverse",
"value": "dataverse"
"text": "fairchive",
"value": "fairchive"
}
],
"query": "dataverse",
"query": "fairchive",
"type": "textbox"
},
{
Expand Down Expand Up @@ -1733,8 +1733,8 @@
]
},
"timezone": "",
"title": "Dataverse dashboard",
"uid": "dataverse-dashboard",
"title": "Fairchive dashboard",
"uid": "fairchive-dashboard",
"version": 4,
"weekStart": ""
}
2 changes: 1 addition & 1 deletion conf/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ global:
scrape_interval: 15s

scrape_configs:
- job_name: 'dataverse'
- job_name: 'fairchive'
static_configs:
- targets: [ 'glassfish:9999' ]
22 changes: 11 additions & 11 deletions dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P
"conf/glassfish/run-install.sh"
"conf/prometheus/prometheus_exporter.yaml"
)
export DATAVERSE_LOCAL_WORKING_DIR="${DATAVERSE_SOURCE_DIR}/dataverse-dist/target/container"
export DATAVERSE_CONTAINER_WORKING_DIR="/dataverse/dataverse-dist/target/container"
export DATAVERSE_DIST_DIR="${DATAVERSE_SOURCE_DIR}/dataverse-dist/target/dist"
export DATAVERSE_LOCAL_WORKING_DIR="${DATAVERSE_SOURCE_DIR}/fairchive-dist/target/container"
export DATAVERSE_CONTAINER_WORKING_DIR="/fairchive/fairchive-dist/target/container"
export DATAVERSE_DIST_DIR="${DATAVERSE_SOURCE_DIR}/fairchive-dist/target/dist"
export COMPOSE_CMD="docker compose -f dev.yml"

cd "${DATAVERSE_SOURCE_DIR}/conf"
Expand Down Expand Up @@ -48,9 +48,9 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P
echo "Commands:"
echo " start Start glassfish"
echo " stop Stop glassfish"
echo " undeploy Undeploy dataverse WAR"
echo " deploy Deploy the dataverse WAR"
echo " redeploy Undeploy and deploy the dataverse WAR"
echo " undeploy Undeploy fairchive WAR"
echo " deploy Deploy the fairchive WAR"
echo " redeploy Undeploy and deploy the fairchive WAR"
echo " apps Show the currently deployed applications"
echo " logging Show the currently set logging levels"
echo " set-logging <logger>=<level> Set the logging level for the provided logger (eg. org.apache.activemq=INFO)"
Expand Down Expand Up @@ -85,7 +85,7 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P
copy_to_dv_container_with_fallback "${EXTENSION_SOURCE_DIR}" "${DATAVERSE_SOURCE_DIR}" "${DATAVERSE_CONFIG_FILES[$i]}"
done

copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "*.war" "dataverse.war"
copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "*.war" "fairchive.war"
copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "activemq"
copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "glassfish"

Expand All @@ -112,8 +112,8 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P

deploy() {
mkdir -p ${DATAVERSE_LOCAL_WORKING_DIR}
copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "*.war" "dataverse.war"
asadmin deploy ${DATAVERSE_CONTAINER_WORKING_DIR}/dataverse.war
copy_to_dv_container_with_fallback "${EXTENSION_DIST_DIR}" "${DATAVERSE_DIST_DIR}" "*.war" "fairchive.war"
asadmin deploy ${DATAVERSE_CONTAINER_WORKING_DIR}/fairchive.war
}

glassfish() {
Expand All @@ -138,7 +138,7 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P
;;
undeploy)
shift
asadmin undeploy dataverse
asadmin undeploy fairchive
exit
;;
deploy)
Expand All @@ -148,7 +148,7 @@ export DATAVERSE_SOURCE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P
;;
redeploy)
shift
asadmin undeploy dataverse
asadmin undeploy fairchive
deploy
exit
;;
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/developers/making-releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Make the following changes in the release branch:
Increment the version number to the milestone (e.g. 4.6.2) in the following files:

- pom.xml
- dataverse-webapp/pom.xml
- dataverse-test-common/pom.xml
- dataverse-persistence/pom.xml
- fairchive-webapp/pom.xml
- fairchive-test-common/pom.xml
- fairchive-persistence/pom.xml
- doc/sphinx-guides/source/conf.py (two places)

Add the version being released to the lists in the following two files:
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/developers/sql-upgrade-scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The database schema for Dataverse is constantly evolving and we have adopted a t
Location of SQL Upgrade Scripts
-------------------------------

``dataverse-persistence/src/main/resources/db/migration`` is the directory where we keep SQLs for Flyway to find.
``fairchive-persistence/src/main/resources/db/migration`` is the directory where we keep SQLs for Flyway to find.

How to Determine if You Need to Create a SQL migration
------------------------------------------------------
Expand All @@ -22,7 +22,7 @@ How to Create a SQL

We assume you have already read the :doc:`version-control` section and have been keeping your feature branch up to date with the "develop" branch.

Create a new file called something like ``V{NEXT_NUMBER}__renamedTermsOfUse.sql`` in the ``dataverse-persistence/src/main/resources/db/migration`` directory. Use a next number compared to the previous sql, ensuring that the number is unique. To read more about Flyway file naming conventions, see https://flywaydb.org/documentation/migrations#naming
Create a new file called something like ``V{NEXT_NUMBER}__renamedTermsOfUse.sql`` in the ``fairchive-persistence/src/main/resources/db/migration`` directory. Use a next number compared to the previous sql, ensuring that the number is unique. To read more about Flyway file naming conventions, see https://flywaydb.org/documentation/migrations#naming

The SQL migration script you wrote will be part of the war file and executed when the war file is deployed. To see a history of Flyway database migrations that have been applied, look at the ``flyway_schema_history`` table.

Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/developers/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Assuming you installed Glassfish in ``/usr/local/glassfish4.1.2``, run the follo

/usr/local/glassfish4.1.2/bin/asadmin list-applications

You will probably see something like ``dataverse-webapp-4.11 <ejb, web>`` as the output. To undeploy, use whichever version you see like this::
You will probably see something like ``fairchive-webapp-4.11 <ejb, web>`` as the output. To undeploy, use whichever version you see like this::

/usr/local/glassfish4.1.2/bin/asadmin undeploy dataverse-webapp-4.11
/usr/local/glassfish4.1.2/bin/asadmin undeploy fairchive-webapp-4.11

Now that Glassfish doesn't have anything deployed, we can proceed with getting Netbeans set up to deploy the code.

Expand Down
Loading