TODO: List all the ways OpenShift can be started locally
-
Start the OpenShift Cluster: The the following command to start the OpenShift Container Platform locally
oc cluster up --image registry.access.redhat.com/openshift3/ose --version v3.7.23-3
-
Re-login as the system admin
oc login -u system:admin
-
Run the following command to deploy the JBoss Middleware image streams
oc create -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/jboss-image-streams.json -n openshift
-
Run the following command to deploy the JBoss Data Grid application template
oc create -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/datagrid/datagrid71-basic.json -n openshift
-
Using the default service account in the myproject namespace
oc policy add-role-to-user view system:serviceaccount:$(oc project -q):default -n $(oc project -q)
-
Use the eap-service-account in the myproject namespace
oc policy add-role-to-user view system:serviceaccount:$(oc project -q):eap-service-account -n $(oc project -q)
-
Log back in as developer
oc login -u developer
-
Create a new JDG app in the myproject namespace
oc new-app --template=datagrid71-basic
-
Deploy the JDG client application which puts 100 entries into the
default
cacheoc new-app vchintal/s2i-java~https://github.com/vchintal/openshift-hotrod-console-client.git
NOTE: The last step runs a bit long as its doing Source-to-Image in OpenShift. Once built the image is pushed onto your local docker repository. So the next time you can use the command like
oc new-app --docker-image=172.30.1.1:5000/myproject/openshift-hotrod-console-client:latest
to deploy the image if for some reason you had to restart the Openshift server (locally)What would be ideal is that image be build locally and then pushed to OpenShift so that there is no need for a build in OpenShift. Hence this step will updated soon.
-
Verify the cache statistcs by visting the JDG POD and looking at the Java Console in the Details tab. Navigate to jboss.datagrid-infinispan 🡒 Cache 🡒 default(dist_sync) 🡒 Clustered 🡒 Statistics and look at the Number of entries