A web-based UI utilising Streamlit to manage exposure data and run modeling workflows on the OasisLMF platform.
The current version of the UI contains the following pages:
/analyses- View and create portfolios and analyses./dashboard- View the output of completed analyses./simplified- Simplified UI which allows for the running of analyses using previously loaded portfolios & models.
gitdockerwith Compose v2 (docker compose)
Three modes are supported. Copy the matching environment template:
cp .env.simple .env # No OIDC — username/password login
cp .env.keycloak .env # Keycloak OIDC
cp .env.authentik .env # Authentik OIDCEdit .env to adjust the hostname, passwords, or image versions if needed.
This file tells the UI how to authenticate against the Oasis API backend.
Edit .streamlit/secrets.toml before running the installer — it is mounted
read-only into the UI container.
Simple auth:
auth_type = 'simple'
user = 'admin'
password = 'password'Keycloak or Authentik OIDC:
auth_type = 'oidc'
client_id = 'oasis-service'
client_secret = 'serviceNotSoSecret'The default hostname is ui.oasis.local. Add it to your hosts file so your
browser can resolve it:
echo "127.0.0.1 ui.oasis.local" | sudo tee -a /etc/hosts./install.shThe installer stages the model data for the selected model set, processes OIDC templates (if applicable), pulls the images, and starts all services. It will prompt before redeploying if a previous installation is detected.
| Option | Description |
|---|---|
-m, --model-set <name> |
Model set to deploy. Defaults to MODEL_SET from .env, or piwind. |
--build-ui |
Build the UI image locally instead of pulling PYTHONUI_IMG:VERS_UI. |
-u, --uninstall |
Bring the stack down and delete its volumes. |
-h, --help |
Show usage. |
To tear everything down (removes containers and volumes):
./install.sh --uninstallAll services are reachable on port 80 via Traefik after a successful install:
| Service | URL |
|---|---|
| UI | http://ui.oasis.local/ |
| API | http://ui.oasis.local/api/ |
| Keycloak Admin | http://ui.oasis.local/auth/ |
| Authentik Admin | http://ui.oasis.local/authentik/ |
- Bring down the current stack:
./install --uninstall
- Copy the new
.envtemplate and edit if needed:cp .env.keycloak .env
- Update
.streamlit/secrets.tomlto match if required (see step 2 of Quick Start). - Re-run the installer:
./install.sh
install.sh layers several Compose files into a single docker compose
command. The model workers live in a file of their own, so the core platform,
the UI and the auth stack stay model-agnostic:
Always loaded:
docker-compose.yml # Core platform: Traefik, server, websocket, databases, broker, filestore
docker-compose.models.<model-set>.yml # Model workers and model registration for one model set
docker-compose.ui.yml # Streamlit UI
Conditionally loaded:
docker-compose.keycloak.yml # Keycloak + its PostgreSQL DB (API_AUTH_TYPE=keycloak)
docker-compose.authentik.yml # Authentik + its PostgreSQL DB (API_AUTH_TYPE=authentik)
docker-compose.yml defines no model workers at all. Everything
model-specific is confined to a docker-compose.models.<model-set>.yml file:
- one worker service per model, carrying its
OASIS_MODEL_SUPPLIER_ID,OASIS_MODEL_ID,OASIS_MODEL_VERSION_IDandOASIS_RUN_MODE - the volume mount that supplies that model's data
- any
model-registrationjob needed to register the models with the API
Exactly one model set is loaded per deployment. Pick it with -m/--model-set,
or set MODEL_SET in .env so a bare ./install.sh deploys it:
./install.sh -m piwind # default: the PiWind demo model
./install.sh -m scenarios # PiWind plus the public scenario modelsModel sets shipped in this repository:
| File | Contents |
|---|---|
docker-compose.models.piwind.yml |
A model-registration one-shot and piwind-worker, with model data from ./OasisPiWind/. |
docker-compose.models.scenarios.yml |
piwind-worker plus the scenario workers (Impact Forecasting, JBA, ARA, IPE), with model data from ${SCENARIOS_PATH}. |
Because the split is by filename, adding a model set means dropping two new
files into the root directory — no edits to docker-compose.yml, install.sh
or the auth files:
- Write
docker-compose.models.<name>.ymlwith the worker services. The workers join the core stack, so they can depend onserver,celery-dbandbrokerand mount the sharedfilestore-datavolume directly. - Optionally add
get-<name>.shto fetch the model data (see below). - Deploy with
./install.sh -m <name>.
install.sh --uninstall passes every docker-compose.models.*.yml to
docker compose down, so the model workers are torn down whichever set was
deployed.
The Compose file describes how a model runs; the matching get-<model-set>.sh
puts its data on disk. Before bringing the stack up, install.sh runs
get-$MODEL_SET.sh if it exists, and otherwise assumes the data is already in
place.
| Script | What it does |
|---|---|
get-piwind.sh |
Clones OasisLMF/OasisPiWind at VERS_PIWIND into ./OasisPiWind/. No-ops once cloned. |
get-scenarios.sh |
Runs get-piwind.sh, clones OasisLMF/Scenarios into $SCENARIOS_PATH, then runs that repository's get_s3_data_reduced.sh to download the model files. Each step is skipped if it has already been done. |
The scripts are idempotent and safe to run on their own, which is the easy way to pre-stage model data on a server before deploying, or to refresh it without a redeploy:
SCENARIOS_PATH=/home/ubuntu/Scenarios ./get-scenarios.shWhen writing your own, keep it re-runnable: install.sh calls it on every
deploy, including redeploys over an existing installation.
| Variable | Description | Example |
|---|---|---|
API_AUTH_TYPE |
Auth mode: simple, keycloak, or authentik |
authentik |
OASIS_UI_HOSTNAME |
Hostname the UI and proxy listen on | ui.oasis.local |
OASIS_PROTOCOL |
http or https |
http |
VERS_API |
Oasis server image tag | 2.5 |
VERS_WORKER |
Oasis worker image tag | 2.5 |
VERS_UI |
Python UI image tag | latest |
See the .env.* templates for the full list with inline comments.
These variables decide what gets deployed and what the UI shows, rather
than how the platform is wired together. They are read straight from .env by
install.sh and the Compose files, and each falls back to the layout in this
repository — so a plain checkout still deploys unchanged with none of them set.
They are not in the .env.* templates; add the ones a deployment needs.
| Variable | Default | Purpose |
|---|---|---|
MODEL_SET |
piwind |
Which docker-compose.models.<name>.yml / get-<name>.sh pair to deploy. -m/--model-set overrides it for one run. |
SCENARIOS_PATH |
(unset) | Host directory holding the scenario model data. Required by the scenarios model set — both get-scenarios.sh and the worker mounts read it. |
UI_CONFIG |
./ui-config.json |
The UI's config file: pages, post-login page, model-to-exposure map, footer, and skip_login. |
UI_DEFAULTS |
./defaults/ |
Per-model default analysis settings the UI pre-fills when creating an analysis. |
UI_ASSETS |
./ui_assets/ |
Files UI_CONFIG refers to as ui_assets/<file> — footer text, logos, anything a deployment supplies. |
UI_STREAMLIT |
./.streamlit/ |
The Streamlit directory mounted read-only: secrets.toml and config.toml. |
PYTHONUI_IMG / VERS_UI |
coreoasis/oasispythonui_app / latest |
UI image pulled at deploy time, and the tag make build / make push produce. |
The default admin user (admin / password) is created automatically.
Additional users must be added via the Oasis API or admin interface.
Edit oidc/keycloak/users.yaml and re-run ./install.sh, or add users
through the Keycloak admin console at /auth/ (keycloak / password).
Edit oidc/authentik/users.yaml and re-run ./install.sh, or add users
through the Authentik admin console at /authentik/ (akadmin / password).
Usually first thing to try before anything is clearing browser cache/cookies for the hostname.
OIDC login redirects to the wrong URL
- Confirm
OASIS_UI_HOSTNAMEin.envmatches the hostname you use in the browser. - Confirm the same hostname resolves locally (check
/etc/hosts).
UI cannot reach the API
- Verify Traefik is running:
docker compose ps traefik. - Check that the server container is healthy:
docker compose ps server. - Inspect Traefik routing logs:
docker compose logs traefik.
Keycloak / Authentik container unhealthy
- Check logs:
docker compose logs keycloakordocker compose logs authentik-server. - The IdP database container must be healthy first:
docker compose ps. - First startup can take 2–3 minutes while blueprints and realms are imported.
install.sh exits with no model set '<name>'
- The model set has no
docker-compose.models.<name>.ymlin the root directory. Check the spelling of-m/--model-setorMODEL_SET.
Logs and status
docker compose ps # service health
docker compose logs -f <container_name> # UI logs- The
.envtemplates andusers.yamlfiles ship with demo credentials. Change all passwords before any non-local deployment.
The public site is at https://ui.oasislmf-scenarios.com/ Default scenarios in the tool are processed/hosted at https://github.com/OasisLMF/Scenarios
