Odyssey
Odyssey Documentation

Parent: ../README.md "Overview README.md"

Application Layer

The Odyssey application is comprised of the components listed below. These components are grouped into services and tasks, which will be discussed in detail later in this document.

  1. Public facing web service for online banking - app/web.
  2. Scheduling service for cron based job dispatch - sched.
  3. Infrastructure components used for internal admin and support...
    1. Authentication - auth.
    2. Database Admin...
      1. PGWeb - pgweb.
      2. DBAdmin - dbadmin.
    3. SSL Redirection - sslredirect.
  4. Backend...
    1. Postgres: RDS based in AWS, Docker based in dev.
    2. File system storage: EFS based in AWS, PROJECT/home in dev.
    3. OAuth2 Validation: GitHub for AWS, disabled in dev.

Services

A service is a high level grouping of containers, tasks or 3rd party services such as AWS's RDS.

A service can contain multiple containers so long as each container shares the same scalability patterns. For example, a service housing a stateless web container might expect to handle fluctuating load based on user traffic. As such, it will likely run at indeterminate scale and lifetime. The service manager (ECS) may start and stop containers dynamically based on load. Any containers that coexist in such a service must be tolerant to the same conditions. You would not, for example, mix stateful and stateless containers, or internal and external services that don't share linkage.

Application Services

App Service

The app service contains the Odyssey business logic, including for management tools such as monitor. It is comprised of several containers as shown here..

Application Container

Web Container

The web container runs Member, Admin and Monitor subsystems. It uses PHP 7 and the Apache web server. There is also some Perl code to communicate with the core appliance.

Web code and assets are stored in the app/web folder of the project. The Dockerfile templates used for constructing the web container are two-fold; The base Dockerfile describes the components used by both the web dockerfile, test dockerfile and sched dockerfile. When a component is intended for use by unittests and the web runtime, it should be located in the base Dockerfile, otherwise, the alterations should be placed in the more specific Dockerfile.

Apache and PHP configuration are kept in the app/conf folder. They use a similar inheritance scheme as the base/web/test dockerfiles.

It follows that Apache and/or PHP configuration which applies to both web and test is located in app/conf/base/apache2 and app/conf/base/php respectively. Likewise there is a web specific conf folder at app/conf/web and test specific folder at app/conf/test.

SSL Redirect Service

This service has one simple goal: to redirect unencrypted HTTP requests to the HTTPS port of the same name and path. There is no business logic in this service and it has no links to any other service making it a very secure method for directing insecure traffic to its more secure counterpart.

Backend Services

The backend services vary depending on where Odyssey is running. For development stacks (ones that typically run on a workstation) the services are either running in Docker or are emulated through other means.

  1. Database:
  2. Shared File System (/home):
    • DEV: The home subfolder of the project is shared via a docker host-volume-mount.
    • AWS: EFS
  3. Authentication (/_restricted):
    • DEV: disabled by default.
    • AWS: OAuth2 via GitHub (infrastructure members only)

Development DB Container - Notes

The database container is based on the official PostgreSQL docker container.

Core schema and initial values for the DB are kept in lexicographically sorted files in the db/initdb.d folder. When a fresh DB container is started it will load any .sql files placed in this folder to bootstrap the database.