app-launcher-helper

command module
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

README

Build Status

App Launcher Helper

App Launcher Helper is a service that provides a list of services created by a specific instance of Application Broker.

Usage

The problem with Cloud Foundry and Application Broker is that there's no direct connection between a service and a related application for now. They're bound by naming convention only. App Launcher Helper is trying to fill this gap by providing a list of entries on a REST call:

http://hostname/rest/orgs/:orgId/atkinstances

Example response body:

{  
  "instances": [
    {
	  "name": "Name of a service instance",
  	  "url": "Url of an application related to a service instance",
	  "state": "current state of an app - STARTED, STOPPED, etc ...."
    }
  ]
}

AL Helper finds all service instances started in a specific organization for a service with a name configured by env variable. It's worth to mention that the application is an OAuth2 Resource Server, which means that there's access token in Authorization header needed. When deployed on Cloud Foundry, the application can be queried this way:

curl -H "Authorization: \`cf oauth-token|grep bearer\`" http://applauncher-helper.54.154.194.181.xip.io/rest/orgs/:orgId/atkinstances

Development

To locally develop this application you'll need godep tool to manage dependencies and build the project. You will also need to have gccgo-go installed, as well as Go workspace created and GOPATH environment variable exported. If you don't meet these prerequisites, please refer to Development Environment Setup instructions in the project [Wiki] (https://github.com/trustedanalytics/project-wiki) for further instructions.

Clone app-launcher-helper using gccgo-go:

$ go get github.com/trustedanalytics/app-launcher-helper

Navigate to the project directory:

cd $GOPATH/src/github.com/trustedanalytics/app-launcher-helper

Build and test app-launcher-helper using godep:

$ godep go build
$ godep go test ./...

Deployment

Before pushing the app to the Cloud Foundry, there're three env variables to be set:

  • TOKEN_KEY_URL - an address of a key, to validate user's access token;
  • API_URL - Cloud Foundry API address;
  • SERVICE_NAME - a service name provided by App Launching Service Broker;

They are defined in manifest.yml, but they can be set by a cf set-env command as well. When environment is ready, there's only one command needed:

$ cf push

Versioning

Bumpversion tools is used to manage project version number, which is kept in two places: .bumpversion.cfg and manifest.yml. The first one is for bumpversion itself, while the second one helps to identify the version of an application deployed in Cloud Foundry.

There's no need to use bumpversion manually - it's being used by CI.

Documentation

Overview

*

  • Copyright (c) 2015 Intel Corporation *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Package main app-launcher-helper API

The purpose of this application is to display filtered list of services created by application broker. Filtering is done by SERVICE_NAME environment variable.

Version: 0.4.21

swagger:meta

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cloudfoundry/gosteno/syslog
Package syslog provides a simple interface to the system log service.
Package syslog provides a simple interface to the system log service.
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/dgrijalva/jwt-go
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html See README.md for more info.
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html See README.md for more info.
A useful example app.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/kelseyhightower/envconfig
Package envconfig implements decoding of environment variables based on a user defined specification.
Package envconfig implements decoding of environment variables based on a user defined specification.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
_workspace/src/github.com/oxtoacart/bpool
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL