Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Pre-requisites: Gradle, Docker, Java 17, Windows Subsystem for Linux (Ubuntu).

Java 17 needs to be installed on WSL as it won't always pick up your Windows Java installation.

You also need the file .dcb.sh which should look like this and be in /scripts:

#!/bin/bash
export KEYCLOAK_BASE="https://reshare-hub-kc.libsdev.k-int.com/realms/reshare-hub"

export KEYCLOAK_BASE="https://keycloak.sph.k-int.com/realms/dcb-hub"
export KEYCLOAK_CERT_URL="$KEYCLOAK_BASE/protocol/openid-connect/certs"
export KEYCLOAK_CLIENT="****"
export KEYCLOAK_SECRET="****"
export DCB_ADMIN_USER=testadmin
export DCB_ADMIN_PASS=testadminpassforresharedcb354
export DCB_STD_USER=teststduser
export DCB_STD_PASS=teststduserpassforresharedcb354

export HOSTS_SANDBOX_CLIENT_KEY="tEnkm/Ty7PrSq5/eig+GQzsBZXLV"
export HOSTS_SANDBOX_CLIENT_SECRET="****"
export HOSTS_SANDBOX_CLIENT_INGEST="false"

export HOSTS_KCTOWERS_CLIENT_KEY="****"
export HOSTS_KCTOWERS_CLIENT_SECRET="****"
export HOSTS_KCTOWERS_CLIENT_INGEST="false"

export HOSTS_STLSANDBOX_CLIENT_KEY="****"
export HOSTS_STLSANDBOX_CLIENT_ID="DCB"
export HOSTS_STLSANDBOX_CLIENT_DOMAIN="STLOUIS"
export HOSTS_STLSANDBOX_CLIENT_USERNAME="SLCLReshare"
export HOSTS_STLSANDBOX_CLIENT_PASSWORD="1640RSMobius"

export DEVTESTUSER1="dcbtestuser1"
export DEVTESTPASS1="dcbtestpass1"

Steps

  • Checkout DCB from its repo and make sure you create the .dcb.sh file from above.

  • Presuming WSL is set-up and you have installed Java 17, enter Bash and do the following:

export PATH="/usr/lib/jvm/java-17-openjdk-amd64/bin/java:$PATH"
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"

  • Make sure docker is running, and then run ./scripts/run_dev_server.sh to start the dev server.

There is an issue on Windows where the line endings of the scripts can get changed to CRLF and thus cause Bash errors when trying to run them.

To rectify, use Notepad++ to get them back to UTF-8. dos2unix can also help with this problem.

Other useful info

./bootstrap-dev.sh will populate the DB.
./gradlew clean check will run the tests.

As per Marc Johnson's comment, the dcb.sh file is only needed for scripts - e.g. to run the server locally with a particular configuration.

  • No labels