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.
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.
- Create a Python configuration with a suitable name
- Script: Find the
fiaas-mast
executable in the virtualenvs bin directory- If using bash, try
which fiaas-mast
inside the virtualenv
- If using bash, try
- Python Interpreter: Make sure to add the virtualenv as an SDK, and use that interpreter
Set the following env variables to run locally:
export ARTIFACTORY_ORIGIN="https://artifactory.yourdomain.com"
export ARTIFACTORY_USER="[email protected]"
export ARTIFACTORY_PWD="artifactory-api-key"
export APISERVER_TOKEN="foo"
export APISERVER_CA_CERT="bar"
- Create a Python tests -> py.test configuration with a suitable name (name of test-file)
- Target: The specific test-file you wish to run
- Python Interpreter: Make sure to add the virtualenv as an SDK, and use that interpreter
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.