Code Monkey home page Code Monkey logo

build-relengapi's Introduction

RelengAPI

Continuous Integration: https://travis-ci.org/mozilla/build-relengapi

Your Interface to Release Engineering Automation.

This is the framework behind https://api.pub.build.mozilla.org/. It is a Flask-based framework for building and hosting releng-related APIs.

Goals

  • Simple self-service usage for consumers

    • Industry-standard access mechanisms (REST, oAuth2, etc.) that require no client-side custom libraries
    • One or very few endpoints (e.g., https://api.pub.build.mozilla.org)
    • Self-documenting tools
    • Semantic versioning
  • Simple, rapid implementation of new apps

    • Common requirements such as authentication, database access, scheduled tasks, configuration handling are already satisfied
    • All apps use the same technologies (language, web framework, DB framework, etc.), so the learning curve from one app to the next is small
    • Tailored for easy local development - minimal requirements, minimal installed components, etc.
  • Operations-friendly

    • Horizontally scalable using normal webops techniques
    • Easily deployed in multiple environments with normal devops processes
    • Resilient to failure: no in-memory state

Documentation

RelengAPI documents itself.
See https://api.pub.build.mozilla.org/docs for the documentation of the currently-deployed version.

Info for Developers

See the "Installation" page of the deployment documentation for information on required operating system packages.

Structure

RelengAPI is a Flask application. It is composed of several Python distributions (packages). Each distribution can contain several Flask Blueprints -- web application components. Each Git repository can contain multiple distributions.

The base is in the relengapi distribution, implemented in this package. It implements the root app, with lots of common support functionality, and a number of blueprints. It also searches its python environment for other distributions that can provide blueprints for the Releng API. These act as plugins, adding extra endpoints and other functionality to the API.

Other top-level directories of this repository contain other related distributions with more blueprints. Other repositories contain even more distributions, with even more blueprints.

All of this is drawn together in production by installing the appropriate distributions on the releng web cluster. When developing, though, only the relengapi distribution and the distribution you're hacking on are required.

Running RelengAPI

To run the tool for development, pip install the requirements into your virtualenv:

pip install -e .[test]

The [test] installs the requirements for testing as well. Omit this if you won't be running tests.

[optional] Build the docs:

relengapi build-docs --development

[optional] Set up your settings file:

cp settings_example.py settings.py
vim settings.py
export RELENGAPI_SETTINGS=$PWD/settings.py

Create the databases for the installed blueprints:

relengapi createdb

And finally run the server:

relengapi serve -p 8010

The relengapi tool has many useful subcommands. See its help for more information.

More

See the Releng API documentation for more information on development and deployment of the releng API. This is available at https://api.pub.build.mozilla.org/docs or, If you've installed the docs blueprint, at the same path on your own instance.

build-relengapi's People

Contributors

djmitche avatar callek avatar petemoore avatar usize avatar amyrrich avatar grenade avatar ianconnolly avatar fluffybeing avatar

Watchers

Yiannis avatar James Cloos 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.