Skip to main content

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

Metadata

Release files for brew-view 2.4.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brew-view 2.4.21
File Size Uploaded
brew-view-2.4.21.tar.gz 10.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for brew-view 2.4.21
File Interpreter ABI Platform
brew_view-2.4.21-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 21.3 MB

Release files / brew-view-2.4.21.tar.gz

Download URL brew-view-2.4.21.tar.gz
Size 10.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e08c371d6b306ea94fb1f9db1735eb2748f24fe5d17310d1e0259a1077c37afb
BLAKE2b-256 checksum
How to use checksums
b15069885eaf3708f185cf5deeb8e41493012b2c563df1b0f8fdab1dbf331359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

Release files / brew_view-2.4.21-py2.py3-none-any.whl

Download URL brew_view-2.4.21-py2.py3-none-any.whl
Size 10.7 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
33cde861f768d376b4f04467a84ef8979e27a37dc249daa714eaa547fe8a347a
BLAKE2b-256 checksum
How to use checksums
2d126ebfbadb4313de3ba0bee113825de6b5fea3a71136693c55c225eecd264b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

Release history Release notifications | RSS feed

This release

2.4.21 This release

2 release files

2.4.20

2 release files

2.4.19

2 release files

2.4.18

2 release files

2.4.17

2 release files

2.4.15

2 release files

2.4.14

2 release files

2.4.12

2 release files

2.4.11

2 release files

2.4.10

2 release files

2.4.9

2 release files

2.4.8

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.10

2 release files

2.3.9

2 release files

2.3.8

3 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page