Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .localhost instead of .kblocalhost.kb.se #1284

Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 kblocalhost.kb.se points to 127.0.0.1
echo '127.0.0.1 kblocalhost.kb.se' | sudo tee -a /etc/hosts
# Make sure libris.localhost points to 127.0.0.1
echo '127.0.0.1 libris.localhost' | sudo tee -a /etc/hosts
```

### Importing test data
Expand Down Expand Up @@ -242,7 +242,7 @@ and the id.kb.se app running on port 3000, but they won't work yet. Next, edit

```
<VirtualHost *:5000>
ServerName kblocalhost.kb.se
ServerName libris.localhost
ProxyRequests Off
ProxyPreserveHost On
Expand All @@ -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.kblocalhost.kb.se:5000/$1 [P]
RewriteRule ([^/]+)$ http://id.localhost:5000/$1 [P]
</LocationMatch>
<Location /_nuxt>
ProxyPreserveHost Off
ProxyPass http://id.kblocalhost.kb.se:5000/_nuxt
ProxyPass http://id.localhost:5000/_nuxt
</Location>
ProxyPass /katalogisering http://localhost:8080/katalogisering
Expand All @@ -278,7 +278,7 @@ and the id.kb.se app running on port 3000, but they won't work yet. Next, edit
</VirtualHost>
<VirtualHost *:5000>
ServerName id.kblocalhost.kb.se
ServerName id.localhost
ProxyRequests Off
ProxyPreserveHost On
Expand Down Expand Up @@ -326,8 +326,8 @@ Listen 5000
Add these lines to `/etc/hosts`:

```
127.0.0.1 kblocalhost.kb.se
127.0.0.1 id.kblocalhost.kb.se
127.0.0.1 libris.localhost
127.0.0.1 id.localhost
```

Make sure some necessary Apache modules are enabled:
Expand All @@ -342,9 +342,9 @@ Now (re)start Apache:
systemctl restart apache2
```

You should now be able to visit http://id.kblocalhost.kb.se:5000, and use the cataloging client
on http://kblocalhost.kb.se:5000/katalogisering/. The XL API itself is available on
http://kblocalhost.kb.se:5000 (proxied via Apache), or directly on http://localhost:8180.
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.

## Maintenance

Expand Down
2 changes: 1 addition & 1 deletion gui-whelktool/cli_run_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -uex

username=$(whoami)

java -DsecretBaseUri=http://kblocalhost.kb.se: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.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
2 changes: 1 addition & 1 deletion marc_export/integtest/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
import xml.etree.ElementTree as ET

base_uri = 'http://kblocalhost.kb.se:5000/'
base_uri = 'http://libris.localhost:5000/'
export_url = 'http://localhost:8580/marc_export/'

## Util-stuff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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://kblocalhost.kb.se:5000/q822pht24j3ljjr#it" },
"reproductionOf": { "@id": "http://libris.localhost:5000/q822pht24j3ljjr#it" },
"production": [
{
"@type": "Reproduction",
"agent": { "@id": "http://kblocalhost.kb.se:5000/jgvxv7m23l9rxd3#it" },
"agent": { "@id": "http://libris.localhost:5000/jgvxv7m23l9rxd3#it" },
"place": { "@type": "Place", "label": "Stockholm" },
"date": "2021"
}
Expand Down Expand Up @@ -508,4 +508,4 @@ class RequestException extends RuntimeException {
static RequestException internalError(String msg) {
new RequestException(code: SC_INTERNAL_SERVER_ERROR, msg: msg)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@graph": [
{
"@id": "http://kblocalhost.kb.se:5000/00nj5pg324pd3kjp",
"@id": "http://libris.localhost:5000/00nj5pg324pd3kjp",
"sameAs": [
{
"@id": "https://id.kb.se/vocab/context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@graph": [
{
"@id": "http://kblocalhost.kb.se:5000/00nj5pg324f356g2",
"@id": "http://libris.localhost:5000/00nj5pg324f356g2",
"sameAs": [
{
"@id": "https://id.kb.se/vocab/display.jsonld"
Expand Down Expand Up @@ -426,4 +426,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#it",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#it",
"@type": "Electronic",
"extent": [
{
Expand All @@ -19,7 +19,7 @@
}
],
"instanceOf": {
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#work",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#work",
"@type": "Text",
"subject": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#it",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#it",
"@type": "Electronic",
"extent": [
{
Expand All @@ -19,7 +19,7 @@
}
],
"instanceOf": {
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#work",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#work",
"@type": "Text",
"language": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#it",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#it",
"@type": "Electronic",
"sameAs": [
{
Expand All @@ -13,7 +13,7 @@
}
],
"instanceOf": {
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#work",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#work",
"@type": "Text",
"language": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#it",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#it",
"@type": "Electronic",
"extent": [
{
Expand All @@ -26,7 +26,7 @@
}
],
"instanceOf": {
"@id": "http://kblocalhost.kb.se:5000/n602lbw018zh88k#work",
"@id": "http://libris.localhost:5000/n602lbw018zh88k#work",
"@type": "Text",
"hasPart": [
{
Expand Down
4 changes: 2 additions & 2 deletions whelktool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def data =
"@id": "TEMPID#it",
"@type": "Item",
"heldBy": ["@id": "https://libris.kb.se/library/Utb1"],
"itemOf": ["@id": "http://kblocalhost.kb.se:5000/wf7mw1h74fkt88r#it"]
"itemOf": ["@id": "http://libris.localhost:5000/wf7mw1h74fkt88r#it"]
]
]]
Expand Down Expand Up @@ -413,4 +413,4 @@ selectByIds(ids) { d ->
def agentIds = getAtPath(d.graph[1], ['instanceOf', 'contribution', '*', 'agent', '@id'])
def partTitles = getAtPath(d.graph[1], ['instanceOf', 'hasPart', '*', 'hasTitle', '*', 'mainTitle'])
}
```
```
2 changes: 1 addition & 1 deletion whelktool/scripts/examples/create.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def data =
"@id": "TEMPID#it",
"@type": "Item",
"heldBy": ["@id": "https://libris.kb.se/library/Utb1"],
"itemOf": ["@id": "http://kblocalhost.kb.se:5000/wf7mw1h74fkt88r#it"]
"itemOf": ["@id": "http://libris.localhost:5000/wf7mw1h74fkt88r#it"]
]
]]

Expand Down