From fe80e44785ea0af76c54e7500cc1ca31d81b39a0 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:43:06 -0700 Subject: [PATCH 1/7] Change rake task namespace to 'vt' --- lib/tasks/{nta.rake => vt.rake} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename lib/tasks/{nta.rake => vt.rake} (98%) diff --git a/lib/tasks/nta.rake b/lib/tasks/vt.rake similarity index 98% rename from lib/tasks/nta.rake rename to lib/tasks/vt.rake index 33320574..4412db67 100644 --- a/lib/tasks/nta.rake +++ b/lib/tasks/vt.rake @@ -2,7 +2,7 @@ require 'fileutils' -namespace :nta do +namespace :vt do # "Resource" is the name for top level containers in ArchivesSpace desc 'Download EAD for a Resource in ArchivesSpace to the /data directory' task :download_resource, %i[repository_id resource_id] => :environment do |_task, args| From 3035f5ccc0bd3d2a159c0ac5a4db809a1b4c120f Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:44:14 -0700 Subject: [PATCH 2/7] Change capistrano configs to use 'vt' naming --- config/deploy.rb | 6 +++--- config/deploy/prod.rb | 4 ++-- config/deploy/stage.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index cd24e894..abbef615 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -set :application, "nta-arclight" -set :repo_url, "https://github.com/sul-dlss/nta-arclight.git" +set :application, "vt-arclight" +set :repo_url, "https://github.com/sul-dlss/vt-arclight.git" # Default branch is :master so we need to update to main if ENV['DEPLOY'] @@ -11,7 +11,7 @@ end # Default deploy_to directory is /var/www/application-name -set :deploy_to, "/opt/app/nta/nta" +set :deploy_to, "/opt/app/vt/vt" # Default value for :linked_files is [] set :linked_files, %w[config/database.yml config/blacklight.yml] diff --git a/config/deploy/prod.rb b/config/deploy/prod.rb index df4d3384..b00a7192 100644 --- a/config/deploy/prod.rb +++ b/config/deploy/prod.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -server 'nta-prod-a.stanford.edu', user: 'nta', roles: %w[web db app] -server 'nta-prod-b.stanford.edu', user: 'nta', roles: %w[web app] +server 'vt-prod-a.stanford.edu', user: 'vt', roles: %w[web db app] +server 'vt-prod-b.stanford.edu', user: 'vt', roles: %w[web app] Capistrano::OneTimeKey.generate_one_time_key! set :rails_env, 'production' diff --git a/config/deploy/stage.rb b/config/deploy/stage.rb index 1beb3e00..e9543e9f 100644 --- a/config/deploy/stage.rb +++ b/config/deploy/stage.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -server 'nta-stage-a.stanford.edu', user: 'nta', roles: %w[web db app] -server 'nta-stage-b.stanford.edu', user: 'nta', roles: %w[web app] +server 'vt-stage-a.stanford.edu', user: 'vt', roles: %w[web db app] +server 'vt-stage-b.stanford.edu', user: 'vt', roles: %w[web app] Capistrano::OneTimeKey.generate_one_time_key! set :rails_env, 'production' From 5b0c07db6beb6800bb91abc707faa97f44283c8d Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:44:32 -0700 Subject: [PATCH 3/7] Rename application module to VtArclight --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index e1bc38ad..1f87a284 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,7 +8,7 @@ # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) -module NtaArclight +module VtArclight # Holds configuration for the application class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. From a3c95e6bf9690ebf412de667fb0cb79fd860209d Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:44:50 -0700 Subject: [PATCH 4/7] Set the application HTML title to 'Virtual Tribunals' --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5cabf249..f68793b5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - NtaArclight + Virtual Tribunals <%= csrf_meta_tags %> <%= csp_meta_tag %> From 2ce68cc2b3c2880e0ea810751124e89b1e52b985 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:45:05 -0700 Subject: [PATCH 5/7] Update CD config to use 'vt' name --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f7654d9e..2dd773d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any environment { - PROJECT = 'sul-dlss/nta-arclight' + PROJECT = 'sul-dlss/vt-arclight' } stages { @@ -23,7 +23,7 @@ pipeline { export DEPLOY=1 # Load RVM - rvm use 3.1.2@nta-arclight --create + rvm use 3.1.2@vt-arclight --create gem install bundler bundle install --without production @@ -68,7 +68,7 @@ pipeline { export REVISION=$TAG_NAME # Load RVM - rvm use 3.1.2@nta-arclight --create + rvm use 3.1.2@vt-arclight --create gem install bundler bundle install --without production From df422691ab88da94b32fb797a801d1aa9ba57cd7 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:45:15 -0700 Subject: [PATCH 6/7] Remove solr references from docker-compose.yml --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 86ad49e7..251edcc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,6 @@ services: environment: NODE_ENV: development RAILS_LOG_TO_STDOUT: 'true' - # SOLR_URL: http://solr:8983/solr/nta-arclight # Docker doesn't allow rails server to remove PID on shutdown PID_FILE: /dev/null depends_on: From acfeefdd0d16752c046d72d9608652d202400869 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Thu, 3 Nov 2022 15:45:29 -0700 Subject: [PATCH 7/7] Update README for name change to Virtual Tribunals --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 56491e4c..897d860e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Nurembeg Trial Archive +# Virtual Tribunals -An Arclight-based discovery application for materials from the Nuremberg Trial +An Arclight-based discovery application for materials from the Virtual Tribunals project ## Install ``` @@ -15,7 +15,7 @@ First start solr. bundle exec solr_wrapper ``` -## Index data from NTA records stored in ArchivesSpace +## Index data from records stored in ArchivesSpace ### Required environment variables Making requests to the ArchivesSpace endpoints via rake task requires that certain environment variables are set. Locally you can pass them on the command line or set them up another way. On staging and production servers, they are stored and accessible. @@ -25,28 +25,28 @@ Making requests to the ArchivesSpace endpoints via rake task requires that certa You can get the values of Vault by running the following (stage example): ```shell -vault kv get puppet/application/nta/stage/aspace_url -vault kv get puppet/application/nta/stage/aspace_user -vault kv get puppet/application/nta/stage/aspace_password +vault kv get puppet/application/vt/stage/aspace_url +vault kv get puppet/application/vt/stage/aspace_user +vault kv get puppet/application/vt/stage/aspace_password ``` ### Requesting data and indexing it -1. Find out the ID of the Resource and its Resository that you want in ArchivesSpace. Repository refers to internal SUL organization. For now we assume the Reposiotry ID is `2`, for Special Collections. This is subject to change in development. +1. Find out the ID of the Resource and its Resository that you want in ArchivesSpace. Repository refers to internal SUL organization. For now we assume the Repository ID is `2`, for Special Collections. This is subject to change in development. - "Resource" is the name for top level containers in ArchivesSpace. The Resource ID is the permanent identifier we use for the NTA collection. It's the same as the PURL and won't change: `mt839rq8746` + "Resource" is the name for top level containers in ArchivesSpace. The Resource ID is the permanent identifier we use for the collection. It's the same as the PURL and won't change: `mt839rq8746` -2. Download the NTA EAD for a specific Resource. This will download EAD to our `/data` folder with the Resource ID as the filename, e.g. `/data/mt839rq8746.xml`. You can use the following command. When trying to pass arguments to a rake task in the form of `[arg1,arg2]`, it seems my zsh shell requires escaping the brackets: +2. Download the EAD for a specific Resource. This will download EAD to our `/data` folder with the Resource ID as the filename, e.g. `/data/mt839rq8746.xml`. You can use the following command. When trying to pass arguments to a rake task in the form of `[arg1,arg2]`, it seems my zsh shell requires escaping the brackets: ```shell - rake nta:download_resource\[2,mt839rq8746\] + rake vt:download_resource\[2,mt839rq8746\] ``` Locally with passing env variables, the command could like like this: ```shell - ASPACE_URL=http://spec-as-stage.stanford.edu:8089 ASPACE_USER= ASPACE_PASSWORD= rake nta:download_resource\[2,mt839rq8746\] + ASPACE_URL=http://spec-as-stage.stanford.edu:8089 ASPACE_USER= ASPACE_PASSWORD= rake vt:download_resource\[2,mt839rq8746\] ``` 3. Index the file. ```shell - rake nta:index + rake vt:index ``` ## Start the app