fiaas / mast

Apache License 2.0
2 stars 7 forks source link

MAST

Mast connects Spinnaker to FIAAS.

Receives HTTP requests from Spinnaker for deployments, and creates or updates a FIAAS-app object in the containing Kubernetes cluster.

Development

The Development target is Python 3.9.

Install dependencies using pip:

$ pip install -r requirements.txt

Add bin/format as a pre-commit step if you want to have your code auto-formatted:

$ ln -sf ../../bin/format .git/hooks/pre-commit

Optionally, enable auto-formatting on save in Emacs:

M-x package-install py-yapf

Add the following to $fiaas-mast/.dir-locals.el:

((python-mode . ((eval . (add-hook 'python-mode-hook 'py-yapf-enable-on-save nil t)))))

Use tox to run tests on multiple python versions:

$ tox

Tox will use all supported interpreters installed on your system to run tests, but will not complain if an interpreter is not available.

IntelliJ runconfigs

Running the application

Set the following env variables to run locally:

export ARTIFACTORY_ORIGIN="https://artifactory.yourdomain.com"
export ARTIFACTORY_USER="user.name@schibsted.com"
export ARTIFACTORY_PWD="artifactory-api-key"
export APISERVER_TOKEN="foo"
export APISERVER_CA_CERT="bar"

Tests

Release Process

When changes are merged to master the master branch is built using semaphore. The build generates a docker image that is published to the fiaas/mast respository on docker hub and is publicly available. Additionally a helm chart is created and published to the fiaas helm repository.