Skip to content

mika-hjalmarsson/mast

 
 

Repository files navigation

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.6.

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

  • 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
  • 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"

Tests

  • 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

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 87.7%
  • Shell 4.9%
  • HTML 4.4%
  • Dockerfile 1.7%
  • Other 1.3%