From c54af164c888a9eacad8977868ed9ddbca254f02 Mon Sep 17 00:00:00 2001 From: Anders Jensen-Urstad Date: Thu, 10 Aug 2023 11:01:36 +0200 Subject: [PATCH] libris.local => libris.kb.se.local; id.local => id.kb.se.local --- README.md | 22 +++++++++---------- gui-whelktool/cli_run_local.sh | 2 +- marc_export/integtest/test.py | 2 +- .../libris/digi/DigitalReproductionAPI.groovy | 4 ++-- .../resources/preserve-paths/context.jsonld | 2 +- .../preserve-paths/display-data.jsonld | 2 +- .../molecular-aspects-cards-cards.jsonld | 4 ++-- .../molecular-aspects-cards-chips.jsonld | 4 ++-- .../molecular-aspects-chips.jsonld | 4 ++-- .../preserve-paths/molecular-aspects.jsonld | 4 ++-- whelktool/README.md | 2 +- whelktool/scripts/examples/create.groovy | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index bbdd3e0053..43c436fa2a 100644 --- a/README.md +++ b/README.md @@ -187,8 +187,8 @@ cp secret.properties.in secret.properties # In secret.properties, set: # - elasticCluster to whatever you set cluster.name to in the Elasticsearch configuration above. vim secret.properties -# Make sure libris.localhost points to 127.0.0.1 -echo '127.0.0.1 libris.localhost' | sudo tee -a /etc/hosts +# Make sure libris.kb.se.localhost points to 127.0.0.1 +echo '127.0.0.1 libris.kb.se.localhost' | sudo tee -a /etc/hosts ``` ### Importing test data @@ -242,7 +242,7 @@ and the id.kb.se app running on port 3000, but they won't work yet. Next, edit ``` - ServerName libris.localhost + ServerName libris.kb.se.localhost ProxyRequests Off ProxyPreserveHost On @@ -252,12 +252,12 @@ and the id.kb.se app running on port 3000, but they won't work yet. Next, edit ProxyPreserveHost Off RewriteCond %{HTTP_ACCEPT} (text/html|application/xhtml|\*/\*|^$) RewriteCond %{REQUEST_METHOD} GET - RewriteRule ([^/]+)$ http://id.localhost:5000/$1 [P] + RewriteRule ([^/]+)$ http://id.kb.se.localhost:5000/$1 [P] ProxyPreserveHost Off - ProxyPass http://id.localhost:5000/_nuxt + ProxyPass http://id.kb.se.localhost:5000/_nuxt ProxyPass /katalogisering http://localhost:8080/katalogisering @@ -278,7 +278,7 @@ and the id.kb.se app running on port 3000, but they won't work yet. Next, edit - ServerName id.localhost + ServerName id.kb.se.localhost ProxyRequests Off ProxyPreserveHost On @@ -326,8 +326,8 @@ Listen 5000 Add these lines to `/etc/hosts`: ``` -127.0.0.1 libris.localhost -127.0.0.1 id.localhost +127.0.0.1 libris.kb.se.localhost +127.0.0.1 id.kb.se.localhost ``` Make sure some necessary Apache modules are enabled: @@ -342,9 +342,9 @@ Now (re)start Apache: systemctl restart apache2 ``` -You should now be able to visit http://id.localhost:5000, and use the cataloging client -on http://libris.localhost:5000/katalogisering/. The XL API itself is available on -http://libris.localhost:5000 (proxied via Apache), or directly on http://localhost:8180. +You should now be able to visit http://id.kb.se.localhost:5000, and use the cataloging client +on http://libris.kb.se.localhost:5000/katalogisering/. The XL API itself is available on +http://libris.kb.se.localhost:5000 (proxied via Apache), or directly on http://localhost:8180. ## Maintenance diff --git a/gui-whelktool/cli_run_local.sh b/gui-whelktool/cli_run_local.sh index c8a2825a51..cf4a3a64d4 100755 --- a/gui-whelktool/cli_run_local.sh +++ b/gui-whelktool/cli_run_local.sh @@ -4,4 +4,4 @@ set -uex username=$(whoami) -java -DsecretBaseUri=http://libris.localhost:5000/ -DsecretSqlUrl=jdbc:postgresql://$username:_XL_PASSWORD_@localhost/whelk_dev -DsecretElasticHost=localhost -DsecretElasticCluster=elasticsearch_$username -DsecretElasticIndex=whelk_dev -DsecretApplicationId=https://libris.kb.se/ -DsecretSystemContextUri=https://id.kb.se/sys/context/kbv -DsecretLocales=sv,en -DsecretTimezone=Europe/Stockholm -jar build/libs/gui-whelktool.jar +java -DsecretBaseUri=http://libris.kb.se.localhost:5000/ -DsecretSqlUrl=jdbc:postgresql://$username:_XL_PASSWORD_@localhost/whelk_dev -DsecretElasticHost=localhost -DsecretElasticCluster=elasticsearch_$username -DsecretElasticIndex=whelk_dev -DsecretApplicationId=https://libris.kb.se/ -DsecretSystemContextUri=https://id.kb.se/sys/context/kbv -DsecretLocales=sv,en -DsecretTimezone=Europe/Stockholm -jar build/libs/gui-whelktool.jar diff --git a/marc_export/integtest/test.py b/marc_export/integtest/test.py index 7a21b7c451..1cbe56b31b 100644 --- a/marc_export/integtest/test.py +++ b/marc_export/integtest/test.py @@ -5,7 +5,7 @@ import json import xml.etree.ElementTree as ET -base_uri = 'http://libris.localhost:5000/' +base_uri = 'http://libris.kb.se.localhost:5000/' export_url = 'http://localhost:8580/marc_export/' ## Util-stuff diff --git a/rest/src/main/groovy/se/kb/libris/digi/DigitalReproductionAPI.groovy b/rest/src/main/groovy/se/kb/libris/digi/DigitalReproductionAPI.groovy index 1c5571abd5..91713ce7c3 100644 --- a/rest/src/main/groovy/se/kb/libris/digi/DigitalReproductionAPI.groovy +++ b/rest/src/main/groovy/se/kb/libris/digi/DigitalReproductionAPI.groovy @@ -53,11 +53,11 @@ TOKEN=$(curl -s -X POST -d 'client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&gr curl -v -XPOST 'http://localhost:8180/_reproduction' -H 'Content-Type: application/ld+json' -H "Authorization: Bearer $TOKEN" -H 'XL-Active-Sigel: S' --data-binary @- << EOF { "@type": "Electronic", - "reproductionOf": { "@id": "http://libris.localhost:5000/q822pht24j3ljjr#it" }, + "reproductionOf": { "@id": "http://libris.kb.se.localhost:5000/q822pht24j3ljjr#it" }, "production": [ { "@type": "Reproduction", - "agent": { "@id": "http://libris.localhost:5000/jgvxv7m23l9rxd3#it" }, + "agent": { "@id": "http://libris.kb.se.localhost:5000/jgvxv7m23l9rxd3#it" }, "place": { "@type": "Place", "label": "Stockholm" }, "date": "2021" } diff --git a/whelk-core/src/test/resources/preserve-paths/context.jsonld b/whelk-core/src/test/resources/preserve-paths/context.jsonld index caf35e2bfd..768987b7e2 100644 --- a/whelk-core/src/test/resources/preserve-paths/context.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/context.jsonld @@ -1,7 +1,7 @@ { "@graph": [ { - "@id": "http://libris.localhost:5000/00nj5pg324pd3kjp", + "@id": "http://libris.kb.se.localhost:5000/00nj5pg324pd3kjp", "sameAs": [ { "@id": "https://id.kb.se/vocab/context" diff --git a/whelk-core/src/test/resources/preserve-paths/display-data.jsonld b/whelk-core/src/test/resources/preserve-paths/display-data.jsonld index 6e633c32a7..3590c2ec23 100644 --- a/whelk-core/src/test/resources/preserve-paths/display-data.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/display-data.jsonld @@ -1,7 +1,7 @@ { "@graph": [ { - "@id": "http://libris.localhost:5000/00nj5pg324f356g2", + "@id": "http://libris.kb.se.localhost:5000/00nj5pg324f356g2", "sameAs": [ { "@id": "https://id.kb.se/vocab/display.jsonld" diff --git a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-cards.jsonld b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-cards.jsonld index ae878a199e..09593062c2 100644 --- a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-cards.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-cards.jsonld @@ -1,5 +1,5 @@ { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#it", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#it", "@type": "Electronic", "extent": [ { @@ -19,7 +19,7 @@ } ], "instanceOf": { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#work", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#work", "@type": "Text", "subject": [ { diff --git a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-chips.jsonld b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-chips.jsonld index 974979ef89..f3f82af301 100644 --- a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-chips.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-cards-chips.jsonld @@ -1,5 +1,5 @@ { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#it", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#it", "@type": "Electronic", "extent": [ { @@ -19,7 +19,7 @@ } ], "instanceOf": { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#work", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#work", "@type": "Text", "language": [ { diff --git a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-chips.jsonld b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-chips.jsonld index cd74429aef..2b90e4de4a 100644 --- a/whelk-core/src/test/resources/preserve-paths/molecular-aspects-chips.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/molecular-aspects-chips.jsonld @@ -1,5 +1,5 @@ { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#it", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#it", "@type": "Electronic", "sameAs": [ { @@ -13,7 +13,7 @@ } ], "instanceOf": { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#work", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#work", "@type": "Text", "language": [ { diff --git a/whelk-core/src/test/resources/preserve-paths/molecular-aspects.jsonld b/whelk-core/src/test/resources/preserve-paths/molecular-aspects.jsonld index ac46003839..af1205b0ac 100644 --- a/whelk-core/src/test/resources/preserve-paths/molecular-aspects.jsonld +++ b/whelk-core/src/test/resources/preserve-paths/molecular-aspects.jsonld @@ -1,5 +1,5 @@ { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#it", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#it", "@type": "Electronic", "extent": [ { @@ -26,7 +26,7 @@ } ], "instanceOf": { - "@id": "http://libris.localhost:5000/n602lbw018zh88k#work", + "@id": "http://libris.kb.se.localhost:5000/n602lbw018zh88k#work", "@type": "Text", "hasPart": [ { diff --git a/whelktool/README.md b/whelktool/README.md index 091244b452..9312771e26 100644 --- a/whelktool/README.md +++ b/whelktool/README.md @@ -205,7 +205,7 @@ def data = "@id": "TEMPID#it", "@type": "Item", "heldBy": ["@id": "https://libris.kb.se/library/Utb1"], - "itemOf": ["@id": "http://libris.localhost:5000/wf7mw1h74fkt88r#it"] + "itemOf": ["@id": "http://libris.kb.se.localhost:5000/wf7mw1h74fkt88r#it"] ] ]] diff --git a/whelktool/scripts/examples/create.groovy b/whelktool/scripts/examples/create.groovy index dfffae4dc8..4319906566 100644 --- a/whelktool/scripts/examples/create.groovy +++ b/whelktool/scripts/examples/create.groovy @@ -8,7 +8,7 @@ def data = "@id": "TEMPID#it", "@type": "Item", "heldBy": ["@id": "https://libris.kb.se/library/Utb1"], - "itemOf": ["@id": "http://libris.localhost:5000/wf7mw1h74fkt88r#it"] + "itemOf": ["@id": "http://libris.kb.se.localhost:5000/wf7mw1h74fkt88r#it"] ] ]]