66---
77# Graph Insights
88
9- ## OAuth configuration
109
11- Graph Insights requires authentication similar to Explore and Build (DataIntegration).
12- There is the need for a client to authenticate in a browser and a second client to allow inter-component communication.
10+ ## Resource consideration
1311
14- For convenience, by default we use the same clients as for the rest of the application:
12+ Please refer to [ Graph Insights Sizing ] ( ../../../deploy-and-configure/requirements/graph-insights-sizing.md ) for more information.
1513
16- - Client for browser: cmem
17- - Client for component communication: cmem-service-account
1814
19- In case you want to have separate clients for production deployments, have a look at the end of this file.
15+ ## Enable Graph Insights
2016
21- ## Resource consideration
17+ ### (a) Enable in docker-compose deployment
18+
19+ In our Corporate Memory docker-orchestration all main configurations can be directed by setting environment
20+ variables in ` environments/config.env ` .
21+ You can find the environments are set as usual in ` environments/default.env ` and ` environments/config.env ` .
22+
23+ Add your license to ``` licenses/graphinsights.lic ``` then start the extension on a already running Corporate Memory
24+ deployment.
25+
26+ ``` console
27+ mkdir licenses
28+ ln -s your-license-file.lic graphinsights.
29+ make enable-extension EXTENSION=graphinsights
30+ ```
31+
32+ Please also have a look at ` extensions/README.graphinsights.md ` .
33+
34+ ### (b) Enable in helm deployment
35+
36+ In helm based deployment you can enable Graph Insights by enable it in your value file.
37+ It creates a new StatefulSet.
38+ Preemptive you have to create a secret containing your license file.
39+
40+ ``` console
41+ - "kubectl -n cmem create secret generic graphinsights-license --from-file your-graphinsights.lic
42+ ```
43+
44+ This enables the plugin.
45+
46+ ``` yaml
47+ graphinsights :
48+ enabled : true
49+ ` ` `
50+
51+ All needed configuration can be done in the Corporate Memory helm chart ` value.yaml` file.
52+ The configuration mentioned below is rendered with those files, but you usually don't have to touch those :
53+
54+ - ` configuration-files/explore-application.yml` for Explore
55+ - ` configuration-files/cmem.integration.config.yml` for Graph Insights
56+
57+ For more details please have a look in the helm value file.
58+ Every configuration is documented there.
59+ Please refer to [Kubernetes deployments](../../../deploy-and-configure/installation/scenario-k8s-deployment/index.md) for more information.
2260
23- Please refer to [ Graph Insights Sizing] ( ../../../deploy-and-configure/requirements/graph-insights-sizing.md ) for more information.
2461
62+ # ## Activate and verify the installation
63+
64+ Fist you have enable the Graph Insight in your Explore workspace. By default ist is disabled.
65+
66+ 
67+
68+ Then you are able to create a snapshot, send it to Graph Insights and select the Graph Insights tab in explore.
69+
70+ 
71+
72+ 
73+
74+
75+
76+ # # Configuration
77+
78+ This section explains the basic configuration of Graph Insights. Since Graph Insights is an application integrated
79+ into explore, we need to have to configure Explore for the integration and Graph Insights as application itself.
80+
81+ The following chapters explain the configuration in case you want to change the default behavior.
82+
83+ While the extension in the docker-orchestration it is enabled through Spring profiles, we just use the benefits of
84+ templating in helm and only use one profile.
85+
86+ This is why the configuration differs in both deployments, but we tried to use the same variable names and configuration
87+ snippets.
2588
2689# ## Explore configuration
2790
28- The following two sections are needed for enabling Graph Insights inside Explores configuration.
29- In the docker orchestration it is enabled through profiles while in helm we just use one profile.
30- We there use helm templating mechanism to render it into the default profile.
91+ In our **docker-orchestration** you find the file which is loaded as `graphinsight` profile
92+ at `conf/explore/application-graphinsights.yml`.
93+ Environment variables as usual can be found in `environments/default.env` and `environments/config.env`.
94+ Sizing can be changed in the loaded memory profile, e.g. at `environments/config.mem.16g.env`.
95+ The deployment definition for explore with the extension is defined `extensions/docker-compose.graphinsights.yml`
96+ in the explore service.
97+
98+ In **helm deployments** you find the needed section inside the `.Values.graphinsights.enabled` in file
99+ at `configuration-files/explore-application.yml`, where most of the configuration is inserted with GO-templates.
100+ Some environment variables are set in the `value.yaml` and rendered in a ConfigMap `templates/explore-configmap.yaml`.
31101
32102` ` ` yaml
33103spring.security.oauth2.client.registration.explore-service:
@@ -53,66 +123,123 @@ semspect:
53123 semspect-dataplatform-url: http://explore/dataplatform
54124` ` `
55125
126+ # ## Graph Insights configuration
56127
57- #### (a) helm configuration
128+ Graph Insights, like Explore, is a Spring Boot application, so it gets configured with environment variables and a YAML
129+ file.
58130
59- In helm based deployment you can enable Graph Insights by enable it in your value file.
60- Preemptive you have to create a secret containing your license file.
131+ In our **docker-orchestration** you find the file at `conf/graphinsights/cmem.integration.config.yml`.
132+ Environment variables as usual can be found in `environments/default.env` and `environments/config.env`.
133+ Sizing can be changed in the loaded memory profile, e.g. at `environments/config.mem.16g.env`.
134+ The deployment definition of the extension is defined `extensions/docker-compose.graphinsights.yml`.
61135
62- ` ` ` console
63- - " kubectl -n cmem create secret generic graphinsights-license --from-file your-graphinsights.lic
64- ```
65136
66- This enables the plugin.
137+ In **helm deployments** you find the file at `configuration-files/cmem.integration.config.yml`, which is rendered as
138+ ConfigMap and then mounted into the Graph Insight StatefulSet.
139+ Environment variables are set in the `value.yaml` and rendered in a ConfigMap `templates/graphinsights-configmap.yaml`.
140+ Sizing regarding memory, CPU or disk usage are configured in the `value.yaml`.
67141
68142` ` ` yaml
69- graphinsights:
70- enabled: true
71- ```
72-
73- All needed configuration can be done in the Corporate Memory helm chart `value.yaml` file.
74- The configuration mentioned above is rendered with those files, but you usally don't have to touch those:
143+ ---
144+ # for descriptions of the properties s. the same file in https://gitlab.eccenca.com/devops/eccenca-graphinsights-docker
145+ semspect:
146+ extensions: cmem
147+ extension.cmem:
148+ baseUri: "${DEPLOY_BASE_URL}"
149+ authorization:
150+ cacheDuration: 60
151+ core:
152+ enableCaptionPropertySelection: false
153+ enableDescriptionPropertySelection: false
154+
155+ frontend:
156+ appNameOverride: "Graph Insights"
157+ enableLogo: false
158+ enableAboutWindow: false
159+ singleDatabaseMode: true
160+ enableIframeOnlyMode: true
161+ enableCopyDeepLink: false
162+ fontFamily: "Roboto, helvetica, arial, sans-serif"
163+ fontFace: >
164+ @font-face {
165+ font-family: 'Roboto';
166+ font-style: normal;
167+ font-weight: 400;
168+ src: url('https://eccenca.com/layouts/default/fonts/roboto-v20-latin-regular.woff2') format('woff2');
169+ }
170+
171+ trustedOrigins:
172+ - "${DEPLOY_BASE_URL}"
173+ - "${DEPLOY_BASE_URL}/*"
174+
175+ backlink:
176+ objectURLTemplate: ${DEPLOY_BASE_URL}/{workspaceID}/explore?resource={objectID}&graph={contextGraphIRI}
177+ categoryURLTemplate: ${DEPLOY_BASE_URL}/{workspaceID}/explore?type={categoryID}&graph={contextGraphIRI}
178+ objectBacklinkDestination: "CMEM"
179+ categoryBacklinkDestination: "CMEM"
180+ multiObjectBacklinkDestination: "CMEM"
181+ debug: true
182+ logLevel: DEBUG
183+
184+ # secure /api/** via resourceserver
185+ spring.security.oauth2:
186+ resourceserver:
187+ jwt:
188+ jwk-set-uri: "${OAUTH_JWK_SET_URL}"
189+ # semspect backend for frontent as oauth2client
190+ # To enable SLO add this as back-channel logout uri to the client semspect uses:
191+ # http://docker.localhost/graphinsights/logout/connect/back-channel/keycloak
192+ client:
193+ registration:
194+ keycloak:
195+ client-id: "${GRAPHINSIGHTS_OAUTH_CLIENT_ID}"
196+ authorization-grant-type: "authorization_code"
197+ client-authentication-method: "client_secret_basic"
198+ # not needed here because we never login to semspect directly
199+ redirectUri: "${DEPLOY_BASE_URL}/graphinsights/login/oauth2/code/{registrationId}"
200+ # openid is mandatory as spring somehow does not add it to the userinfo request
201+ scope:
202+ - openid
203+ - profile
204+ - email
205+ # service account used for datastore access
206+ semspect-service:
207+ client-id: "${GRAPHINSIGHTS_OAUTH_SERVICE_CLIENT_ID}"
208+ client-secret: "${GRAPHINSIGHTS_OAUTH_SERVICE_CLIENT_SECRET}"
209+ authorization-grant-type: client_credentials
210+ provider: keycloak
211+ provider:
212+ keycloak:
213+ issuer-uri: "${OAUTH_ISSUER_URL}"
214+ user-name-attribute: "preferred_username"
215+
216+ # same (fixed) session timeout as explore backend
217+ server.servlet.session.timeout: "36000s"
218+ server.frame.ancestors: "${DEPLOY_BASE_URL}"
219+
220+ logging:
221+ level:
222+ root: DEBUG
223+ org.springframework: WARN
224+ org.springframework.security: WARN
225+
226+ pattern:
227+ console: "%d{yyyy-MM-dd'T'HH:mm:ss.SSSX,UTC} %-5level %logger{15} - %message%n%xException"
75228
76- - `configuration-files/explore-application.yml` for Explore
77- - `configuration-files/cmem.integration.config.yml` for Graph Insights
229+ ` ` `
78230
79- For more details please have a look in the helm value file.
80- Every configuration is documented there.
81- Please refer to [Kubernetes deployments](../../../deploy-and-configure/installation/scenario-k8s-deployment/index.md) for more information.
82231
83- #### (b) docker-compose configuration
232+ # # OAuth configuration
84233
85- In our Corporate Memory docker-orchestration all main configurations can be directed by setting environments
86- variables in `environments/config.env`.
87- You can find the environments are set as usual in `environments/default.env` and `environments/config.env`.
234+ Graph Insights requires authentication similar to Explore and Build (DataIntegration).
235+ There is the need for a client to authenticate in a browser and a second client to allow inter-component communication.
88236
89- ``` Makefile
90- ###########################
91- # GRAPH-INSIGHTS SETTINGS #
92- ###########################
93- GRAPHINSIGHTS_JAVA_TOOL_OPTIONS=" -XX:UseSVE=0"
94-
95- # This is the client the user uses to login to Graph Insights in browser
96- # for convenience we use the same as CMEM client
97- # GRAPHINSIGHTS_OAUTH_CLIENT_ID=graph-insights
98- GRAPHINSIGHTS_OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
99-
100- # This is the client ID for the Graph Insights service account but not used
101- # due to convienience we use the same as CMEM service account
102- GRAPHINSIGHTS_OAUTH_SERVICE_CLIENT_ID=graph-insights-service-account
103- GRAPHINSIGHTS_OAUTH_SERVICE_CLIENT_SECRET=changeme
104-
105- GRAPHINSIGHTS_SERVER_PORT=8080
106- GRAPHINSIGHTS_SERVER_SERVLET_CONTEXT_PATH=/graphinsights
107- # in case of subdomain this have to be adjusted.
108- GRAPHINSIGHTS_SERVER_FRAME_ANCESTORS=${DEPLOY_BASE_URL}
109- GRAPHINSIGHTS_LOGGING_LEVEL_ROOT=DEBUG
110- ```
237+ For convenience, by default we use the same clients as for the rest of the application :
111238
112- These are used in the configuration files in ` conf/explore/application-graphinsights.yml ` for Explore settings and
113- ` conf/graphinsights/cmem.integration.config.yml ` for Graph Insights settings.
239+ - Client for browser : cmem
240+ - Client for component communication : cmem-service-account
114241
115- The deployment definition can be found here ` extensions/docker-compose.graphinsights.yml `
242+ In case you want to have separate clients for production deployments, have a look at the end of this file.
116243
117244
118245# # Using separate OAuth clients for Graph Insights
0 commit comments