Vert.x server runs locally by default on localhost:33333. To access OpenShift endpoints, it is necessary to pass header Authorization with token customtoken - "Authorization: Bearer customtoken"
- build project
mvn clean packageand run fat jarjava -jar target/vertx-server.jar
- there is a docker image
mlabuda/che-vertx-server:openshifton dockerhub which is ready to run on OpenShift, or on docker locally - required parameters for running on OpenShift are
VERTX_CHE_SERVER_URL,VERTX_OS_ROUTE_HOST
There are several execution parameters:
VERTX_CHE_SERVER_URL- URL of virtual Che server (this vertx server), defaulthttp://localhost:33333VERTX_OS_ROUTE_HOST- OpenShift route host of Che server, default value is set to this vert.x server running locally, value can't contain http prefix, defaultlocalhost:33333.VERTX_DC- deployment config name of Che server deployment on OpenShift, defaultcheVERTX_OS_ROUTE_NAME- OpenShift route name of Che server, defaultche-host
To use this mocked Vert.x server with che-starter, use following values for parameters in che-starter REST API:
masterUrl- when running locally, usehttp://localhost:33333, otherwise use real endpoint of the deployment of this server (e.g. on OpenShift a route URL)namespace- useeclipse-che, for now it reflects real OpenShift project of Che server deploymentAuthorization- use any string, there is no limitation so farparam- when creating a new workspace, use following params in case you wish successful calls
{
"branch": "master",
"description": "https://github.com/mlabuda/vertx-with-che.git#master",
"id": "chevertxwsid13",
"name": "vertxworkspace",
"repo": "https://github.com/mlabuda/vertx-with-che",
"stack": "vert.x"
}