You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapters/docker-basics.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Docker has three main components:
24
24
In order for these three components to work together, there is *Docker Daemon* that runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. In addition, there is *Client* that is a Docker binary which accepts commands from the user and communicates back and forth with the daemon.
25
25
26
26
.Docker architecture
27
-
image::../images/docker-architecture.png[]
27
+
image::chapters/images/docker-architecture.png[]
28
28
29
29
Client communicates with Daemon, either co-located on the same host, or on a different host. It requests the Daemon to pull an image from the repository using `pull` command. The Daemon then downloads the image from Docker Hub, or whatever registry is configured. Multiple images can be downloaded from the registry and installed on Daemon host. Images are run using `run` command to create containers on demand.
30
30
@@ -140,4 +140,4 @@ PING dockerhost (192.168.99.101): 56 data bytes
140
140
64 bytes from 192.168.99.101: icmp_seq=1 ttl=64 time=0.387 ms
Copy file name to clipboardExpand all lines: chapters/docker-container-linking.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
<<JavaEE7_PreBuilt_WAR>> explained how to use an in-memory database with the application server. This gets you started rather quickly but becomes a bottleneck soon as the database is only in-memory. This means that any changes made to your schema and data are lost when the application server shuts down. In this case, you need to use a database server that resides outside the application server. For example, MySQL as the database server and WildFly as the application server.
This section will show how https://docs.docker.com/userguide/dockerlinks/[Docker Container Linking] can be used to connect to a service running inside a Docker container via a network port.
Copy file name to clipboardExpand all lines: chapters/docker-container.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ At first, the top read-write layer has nothing in it, but any time a process cre
34
34
We call the union of the read-write layer and all the read-only layers a _union file system_.
35
35
36
36
.Docker Layers
37
-
image::../images/plain-wildfly0.png[]
37
+
image::chapters/images/plain-wildfly0.png[]
38
38
====
39
39
40
40
In our particular case, the https://github.com/jboss-dockerfiles/wildfly/blob/master/Dockerfile[jboss/wildfly] image extends the https://github.com/jboss-dockerfiles/base/blob/master/Dockerfile[jboss/base-jdk:7] image which adds the OpenJDK distribution on top of the https://github.com/jboss-dockerfiles/base/blob/master/Dockerfile[jboss/base] image.
@@ -205,7 +205,7 @@ See more about networking on the Docker website link:https://docs.docker.com/art
205
205
Now we're ready to test http://dockerhost:8080 again. This works with the exposed port, as expected.
206
206
207
207
.Welcome WildFly
208
-
image::../images/plain-wildfly1.png[]
208
+
image::chapters/images/plain-wildfly1.png[]
209
209
210
210
[[Enabling_WildFly_Administration]]
211
211
### Enabling WildFly Administration
@@ -259,7 +259,7 @@ The username/password credentials are:
Copy file name to clipboardExpand all lines: chapters/docker-deployment-options.adoc
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,36 +50,36 @@ Start JBoss Developer Studio, if not already started.
50
50
. Select '`Servers`' tab, create a new server adapter
51
51
+
52
52
.Server adapter
53
-
image::../images/jbds1.png[]
53
+
image::chapters/images/jbds1.png[]
54
54
+
55
55
. Assign an existing or create a new WildFly 9.0.0 runtime (changed properties are highlighted.)
56
56
+
57
57
.WildFly Runtime Properties
58
-
image::../images/jbds2.png[]
58
+
image::chapters/images/jbds2.png[]
59
59
+
60
60
. If a new runtime needs to be created, pick the directory for WildFly 9.0.0:
61
61
+
62
62
.WildFly 9.0.0.Final Runtime
63
-
image::../images/jbds3.png[]
63
+
image::chapters/images/jbds3.png[]
64
64
+
65
65
Click on '`Finish`'.
66
66
+
67
67
. Double-click on the newly selected server to configure server properties:
68
68
+
69
69
.Server properties
70
-
image::../images/jbds4.png[]
70
+
image::chapters/images/jbds4.png[]
71
71
+
72
72
The host name is specified to '`dockerhost`'. Two properties on the left are automatically propagated from the previous dialog. Additional two properties on the right side are required to disable to keep deployment scanners in sync with the server.
73
73
+
74
74
. Specify a custom deployment folder on Deployment tab of Server Editor
75
75
+
76
76
.Custom deployment folder
77
-
image::../images/jbds5.png[]
77
+
image::chapters/images/jbds5.png[]
78
78
+
79
79
. Right-click on the newly created server adapter and click '`Start`'.
80
80
+
81
81
.Started server
82
-
image::../images/jbds6.png[]
82
+
image::chapters/images/jbds6.png[]
83
83
84
84
### Deploy Application Using Shared Volumes
85
85
@@ -89,7 +89,7 @@ image::../images/jbds6.png[]
89
89
The project runs and displays the start page of the application.
90
90
91
91
.Start Server
92
-
image::../images/jbds7.png[]
92
+
image::chapters/images/jbds7.png[]
93
93
94
94
Congratulations!
95
95
@@ -143,7 +143,7 @@ Now you've sucessfully used the CLI to remote deploy the Java EE 7 sample applic
143
143
WildFly comes with a web-based administration console. It also relies on the same management APIs that are used by JBoss Developer Tools and the CLI. It provides a simple and easy to use web-based console to manage WildFly instance. For a Docker image, it needs to be explicitly enabled as explained in <<Enabling_WildFly_Administration>>. Once enabled, it can be accessed at http://dockerhost:9990.
144
144
145
145
.WildFly Web Console
146
-
image::../images/console1.png[]
146
+
image::chapters/images/console1.png[]
147
147
148
148
Username and password credentials are shown in <<WildFly_Administration_Credentials>>.
149
149
@@ -159,7 +159,7 @@ Deploy the application using the console with the following steps:
This will complete the deployment of the Java EE 7 application using Web Console. The output can be seen out http://dockerhost:8080/javaee7-simple-sample and looks like:
@@ -195,24 +195,24 @@ In addition to application port 8080, the administration port 9990 is exposed as
195
195
+
196
196
. Create a new server adapter in JBoss Developer Studio and name it "`WildFly 9.0.0-Management`". Specify the host name as '`dockerhost`'.
197
197
+
198
-
image::../images/jbds8.png[]
198
+
image::chapters/images/jbds8.png[]
199
199
+
200
200
. Click on '`Next>`' and change the values as shown.
201
201
+
202
202
.Create New Server Adapter
203
-
image::../images/jbds9.png[]
203
+
image::chapters/images/jbds9.png[]
204
204
+
205
205
. Take the default values in '`Remote System Integration`' and click on '`Finish`'.
206
206
+
207
207
. Change server properties by double clicking on the newly created server adapter. Specify admin credentials (username: docker, password: docker#admin). Note, you need to delete the existing password and use this instead:
208
208
+
209
209
.Management Login Credentials
210
-
image::../images/jbds10.png[]
210
+
image::chapters/images/jbds10.png[]
211
211
+
212
212
. Right-click on the newly created server adapter and click '`Start`'. Status quickly changes to '`Started`' as shown.
213
213
+
214
214
.Synchronized WildFly Server
215
-
image::../images/jbds11.png[]
215
+
image::chapters/images/jbds11.png[]
216
216
+
217
217
. Right-click on the javaee7-simple-sample project, select '`Run on Server`' and choose this server. The project runs and displays the start page of the application.
Click on '`OK`' and '`Finish`' to exit out of the wizard.
62
62
+
63
63
. Docker Explorer itself is a tree view that handles multiple connections and provides users with quick overview of the existing images and containers.
64
64
+
65
65
.Docker Explorer Tree View
66
-
image::../images/jbds-docker-tools3.png[]
66
+
image::chapters/images/jbds-docker-tools3.png[]
67
67
+
68
68
. Customize the view by clicking on the arrow in toolbar:
By default, all exports ports from the image are mapped to random ports on the host interface. This setting can be changed by unselecting the first checkbox and specify exact port mapping.
99
99
+
@@ -102,7 +102,7 @@ Click on '`Finish`' to start the container.
102
102
. When the container is started, all logs are streamed into Eclipse Console:
103
103
+
104
104
.Docker Container Logs
105
-
image::../images/jbds-docker-tools5.png[]
105
+
image::chapters/images/jbds-docker-tools5.png[]
106
106
107
107
### Docker Containers
108
108
@@ -111,18 +111,18 @@ Docker Containers view lets the user manage the containers. The view toolbar pro
111
111
. Use the menu '`Window`', '`Show View`', '`Other...`', select '`Docker Containers`'. It shows the list of running containers on Docker Host:
112
112
+
113
113
.Docker Containers View
114
-
image::../images/jbds-docker-tools6.png[]
114
+
image::chapters/images/jbds-docker-tools6.png[]
115
115
+
116
116
. Pause the container by clicking on the "`pause`" button in the toolbar (https://bugs.eclipse.org/bugs/show_bug.cgi?id=469310[#469310]). Show the complete list of containers by clicking on the '`View Menu`', '`Show all containers`'.
Copy file name to clipboardExpand all lines: chapters/docker-javaee7.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
https://github.com/javaee-samples/javaee7-hol[Java EE 7 Movieplex] is a standard multi-tier enterprise application that shows design patterns and anti-patterns for a typical Java EE 7 application.
5
5
6
6
.Java EE 7 Application Architecture
7
-
image::../images/javaee7-hol.png[]
7
+
image::chapters/images/javaee7-hol.png[]
8
8
9
9
Pull the Docker image that contains WildFly and pre-built Java EE 7 application WAR file as shown:
10
10
@@ -27,12 +27,12 @@ ifdef::public[docker run -it -p 8080:8080 arungupta/javaee7-hol]
27
27
See the application in action at http://dockerhost:8080/movieplex7/. The output is shown:
28
28
29
29
.Java EE 7 Application Output
30
-
image::../images/javaee7-movieplex7.png[]
30
+
image::chapters/images/javaee7-movieplex7.png[]
31
31
32
32
This uses an in-memory database with WildFly application server as shown in the image:
After the 50,000 feet view, lets fly a little lower at 30,000 feet and take a look at how Kubernetes make all of this happen. There are a few key components at Master and Minion that make this happen.
30
30
@@ -134,18 +134,18 @@ By default, the Vagrant setup will create a single kubernetes-master and 1 kuber
134
134
NOTE: By default, only one minion is created. This can be manipulated by setting an environment variable NUM_MINIONS variable to an integer before invoking `kube-up.sh` script.
By default, each VM in the cluster is running Fedora, Kubelet is installed into ``systemd'', and all other Kubernetes services are running as containers on Master.
140
140
+
141
141
. Access https://10.245.1.2 (or whatever IP address is assigned to your kubernetes cluster start up log). This may present the warning as shown below:
Use '`vagrant`' as the username and '`vagrant`' as the password.
151
151
+
@@ -190,7 +190,7 @@ Pods, and the IP addresses assigned to them, are ephemeral. If a pod dies then K
190
190
Kubernetes services is an abstraction which defines a logical set of pods. A service is typically back-ended by one or more physical pods (associated using labels), and it has a permanent IP address that can be used by other pods/applications. For example, WildFly pod can not directly connect to a MySQL pod but can connect to MySQL service. In essence, Kubernetes service offers clients an IP and port pair which, when accessed, redirects to the appropriate backends.
191
191
192
192
.Kubernetes Service
193
-
image::../images/kubernetes-service.png[]
193
+
image::chapters/images/kubernetes-service.png[]
194
194
195
195
NOTE: In this case, all the pods are running on a single minion. This is because, that is the default number for a Kubernetes cluster. The pod can very be on another minion if more number of minions are configured to start in the cluster.
0 commit comments