Skip to main content

Beergarden Frontend

Project description

Brew View is the beer-garden application frontend. It uses Tornado to serve some REST endpoints and the AngularJS application, and it communicates with the beer-garden backend (Bartender) through Thrift.

Gitter PyPI Build Status Code Coverage Documentation Status Pyup Updates

Getting Started

The following steps are the easiest way to get Brew-view up and running from source.

Prerequisites

  • Python (2.7.9+ or 3.4+)

  • Node.js (Stable, 6+) with yarn installed globally

  • Connectivity to a MongoDB Server

  • Connectivity to a RabbitMQ Server

Get Up and Running

A full installation guide for RabbitMQ and Mongo is outside the scope of this document. Below is a small snippet to get you up and running if you have docker installed..

$ docker run -d -p 27017:27017 --name bg-mongo mongo
$ docker run -d -p 5672:5672 -p 15672:15672 --name bg-rmq rabbitmq:3-management-alpine

To do development locally, it is important to note that brew-view is a combination of a python API powered by tornado and an AngularJS App. So we will start them both up!

$ git clone https://github.com/beer-garden/brew-view.git
$ cd brew-view
$ make deps # just a simple way to do pip install -r requirements.txt and yarn install

Start up the JavaScript Application:

$ cd brew_view/static
$ yarn serve

Now start up the Python API:

$ cd /path/to/brew-view
$ python -m brew_view -c ./dev_conf/config.yml

Sweet! Everything should now be up and running. Visit http://localhost:8080/ in a browser to check it out. Hit Ctrl-c to stop the web server.

NOTE: It’s worth noting that the JavaScript App is served on 8080 but the python application is running on 2337.

Configuration

There’s a conf/config.yml file that comes with the installation. It comes with sensible default values but feel free to change them if you’d like. You’ll need to restart the web server after making any changes.

REST Services

Brew-view’s most visible job is to serve the frontend application, but it also provides a REST API. This API is used by the frontend (and the plugins) to interact with the rest of beer-garden. You’re more than welcome to use the REST API directly if you’d like - you can find Swagger documentation by navigating to the About page and clicking the Check it out! button.

Testing and Code Coverage

You can run the testing yourself.

Python

$ make test

This will run the tests for the python application. You can run against multiple python versions using tox:

$ make test-all

To generate coverage:

$ make coverage

We use flake8 for linting:

$ make lint

JavaScript

The JavaScript application has its own Makefile so to run these commands you’ll need to be in the brew_view/static directory.

We are currently lacking in good JavaScript tests since we switched to webpack. We are hoping to remedy this in the near-term future. You __should__ be able to run tests:

$ make test

To run ESLint:

make lint

Distribution

Creating the brew-view distribution is simple. Simply go to the git root directory and run the following:

$ make dist

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

brew-view-2.4.8.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

brew_view-2.4.8-py2.py3-none-any.whl (56.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file brew-view-2.4.8.tar.gz.

File metadata

  • Download URL: brew-view-2.4.8.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for brew-view-2.4.8.tar.gz
Algorithm Hash digest
SHA256 833c463fb58502ae499395c595b3bcc2bbc5446abf281065ade86c72033b21c9
MD5 81e8d960b70bf7e7fc237525a5f1478b
BLAKE2b-256 d74b7567b43301b6665be2a9151b1dd43505034a3fe18fd2b9497507ed493a19

See more details on using hashes here.

Provenance

File details

Details for the file brew_view-2.4.8-py2.py3-none-any.whl.

File metadata

  • Download URL: brew_view-2.4.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 56.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for brew_view-2.4.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e239e2fc10b5e62fd6e3cb4db6521fee8a8a9fac56a27a2941eab8cb398443d4
MD5 80d5a140fd7c7a26970b1b2575219a94
BLAKE2b-256 c598234695b707b12d3377868f6973db2e9451a64661e34455bff1bd98acd989

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page