Skip to content

Environments

Ops Atlas manages Docker containers across multiple environments. Each environment represents a deployment target — typically QA, Stage, and Prod.

Environment Model

Every environment is defined by the following properties:

PropertyDescriptionExample
codeUnique identifier (lowercase)qa, stage, prod
displayNameHuman-readable labelQA Environment
hostsArray of Docker host entriesSee below
dockerPortDocker daemon port2375 (default)
sshUserSSH user for remote operationsdeploy
composeDirectoryPath to compose files on host/opt/docker/compose

Host Configuration

Each environment contains one or more hosts:

yaml
hosts:
  - hostname: qa-host-01
    ip: 10.0.1.10
    enabled: true
  - hostname: qa-host-02
    ip: 10.0.1.11
    enabled: false

Setting enabled: false temporarily excludes a host from operations without removing its configuration.

Setup

Environments can be configured in two ways:

1. Setup Wizard

On first launch, the setup wizard walks you through creating your initial environments. This is the recommended approach for new installations.

2. Settings Page

Navigate to Settings > Environments to add, edit, or remove environments after initial setup. Requires the ADMIN role.

WARNING

Changing environment configuration on a running system takes effect immediately. Verify SSH connectivity before saving changes.

How Connections Work

The backend connects to Docker hosts over SSH:

  1. Ops Atlas opens an SSH connection to the host using the configured sshUser
  2. Commands are executed against the Docker daemon on dockerPort
  3. Container state, logs, and stats are streamed back to the frontend
Browser → Ops Atlas Backend → SSH → Docker Host (port 2375)

INFO

SSH key-based authentication is required. Password authentication is not supported. Ensure the sshUser has access to the Docker socket on each host.

API

GET /api/environments          # List all environments
GET /api/environments/{code}   # Get a single environment

Environments are also referenced by code in other API calls:

GET /api/services/{env}        # List containers in an environment
POST /api/deployment/deploy    # Deploy to a specific environment

Backend Configuration

Environments are persisted in PostgreSQL and can also be seeded via application.yml:

yaml
ops:
  environments:
    - code: qa
      displayName: QA
      dockerPort: 2375
      sshUser: deploy
      composeDirectory: /opt/docker/compose
      hosts:
        - hostname: qa-01
          ip: 10.0.1.10
          enabled: true

Released under the MIT License.