This is a sample project, stored in git, that can be built and deployed to OpenShift. It is based on the OpenShift project ("jee-ex"), found in OpenShift on github
Prerequisite: Working OpenShift/MiniShift command line environment, with openshift running
-
Navigate to correct project
$ oc project poc
-
Create a new openshift app, using github repository as a basis
$ oc new-app https://github.com/mikefinnxrx/xcom-jee-ex --image-stream="openshift/wildfly:latest"
a. Watch the build log via
$ oc logs -f bc/xcom-jee-ex
b. Check overall status
$ oc status
-
Expose a route for the application (for the request inbound to openshift cluster to be routed to the correct service)
$ oc expose svc/xcom-jee/ex
-
Open default web resource (index.html) in browser
$ ./minishift openshift service xcom-jee-ex --in-browser -n poc
-
Open web console in browser
-
Select the Project to which you want to add the application (drop-down to the right of "Projects").
a. If you want to create a new project, select "View all projects" from the drop-down, and click on New Project
-
Click the "Add to project" drop-down and click "Browse catalog"
-
Click the "Java" tile
-
Select latest Wildfly from drop-down and click "Select"
-
Fill out the application info:
a. Name: xcom-jee-ex
b. Git Repository URL: https://github.com/mikefinnxrx/xcom-jee-ex
-
Click "Create"
-
You will see an "Application created" screen. Click "Continue to overview"
-
Check the status of the build. When it's finished, you will see an Application entry for it, a running pod (far right), and the access URL
-
Open URL in browser. There will be a default index.html. From there, you can see a few links to be used for demo purposes.
-
Bask in the glory, openshift stud!