Skip to main content

Otta

Otta is a compose file inheretance helper

Rationale

For simple usecases builtin defaults of docker-compose are just fine. But systems do grow and the following problems are appearing:

  • shell commands are becoming longer
  • code duplication in compose files is getting worse
  • project root directory is getting bloated with compose files
  • complex compose configurations need up to date documentation

Example

Without Otta:

docker-compose -f base.yml -f local.yml -f mock_emails.yml -p local up

With Otta:

otta up

Otta file and otta directory

Otta directory:

otta
├── base.yml
├── local.yml
├── mock_mail_server.yml
├── prod_common.yml
├── prod_a.yml
├── prod_b.yml
└── otta.yml

Otta file:

files:
  - base.yml
  - local.yml
  - mock_mail_server.yml
  - prod_common.yml
  - prod_a.yml
  - prod_b.yml

default_recipe: local

recipes:
  local:
    project_name: local
    files:
      - base.yml
      - local.yml
    options:
      mockmail:
        files:
          - mock_mail_server.yml

  prod_a:
    files:
      - base.yml
      - prod_common.yml
      - prod_a.yml

  prod_b:
    project_name: production
    files:
      - base.yml
      - prod_common.yml
      - prod_b.yml

Explanation

Otta configuration is a directory with compose files and single otta file.

Otta files defines

  • root property files that defines all the files that can be used in recipes
  • root property default_recipe that defines... well, default recipe
  • the most important property, recipes defines available recipes

Each recipe has

  • name, 1 to 40 symbols: letters, numbers and underscores
  • optional project_name, with identical restrictions
  • files, list of files defined in root property
  • options, optional definition of available options

Options have name (1 to 20 symbols, numbers letters and underscores) and files property.

CLI reference

Otta and it's variants determine recipe from OTTA_REC env variable.

Recipe specification is either just recipe (local), or recipe with options (local+mockmail)

OTTA_FILE is path to otta file, absolute or relative

Setting OTTA_DEBUG to 1 makes the program print debug info

otta binary

otta call is equal to docker-compose -f base.yml -f local.yml -p local

skara binary

skara call is equal to docker stack deploy -c base.yml -c local.yml

project_name is ignored

kumla binary

kumla call is equal to kompose -f base.yml -f local.yml

project_name is ignored

Contributing

Please report all problems to GitLab

Pull requests are welcome

Metadata

Release files for otta 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for otta 1.0
File Size Uploaded Provenance
otta-1.0.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for otta 1.0
File Interpreter ABI Platform
otta-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / otta-1.0.tar.gz

Download URL otta-1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f0ea52dded45578b5b01e7d0e23fb58e29d89f81ba371079218c5b9461e9a33a
BLAKE2b-256 checksum
How to use checksums
a3d2a564c28cfee73606c659c09c2f074979c4eba662b96a07d1541bf9afff7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release files / otta-1.0-py3-none-any.whl

Download URL otta-1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a520694ef16c8ec3124143818ed74165ee436490f86917a59f1ee6a668a424ea
BLAKE2b-256 checksum
How to use checksums
65369f8a6c7c43059c5bff03d8c6e672e39d0b29aa6a1bc29663e597edecffc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Security for otta 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page