RESTful interface for Elastic Build Results.
Project description
ebr-board
RESTful interface for Elastic Build Results.
Usage
To view the API documentation, start the server and go to to <url>/api/docs
.
Configuration
ebr-board uses Vault-Anyconfig to read in its configuration, allowing it to access a Hashicorp Vault instance for loading secrets. For more details refer to its documentation.
In order to deploy a simple ebr-board instance, you will need two files: config.yaml
and vault.yaml
. Leave vault.yaml
empty, as we will not use
secret loading from Vault-Anyconfig in this instance.
config.yaml
should be formatted as follows:
elastic:
host: <elastic_url>
port: 9200
timeout: 20
use_ssl: true
verify_certs: true
ca_certs: /etc/ebr-board/elastic.crt
index: testspipeline*
user: <elastic_user>
pwd: <elastic_password>
To change the default url prefix (/api
) add a new key-value at the top level:
url_prefix: "/new_prefix"
To have no prefix, provide an empty string, i.e.
url_prefix: ""`
Dev Mode
To start in dev mode, run python ebr_board/ebr_board.py
Production Mode
Can be invoked with ebr_board:create_app(config_filename='/etc/ebr-board/config.yaml', vault_config_filename='/etc/ebr-board/vault.yaml', vault_creds_filename='/etc/ebr-board/vault.yaml', load_certs=True, reverse_proxy=True)
, for example from Gunicorn. You should configure it behind a reverse proxy - for more details see
any guide on configuring Flask servers for deployment. A Dockerfile pre-configuring Gunicorn is available in the root of the repository.
AWS Lambda Support
The application can be run in AWS Lambda by using the handler
function in the aws_lambda
module. In this case it should be installed with the
aws_lambda
optional dependencies, i.e. pip install ebr-board['aws_lambda']
.
It expects that the configuration (the main configuration, vault configuration and vault creds) will be stored entirely as strings in the parameter
store. The way it processes these parameters can be configured with environmental variables:
config_name
: defaults toebr_board_config
vault_config_name
: defaults toebr_board_vault_config
vault_creds_name
: defaults toebr_board_vault_creds
config_format
: defaults toyaml
Features
- Provides abstraction to fetch:
- a list of builds from a given job
- tests from a given job
- aggregations of tests failures
- AWS Lambda support
Todo:
- Improve test coverage
- Fill in coverage of resources
- Expand aggregation/search functionality
Credits
This package was created with Cookiecutter and the tomtom-international/cookiecutter-python project template.
Changelog
0.2.0 (2019-08-26)
- Removed support for Python 3.5
0.1.1 (2019-08-23)
- Added extras_require for aws_lambda
0.1.0 (2019-08-22)
- Add aws lambda handler
- Clean up code to contain state better (for lambda compatability)
0.0.1-dev (2019-07-05)
- First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ebr_board-0.2.1.tar.gz
.
File metadata
- Download URL: ebr_board-0.2.1.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e84ddb6bd7c6d132a3a7b1d44dbf4d5b5a2901c47e24a9d0aac383f82c4359 |
|
MD5 | 4f22ef339e438af6279a894a4d5cba0b |
|
BLAKE2b-256 | 60b91d22962db4915bac1bb65eb04af1e6c1358eae8aeb2b21e2a27997cbc83e |