diff --git a/conf/docker-aio/c7.dockerfile b/conf/docker-aio/c7.dockerfile index f6446a3638a..649fe74f673 100644 --- a/conf/docker-aio/c7.dockerfile +++ b/conf/docker-aio/c7.dockerfile @@ -58,6 +58,18 @@ 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 diff --git a/conf/docker-aio/configure_doi.bash b/conf/docker-aio/configure_doi.bash new file mode 100755 index 00000000000..24ed6005b95 --- /dev/null +++ b/conf/docker-aio/configure_doi.bash @@ -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 diff --git a/conf/docker-aio/prep_it.bash b/conf/docker-aio/prep_it.bash index f78e90484f4..e707fe6a76c 100755 --- a/conf/docker-aio/prep_it.bash +++ b/conf/docker-aio/prep_it.bash @@ -63,6 +63,9 @@ if [ $err -ne 0 ]; then echo "seturl fail; bailing out" exit 1 fi +# configure DOI provider based on docker build arguments / environmental variables +docker exec -it dv /opt/dv/configure_doi.bash + cd ../.. echo "docker-aio ready to run integration tests ($i_retry)" diff --git a/conf/docker-aio/readme.md b/conf/docker-aio/readme.md index b05fa536ecc..0338e3cd2de 100644 --- a/conf/docker-aio/readme.md +++ b/conf/docker-aio/readme.md @@ -8,6 +8,7 @@ Also usable for normal development and system evaluation; not intended for produ ### Quickstart: - in the root of the repository, run `./conf/docker-aio/prep_it.bash` + - if using DataCite test credentials, update the build args appropriately. - if all goes well, you should see the results of the `api/info/version` endpoint, including the deployed build (eg `{"status":"OK","data":{"version":"4.8.6","build":"develop-c3e9f40"}}`). If not, you may need to read the non-quickstart instructions. - run integration tests: `./conf/docker-aio/run-test-suite.sh` @@ -56,4 +57,4 @@ There isn't any strict requirement on the local port (8083, 8084 in this doc), t * `empty reply from server` or `Failed to connect to ::1: Cannot assign requested address` tend to indicate either that you haven't given glassfish enough time to start, or your docker setup is in an inconsistent state and should probably be restarted. -* For manually fiddling around with the created dataverse, use user `dataverseAdmin` with password `admin`. \ No newline at end of file +* For manually fiddling around with the created dataverse, use user `dataverseAdmin` with password `admin`. diff --git a/doc/sphinx-guides/source/admin/dashboard.rst b/doc/sphinx-guides/source/admin/dashboard.rst new file mode 100644 index 00000000000..b411402812d --- /dev/null +++ b/doc/sphinx-guides/source/admin/dashboard.rst @@ -0,0 +1,31 @@ +Dashboard +========= + +Dataverse offers a dashboard of administrative tools for superusers only. If you are a logged-in superuser, you can access it by clicking your username in the navbar, and then clicking "Dashboard" from the dropdown. You can verify that you are a superuser by checking the color of your username in the navbar. If it's red, you have the right permissions to use the Dashboard. Superusers can give other users the superuser status via :doc:`user-administration`. + +.. contents:: Contents: + :local: + +Harvesting +---------- + +Harvesting Clients +~~~~~~~~~~~~~~~~~~ + +This dashboard tool allows you to set up which other repositories your Dataverse installation harvests metadata records from. You can see a list of harvesting clients and add, edit, or remove them. See the :doc:`harvestclients` section for more details. + +Harvesting Servers +~~~~~~~~~~~~~~~~~~ + +This dashboard tool allows you to define sets of local datasets to make available to remote harvesting clients. You can see a list of sets and add, edit, or remove them. See the :doc:`harvestserver` section for more details. + +Metadata Export +--------------- + +This part of the Dashboard is simply a reminder message that metadata export happens through the Harvard Dataverse API. See the :doc:`metadataexport` section and the :doc:`/api/native-api` section of the API Guide for more details. + +Users +----- + +This dashboard tool allows you to search a list of all users of your Dataverse installation. You can remove roles from user accounts and assign or remove superuser status. See the :doc:`user-administration` section for more details. + diff --git a/doc/sphinx-guides/source/admin/harvestclients.rst b/doc/sphinx-guides/source/admin/harvestclients.rst index 25c3d493a38..cd841aeba85 100644 --- a/doc/sphinx-guides/source/admin/harvestclients.rst +++ b/doc/sphinx-guides/source/admin/harvestclients.rst @@ -18,7 +18,7 @@ Managing Harvesting Clients To start harvesting metadata from a remote OAI repository, you first create and configure a *Harvesting Client*. -Clients are managed on the "Harvesting Clients" page accessible via the Dashboard. Click on the *Add Client* button to get started. +Clients are managed on the "Harvesting Clients" page accessible via the :doc:`dashboard`. Click on the *Add Client* button to get started. The process of creating a new, or editing an existing client, is largely self-explanatory. It is split into logical steps, in a way that allows the user to go back and correct the entries made earlier. The process is interactive and guidance text is provided. For example, the user is required to enter the URL of the remote OAI server. When they click *Next*, the application will try to establish a connection to the server in order to verify that it is working, and to obtain the information about the sets of metadata records and the metadata formats it supports. The choices offered to the user on the next page will be based on this extra information. If the application fails to establish a connection to the remote archive at the address specified, or if an invalid response is received, the user is given an opportunity to check and correct the URL they entered. diff --git a/doc/sphinx-guides/source/admin/harvestserver.rst b/doc/sphinx-guides/source/admin/harvestserver.rst index 122ceb0ee28..c952a1f17e7 100644 --- a/doc/sphinx-guides/source/admin/harvestserver.rst +++ b/doc/sphinx-guides/source/admin/harvestserver.rst @@ -25,7 +25,7 @@ that are harvested. Remote harvesters will generally not attempt to download the data files associated with the harvested datasets. Harvesting server can be enabled or disabled on the "Harvesting -Server" page accessible via the Dashboard. Harvesting server is by +Server" page accessible via the :doc:`dashboard`. Harvesting server is by default disabled on a brand new, "out of the box" Dataverse. OAI Sets diff --git a/doc/sphinx-guides/source/admin/index.rst b/doc/sphinx-guides/source/admin/index.rst index f005f29f7b1..cec018bef4d 100755 --- a/doc/sphinx-guides/source/admin/index.rst +++ b/doc/sphinx-guides/source/admin/index.rst @@ -6,14 +6,13 @@ Admin Guide =========== -This guide documents the functionality only available to the Dataverse Admin ("Network Administrator") users. As of this release (4.5) such functionality includes managing Harvesting (client and server) and batch metadata export. - -These "superuser" tasks are managed via the new page called the Dashboard. A user logged in as a Dataverse Admin will see the Dashboard link rendered in the upper right corner of every Dataverse page. +This guide documents the functionality only available to superusers (such as "dataverseAdmin") through the :doc:`dashboard` as well as command line utilities of interest to sysadmins. **Contents:** .. toctree:: + dashboard harvestclients harvestserver metadatacustomization diff --git a/doc/sphinx-guides/source/admin/user-administration.rst b/doc/sphinx-guides/source/admin/user-administration.rst index 80ebb57ea7a..18a5aab2472 100644 --- a/doc/sphinx-guides/source/admin/user-administration.rst +++ b/doc/sphinx-guides/source/admin/user-administration.rst @@ -9,10 +9,12 @@ This section focuses on user administration tools and tasks. Manage Users ------------ -The Manage Users table gives the network administrator a list of all user accounts in table form. You can access it by clicking the "Manage Users" button on the Dashboard, which is linked from the header of all Dataverse pages (if you're logged in as an administrator). It lists username, full name, email address, affiliation, the authentication method they use, the roles their account has been granted, and whether or not they have Superuser status. +The Manage Users table gives the network administrator a list of all user accounts in table form. You can access it by clicking the "Manage Users" button on the :doc:`dashboard`, which is linked from the header of all Dataverse pages (if you're logged in as an administrator). It lists username, full name, email address, affiliation, the authentication method they use, the roles their account has been granted, and whether or not they have Superuser status. Users are listed alphabetically by username. The search bar above the table allows you to search for a specific user. It performs a right-truncated wildcard search of the Username, Name, and Email columns. This means, if you search "baseba" then it will search those three columns for any string of text that begins with "baseba", e.g. "baseball" or "baseballfan". +If you would like to assign or remove a user's Superuser status, then you can do so by checking or unchecking their checkbox under the "Superuser" column. + If you would like to remove all roles/permissions from a user's account (in the event of their leaving your organization, for example) then you can do so by clicking the "Remove All" button under the Roles column. This will keep the user's account active, but will revert it to put the account on the level of a default user with default permissions. List Users via API diff --git a/pom.xml b/pom.xml index f5eedbe9912..1e288867bcd 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,11 @@ UTC en US + + -Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region} 4.12 5.3.1 @@ -657,9 +662,8 @@ maven-surefire-plugin 2.22.0 - - ${testsToExclude} - ${argLine} -Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region} + + ${testsToExclude}