Giter Club home page Giter Club logo

ltd-dasher's Introduction

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).lsst.io/v and (product).lsst.io/builds, 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):

./run.py render

Clean up the development render:

./run.py clean

Run a development server:

./run.py 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://dasher:3031/

HTTP API reference

GET /

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": "https://github.com/lsst-sqre/ltd-dasher"
}

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:='["https://keeper.lsst.codes/products/developer", "https://keeper.lsst.codes/products/pipelines"]'

Expected response status: 202.


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

MIT licensed open source.

ltd-dasher's People

Contributors

dependabot[bot] avatar jonathansick avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ltd-dasher's Issues

Make git_refs / tracked_git_refs optional

With the new EUPS-based tracking modes, the tracked_git_refs field should be considered optional. However, the dashboard build assumes tracked_git_refs is present.

See app/dashboard/render.py line 48

Best solution is to gracefully fallback when tracked_git_refs data is not available.

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.