Table of Contents generated with DocToc
Documentation is WORK IN PROGRESS
SAP Cloud Platform deployable Keycloak secured system that deploys multiple microservices that takes advantage of the built in search index, geospatial and text analysis libraries in SAP HANA as well as manage SAP Cloud Platform Workflows for visitor management
- For deployment on SAP Cloud Platform, a configured CloudFoundry cli with access to a user or trial account
- For deployment on SAP Cloud Plaform, Keycloak requires a hosted Postgresql backend. Project built with free tier instance from Amazon RDS
- Registration email feature in Keycloak requires a sendmail server. Project built with Amazon SES
- nodejs environment
- To take advantage of the simplified project deployment scripts you need the following environment variables set. Below are are example values only
export CP_USER=i999111
export CP_PASSWORD=MyAccountPassword55
export PG_ADDR=cp-rtwp.random-string-text.us-east-1.rds.amazonaws.com
export PG_PASSWORD=WholeBunchOfCharacters
export KEYCLOAK_URL=https://keycloak-server.com/auth
-
Deployed with
cf-keycloak.sh
- Default vendor, user and database are all
postgres
PG_ADDR
variable is just the hostname or ip address:sample-app.abcdefg.us-east-1.rds.amazonaws.com
- Default vendor, user and database are all
-
Keycloak security is disabled by default. Changing the environment variable to true enables integration
- Requires a PostgreSQL backend.
This project was developed with a free tier Amazon RDS instance.
- Run the build script to copy over the custom CoreUI based theme
cd keycloak
./docker-build.sh
- Update
keycloak/docker-run.sh
to have the values for your PostgreSQL instance.PG_ADDR
andPG_PASSWORD
are externalized to environment variables to avoid being checked into source control
cd keycloak
./docker-run.sh
- Make sure the keycloak container is running. Get the id of the running container from this command
docker ps -f ancestor=quay.io/mechevarria/keycloak-coreui | awk '{print $1}'
- Copy the over the theme directory from the container by replacing
$container
with the value from the previous command. The system themes are automatically ignored by git
docker cp $container:/opt/jboss/keycloak/themes keycloak/
- Build a development image (turns off caching of pages)
cd keycloak
./docker-build-dev.sh
- Run the development image (mount the local themes directory)
cd keycloak
./docker-run-dev.sh
- Changes made locally to
keycloak/themes
will be seen when you refresh server pages in your browser.
- Deployed with
cf-db.sh
- A container named
hdi-hana-deployer
will be created in SAP Cloud Platform to deploy the hana database, populate data and create tables, indexes, etc. The container will then be stopped once complete
Requires the SAP HANA database container to be deployed. Local development requires the SAP HANA host to whitelist external addresses
- Inside the
rtwp-api
run the following to install all dependencies
npm install
- Start a development server with changes hot deployed
cd rtw-api
npm install
./local-run.sh
The one parameter to the deployment script is the prefix. Example: prod
or mechevarria
- Deployed with
./cf-express-api.sh mechevarria
- Change the
KEYCLOAK
environment variable to true to enable sso integration
Requires the Express container to be deployed
cd rtwp-admin
npm install
./local-setup.sh
npm run serve
- The server will be running on http://localhost:4200
npm run build
You can create an account for free at SAP Cloud Platform
-
Make sure you have the Cloud Foundry Command Line Interface (cf CLI) installed
-
Update the
cf-login.sh
script with the values found in the SAP Cloud Foundry Cockpit. Then run the script to login. The one parameter to the script is the space your want to login to. Examplertwp-dev
./cf-login.sh rtwp-dev
- Push your code directly without the need of a container registry with the following commands (make sure you have done a build ahead of time). The one parameter to the script is a prefix for the app name. Example
prod
ormechevarria
for development
./cf-rtwp-admin.sh mechevarria
- You will find a url to your deployed application in the SAP Cloud Foundry Cockpit.
- Vue cli used to generate this project
- Style Guide for Vue. Attempting to follow as best as possible
- CoreUI Bootstrap theme
- Bootstrap-Vue components
- Vue Router for view management
- Vuex for state management
- vue-mobile-detection for checking mobile state
- axios as http client
- vue-keycloak-js for SSO integration
- Vue2Leaflet map integration