Scenario: Local Installation¤
Introduction¤
This page describes a docker compose based orchestration running on your local machine and accessible via browser.
The code examples in this section assume that you have a POSIX-compliant shell (Linux, macOS or WSL for Windows).
Requirements¤
- Access credentials to eccenca Artifactory and eccenca Docker Registry → contact us to get yours
- docker and docker compose (v2) installed locally
- git installed locally
- jq installed locally
- A GraphDB license (free or commercial)
- (optional) A Graph Insights license
- make - build tool (apt-get install make) installed locally (don’t use version 4.4.1 →; e.g., 4.3 works well)
- At least 4 CPUs and 12GB of RAM (recommended: 16GB) dedicated to docker
Setup & Check Installation Environment¤
Install the requirements
Install all the needed packages:
To install Corporate Memory, you need to modify your local hosts file (located in /etc/hosts), minimal configuration is as follows:Install homebrew:
Install all needed packages:
To install Corporate Memory, you need to modify your local hosts file (located in /etc/hosts), minimal configuration is as follows:First of all, you need to start PowerShell as administrator. Alternatively you can also install a WSL distribution from Microsoft Store.
Install WSL, then restart your Windows machine.
List available distributions
Install a distribution:
Choose from the Name column.
Here we use a Debian based distribution like Debian or any Ubuntu.
However, other distributions might work as well.
Ensure you use WSL version 2 (this is necessary to use systemd services).
Install version 2 components (this requires a windows restart)
Enter WSL machine
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.
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):
(Optional) If you need to restart your WSL use in Powershell:
To install Corporate Memory, you need to modify your local hosts file (located in C:\Windows\System32\drivers\etc\hosts), minimal configuration is as follows:
Warning
This requires administration rights.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 docker.localhost
(Optional) You can create a .wslconfig file under C:\Users\<your username> to specify some system resources like:
[wsl2]
memory=16GB # restrict ram WSL can use
processors=4 # restrict cpu-cores
swap=8GB # set swap size
swapFile=C:/Users/<your username>/wsl/Debianswap.vhdx # location to swap-file
Alternatively, (with WSL v2) you may use the graphical configuration application WSL Settings.
For Docker, we recommend using the Linux Docker within WSL. Alternatively, you may use Docker for Desktop and enable WSL integration in the settings.
Open a terminal window, create a directory, copy and extract docker orchestration there.
# Create eccenca-corporate-memory directory in your ${HOME} and set as a
# working dir.
mkdir ${HOME}/eccenca-corporate-memory && cd ${HOME}/eccenca-corporate-memory
# Download the Corporate Memory orchestration distribution
curl https://releases.eccenca.com/docker-orchestration/latest.zip \
> cmem-orchestration.zip
# Unzip the orchestration and move the unzipped directory
unzip cmem-orchestration.zip
rm cmem-orchestration.zip
mv cmem-orchestration-v* cmem-orchestration
cd cmem-orchestration
git init && git add . && git commit -m "stub"
Check your local environment:
# Run the following command to check your docker server version.
# To have the current security patches, always update your docker version
# to the latest one.
docker version | grep -i version
# Docker version: 27.5.1, build 9f9e405
# Check docker compose version, should be at least v2.*.*
# update to the latest version if necessary
docker compose version
# Docker Compose version v2.32.4
# login into eccenca docker registry
docker login docker-registry.eccenca.com
# Username: yourusername
# Password:
# Login Succeeded
Installation¤
Corporate Memory uses Ontotext GraphDB triple store as the default backend.
You need to copy your license for Ontotext GraphDB to the license folder inside Corporate Memory’s root folder.
# Create the licenses folder within ${HOME}/cmem-orchestration
mkdir -p licenses
# Copy YOUR-LICENSE-FILE
cp YOUR_SE_LICENSE_FILE \
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-se.license
# or
cp YOUR_EE_LICENSE_FILE \
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-ee.license
Then change the file environments/config.env to use the correct version:
# Use Free, 'se' or 'ee' or adjust the mountpoint in
# compose/docker-compose.store.graphdb.yaml
GRAPHDB_LICENSE=se
Run the command to clean workspace, pull the images, start the Corporate Memory instance and load initial data:
(Optional) Enable Graph Insights Extension¤
If you want to have Graph Insights enabled as well, first you need a license. Then you can simply run:
mkdir -p licenses
ln -s your-license-file.lic graphinsights.lic
make enable-extension EXTENSION=graphinsights
Please also visit our extended documentation for Graph Insights
Initial Login / Test¤
Open your browser and navigate to http://docker.localhost
| account | password | description |
|---|---|---|
admin |
admin |
Is member of the global admin group (can see and do anything) |
After successful login, you will see the Corporate Memory interface. You can now proceed to the Getting Started section.
Backup¤
To create a backup you have to prepare the backup folders. Make sure these folders exist and have write permissions:
# assuming you are currently in the cmem-orchestration folder
mkdir -p data/backups/graphs data/backups/workspace
chmod 777 data/backups/graphs data/backups/workspace
make backup
mkdir -p data/backups/keycloak
# Started Keycloak database backup to data/backups/keycloak/keycloak.sql ...
# Finished Keycloak database backup.
mv data/backups/keycloak/keycloak.sql data/backups/keycloak/2024-07-26_14-15.sql
ln -sf 2024-07-26_14-15.sql data/backups/keycloak/latest.sql
mkdir -p data/backups/workspace
docker compose run -i --rm --env "OAUTH_CLIENT_SECRET=c8c12828-000c-467b-9b6d-2d6b5e16df4a" --volume /home/ttelleis/cmem-dist/cmem-orchestration/data:/data --volume /home/ttelleis/cmem-dist/cmem-orchestration/conf/cmemc/cmemc.ini:/config/cmemc.ini cmemc -c cmem admin workspace export /data/backups/workspace/2024-07-26_14-15.zip
# Export workspace to /data/backups/workspace/2024-07-26_14-15.zip ... done
ln -sf 2024-07-26_14-15.zip data/backups/workspace/latest.zip
mkdir -p data/backups/python-packages
zip -r data/backups/python-packages/2024-07-26_14-15.zip data/python-packages
adding: data/python-packages/ (stored 0%)
ln -sf 2024-07-26_14-15.zip data/backups/python-packages/latest.zip
mkdir -p data/backups/graphs
docker compose run -i --rm --env "OAUTH_CLIENT_SECRET=c8c12828-000c-467b-9b6d-2d6b5e16df4a" --volume /home/ttelleis/cmem-dist/cmem-orchestration/data:/data --volume /home/ttelleis/cmem-dist/cmem-orchestration/conf/cmemc/cmemc.ini:/config/cmemc.ini cmemc -c cmem admin store export /data/backups/graphs/2024-07-26_14-15.zip
# Exporting graphs backup to /data/backups/graphs/2024-07-26_14-15.zip ... done
ln -sf 2024-07-26_14-15.zip data/backups/graphs/latest.zip
zip -r data/backups/2024-07-26_14-15.zip data/backups/keycloak/2024-07-26_14-15.sql data/backups/workspace/2024-07-26_14-15.zip data/backups/graphs/2024-07-26_14-15.zip data/backups/python-packages/2024-07-26_14-15.zip
adding: data/backups/keycloak/2024-07-26_14-15.sql (deflated 82%)
adding: data/backups/workspace/2024-07-26_14-15.zip (stored 0%)
adding: data/backups/graphs/2024-07-26_14-15.zip (stored 0%)
adding: data/backups/python-packages/2024-07-26_14-15.zip (stored 0%)
ln -sf 2024-07-26_14-15.zip data/backups/latest.zip
The full backup is now at data/backups/latest.zip.
Caveats¤
In case you have problems starting and receive error messages like “Port 80 already assigned”, check if an httpd service (like apache2) is running and stop it.