OpenShift Install

Download

Binaries

Get packaged zip file

Build From Source

git clone https://github.com/codenvy/plugin-openshift
cd plugin-openshift
mvn clean install

Configure Che

# Create a directory to host conf files
mkdir -p /home/user/.che/plugin-conf

# Set CHE_LOCAL_CONF_DIR to be this new folder
echo "export CHE_LOCAL_CONF_DIR=/home/user/.che" >> ~/.bashrc

Create ~/.che/che.properties and set OpenShift parameters.

openshift.api.endpoint=https://your.openshift.instance.com/
oauth.openshift.authuri=https://your.openshift.instance.com/oauth/authorize
oauth.openshift.tokenuri=https://your.openshift.instance.com/oauth/token
oauth.openshift.clientid=yourID
oauth.openshift.clientsecret=yourSecret
oauth.openshift.redirecturis=http://localhost:${SERVER_PORT}/wsmaster/api/oauth/callback

Create ~/.che/plugin-conf/che.properties and set a single OpenShift parameter:

openshift.api.endpoint=https://your.openshift.instance.com/

Both configuration files are mandatory.

What is my API endpoint client ID and secret?

API endpoint is the URL of your OpenShift installation (can be a domain name or IP address). Client ID and secret should match those registered in a custom oAuth client.

Register a Custom oAuth Client

Che uses oAuth2 to get authentication tokens from OpenShift. You need to register a custom oAuth client in your OpenShift master node. Example, using oc:

# Requires OpenShift admin privs
oc create -f <(echo '
{
  "kind": "OAuthClient",
  "apiVersion": "v1",
  "metadata": {
    "name": "che"
  },
  "secret": "yoursecret",
  "redirectURIs": [
    "http://localhost:8080/wsmaster/api/oauth/callback"
  ]
}')