Skip to content

Commit cc77ac1

Browse files
committed
First Clustering Steps
1 parent 16a8982 commit cc77ac1

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

images/wildfly_cluster1.png

19.4 KB
Loading

images/wildfly_cluster2.png

13.9 KB
Loading

readme.adoc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,10 @@ And again, keep the container running, we're going to look into the last deploym
451451
The build in Web-Console also relies on the same management APIs that we've already been using via JBoss Developer Tools and the CLI. It does provide a nice web-based way to administrate your instance and if you've already exposed the container ports, you can simply access it via the URL: http://dockerhost:9990 in your webbrowser.
452452
This will point you to the management interface
453453

454-
.Start Server
454+
.The Web Console
455455
image::images/console1.png[]
456456

457+
457458
If you're prompted for username and password enter "admin" as username and "docker#admin" as password. Now navigate through it and execute the following steps:
458459

459460
. Go to the "Deployments tab".
@@ -462,8 +463,36 @@ If you're prompted for username and password enter "admin" as username and "dock
462463
. On the "Step 2/2" screen, click "Next" again.
463464

464465
Now you've been successfully deploying the Ticket Monster application in three different ways. Time to look at some more features, that Docker can provide to Java developers.
466+
Make sure to stop the WildFly instance after this last option.
467+
468+
Stop wildfly when you're done.
469+
[source, text]
470+
----
471+
docker stop wildfly
472+
----
465473

466474
## Ticket-Monster Docker Cluster
475+
Another frequent requirement for Java EE based applications is clustering. While setup and test can be complicated on developer machines, this is where Docker can play to it's full potential. With the help of images and automatic port mapping, we're ready to test Ticket-Monster on a couple of WildFly instances and add and remove them randomly.
476+
Here is the rough architecture, of what we're going to do:
477+
478+
.Standalone Cluster with WildFly and mod_cluster
479+
image::images/wildfly_cluster1.png[]
480+
481+
482+
We're going to start with the Apache HTTPD server.
483+
[source, text]
484+
----
485+
docker run -d --name modcluster -p 80:80 <INSTRUCTOR_IP>:5000/mod_cluster
486+
----
487+
488+
To see if everything worked out the way we wanted it, open http://dockerhost/mod_cluster_manager with your browser. This should show the empty console:
489+
490+
.Apache HTTPD runing mod_cluster_manager interface
491+
image::images/wildfly_cluster2.png[]
492+
493+
494+
495+
467496

468497
https://github.com/rafabene/devops-demo
469498

0 commit comments

Comments
 (0)