Giter Club home page Giter Club logo

cg-dashboard's Introduction

18F Cloud Foundry Dashboard

CircleCI Code Climate

Environments: Production and Staging

Introduction

This dashboard is a web application to manage cloud.gov organizations, spaces, services, and apps.

Learn more about cloud.gov.

Tech Stack

Backend Server

  • Go (version 1.9)

Front end application

  • Node (version 6.x.x)
  • React (version ^15.0.0)
  • Babel (version ^6.x.x)
  • Karma (version ^1.4.x)
  • Webpack (version ^1.x.x)

Setup Local Environment

There are two different ways to setup your local environment:

  1. Recommended Docker+PCFDev Instructions
  2. Manual Instructions

Deploying

The cloud.gov dashboard is continuously deployed by CircleCI. To deploy manually:

Bootstrap Deployment Spaces

In each space that you plan on deploying, you need to create a user-provided-service.

Run:

# Create user provided service with config
# See https://github.com/18F/cg-dashboard/blob/master/helpers/env_vars.go for all env variables
cf create-user-provided-service dashboard-ups -p @<(cat <<EOF
{
  "CONSOLE_CLIENT_ID": "your-client-id",
  "CONSOLE_CLIENT_SECRET": "your-client-secret",
  "CSRF_KEY": "$(openssl rand -hex 32)",
  "SESSION_AUTHENTICATION_KEY": "$(openssl rand -hex 64)",
  "SESSION_ENCRYPTION_KEY": "$(openssl rand -hex 32)",
  "SMTP_HOST": "smtp.host.com",
  "SMTP_PORT": "25",
  "SMTP_USER": "username",
  "SMTP_PASS": "password",
  "SMTP_FROM": "[email protected]",
  "CONSOLE_NEW_RELIC_LICENSE": ""
}
EOF
)

Create a Client with UAAC

  • Make sure UAAC is installed.
  • Target your UAA server. uaac target <uaa.your-domain.com>
  • Login with your current UAA account. uaac token client get <your admin account> -s <your uaa admin password>
  • Create client account:
uaac client add <your-client-id> \
 --authorities "uaa.none scim.invite cloud_controller.admin scim.read" \
 --authorized_grant_types authorization_code,client_credentials,refresh_token \
 --scope cloud_controller.admin,cloud_controller.read,cloud_controller.write,openid,scim.read \
 --autoapprove true \
-s <your-client-secret>
  • Unable to create an account still? Troubleshoot here

CI

This project uses CircleCI.

  • You will need to set up the credentials to deploy to the dashboard-prod and dashboard-stage spaces.
    • In both spaces run: cf create-service cloud-gov-service-account space-deployer dashboard-deployer.
    • You will get the link for that space's credentials by running cf service dashboard-deployer.
    • You will need to set these secret variables in the CircleCI UI.
      • CF_USERNAME_PROD_SPACE - The username for the dashboard-prod deployer
      • CF_PASSWORD_PROD_SPACE - The password for the dashboard-prod deployer
      • CF_USERNAME_STAGE_SPACE - The username for the dashboard-stage deployer
      • CF_PASSWORD_STAGE_SPACE - The password for the dashboard-stage deployer
  • If you fork this project for your own use, you will need to use the CircleCI CLI UI to set the variables. (If you're forking just to make a pull request, there's no need to do this.)

Optional features

Some features can be enabled by supplying the right environment configuration.

New Relic Browser

If you have New Relic Browser, you can set your New Relic ID and Browser license key. These are public and can be set in your manifest file. Note that your Browser license key is different than your New Relic License Key (which should be treated as confidential).

# manifest.yml
env:
  NEW_RELIC_ID: 12345
  NEW_RELIC_BROWSER_LICENSE_KEY: abcdef

Google Analytics

If you have a GA site configured, specify your tracking ID as GA_TRACKING_ID in your environment.

# manifest.yml
env:
  GA_TRACKING_ID: UA-123456-11

cg-dashboard's People

Contributors

adborden avatar aeijdenberg avatar afeld avatar arthurhlt avatar dlapiduz avatar el-mapache avatar femmebot avatar fureigh avatar jcscottiii avatar jeremiak avatar jmcarp avatar jonathanconway avatar jonathaningram avatar jontours avatar juliaelman avatar linuxbozo avatar mogul avatar ozzyjohnson avatar pburkholder avatar ramirezg avatar rememberlenny avatar rogeruiz avatar sharms avatar thisisdano avatar timothy-spencer avatar toolness avatar wjwoodson avatar

Watchers

 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.