Multi-file compose/stack helper
Project description
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
filesthat defines all the files that can be used in recipes - root property
default_recipethat defines... well, default recipe - the most important property,
recipesdefines 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 propertyoptions, 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file otta-1.0.tar.gz.
File metadata
- Download URL: otta-1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ea52dded45578b5b01e7d0e23fb58e29d89f81ba371079218c5b9461e9a33a
|
|
| MD5 |
3b3dfd1aecf864b11e0b5462010741e6
|
|
| BLAKE2b-256 |
a3d2a564c28cfee73606c659c09c2f074979c4eba662b96a07d1541bf9afff7b
|
File details
Details for the file otta-1.0-py3-none-any.whl.
File metadata
- Download URL: otta-1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a520694ef16c8ec3124143818ed74165ee436490f86917a59f1ee6a668a424ea
|
|
| MD5 |
42a2e33a3936ebcd6e2cd76816a4cd62
|
|
| BLAKE2b-256 |
65369f8a6c7c43059c5bff03d8c6e672e39d0b29aa6a1bc29663e597edecffc8
|