Skip to content

Commit 97d9c90

Browse files
authored
Merge pull request #176 from eccenca/feature/include_wsl_documentation
Feature/include wsl documentation
2 parents b4a9a9a + 5db7bc8 commit 97d9c90

File tree

2 files changed

+108
-18
lines changed
  • docs/deploy-and-configure/installation
    • scenario-local-installation
    • scenario-single-node-cloud-installation

2 files changed

+108
-18
lines changed

docs/deploy-and-configure/installation/scenario-local-installation/index.md

Lines changed: 106 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,92 @@ The code examples in this section assumes that you have POSIX-compliant shell (l
1313
- [docker](https://www.docker.com/) and [docker compose](https://docs.docker.com/compose/install/) (v2) installed locally
1414
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) installed locally
1515
- [jq](https://jqlang.github.io/jq/download/) installed locally
16+
- make - build tools (apt-get install make) installed locally
1617
- At least 4 CPUs and 12GB of RAM (recommended: 16GB) dedicated to docker
1718

19+
## wsl installation and configuration
20+
21+
For all you need to start Powershell started as administrator.
22+
Alternatively you can also install a WSL distribution from Microsoft Store.
23+
24+
Install WSL, then restart your Windows machine.
25+
26+
```shell
27+
wsl --install
28+
```
29+
30+
List available distributions
31+
32+
```shell
33+
wsl --list --online
34+
```
35+
36+
Install a distribution.
37+
Chose from the `Name` column.
38+
Here we use a Debian based distribution like Debian or any Ubuntu.
39+
However other Distributions might work as well.
40+
41+
```shell
42+
wsl --install Debian
43+
```
44+
45+
Ensure you use wsl version 2 (this is necessary to use `systemd` services).
46+
47+
```shell
48+
wsl -l -v
49+
```
50+
51+
Install version 2 components (this requires a windows restart)
52+
53+
```shell
54+
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
55+
```
56+
57+
Enter WSL machine
58+
59+
```shell
60+
wsl -d Debian
61+
```
62+
63+
Enable `generateHosts = false` in your `/etc/hosts` file to make sure that this file won't be overwritten from the host system on every restart.
64+
65+
To be able to use `systemd` services and commands make sure `/etc/wsl.conf` is available with this content (should be the default with wsl v2):
66+
67+
```shell
68+
[boot]
69+
systemd=true
70+
```
71+
72+
(Optional) If you need to restart your WSL use in Powershell:
73+
74+
```shell
75+
wsl --shutdown
76+
```
77+
78+
(Optional) you can create a `.wslconfig` file under `C:\users\<your username>` to specify some system resources like:
79+
80+
```shell
81+
[wsl2]
82+
memory=16GB # restrict ram wsl can use
83+
processors=4 # restrict cpu-cores
84+
swap=8GB # set swap size
85+
swapFile=C:/Users/<your username>/wsl/Debianswap.vhdx # location to swap-file
86+
```
87+
88+
Alternatively, (with wsl v2) you may use the graphical configuration application _WSL Settings_.
89+
1890
## Setup & Check Installation Environment
1991

92+
For docker we recommend to use the linux docker within wsl.
93+
Follow the instruction in [Server Provisioning in Scenario: Single Node Cloud Installation](../scenario-single-node-cloud-installation/index.md#server-provisioning).
94+
Alternatively, you may use docker for desktop and enable wsl integration in the settings.
95+
2096
Open a terminal window, create a directory, copy and extract docker orchestration there.
2197

22-
```bash
23-
# Create eccenca-corporate-memory directory in your ${HOME} and set as a
98+
```shell
99+
# Create eccenca-corporate-memory directory in your ${HOME} and set as a
24100
# working dir.
101+
sudo apt install -y curl jq make git unzip gpg
25102

26103
mkdir ${HOME}/eccenca-corporate-memory && cd ${HOME}/eccenca-corporate-memory
27104

@@ -39,19 +116,19 @@ git init && git add . && git commit -m "stub"
39116

40117
Check your local environment:
41118

42-
```bash
119+
```shell
43120
# Run the following command to check your docker server version.
44121
# To have the current security patches, always update your docker version
45122
# to the latest one.
46123

47124
docker version | grep -i version
48-
# Version: 26.1.4
125+
# Docker version: 27.5.1, build 9f9e405
49126

50127
# Check docker compose version, should be at least v2.*.*
51128
# update to the latest version if necessary
52129

53130
docker compose version
54-
# Docker Compose version v2.29.1
131+
# Docker Compose version v2.32.4
55132

56133
# login into eccenca docker registry
57134

@@ -65,7 +142,7 @@ docker login docker-registry.eccenca.com
65142

66143
To install Corporate Memory, you need to modify your local hosts file (located in /etc/hosts), minimal configuration is as follows:
67144

68-
```bash
145+
```shell
69146
##
70147
# Host Database
71148
#
@@ -76,35 +153,37 @@ To install Corporate Memory, you need to modify your local hosts file (located i
76153
127.0.0.1 docker.localhost
77154
```
78155

79-
Corporate Memory uses Ontotext GraphDB triple store as default backend. Graphdb is available as free version and does not requires a license. If you have a license for graphdb you can copy the file to the ```license```folder inside Corporate Memory's root folder.
156+
Corporate Memory uses Ontotext GraphDB triple store as default backend.
157+
Graphdb is available as free version and does not requires a license.
158+
If you have a license for Ontotext GraphDB you can copy the file to the `license` folder inside Corporate Memory's root folder.
80159

81-
```bash
160+
```shell
82161
cp YOUR_SE_LICENSE_FILE \
83162
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-se.license
84163
# or
85164
cp YOUR_EE_LICENSE_FILE \
86165
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-ee.license
87166
```
88167

89-
Then change the file ```environments/config.env``` to use the correct version:
168+
Then change the file `environments/config.env` to use the correct version:
90169

91-
```bash
170+
```shell
92171
# Use Free, 'se' or 'ee' or adjust the mountpoint in
93172
# compose/docker-compose.store.graphdb.yaml
94173
GRAPHDB_LICENSE=se
95174
```
96175

97176
Run the command to clean workspace, pull the images, start the Corporate Memory instance and load initial data:
98177

99-
```bash
178+
```shell
100179
# Pulling the images will take time
101180

102181
make clean-pull-start-bootstrap
103182
```
104183

105184
You should see the output as follows:
106185

107-
```bash
186+
```shell
108187
make[1]: Entering directory '/home/ttelleis/cmem-dist/cmem-orchestration'
109188
The target cleans up everything and esp. REMOVES ALL YOUR DATA. Do you want to continue?
110189

@@ -150,17 +229,17 @@ Run make logs to see log output
150229

151230
Open your browser and navigate to <http://docker.localhost>
152231

153-
| account | password | description |
154-
| ------- | -------- | ------------------------------------------------------------------------------------------- |
155-
| `admin` | `admin` | Is member of the global admin group (can see and do anything) |
232+
| account | password | description |
233+
| ------- | -------- | ----------- |
234+
| `admin` | `admin` | Is member of the global admin group (can see and do anything) |
156235

157236
After successful login, you will see Corporate Memory interface. You can now proceed to the :arrow_right:[Getting Started](../../../getting-started/index.md) section.
158237

159238
### Backup
160239

161240
To create a backup you have to prepare the backup folders. Make sure these folders exists and have write permissions. Run this:
162241

163-
```bash
242+
```shell
164243
# assuming you are currently in the the cmem-orchestration folder
165244
mkdir -p data/backups/graphs data/backups/workspace
166245
chmod 777 data/backups/graphs data/backups/workspace
@@ -189,6 +268,16 @@ zip -r data/backups/2024-07-26_14-15.zip data/backups/keycloak/2024-07-26_14-15.
189268
adding: data/backups/graphs/2024-07-26_14-15.zip (stored 0%)
190269
adding: data/backups/python-packages/2024-07-26_14-15.zip (stored 0%)
191270
ln -sf 2024-07-26_14-15.zip data/backups/latest.zip
192-
193271
```
272+
194273
The full backup is now at `data/backups/latest.zip`.
274+
275+
### Caveats
276+
277+
In case you have problems starting and receive error messages like Port 80 already assigned.
278+
Then check if a apache2 service is running and remove it.
279+
280+
```shell
281+
sudo service apache2 status
282+
sudo service stop apache2
283+
```

docs/deploy-and-configure/installation/scenario-single-node-cloud-installation/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ sudo apt-get install docker-ce docker-ce-cli containerd.io \
4242
docker-compose-plugin
4343

4444
# (optional) add a user to docker group
45+
# may require logout/login to reload group assignments
4546
# sudo usermod -a -G docker admin
4647
```
4748

@@ -62,7 +63,7 @@ cd /opt
6263
curl https://releases.eccenca.com/docker-orchestration/latest.zip \
6364
> cmem-orchestration.zip
6465

65-
# unzip the orchestration and move the unzipped directory to
66+
# unzip the orchestration and move the unzipped directory to
6667
# /opt/cmem-orchestration
6768
unzip cmem-orchestration.zip
6869
rm cmem-orchestration.zip

0 commit comments

Comments
 (0)