Giter Site home page Giter Site logo

ebr-board's Introduction

ebr-board

Build Status

PyPI - Version PyPI - License PyPI - Python Versions PyPI - Format PyPI - Status PyUp - Updates

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 to ebr_board_config
  • vault_config_name: defaults to ebr_board_vault_config
  • vault_creds_name: defaults to ebr_board_vault_creds
  • config_format: defaults to yaml

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.

ebr-board's People

Contributors

eugene-davis avatar tt-ci avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.