Skip to content
LSST the Docs Dasher: Dashboard building microservice
Python CSS HTML JavaScript Dockerfile
Branch: master
Clone or download
jonathansick Merge pull request #9 from lsst-sqre/tickets/DM-21494
DM-21494: Add a kustomize-based set of manifests
Latest commit a97b168 Oct 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Make tracked_refs optional Jul 11, 2018
licenses Create Flask application skeleton Jan 30, 2017
manifests Add a kustomize-based set of manifests Oct 3, 2019
src Implement build items, like edition items Feb 23, 2017
tests Improve handle truncation from title Dec 28, 2017
.babelrc Create npm package and Gulp tasks Feb 3, 2017
.dockerignore Add dockerignore Feb 13, 2017
.gitignore Create npm package and Gulp tasks Feb 3, 2017
CHANGELOG.rst Release version 0.1.4 Oct 7, 2019
Dockerfile Dockerize flask app with uwsgi Jan 30, 2017
LICENSE Initial commit Jan 21, 2017
README.rst Improve HTTP endpoint reference in README Feb 21, 2017
gulpfile.babel.js Add gulp assets task Feb 20, 2017
package.json Implement svg sprite (with octicons) Feb 20, 2017
requirements.txt Use ltd-conveyor 0.3.0 release Feb 20, 2017 Use vN heuristic to identify releases from git ref Feb 21, 2017
uwsgi.ini Switch to multiprocess/multithread uwsgi Feb 13, 2017


LSST the Docs: Dasher

Versioning is a core feature of LSST the Docs. By default, the documentation of every branch and tag of a Git repository is available through separate URLs. LTD Dasher creates lightweight dashboards, available at (product) and (product), that help users find the right version of project's documentation. For more information about LSST the Docs' versioned documentation, see SQR-006.

LTD Dasher is a Kubernetes-deployed microservice that works with LTD Keeper.

Local development

In a Python 3.5 virtual environment, install requirements:

pip install -r requirements.txt

Installing npm and gulp if they're not already installed. For example:

brew install node
npm install -g gulp

And install LTD Dasher's node.js dependencies:

npm install

Generate a dashboard for development (written to _build):

./ render

Clean up the development render:

./ clean

Run a development server:

./ runserver

Run unit tests:

py.test --flake8 --cov=app

Making Docker images

Prepare assets:

gulp assets -env=deploy

Build the image:

docker build -t lsstsqre/ltd-dasher:tag .

Note: for releases, the image's tag should match both the Git tag and app.__version__. We need to work out the continuous delivery pipeline.

Push to lsstsqre/ltd-dasher on Docker Hub:

docker push lsstsqre/ltd-dasher:tag

Kubernetes deployment

LTD Dasher needs to be deployed in the same Kubernetes cluster as LTD Keeper; Dasher isn't meant to have a world-facing endpoint. The basic deployment is:

cd kubernetes
kubectl apply -f dasher-service.yaml
kubectl apply -f dasher-deployment.yaml

Through the dasher service, the application is available in the cluster at:


HTTP API reference


Returns basic metadata about the service. Example:

HTTP/1.0 200 OK
Content-Length: 91
Content-Type: application/json
Date: Tue, 24 Jan 2017 17:32:47 GMT
Server: Werkzeug/0.11.15 Python/3.5.2

    "dasher_version": "0.1.0-rc.1",
    "repo": ""

GET /healthz

Endpoint for a readiness probe (see kubernetes/dasher-deployment.yaml). Example:

HTTP/1.0 200 OK
Content-Length: 21
Content-Type: application/json
Date: Tue, 24 Jan 2017 17:34:30 GMT
Server: Werkzeug/0.11.15 Python/3.5.2

    "status": "ok"

POST /build

Triggers a dashboard build on one or more LTD Keeper-managed products.

Example request with HTTPie:

http post http://localhost:3031/build \
    product_urls:='["", ""]'

Expected response status: 202.

Copyright 2017 Association of Universities for Research in Astronomy, Inc.

MIT licensed open source.

You can’t perform that action at this time.