Skip to content

Commit 46c5395

Browse files
committed
Updated Setup instructions in README
OWNER_KEY_PASSWORD not required in .env anymore
1 parent 7e1b4e4 commit 46c5395

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.env_sample

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ OWNER_ORG_UNIT=My unit
1515
OWNER_ORGANIZATION=My org
1616
OWNER_LOCALITY=Copenhagen
1717
OWNER_STATE_OR_PROVINCE=Denmark
18-
OWNER_COUNTRY_NAME=DK
19-
OWNER_KEY_PASSWORD=changeit
18+
OWNER_COUNTRY_NAME=DK

README.md

+19-14
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ What makes LinkedDataHub unique is its completely _data-driven architecture_: ap
2020
<details>
2121
<summary>Click to expand</summary>
2222

23-
1. [Install Docker](https://docs.docker.com/install/)
23+
1. Have your `bash` shell ready. It should be included by default on Linux. On Windows you can install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
24+
2. [Install Docker](https://docs.docker.com/install/)
2425
- [Install Docker Compose](https://docs.docker.com/compose/install/), if it is not already included in the Docker installation
25-
2. [Fork](https://guides.github.com/activities/forking/) this repository and clone the fork into a folder
26-
3. In the folder, create an `.env` file and fill out the missing values (you can use [`.env_sample`](https://github.com/AtomGraph/LinkedDataHub/blob/master/.env_sample) as a template). For example:
26+
3. [Fork](https://guides.github.com/activities/forking/) this repository and clone the fork into a folder
27+
4. In the folder, create an `.env` file and fill out the missing values (you can use [`.env_sample`](https://github.com/AtomGraph/LinkedDataHub/blob/master/.env_sample) as a template). For example:
2728
```
2829
COMPOSE_CONVERT_WINDOWS_PATHS=1
2930
COMPOSE_PROJECT_NAME=linkeddatahub
@@ -42,26 +43,30 @@ What makes LinkedDataHub unique is its completely _data-driven architecture_: ap
4243
OWNER_LOCALITY=Copenhagen
4344
OWNER_STATE_OR_PROVINCE=Denmark
4445
OWNER_COUNTRY_NAME=DK
45-
OWNER_KEY_PASSWORD=changeit
4646
```
47-
4. Run this from command line:
47+
5. Setup SSL certificates/keys by running this from command line (replace `$owner_cert_pwd` and `$secretary_cert_pwd` with your own passwords):
48+
```
49+
./scripts/setup.sh .env ssl $owner_cert_pwd $secretary_cert_pwd 3650
50+
```
51+
The script will create an `ssl` sub-folder where the SSL certificates and/or public keys will be placed. It requires Java's `keytool` as well as `openssl` to be available on `$PATH`.
52+
6. Launch the application services by running this from command line:
4853
```
4954
docker-compose up
5055
```
51-
5. LinkedDataHub will start and create the following sub-folders:
52-
- `certs` where your WebID certificates are stored
56+
LinkedDataHub will start and mount the following sub-folders:
5357
- `data` where the triplestore(s) will persist RDF data
5458
- `uploads` where LDH stores content-hashed file uploads
55-
6. Install `certs/owner.p12` into a web browser of your choice (password is the `OWNER_KEY_PASSWORD` value)
59+
60+
The first should take around half a minute as datasets are being loaded into triplestores. After a successful startup, the last line of the Docker log should read something like:
61+
62+
linkeddatahub_1 | 09-Feb-2021 14:18:10.536 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [32609] milliseconds
63+
64+
7. Install `ssl/owner/keystore.p12` into a web browser of your choice (password is the `$owner_cert_pwd` value supplied to `setup.sh`)
5665
- Google Chrome: `Settings > Advanced > Manage Certificates > Import...`
5766
- Mozilla Firefox: `Options > Privacy > Security > View Certificates... > Import...`
5867
- Apple Safari: The file is installed directly into the operating system. Open the file and import it using the [Keychain Access](https://support.apple.com/guide/keychain-access/what-is-keychain-access-kyca1083/mac) tool.
5968
- Microsoft Edge: Does not support certificate management, you need to install the file into Windows. [Read more here](https://social.technet.microsoft.com/Forums/en-US/18301fff-0467-4e41-8dee-4e44823ed5bf/microsoft-edge-browser-and-ssl-certificates?forum=win10itprogeneral).
60-
7. Open **https://localhost:4443/** in that web browser
61-
62-
After a successful startup, the last line of the Docker log should read:
63-
64-
linkeddatahub_1 | 02-Feb-2020 02:02:20.200 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3420 ms
69+
8. Open **https://localhost:4443/** in that web browser
6570

6671
### Notes
6772

@@ -108,7 +113,7 @@ _:warning: Do not use blank nodes to identify applications or services. We recom
108113

109114
If you need to start fresh and wipe the existing setup (e.g. after configuring a new base URI), you can do that using
110115
```
111-
sudo rm -rf certs data && docker-compose down -v
116+
sudo rm -rf data && docker-compose down -v
112117
```
113118

114119
_:warning: This will **remove the persisted data**, server and owner certificates as well as their Docker volumes._

scripts/setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ secretary_keystore="${out_folder}/secretary/keystore.p12"
2222
secretary_keystore_pwd="LinkedDataHub"
2323
secretary_cert="${out_folder}/secretary/cert.pem"
2424
secretary_cert_pwd="$4"
25+
secretary_cert_dname="CN=LDH, OU=LDH, O=AtomGraph, L=Copenhagen, ST=Denmark, C=DK"
2526

2627
validity="$5"
2728

@@ -149,7 +150,6 @@ secretary_uri="${base_uri}admin/acl/agents/${secretary_uuid}/#this"
149150

150151
printf "\n### Secretary's WebID URI: %s\n" "$secretary_uri"
151152

152-
secretary_cert_dname="CN=LDH, OU=LDH, O=AtomGraph, L=Copenhagen, ST=Denmark, C=DK"
153153
printf "\n### Secretary WebID certificate's DName attributes: %s\n" "$secretary_cert_dname"
154154

155155
keytool \

0 commit comments

Comments
 (0)