blob: 46d17d4e4b476d7baaec1078d3bfde127396c4a3 [file] [log] [blame]
////
******************************************************************************
* Copyright 2018 Mettenmeier GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*
******************************************************************************
////
= openKonsequenz "StandbyPlanning" - How to configure the module
:Date: 2018-06-07
:Revision: 1
== Keycloak
Define the following client(s), roles and users.
.create keycloak client
[source]
standbyplanning
.create keycloak client roles
[source]
BP_Admin
BP_Gruppenleiter
BP_Leseberechtigte
BP_Sachbearbeiter
.create keycloak user
[source]
user= bp_leser pwd= mm
user= bp_leiter pwd= mm
user= bp_bearbeiter pwd= mm
user= bp_admin pwd= mm
== Datenbank (Postgres)
A postgres database and a user should be created. All the needed tables and sequences will be genreated bei the "Standby Planning" backend (spbe).
.user
[source]
-- Role: bp
-- DROP ROLE bp;
CREATE ROLE bp LOGIN
ENCRYPTED PASSWORD 'md5b03632e190331f379668603ee46d4772'
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
.database
[source]
--CREATE DATABASE "BP"
WITH OWNER = bp
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;
== oK Auth2Auth core module
The frontend and backend of the auth2auth modul has to be put in the webapps folder. In this case portal.war file and portalFE folder has to be put there.
[source]
webapps/portal.war
webapps/portalFE
Configure the portalFE url to your local environment. For more details see the dcumentation of the auth2auth core-module.
[source]
webapps/portal/WEB-INF/classes/backendConfigProduction.json // URL to keycloak
webapps/portal/WEB-INF/classes/moduleConfigDevLocal.json // Modulconfiguration Dev
webapps/portal/WEB-INF/classes/moduleConfigProduction.json // Modulconfiguration Prod
In out case is the following module entry needed:
[source]
{
"name": "Bereitschaftsplanung",
"cols": 1,
"rows": 1,
"color": "#ffffff",
"link": "https://localhost:8080/spfe",
"pictureLink": "https://www.openkonsequenz.de/medien/cache/main_image/l_bereitschaftsplan_57882047.jpg",
"requiredRole": "planning-access"
}
=== server.xml
The following Resources has added to the *<GlobalNamingResources>* section of the tomcat server.xml.
[source, xml]
<!--BP resource-->
<Resource auth="Container"
driverClassName="org.postgresql.Driver"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" maxActive="20"
minIdle="5" name="jdbc/BP" password="bp" type="javax.sql.DataSource"
uniqueResourceName="bp" url="jdbc:postgresql://localhost:5432/BP"
username="bp" />
== define Keycloak URL
Define the URL to your openkonsequenz auth2auth modul. For your local development you can use http instead of https.
.change url in spfe/main*.js
[source]
loginPage:"https://localhost:8080/portalFE/#/login"
Define the base URL of the frontend application.
.change url in spfe/main*.js
[source]
basePath:"https://localhost:8080/spbe/webapi"
== Setup the Application Standbyplanning
You need to build the standbyplanning forntend and backand. Then you will have two *.war files.
[source]
spfe.war
spbe.war
Both war files schold be placed