You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Openshift Component

Available as of Camel 2.14

The openshift component is a component for managing your OpenShift applications. 

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-openshift</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

URI format

openshift:clientId[?options]

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Unknown macro: {div}

Name

Default Value

Description

domain

null

Domain name. If not specified then the default domain is used.

username

 

Mandatory: The username to login to openshift server.

password

 

Mandatory: The password for login to openshift server.

server

 

Url to the openshift server. If not specified then the default value from the local openshift configuration file ~/.openshift/express.conf is used.

operation

list

The operation to perform which can be: list, start, stop, restart, and state. The list operation returns information about all the applications in json format. The state operation returns the state such as: started, stopped etc. The other operations does not return any value.

application

 

The application name to start, stop, restart, or get the state.

Examples

Listing all applications

// sending route
from("direct:apps")
    .to("openshift:myClient?username=foo&password=secret&operation=list");
    .to("log:apps");

In this case the information about all the applications is returned as json.

Stopping an application

// sending route
from("direct:control")
    .to("openshift:myClient?username=foo&password=secret&operation=stop&application=foobar");
 

In the example above we stop the application named foobar.

  • No labels