# Company demo deployment

The company demo runs a locally built Linux AMD64 TestDataPlus Suite on OpenShift. Java sign-in
runs in its own Deployment. External Oracle holds the Suite application schema and serves as
the export target.

## Deployment decisions

- Use the `tdp` project on `https://api.cloud-tst.equateplus.net:6443`. Run the company commands
  from `~/tdp` on the company host, one folder per release.
- Deploy the Suite image from `build.equateplus.net:49096/library`. Use the existing `default`
  service account with its Nexus pull credentials. The package tags the Suite and Java sign-in
  images with the same release, and every update applies both.
- Keep three manifests. The setup template creates the Secrets once with `oc create`. The
  workload file has no parameters and is applied unchanged for every release. The Routes file
  is created once from a private copy with the certificates.
- Use the existing Oracle PDB and one schema owner, `TDP1` by default. The Suite uses
  `single-schema` layout and creates its own tables, sequences and triggers in that schema.
  The Secret `tdp-company-demo-oracle` holds the Oracle Thin JDBC URL as `url`, the user as
  `user` and the password as `tdp.db.password`.
- Register the Oracle source under **Sources** and the export target under **Test databases**,
  each with its own login and the [database account grants](#oracle-accounts).
- Reuse `https://tdp-bt1.cloud-tst.equateplus.net/` and
  `https://tdp-login-bt1.cloud-tst.equateplus.net/`. The workload file and the Routes file both
  name them. Both edge Routes select the `http` Service port `8080`, which targets pod port
  `8080`. The OpenShift router terminates HTTPS.
- Keep the ingress policies on port `8080`. The router peer uses the namespace selector
  `policy-group.network.openshift.io/ingress: ''` by itself. Suite back-channel access to
  sign-in uses the Suite pod selector on port `8080`.
- Demo logins use `<login>.42`, for example `admin` with `admin.42`. The optional entries in
  `tdp-company-demo-users` override individual passwords. The setup template generates the
  Suite key and OAuth client Secrets. Preserve their exact values and the Route certificates
  when reusing an installation.
- Oracle holds persistent application data. The pods use `emptyDir` for runtime files, logs,
  swap and the sign-in key. The Suite requests 8 GiB memory and 11 GiB ephemeral storage.
- Container logs rotate at 10 MB and keep at most 20 MB of archives per service, so all
  services fit the 256 MiB log volume. Read them with `oc logs`.

## Oracle accounts

The DBA creates the accounts with the grants in [database accounts](database-accounts.md):

| Account | Grants |
| --- | --- |
| Suite user, `TDP1` by default, in the Suite PDB | [Application database](database-accounts.md#application-database) |
| Read-only login for the company source | [Source account](database-accounts.md#source-account) |
| Export login with its own schema | [Target account](database-accounts.md#target-account) |

Use a target database ID different from the source. Keep the Suite metadata schema for
TestDataPlus.

## Release and handoff

Run `components/suite/scripts/company-demo/build` from the repository root. It builds a clean
clone of the committed `HEAD`, never the working tree. Release versions advance as
`0.3.0-r13`, `0.3.0-r14` and so on. The command records the current and next numbers in
`company-demo-releases.md` and writes the source revision and image checksums to the
verification log.

The exact Suite and sign-in images start on fresh Oracle 19c, PostgreSQL and Oracle 26ai
databases. Each startup must reach readiness with zero column drops. The release manifest
records the database versions and image IDs. When the company requests Oracle 19c first,
the package is available after the Oracle 19c and PostgreSQL checks. The build then puts
the Oracle 26ai result in `oracle26-startup.json` beside the same ZIP.
The command copies the complete release ZIP, the individual release files and their checksums
into one numbered folder under `/Volumes/raspberry/nginx/static/public/download/tdp/`. It verifies
the copy before recording the handoff. The release holds no Oracle values; they are set once on
the company host.

Use the [OpenShift runbook](openshift-company-demo.md) to publish, install, update and verify.
Update these decisions and the manifests together when the company deployment changes.
