equinor / komodo

Komodo is a software distribution system used internally in Equinor
GNU Affero General Public License v3.0
5 stars 22 forks source link
distribution

Komodo

Build Status

Komodo is a software distribution system.

The purpose of Komodo is to automatically, reproducibly, and testably create a software distribution. Automatic deploy of new releases, as well as nightly deploy and the option of automatically moving the testing stage, is supported.

Install

The tool is not hosted on PyPI but can be installed with pip directly from GitHub:

pip install git+https://github.com/equinor/komodo.git

Documentation

The documentation is online. Developers can build it by installing with dev-dependencies by running pip install ".[dev]" and running make html in the docs directory.

Basic usage

We have a 'repository' of packages described in a YAML file. Each package contains a list of one or more versions. Each version contains:

For example, we may have a repository.yml like this:

python:
  3-builtin:
    make: sh
    makefile: build__python-virtualenv.sh
    maintainer: foo@example.com
    makeopts: --virtualenv-interpreter python3

treelib:
  1.6.1:
    source: pypi
    make: pip
    maintainer: bar@example.com
    depends:
      - python

Note that build__python-virtualenv.sh is a script that comes with komodo (in komodo/data); it will use the system Python in the environment it builds.

Now a 'release', e.g. stable, is defined in another YAML file, e.g. stable.yml, containing some or all of the packages in the repository file:

python: 3-builtin
treelib: 1.6.1

A full software distribution can then be built and deployed to a specified path, e.g. ./builds/stable-0.0.1, with the following command:

kmd stable.yml repository.yml --prefix builds --release stable-0.0.1

To use this environment, type source builds/stable-0.0.1/enable.

Other komodo commands

As well as the kmd command, this package installs several other commands, each with its own options:

Run tests

In a virtual environment:

git clone https://github.com/equinor/komodo.git
cd komodo
pip install ".[dev]"
pytest tests