Giter Club home page Giter Club logo

ukhomeoffice.ho-example-dashboard's Introduction

HO Example Dashboard

This repo is here to provide a quick and easy way for teams to get running with a basic dashboard. Over time it will be expanded with more features.

For a richer dashboarding experience we recommend forking this repo and customizing the dashboard to your heart's content.

The dashboard is built on Smashing - check out https://github.com/SmashingDashboard/smashing for more information.

Configuration settings

All config is taken in with environment variables, you can set the following parameters: For dashboarding Github repo statuses

  • GITHUB_REPOS - comma separated list of Github repos
  • GITHUB_TOKEN (whilst not required for open source repos it increases the rate limit dramatically so highly recommend setting this)
  • DRONE_GH_SERVER - Drone server used for Github CI
  • GITHUB_SERVER (defaults to https://api.github.com)

For dashboarding Gitlab repo statuses

  • GITLAB_REPOS - command separated list of Gitlab repos in format TeamName/RepoName
  • DRONE_GL_SERVER
  • DRONE_GL_TOKEN
  • GITLAB_SERVER
  • GITLAB_TOKEN

Managing tokens for Gitlab and Gitlab Drone

You will need to request an O365 dashboard account to be created by contacting the Home Team and requesting a dashboard account. It's important you specify that it is a dashboard account

These will then need to be granted read only access to the relevant repos, and API tokens for Drone and Gitlab created for them.

Deploying with kubernetes

IMPORTANT NOTE - if dashboarding private projects please ensure the project names and branch names aren't sensitive. There currently isn't any auth on the dashboards with the following deployments

Long term deploy solution

You will need:

  1. A namespace to deploy to
  2. A step in your drone yaml to do the deploy (you can use the deploy step in this repos .drone.yml as a guide, and the files in kubernetes_deployment)
  3. Drone secrets for KUBE_TOKEN to deploy to your chosen namespace
  4. Secrets within that namespace for TLS encryption matching the name given in the ingress controller (external-tls)

Customizing the dashboard

The above gives you a basic dashboard with some core capabilities. If you would like to customize it further please fork this repo and tinker to your heart's content! Let us know in the issue here if you do this please :)

Running the dashboard on your machine

You can run the dashboard locally or with docker. Passing in environment variables lets you specify github credentials and the repos you wish to monitor. If you don't specify github credentials it will still work with public repos, but the rate limit will be lower.

Note your local machine must have access to drone for this to work!

Running the dashboard with docker

git clone https://github.com/UKHomeOffice/ho-example-dashboard.git
cd ho-example-dashboard
docker build -t my-dashboard . 
docker run -ti -p 3030:3030 -e GITHUB_REPOS=UKHomeOffice/my-project-1,UKHomeOffice/my-project2 -e GITHUB_TOKEN=mypassword my-dashboard

You will find the dashboard on http://localhost:3030

Running the dashboard locally

git clone https://github.com/UKHomeOffice/ho-example-dashboard.git
cd ho-example-dashboard
bundle install
GITHUB_REPOS=UKHomeOffice/my-project-1,UKHomeOffice/my-project2 GITHUB_TOKEN=mypassword smashing start

You will find the dashboard on http://localhost:3030

Running tests

Tests are written with rspec, to run them do:

cd ho-example-dashboard
rspec

ukhomeoffice.ho-example-dashboard's People

Contributors

chrisns avatar danielepolencic avatar jcavell avatar timgent 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.