Skip to content

Commit 231d522

Browse files
committed
adding some details about OpenShift - lots TODO
1 parent 9367b7e commit 231d522

1 file changed

Lines changed: 54 additions & 1 deletion

File tree

chapters/docker-openshift.adoc

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
## OpenShift v3 (Optional Part, No Windows?)
22

3-
If you are on a Mac or Linux system, you can also try out clustering with OpenShift V3 and Kubernetes. For this is an optional step in the lab, you can follow these separate instructions.
3+
[quote, github.com/openshift/origin]
4+
OpenShift adds developer and operational centric tools on top of Kubernetes to enable rapid application development, easy deployment and scaling, and long-term lifecycle maintenance for small and large teams and applications.
5+
6+
OpenShift is Red Hat’s open source PaaS platform. OpenShift v3 (due to be released this year) will provide a holistic experience on running your microservices using Docker and Kubernetes. In a classic Red Hat way, all the work is done in the open source at OpenShift Origin. This will also drive the next major release of OpenShift Online and OpenShift Enterprise.
7+
8+
OpenShift v3 uses a new platform stack that is using plenty of community projects where Red Hat contributes such as Fedora, Centos, Docker, Project Atomic, Kubernetes, and OpenStack. OpenShift v3 Platform Combines Docker, Kubernetes, Atomic and More explain this platform stack in detail.
9+
10+
image::../images/openshiftv3-stack.png[]
11+
12+
### Download and Run OpenShift Origin
13+
14+
OpenShift Origin is available as a Docker container. It has all of the software prebuilt and pre-installed, but you do need to do a few things to get it going.
15+
16+
. Create a `/var/lib/openshift` folder on your Docker host. This volume will be mounted in the container to hold any data such that it is preserved after restart.
17+
+
18+
[source, text]
19+
----
20+
docker-machine ssh lab "mkdir /var/lib/openshift"
21+
----
22+
+
23+
. Download and run the OpenShift Origin container as:
24+
+
25+
[source, text]
26+
----
27+
$ docker run -d --name "openshift-origin" --net=host --privileged \
28+
-v /var/run/docker.sock:/var/run/docker.sock \
29+
-v /var/lib/openshift:/var/lib/openshift \
30+
dockerlab:5000/openshift start
31+
----
32+
+
33+
. Check that the container is running:
34+
+
35+
[source, text]
36+
----
37+
> docker ps
38+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
39+
df29f4cdff9e openshift/origin:latest "/usr/bin/openshift 57 seconds ago Up 57 seconds openshift-origin
40+
----
41+
42+
### Run Java EE Application
43+
44+
Here is the deployment diagram of our application:
45+
46+
image::../images/openshiftv3-wildfly-mysql-deployment.png[]
47+
48+
. WildFly and MySQL are running on separate pods.
49+
. Each of them is wrapped in a Replication Controller to enable simplified scaling.
50+
. Each Replication Controller is published as a Service.
51+
. WildFly talks to the MySQL service, as opposed to directly to the pod. This is important as Pods, and IP addresses assigned to them, are ephemeral.
52+
53+
Lets get started!
54+
55+
. Docker host is already configured to trust insecure registry service. This registry will be used to push images for build/test/deploy cycle.
56+
457

558
http://blog.arungupta.me/openshift-v3-getting-started-javaee7-wildfly-mysql/

0 commit comments

Comments
 (0)