Deploying VDB Swarm

This section will use a image in a public repository in docker hub to create a data federation application.

Using CLI

The oc new-app can create a new application by specifying source code, templates, and/or images. Use a vdb-datafederation-swarm image in a private registry to create an app and override application artifacts' names

oc new-app --docker-image=kylinsoong/vdb-datafederation-swarm:1.1 --name=vdb-datafederation-swarm

You may see the following output:

--> Found Docker image 5e01127 (12 days old) from Docker Hub for "kylinsoong/vdb-datafederation-swarm:1.1"

    * An image stream will be created as "vdb-datafederation-swarm:1.0" that will track this image
    * This image will be deployed in deployment config "vdb-datafederation-swarm"
    * Port 31000/tcp will be load balanced by service "vdb-datafederation-swarm"
      * Other containers can access this service through the hostname "vdb-datafederation-swarm"
    * WARNING: Image "kylinsoong/vdb-datafederation-swarm:1.0" runs as the 'root' user which may not be permitted by your cluster administrator

--> Creating resources ...
    imagestream "vdb-datafederation-swarm" created
    deploymentconfig "vdb-datafederation-swarm" created
    service "vdb-datafederation-swarm" created
--> Success
    Run 'oc status' to view your app.

Alternatively, refer to Using Web Console to create application via Web Console.

Using Web Console

Login to the Web Console, find your project and click it. Next, click Add to project at the top of the screen.

There are several options, but we are only concerned with Deploy Image. Click it. We will learn more about image streams and image stream tags later. For now, select the Image Name option, and copy/paste the following into the box:


Your screen will end up looking something like this:


Either press enter or click on the magnifying glass. OpenShift will then go out to the Docker registry specified and interrogate the image. You then are presented with some options to add things like environment variables, labels, and etc.

Hit the blue Create button at the bottom of the screen and then click the Continue to overview link. Take a moment to look at the various messages that you now see on the overview page.

Exploring created resources

oc get pod
$ oc get pod
NAME                               READY     STATUS    RESTARTS   AGE
vdb-datafederation-swarm-1-2lknm   1/1       Running   0          22m
oc get imagestream
$ oc get imagestream
NAME                       DOCKER REPO                                                     TAGS      UPDATED
vdb-datafederation-swarm   1.0       22 minutes ago
oc get deploymentconfig
$ oc get deploymentconfig
vdb-datafederation-swarm   1          1         1         config,image(vdb-datafederation-swarm:1.0)
oc get service
$ oc get service
NAME                       CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
vdb-datafederation-swarm   <none>        31000/TCP   22m
oc get replicationcontroller
$ oc get replicationcontroller
NAME                         DESIRED   CURRENT   READY     AGE
vdb-datafederation-swarm-1   1         1         1         45m

View the Lables via oc describe

oc describe pod
$ oc describe pod vdb-datafederation-swarm-1-2lknm
Name:			vdb-datafederation-swarm-1-2lknm
Namespace:		wf-swarm-example
Security Policy:	restricted
Node:			node2.na1.internal/
Start Time:		Thu, 06 Jul 2017 11:04:26 +0800
Labels:			app=vdb-datafederation-swarm
Status:			Running
Controllers:		ReplicationController/vdb-datafederation-swarm-1
oc describe imagestream
$ oc describe imagestream vdb-datafederation-swarm
Name:			vdb-datafederation-swarm
Namespace:		wf-swarm-example
Created:		43 minutes ago
Labels:			app=vdb-datafederation-swarm
oc describe deploymentconfig
$ oc describe deploymentconfig vdb-datafederation-swarm
Name:		vdb-datafederation-swarm
Namespace:	wf-swarm-example
Created:	About an hour ago
Labels:		app=vdb-datafederation-swarm
Latest Version:	1
Selector:	app=vdb-datafederation-swarm,deploymentconfig=vdb-datafederation-swarm
Replicas:	1
Triggers:	Config, Image(vdb-datafederation-swarm@1.0, auto=true)
Strategy:	Rolling
oc describe service
$ oc describe service vdb-datafederation-swarm
Name:			vdb-datafederation-swarm
Namespace:		wf-swarm-example
Labels:			app=vdb-datafederation-swarm
Selector:		app=vdb-datafederation-swarm,deploymentconfig=vdb-datafederation-swarm
Type:			ClusterIP
Port:			31000-tcp	31000/TCP
Session Affinity:	None
oc describe replicationcontroller
$ oc describe replicationcontroller vdb-datafederation-swarm-1
Name:		vdb-datafederation-swarm-1
Namespace:	wf-swarm-example
Image(s):	kylinsoong/vdb-datafederation-swarm@sha256:c35515360ce5a8e5d3e8a7c37cc0b45efef8e0b2ec0e4c840489cbeeab3687be
Selector:	app=vdb-datafederation-swarm,deployment=vdb-datafederation-swarm-1,deploymentconfig=vdb-datafederation-swarm
Labels:		app=vdb-datafederation-swarm
Replicas:	1 current / 1 desired
Pods Status:	1 Running / 0 Waiting / 0 Succeeded / 0 Failed

results matching ""

    No results matching ""