Skip to content

EricSchles/cf-console

 
 

Repository files navigation

18F Cloud Foundry Console

Tech Stack

  • Go for the backend server.
  • AngularJS for the frontend.

Setup

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 cloud_controller.admin,cloud_controller.read,cloud_controller.write,openid,scim.read \
 --authorized_grant_types authorization_code,client_credentials,refresh_token \
 --scope cloud_controller.admin,cloud_controller.read,cloud_controller.write,openid,scim.read \
-s <your-client-secret>
  • Unable to create an account still? Troubleshoot here

Set the environment variables

If you are testing locally, export these variables. If you are deploying to cloud foundry, modify the manifest.yml

  • CONSOLE_CLIENT_ID: Registered client id with UAA.
  • CONSOLE_CLIENT_SECRET: The client secret.
  • CONSOLE_HOSTNAME: The URL of the service itself.
  • CONSOLE_LOGIN_URL: The base URL of the auth service. i.e. https://login.domain.com
  • CONSOLE_UAA_URL: The URL of the UAA service. i.e. https://uaa.domain.com
  • CONSOLE_API: The URL of the API service. i.e. http://api.domain.com

Front end

Bootstrap is already included. To update Bootstrap library for the front end:

cd static
bower install bootstrap

Running locally

  • Modify the ClientID and ClientSecret in main() to reflect your client id and secret. TODO: Use environment variables.
  • Modify the AuthURL and TokenURL in main() to reflect the URLs to login and get tokens. TODO: Use environment variables.
  • go run server.go
  • Navigate browser to http://localhost:9999

Testing

go test ./...

Deploying

  • cf push <optional-app-name>

About

A web service console for interacting with Cloud Foundry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 70.5%
  • HTML 17.8%
  • JavaScript 11.7%