From bf05069349f3220c6070f058c857256d32c12046 Mon Sep 17 00:00:00 2001 From: Hardy Pottinger Date: Wed, 29 Nov 2023 13:52:17 -0600 Subject: [PATCH 1/3] Add add_healthcheck_config_to_server_xml.py and a tomcat folder to the config folder --- add_healthcheck_config_to_server_xml.py | 78 ++++++++++ config/tomcat/server.xml | 181 ++++++++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100755 add_healthcheck_config_to_server_xml.py create mode 100644 config/tomcat/server.xml diff --git a/add_healthcheck_config_to_server_xml.py b/add_healthcheck_config_to_server_xml.py new file mode 100755 index 0000000..e70f340 --- /dev/null +++ b/add_healthcheck_config_to_server_xml.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Script to modify a Tomcat server.xml file using Docker and plain text processing. + +This script fetches the server.xml file from a Docker container, adds a new +HealthCheckValve element to the last Host in the XML, and saves the modified +file locally. + +Make sure you have Docker installed and the necessary permissions to run it. + +Usage: + 1. Adjust CONTAINER_TOMCAT_CONFIG_PATH, LOCAL_TOMCAT_CONFIG_PATH, and + BACKEND_IMAGE_TAG as needed. + 2. Run the script. + +""" + +import subprocess +import sys +import os + +CONTAINER_TOMCAT_CONFIG_PATH = '/usr/local/tomcat/conf' +LOCAL_TOMCAT_CONFIG_PATH = 'config/tomcat' +BACKEND_IMAGE_TAG = os.getenv('BACKEND_IMAGE_TAG', 'dspace/dspace:dspace-7_x') + +CONTAINER_SERVER_XML = CONTAINER_TOMCAT_CONFIG_PATH + '/server.xml' +LOCAL_SERVER_XML = LOCAL_TOMCAT_CONFIG_PATH + '/server.xml' + +# Indicate that we are fetching the server.xml file +print("Fetching the server.xml file from the Docker container...") + +docker_command = [ + 'docker', + 'run', + '--rm', + BACKEND_IMAGE_TAG, + 'cat', + CONTAINER_SERVER_XML, +] + +# Run the Docker command to fetch the server.xml file +with subprocess.Popen(docker_command, cwd=LOCAL_TOMCAT_CONFIG_PATH, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) as process: + output, error = process.communicate() + if process.returncode != 0: + print("Error fetching the server.xml file:") + print("stdout:", output.decode('utf-8')) + print("stderr:", error.decode('utf-8')) + sys.exit(1) + + # Write the fetched content to the local server.xml file + with open(LOCAL_SERVER_XML, 'wb') as local_file: + local_file.write(output) + +# Indicate that we are processing the server.xml file +print("Processing the server.xml file...") + +# Identify the line number where we want to insert the new HealthCheckValve +INSERT_LINE_NUMBER = None +with open(LOCAL_SERVER_XML, 'r', encoding='utf-8') as xml_file: + lines = xml_file.readlines() + for i, line in enumerate(reversed(lines)): + if '' in line: + INSERT_LINE_NUMBER = len(lines) - i + break + +# Insert the new HealthCheckValve into the identified line +if INSERT_LINE_NUMBER is not None: + lines.insert(INSERT_LINE_NUMBER, + ' \n') + +# Write the modified content back to the local server.xml file +with open(LOCAL_SERVER_XML, 'w', encoding='utf-8') as xml_file: + xml_file.writelines(lines) + +# Indicate success +print("Modification complete. The modified server.xml file is saved locally.") + +sys.exit(0) diff --git a/config/tomcat/server.xml b/config/tomcat/server.xml new file mode 100644 index 0000000..ae80d45 --- /dev/null +++ b/config/tomcat/server.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e130c6e1d037b898e2a204701ea6495138aef669 Mon Sep 17 00:00:00 2001 From: Hardy Pottinger Date: Fri, 1 Dec 2023 16:34:27 -0600 Subject: [PATCH 2/3] WIP, fixing env file and the validate and push script --- .../from_container/access-conditions.xml | 108 + .../from_container/bibtex-integration.xml | 63 + config/dspace/from_container/bitstore.xml | 41 + config/dspace/from_container/cache.xml | 21 + .../dspace/from_container/discovery-solr.xml | 2942 +++++++++++++++++ config/dspace/from_container/discovery.xml | 2942 +++++++++++++++++ .../from_container/workflow-actions.xml | 106 + config/dspace/from_container/workflow.xml | 199 ++ config/env/pub-dspace-dev.env | 104 +- validate_and_push_dotenv_files.sh | 4 +- 10 files changed, 6476 insertions(+), 54 deletions(-) create mode 100644 config/dspace/from_container/access-conditions.xml create mode 100644 config/dspace/from_container/bibtex-integration.xml create mode 100644 config/dspace/from_container/bitstore.xml create mode 100644 config/dspace/from_container/cache.xml create mode 100644 config/dspace/from_container/discovery-solr.xml create mode 100644 config/dspace/from_container/discovery.xml create mode 100644 config/dspace/from_container/workflow-actions.xml create mode 100644 config/dspace/from_container/workflow.xml diff --git a/config/dspace/from_container/access-conditions.xml b/config/dspace/from_container/access-conditions.xml new file mode 100644 index 0000000..fcd0b54 --- /dev/null +++ b/config/dspace/from_container/access-conditions.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/bibtex-integration.xml b/config/dspace/from_container/bibtex-integration.xml new file mode 100644 index 0000000..bc5adf5 --- /dev/null +++ b/config/dspace/from_container/bibtex-integration.xml @@ -0,0 +1,63 @@ + + + + + + + Defines which metadatum is mapped on which metadatum. Note that while the key must be unique it + only matters here for postprocessing of the value. The mapped MetadatumContributor has full control over + what metadatafield is generated. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/bitstore.xml b/config/dspace/from_container/bitstore.xml new file mode 100644 index 0000000..15bb3ef --- /dev/null +++ b/config/dspace/from_container/bitstore.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/cache.xml b/config/dspace/from_container/cache.xml new file mode 100644 index 0000000..6e755eb --- /dev/null +++ b/config/dspace/from_container/cache.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dspace/from_container/discovery-solr.xml b/config/dspace/from_container/discovery-solr.xml new file mode 100644 index 0000000..fb25f11 --- /dev/null +++ b/config/dspace/from_container/discovery-solr.xml @@ -0,0 +1,2942 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.rights + + + + + + + + + + + + + + + dc.rights + + + + + + + + dc.description.provenance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (search.resourcetype:Item AND latestVersion:true) OR search.resourcetype:Collection OR search.resourcetype:Community + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item OR search.resourcetype:Collection OR search.resourcetype:Community + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true + + withdrawn:true OR discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (search.resourcetype:Item AND latestVersion:true) OR search.resourcetype:WorkspaceItem OR search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:WorkspaceItem AND supervised:true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:PoolTask OR search.resourcetype:ClaimedTask + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:WorkspaceItem OR search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Publication + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Publication + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Person + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Person + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Project + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Project + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:OrgUnit + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:OrgUnit + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:JournalIssue + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:JournalIssue + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:JournalVolume + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:JournalVolume + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Journal + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Journal + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND (entityType_keyword:OrgUnit OR entityType_keyword:Person) + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:OrgUnit AND dc.type:FundingOrganization + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item + search.entitytype:${researcher-profile.entity-type:Person} + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + + + + + + + + + + + relation.isAuthorOfPublication.latestForDiscovery + + + + + + + + + + + relation.isProjectOfPublication.latestForDiscovery + + + + + + + + + + + + relation.isOrgUnitOfPublication.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfJournalIssue.latestForDiscovery + + + + + + + + + + + relation.isJournalOfPublication.latestForDiscovery + + + + + + + + + + + dc.contributor.author + dc.creator + + + + + + + + + + + + + + + dspace.entity.type + + + + + + + + + + + + + + dc.subject.* + + + + + + + + + + + + + + dc.date.issued + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.type + + + + + + + + + dc.identifier + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + person.jobTitle + + + + + + + + + + + + + + + person.knowsLanguage + + + + + + + + + + + + + person.birthDate + + + + + + + + + + + + + + + + + person.familyName + + + + + + + + + + + person.givenName + + + + + + + + + + + relation.isOrgUnitOfPerson.latestForDiscovery + + + + + + + + + + + relation.isProjectOfPerson.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfAuthor.latestForDiscovery + + + + + + + + + + + + organization.address.addressCountry + + + + + + + + + + + + + + + organization.address.addressLocality + + + + + + + + + + + + + + + organization.foundingDate + + + + + + + + + + + + + + + + organization.legalName + + + + + + + + + + + relation.isPersonOfOrgUnit.latestForDiscovery + + + + + + + + + + + relation.isProjectOfOrgUnit.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfOrgUnit.latestForDiscovery + + + + + + + + + + + creativework.keywords + + + + + + + + + + + + + + + creativework.datePublished + + + + + + + + + + + + + + + + publicationissue.issueNumber + + + + + + + + + + + relation.isPublicationOfJournalIssue.latestForDiscovery + + + + + + + + + + + publicationVolume.volumeNumber + + + + + + + + + + + relation.isIssueOfJournalVolume.latestForDiscovery + + + + + + + + + + + relation.isJournalOfVolume.latestForDiscovery + + + + + + + + + + + creativework.publisher + + + + + + + + + + + + + + + creativework.editor + + + + + + + + + + + + + + + relation.isVolumeOfJournal.latestForDiscovery + + + + + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + relation.isOrgUnitOfProject.latestForDiscovery + + + + + + + + + + + + relation.isPersonOfProject.latestForDiscovery + + + + + + + + + + + + relation.isPublicationOfProject.latestForDiscovery + + + + + + + + + + + relation.isContributorOfPublication.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfContributor.latestForDiscovery + + + + + + + + + + + relation.isFundingAgencyOfProject.latestForDiscovery + + + + + + + + + + + relation.isProjectOfFundingAgency.latestForDiscovery + + + + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/discovery.xml b/config/dspace/from_container/discovery.xml new file mode 100644 index 0000000..fb25f11 --- /dev/null +++ b/config/dspace/from_container/discovery.xml @@ -0,0 +1,2942 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.rights + + + + + + + + + + + + + + + dc.rights + + + + + + + + dc.description.provenance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (search.resourcetype:Item AND latestVersion:true) OR search.resourcetype:Collection OR search.resourcetype:Community + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item OR search.resourcetype:Collection OR search.resourcetype:Community + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true + + withdrawn:true OR discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + dc.contributor.author + dc.creator + dc.subject + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (search.resourcetype:Item AND latestVersion:true) OR search.resourcetype:WorkspaceItem OR search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:WorkspaceItem AND supervised:true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:PoolTask OR search.resourcetype:ClaimedTask + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:WorkspaceItem OR search.resourcetype:XmlWorkflowItem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Publication + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Publication + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Person + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Person + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Project + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Project + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:OrgUnit + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:OrgUnit + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:JournalIssue + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:JournalIssue + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:JournalVolume + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:JournalVolume + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:Journal + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND entityType_keyword:Journal + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND (entityType_keyword:OrgUnit OR entityType_keyword:Person) + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item AND latestVersion:true AND entityType_keyword:OrgUnit AND dc.type:FundingOrganization + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + search.resourcetype:Item + search.entitytype:${researcher-profile.entity-type:Person} + -withdrawn:true AND -discoverable:false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.title + + + + + + + + + + + relation.isAuthorOfPublication.latestForDiscovery + + + + + + + + + + + relation.isProjectOfPublication.latestForDiscovery + + + + + + + + + + + + relation.isOrgUnitOfPublication.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfJournalIssue.latestForDiscovery + + + + + + + + + + + relation.isJournalOfPublication.latestForDiscovery + + + + + + + + + + + dc.contributor.author + dc.creator + + + + + + + + + + + + + + + dspace.entity.type + + + + + + + + + + + + + + dc.subject.* + + + + + + + + + + + + + + dc.date.issued + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dc.type + + + + + + + + + dc.identifier + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + person.jobTitle + + + + + + + + + + + + + + + person.knowsLanguage + + + + + + + + + + + + + person.birthDate + + + + + + + + + + + + + + + + + person.familyName + + + + + + + + + + + person.givenName + + + + + + + + + + + relation.isOrgUnitOfPerson.latestForDiscovery + + + + + + + + + + + relation.isProjectOfPerson.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfAuthor.latestForDiscovery + + + + + + + + + + + + organization.address.addressCountry + + + + + + + + + + + + + + + organization.address.addressLocality + + + + + + + + + + + + + + + organization.foundingDate + + + + + + + + + + + + + + + + organization.legalName + + + + + + + + + + + relation.isPersonOfOrgUnit.latestForDiscovery + + + + + + + + + + + relation.isProjectOfOrgUnit.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfOrgUnit.latestForDiscovery + + + + + + + + + + + creativework.keywords + + + + + + + + + + + + + + + creativework.datePublished + + + + + + + + + + + + + + + + publicationissue.issueNumber + + + + + + + + + + + relation.isPublicationOfJournalIssue.latestForDiscovery + + + + + + + + + + + publicationVolume.volumeNumber + + + + + + + + + + + relation.isIssueOfJournalVolume.latestForDiscovery + + + + + + + + + + + relation.isJournalOfVolume.latestForDiscovery + + + + + + + + + + + creativework.publisher + + + + + + + + + + + + + + + creativework.editor + + + + + + + + + + + + + + + relation.isVolumeOfJournal.latestForDiscovery + + + + + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + relation.isOrgUnitOfProject.latestForDiscovery + + + + + + + + + + + + relation.isPersonOfProject.latestForDiscovery + + + + + + + + + + + + relation.isPublicationOfProject.latestForDiscovery + + + + + + + + + + + relation.isContributorOfPublication.latestForDiscovery + + + + + + + + + + + relation.isPublicationOfContributor.latestForDiscovery + + + + + + + + + + + relation.isFundingAgencyOfProject.latestForDiscovery + + + + + + + + + + + relation.isProjectOfFundingAgency.latestForDiscovery + + + + + + + + + + + + + placeholder.placeholder.placeholder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/workflow-actions.xml b/config/dspace/from_container/workflow-actions.xml new file mode 100644 index 0000000..d01f1b6 --- /dev/null +++ b/config/dspace/from_container/workflow-actions.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/dspace/from_container/workflow.xml b/config/dspace/from_container/workflow.xml new file mode 100644 index 0000000..448e10f --- /dev/null +++ b/config/dspace/from_container/workflow.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/env/pub-dspace-dev.env b/config/env/pub-dspace-dev.env index ac21f24..85b6125 100644 --- a/config/env/pub-dspace-dev.env +++ b/config/env/pub-dspace-dev.env @@ -47,9 +47,9 @@ default__P__language=en_US #### Solr settings #### # URL of Solr server -solr__P__server=http://pub-dspace-dev-solr.pub-dspace-dev-cluster.local:8983/solr +solr__P__server=http://solr.pub-dspace-dev-cluster:8983/solr -# Maximum open connections to Sol +# Maximum open connections to Solr solr__P__client__P__maxTotalConnections=20 # Maximum open connections per Solr instance: @@ -211,56 +211,56 @@ handle__P__prefix=123456789 # handle__P__hide__P__listhandles=false ##### Authorization system configuration - Delegate ADMIN ##### - -# COMMUNITY ADMIN configuration -# Authorize community administrators to create/delete subcommunities or collections -core__P__authorization__P__community__P__admin__P__create__D__subelement=true -core__P__authorization__P__community__P__admin__P__delete__D__subelement=true -# Authorize community administrators to manage community policies or community admin group -core__P__authorization__P__community__P__admin__P__policies=true -core__P__authorization__P__community__P__admin__P__admin__D__group=true -# Authorize community administrators to manage collection settings (for collections under the community) -core__P__authorization__P__community__P__admin__P__collection__P__policies=true -core__P__authorization__P__community__P__admin__P__collection__P__template__D__item=true -core__P__authorization__P__community__P__admin__P__collection__P__submitters=true -core__P__authorization__P__community__P__admin__P__collection__P__workflows=true -core__P__authorization__P__community__P__admin__P__collection__P__admin__D__group=true -# Authorize community administrators to manage item settings (for items owned by collections under the community) -core__P__authorization__P__community__P__admin__P__item__P__delete=true -core__P__authorization__P__community__P__admin__P__item__P__withdraw=true -core__P__authorization__P__community__P__admin__P__item__P__reinstatiate=true -core__P__authorization__P__community__P__admin__P__item__P__policies=true -# Authorize community administrators to manage bundles/bitstreams of those items -core__P__authorization__P__community__P__admin__P__item__P__create__D__bitstream=true -core__P__authorization__P__community__P__admin__P__item__P__delete__D__bitstream=true -core__P__authorization__P__community__P__admin__P__item__D__admin__P__cc__D__license=true - -# COLLECTION ADMIN -# Authorize collection administrators to manage collection settings -core__P__authorization__P__collection__P__admin__P__policies=true -core__P__authorization__P__collection__P__admin__P__template__D__item=true -core__P__authorization__P__collection__P__admin__P__submitters=true -core__P__authorization__P__collection__P__admin__P__workflows=true -core__P__authorization__P__collection__P__admin__P__admin__D__group=true -# Authorize collection administrators to manage item settings (for items owned by the collection) -core__P__authorization__P__collection__P__admin__P__item__P__delete=true -core__P__authorization__P__collection__P__admin__P__item__P__withdraw=true -core__P__authorization__P__collection__P__admin__P__item__P__reinstatiate=true -core__P__authorization__P__collection__P__admin__P__item__P__policies=true -# Authorize collection administrators to manage bundles/bitstreams of those items (owned by the collection) -core__P__authorization__P__collection__P__admin__P__item__P__create__D__bitstream=true -core__P__authorization__P__collection__P__admin__P__item__P__delete__D__bitstream=true -core__P__authorization__P__collection__P__admin__P__item__D__admin__P__cc__D__license=true - -# ITEM ADMIN -# Authorize item administrators to manage item settings -core__P__authorization__P__item__D__admin__P__policies=true -core__P__authorization__P__item__D__admin__P__installitem__P__inheritance__D__read__P__append__D__mode=false -# Authorize item administrators to manage bundles/bitstreams of the item -core__P__authorization__P__item__D__admin__P__create__D__bitstream=true -core__P__authorization__P__item__D__admin__P__delete__D__bitstream=true -core__P__authorization__P__item__D__admin__P__cc__D__license=true - +# +# # COMMUNITY ADMIN configuration +# # Authorize community administrators to create/delete subcommunities or collections +# core__P__authorization__P__community__P__admin__P__create__D__subelement=true +# core__P__authorization__P__community__P__admin__P__delete__D__subelement=true +# # Authorize community administrators to manage community policies or community admin group +# core__P__authorization__P__community__P__admin__P__policies=true +# core__P__authorization__P__community__P__admin__P__admin__D__group=true +# # Authorize community administrators to manage collection settings (for collections under the community) +# core__P__authorization__P__community__P__admin__P__collection__P__policies=true +# core__P__authorization__P__community__P__admin__P__collection__P__template__D__item=true +# core__P__authorization__P__community__P__admin__P__collection__P__submitters=true +# core__P__authorization__P__community__P__admin__P__collection__P__workflows=true +# core__P__authorization__P__community__P__admin__P__collection__P__admin__D__group=true +# # Authorize community administrators to manage item settings (for items owned by collections under the community) +# core__P__authorization__P__community__P__admin__P__item__P__delete=true +# core__P__authorization__P__community__P__admin__P__item__P__withdraw=true +# core__P__authorization__P__community__P__admin__P__item__P__reinstatiate=true +# core__P__authorization__P__community__P__admin__P__item__P__policies=true +# # Authorize community administrators to manage bundles/bitstreams of those items +# core__P__authorization__P__community__P__admin__P__item__P__create__D__bitstream=true +# core__P__authorization__P__community__P__admin__P__item__P__delete__D__bitstream=true +# core__P__authorization__P__community__P__admin__P__item__D__admin__P__cc__D__license=true +# +# # COLLECTION ADMIN +# # Authorize collection administrators to manage collection settings +# core__P__authorization__P__collection__P__admin__P__policies=true +# core__P__authorization__P__collection__P__admin__P__template__D__item=true +# core__P__authorization__P__collection__P__admin__P__submitters=true +# core__P__authorization__P__collection__P__admin__P__workflows=true +# core__P__authorization__P__collection__P__admin__P__admin__D__group=true +# # Authorize collection administrators to manage item settings (for items owned by the collection) +# core__P__authorization__P__collection__P__admin__P__item__P__delete=true +# core__P__authorization__P__collection__P__admin__P__item__P__withdraw=true +# core__P__authorization__P__collection__P__admin__P__item__P__reinstatiate=true +# core__P__authorization__P__collection__P__admin__P__item__P__policies=true +# # Authorize collection administrators to manage bundles/bitstreams of those items (owned by the collection) +# core__P__authorization__P__collection__P__admin__P__item__P__create__D__bitstream=true +# core__P__authorization__P__collection__P__admin__P__item__P__delete__D__bitstream=true +# core__P__authorization__P__collection__P__admin__P__item__D__admin__P__cc__D__license=true +# +# # ITEM ADMIN +# # Authorize item administrators to manage item settings +# core__P__authorization__P__item__D__admin__P__policies=true +# core__P__authorization__P__item__D__admin__P__installitem__P__inheritance__D__read__P__append__D__mode=false +# # Authorize item administrators to manage bundles/bitstreams of the item +# core__P__authorization__P__item__D__admin__P__create__D__bitstream=true +# core__P__authorization__P__item__D__admin__P__delete__D__bitstream=true +# core__P__authorization__P__item__D__admin__P__cc__D__license=true +# # Client IP Address Anonymization # Define how many parts of the client IP address to set to 0 in order to anonymize clients. # For example, setting it to 2 will mean that client IPs will look like 192.168.0.0. diff --git a/validate_and_push_dotenv_files.sh b/validate_and_push_dotenv_files.sh index d24ba96..245cdbd 100755 --- a/validate_and_push_dotenv_files.sh +++ b/validate_and_push_dotenv_files.sh @@ -2,7 +2,7 @@ set -eou pipefail # Set AWS profile and function name -export AWS_PROFILE=cdl-pad-dev +export AWS_PROFILE=${AWS_PROFILE:-cdl-pad-dev} export FUNC=pub-dspace-dev # Specify the S3 bucket @@ -24,6 +24,6 @@ dotenv-linter -rq echo "Pushing all dotenv files to S3..." # Copy dotenv file to S3 bucket -aws s3 cp $DOTENV_FILES "s3://$S3_BUCKET/$S3_FOLDER" +aws s3 cp $DOTENV_FILES "s3://$S3_BUCKET/$S3_FOLDER/" exit 0 From 4109f7e49c4aaf5e361ad3eaa0503f02ecc0fcd9 Mon Sep 17 00:00:00 2001 From: Hardy Pottinger Date: Tue, 5 Dec 2023 16:09:42 -0600 Subject: [PATCH 3/3] Fix-up shellcheck concern, adjust reviewdog workflow --- .github/workflows/reviewdog.yml | 1 + validate_and_push_dotenv_files.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 87444d0..ed79f5d 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -11,6 +11,7 @@ jobs: uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Use yamllint to lint yaml files yamllint: name: check / yamllint diff --git a/validate_and_push_dotenv_files.sh b/validate_and_push_dotenv_files.sh index 245cdbd..df3c994 100755 --- a/validate_and_push_dotenv_files.sh +++ b/validate_and_push_dotenv_files.sh @@ -24,6 +24,6 @@ dotenv-linter -rq echo "Pushing all dotenv files to S3..." # Copy dotenv file to S3 bucket -aws s3 cp $DOTENV_FILES "s3://$S3_BUCKET/$S3_FOLDER/" +aws s3 cp "$DOTENV_FILES" "s3://$S3_BUCKET/$S3_FOLDER/" exit 0