Sign inSign up

atlasplatformdocker/rta-sessionsvc

By atlasplatformdocker

Updated 11 months ago

Image
0

434

atlasplatformdocker/rta-sessionsvc repository overview

RTA Session Service

This service is part of the RTA Toolkit Services suite.

It manages a PostgreSQL database of sessions, which are data sets — like files — that can be opened in McLaren ATLAS.

It exposes a GRPC interface to define and manage sessions from your environment, and an outward-facing REST interface to be exposed to users via the Gateway Service.

This service is available as a binary for Windows and Linux, and as a Docker image.

Usage

Docker
docker run --rm \
  -e "RTA_PostgresConnectionString=Server=mydbhost;Port=5432;Database=postgres;User Id=postgres;Password=hunter2;" \
  -e RTA_PostgresSchema=rta_sessions \
  -p 2650:2650 -p 2651:2651 -p 2652:2652 \
  mclarenapplied/rta-sessionsvc
Command Line
rta-sessionsvc --PostgresConnectionString "Server=mydbhost;Port=5432;Database=postgres;User Id=postgres;Password=hunter2" --PostgresSchema rta_sessions

Setup

Unlike RTA Server (rta-server), this service will not automatically create or upgrade the database schema. This ensures that any upgrade is applied in controlled circumstances, and with different credentials if desired.

To configure the database, launch the service with the --InitStoreAndExit=true command line argument in addition to the other arguments or environment variables. The service will run and exit.

!!! tip This can also be accomplished from Docker by opening a shell on the container and running:

`/app/rta-server --InitStoreAndExit=true`

assuming that the other configuration is present in environment variables.

Restart any running services after applying the change.

Ports

PortProtocolUsage
2650HTTPExpose to ATLAS via Gateway Service
2651HTTPSExpose to ATLAS via Gateway Service
2652GRPCExpose within local environment

Monitoring

HTTP GET / : Returns 200 OK and reports the software version. In Kubernetes, use this for liveness probes.

HTTP GET /health : Returns 200 OK if the service is up and PostgreSQL is accessible.
In Kubernetes, use this for readiness probes.

HTTP GET /metrics : Prometheus metrics, including the health check status.

Configuration

Options can be set using both environment variables and command line arguments, or by the provided appsettings.config JSON configuration file.

Environment variables are all prefixed with RTA_, and can be written in ALLCAPS or MixedCase.
For example, PostgresSchema is RTA_POSTGRESSCHEMA or RTA_PostgresSchema.

For Linux and on Kubernetes, also replace : with __.
For example, Category:Item is RTA_CATEGORY__ITEM.

OptionValueRequiredDefault
PostgresConnectionStringDatabase connection stringyes
PostgresSchemaDatabase schema namenorta_sessions
PostgresConnectionTimeoutTime (ms) to wait for a connectionno60000
Init Store

InitStoreAndExit=true will cause the service to initialize PostgreSQL and exit immediately. This enables the service to be used to setup or upgrade the environment.

OptionValueRequired
InitStoreAndExittrue or falseno

See Setup notes, above.

Authentication and Authorization

These options enable OAuth 2.0 support. This service is intended to run within a private network, behind the Gateway Service, which will forward the Bearer token if present.

OptionValueRequired
EnableAuthtrue or falseno
Auth:AuthorityOAuth2 authorization serverif EnableAuth=​true
Auth:AudienceOAuth2 audienceif EnableAuth=​true

Tag summary

Content type

Image

Digest

sha256:dd5d37531

Size

126.9 MB

Last updated

11 months ago

docker pull atlasplatformdocker/rta-sessionsvc