Skip to content

Commit b4a9a9a

Browse files
authored
Merge pull request #182 from eccenca/feature/codeblock_adjustments
Feature/codeblock adjustments
2 parents 3368e9b + befac88 commit b4a9a9a

File tree

4 files changed

+84
-83
lines changed
  • docs/deploy-and-configure/installation
    • scenario-local-installation
    • scenario-redhat-enterprise-linux-7
    • scenario-single-node-cloud-installation

4 files changed

+84
-83
lines changed

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

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,53 @@ The code examples in this section assumes that you have POSIX-compliant shell (l
1919

2020
Open a terminal window, create a directory, copy and extract docker orchestration there.
2121

22-
```
22+
```bash
2323
# Create eccenca-corporate-memory directory in your ${HOME} and set as a
2424
# working dir.
2525

26-
$ mkdir ${HOME}/eccenca-corporate-memory && cd ${HOME}/eccenca-corporate-memory
26+
mkdir ${HOME}/eccenca-corporate-memory && cd ${HOME}/eccenca-corporate-memory
2727

2828
# download the Corporate Memory orchestration distribution
29-
$ curl https://releases.eccenca.com/docker-orchestration/latest.zip \
29+
curl https://releases.eccenca.com/docker-orchestration/latest.zip \
3030
> cmem-orchestration.zip
3131

3232
# unzip the orchestration and move the unzipped directory
33-
$ unzip cmem-orchestration.zip
34-
$ rm cmem-orchestration.zip
35-
$ mv cmem-orchestration-v* cmem-orchestration
36-
$ cd cmem-orchestration
37-
$ git init && git add . && git commit -m "stub"
33+
unzip cmem-orchestration.zip
34+
rm cmem-orchestration.zip
35+
mv cmem-orchestration-v* cmem-orchestration
36+
cd cmem-orchestration
37+
git init && git add . && git commit -m "stub"
3838
```
3939

4040
Check your local environment:
4141

42-
```
42+
```bash
4343
# Run the following command to check your docker server version.
4444
# To have the current security patches, always update your docker version
4545
# to the latest one.
4646

47-
$ docker version | grep -i version
48-
Version: 26.1.4
47+
docker version | grep -i version
48+
# Version: 26.1.4
4949

5050
# Check docker compose version, should be at least v2.*.*
5151
# update to the latest version if necessary
5252

53-
$ docker compose version
54-
Docker Compose version v2.29.1
53+
docker compose version
54+
# Docker Compose version v2.29.1
5555

5656
# login into eccenca docker registry
5757

58-
$ docker login docker-registry.eccenca.com
59-
Username: yourusername
60-
Password:
61-
Login Succeeded
58+
docker login docker-registry.eccenca.com
59+
# Username: yourusername
60+
# Password:
61+
# Login Succeeded
6262
```
6363

6464
## Installation
6565

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

68-
```
68+
```bash
6969
##
7070
# Host Database
7171
#
@@ -78,33 +78,33 @@ To install Corporate Memory, you need to modify your local hosts file (located i
7878

7979
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.
8080

81-
```
82-
$ cp YOUR_SE_LICENSE_FILE \
83-
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-se.license
81+
```bash
82+
cp YOUR_SE_LICENSE_FILE \
83+
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-se.license
8484
# or
85-
$ cp YOUR_EE_LICENSE_FILE \
86-
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-ee.license
85+
cp YOUR_EE_LICENSE_FILE \
86+
${HOME}/cmem-orchestration-VERSION/licenses/graphdb-ee.license
8787
```
8888

8989
Then change the file ```environments/config.env``` to use the correct version:
9090

91-
```
91+
```bash
9292
# Use Free, 'se' or 'ee' or adjust the mountpoint in
9393
# compose/docker-compose.store.graphdb.yaml
9494
GRAPHDB_LICENSE=se
9595
```
9696

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

99-
```
99+
```bash
100100
# Pulling the images will take time
101101

102-
$ make clean-pull-start-bootstrap
102+
make clean-pull-start-bootstrap
103103
```
104104

105105
You should see the output as follows:
106106

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

@@ -160,28 +160,28 @@ After successful login, you will see Corporate Memory interface. You can now pro
160160

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

163-
```
163+
```bash
164164
# assuming you are currently in the the cmem-orchestration folder
165-
$ mkdir -p data/backups/graphs data/backups/workspace
166-
$ chmod 777 data/backups/graphs data/backups/workspace
165+
mkdir -p data/backups/graphs data/backups/workspace
166+
chmod 777 data/backups/graphs data/backups/workspace
167167

168-
$ make backup
168+
make backup
169169
mkdir -p data/backups/keycloak
170-
Started Keycloak database backup to data/backups/keycloak/keycloak.sql ...
171-
Finished Keycloak database backup.
170+
# Started Keycloak database backup to data/backups/keycloak/keycloak.sql ...
171+
# Finished Keycloak database backup.
172172
mv data/backups/keycloak/keycloak.sql data/backups/keycloak/2024-07-26_14-15.sql
173173
ln -sf 2024-07-26_14-15.sql data/backups/keycloak/latest.sql
174174
mkdir -p data/backups/workspace
175175
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
176-
Export workspace to /data/backups/workspace/2024-07-26_14-15.zip ... done
176+
# Export workspace to /data/backups/workspace/2024-07-26_14-15.zip ... done
177177
ln -sf 2024-07-26_14-15.zip data/backups/workspace/latest.zip
178178
mkdir -p data/backups/python-packages
179179
zip -r data/backups/python-packages/2024-07-26_14-15.zip data/python-packages
180180
adding: data/python-packages/ (stored 0%)
181181
ln -sf 2024-07-26_14-15.zip data/backups/python-packages/latest.zip
182182
mkdir -p data/backups/graphs
183183
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
184-
Exporting graphs backup to /data/backups/graphs/2024-07-26_14-15.zip ... done
184+
# Exporting graphs backup to /data/backups/graphs/2024-07-26_14-15.zip ... done
185185
ln -sf 2024-07-26_14-15.zip data/backups/graphs/latest.zip
186186
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
187187
adding: data/backups/keycloak/2024-07-26_14-15.sql (deflated 82%)

docs/deploy-and-configure/installation/scenario-redhat-enterprise-linux-7/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This page describes a `docker compose` based orchestration running on RedHat Ent
1717

1818
Create a working directory for this scenario and inside the working directory `Vagrantfile` with the following contents:
1919

20-
```bash linenums="1"
20+
```ruby
2121
# -*- mode: ruby -*-
2222
# vi: set ft=ruby :
2323

@@ -47,8 +47,8 @@ end
4747

4848
Spin up the virtual machine:
4949

50-
```bash linenums="1"
51-
$ vagrant up
50+
```ruby
51+
vagrant up
5252
Bringing machine 'rhel7' up with 'virtualbox' provider...
5353
==> rhel7: Importing base box 'generic/rhel7'...
5454
==> rhel7: Matching MAC address for NAT networking...
@@ -86,7 +86,7 @@ Bringing machine 'rhel7' up with 'virtualbox' provider...
8686

8787
Now you can connect to the virtual machine using `~/.vagrant.d/insecure_private_key` ssh key:
8888

89-
```bash linenums="1"
89+
```bash
9090
# add vagrant ssh key to your keychain
9191
ssh-add ~/.vagrant.d/insecure_private_key
9292

@@ -99,7 +99,7 @@ ssh [email protected]
9999

100100
Install the necessary software Inside the virtual machine and download the Corporate Memory orchestration from [releases.eccenca.com](http://releases.eccenca.com/):
101101

102-
```bash linenums="1"
102+
```bash
103103
# switch to superuser
104104
sudo su
105105

@@ -135,8 +135,8 @@ chcon -Rt svirt_sandbox_file_t /opt/corporate-memory
135135

136136
Create `/opt/corporate-memory/environments/prod.env` file with the following contents:
137137

138-
```bash linenums="1"
139-
#!/bin/bash linenums="1"
138+
```bash
139+
#!/bin/bash
140140

141141
DEPLOYHOST=corporate.memory
142142
DEPLOYPROTOCOL=https
@@ -148,21 +148,21 @@ APACHE_CONFIG=default.ssl.conf
148148

149149
Login into eccenca docker registry:
150150

151-
```bash linenums="1"
151+
```bash
152152
docker login docker-registry.eccenca.com
153153
```
154154

155155
Provide a stardog license or request a trial license:
156156

157-
```bash linenums="1"
157+
```bash
158158
# check validity of your license
159-
$ make stardog-license-check
159+
make stardog-license-check
160160
docker run -it --rm --name stardog-license-check -v data:/data -v /opt/corporate-memory//conf/stardog/stardog-license-key.bin:/data/stardog-license-key.bin docker-registry.eccenca.com/complexible-stardog:v7.2.0-1 stardog-admin license info /data/stardog-license-key.bin
161161
The license is invalid: java.io.EOFException
162162
make: *** [custom.dist.Makefile:5: stardog-license-check] Error 1
163163

164164
# request stardog trial license
165-
$ make stardog-license-request
165+
make stardog-license-request
166166
docker run -it --rm --name stardog-license-check -v data:/data -v /opt/corporate-memory//conf/stardog/stardog-license-key.bin:/data/stardog-license-key.bin docker-registry.eccenca.com/complexible-stardog:v7.2.0-1 stardog-admin license request --force --output /data/stardog-license-key.bin
167167
Thank you for downloading Stardog.
168168
A valid license was not found in /data.
@@ -199,7 +199,7 @@ Email validated. You now have a 60-day Stardog trial license. Starting Stardog..
199199
Thank you!
200200

201201
# check the license again
202-
$ make stardog-license-check
202+
make stardog-license-check
203203
docker run -it --rm --name stardog-license-check -v data:/data -v /opt/corporate-memory//conf/stardog/stardog-license-key.bin:/data/stardog-license-key.bin docker-registry.eccenca.com/complexible-stardog:v7.2.0-1 stardog-admin license info /data/stardog-license-key.bin
204204
Licensee: Stardog Trial User ([email protected]), Stardog Union
205205
Version: Stardog *
@@ -212,7 +212,7 @@ Quantity: 3
212212
213213
Finally deploy the Corporate Memory instance:
214214
215-
```bash linenums="1"
215+
```bash
216216
# create local truststore
217217
CONFIGFILE=environments/prod.env make buildTrustStore
218218

@@ -226,7 +226,7 @@ You have successfully deployed a Corporate Memory instance.
226226
227227
On your localhost where you are running VirtualBox, modify /etc/hosts file:
228228
229-
```bash linenums="1"
229+
```bash
230230
echo "10.10.10.10 corporate.memory" >> /etc/hosts
231231
```
232232

0 commit comments

Comments
 (0)