No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
LICENSE
README.md
oc.sh

README.md

Heroku Buildpack: Openshift cli

This heroku buildpack makes it possible for an application to establish ssh tunnel to reach a remote host of openshift platform (version 3.x).

As an example, you can connect to a database running in an openshift container, a so called pod. The underlying tool to create the tunnel is the CLI provided from openshift.

Usage

  1. Add this buildpack
$ heroku buildpacks:add https://github.com/mwiede/heroku-buildpack-oc
  1. Provide the configuration

The buildpack creates an ssh tunnel and forwards the port on the basis of the environment variables configured for Heroku:

$ heroku config:set OC_LOGIN_ENDPOINT=https://api.starter-ca-central-1.openshift.com 
$ heroku config:set OC_LOGIN_TOKEN=askdjalskdj 
$ heroku config:set OC_POD_NAME=mysql-1-weuoi 
$ heroku config:set OC_LOCAL_PORT=3306 
$ heroku config:set OC_REMOTE_PORT=3306
  1. access the database in your app.