From 4f18d4496af2c5fbb4e0e6fafdf41b4e7270ec23 Mon Sep 17 00:00:00 2001 From: arun-gupta Date: Fri, 14 Aug 2015 16:15:51 -0700 Subject: [PATCH] using imagesdir --- chapters/docker-basics.adoc | 2 +- chapters/docker-compose.adoc | 2 +- chapters/docker-container-linking.adoc | 2 +- chapters/docker-container.adoc | 6 +- chapters/docker-deployment-options.adoc | 32 ++++---- chapters/docker-eclipse.adoc | 34 ++++----- chapters/docker-javaee7.adoc | 6 +- chapters/docker-kubernetes.adoc | 10 +-- chapters/docker-mod-cluster.adoc | 8 +- chapters/docker-openshift.adoc | 4 +- chapters/docker-swarm.adoc | 2 +- chapters/docker-ticket-monster.adoc | 24 +++--- readme.adoc | 1 + readme.html | 98 ++++++++++++------------- 14 files changed, 116 insertions(+), 115 deletions(-) diff --git a/chapters/docker-basics.adoc b/chapters/docker-basics.adoc index 273eab8..3e60991 100644 --- a/chapters/docker-basics.adoc +++ b/chapters/docker-basics.adoc @@ -24,7 +24,7 @@ Docker has three main components: 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. .Docker architecture -image::chapters/images/docker-architecture.png[] +image::docker-architecture.png[] 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. diff --git a/chapters/docker-compose.adoc b/chapters/docker-compose.adoc index 7d03442..2270831 100644 --- a/chapters/docker-compose.adoc +++ b/chapters/docker-compose.adoc @@ -139,7 +139,7 @@ mysqldb_1 | 2015-06-05 15:40:18 1 [Warning] IP address '172.17.0.24' could not . Access the application at http://dockerhost:8080/employees/resources/employees/. This is shown in the browser as: .Output From Servers Run Using Docker Compose -image::chapters/images/docker-compose-output.png[] +image::docker-compose-output.png[] ### Stop Services diff --git a/chapters/docker-container-linking.adoc b/chapters/docker-container-linking.adoc index b4867cf..f918d5c 100644 --- a/chapters/docker-container-linking.adoc +++ b/chapters/docker-container-linking.adoc @@ -4,7 +4,7 @@ <> 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. .Two Containers On Same Docker Host -image::chapters/images/javaee7-hol-container-linking.png[] +image::javaee7-hol-container-linking.png[] 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. diff --git a/chapters/docker-container.adoc b/chapters/docker-container.adoc index 128cc06..e53fe2d 100644 --- a/chapters/docker-container.adoc +++ b/chapters/docker-container.adoc @@ -34,7 +34,7 @@ At first, the top read-write layer has nothing in it, but any time a process cre We call the union of the read-write layer and all the read-only layers a _union file system_. .Docker Layers -image::chapters/images/plain-wildfly0.png[] +image::plain-wildfly0.png[] ==== 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 Now we're ready to test http://dockerhost:8080 again. This works with the exposed port, as expected. .Welcome WildFly -image::chapters/images/plain-wildfly1.png[] +image::plain-wildfly1.png[] [[Enabling_WildFly_Administration]] ### Enabling WildFly Administration @@ -259,7 +259,7 @@ The username/password credentials are: This shows the admin console as: .Welcome WildFly -image::chapters/images/wildfly-admin-console.png[] +image::wildfly-admin-console.png[] ##### Additional Ways To Find Port Mapping diff --git a/chapters/docker-deployment-options.adoc b/chapters/docker-deployment-options.adoc index f59ac5d..6801408 100644 --- a/chapters/docker-deployment-options.adoc +++ b/chapters/docker-deployment-options.adoc @@ -50,36 +50,36 @@ Start JBoss Developer Studio, if not already started. . Select '`Servers`' tab, create a new server adapter + .Server adapter -image::chapters/images/jbds1.png[] +image::jbds1.png[] + . Assign an existing or create a new WildFly 9.0.0 runtime (changed properties are highlighted.) + .WildFly Runtime Properties -image::chapters/images/jbds2.png[] +image::jbds2.png[] + . If a new runtime needs to be created, pick the directory for WildFly 9.0.0: + .WildFly 9.0.0.Final Runtime -image::chapters/images/jbds3.png[] +image::jbds3.png[] + Click on '`Finish`'. + . Double-click on the newly selected server to configure server properties: + .Server properties -image::chapters/images/jbds4.png[] +image::jbds4.png[] + 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. + . Specify a custom deployment folder on Deployment tab of Server Editor + .Custom deployment folder -image::chapters/images/jbds5.png[] +image::jbds5.png[] + . Right-click on the newly created server adapter and click '`Start`'. + .Started server -image::chapters/images/jbds6.png[] +image::jbds6.png[] ### Deploy Application Using Shared Volumes @@ -89,7 +89,7 @@ image::chapters/images/jbds6.png[] The project runs and displays the start page of the application. .Start Server -image::chapters/images/jbds7.png[] +image::jbds7.png[] Congratulations! @@ -143,7 +143,7 @@ Now you've sucessfully used the CLI to remote deploy the Java EE 7 sample applic 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 <>. Once enabled, it can be accessed at http://dockerhost:9990. .WildFly Web Console -image::chapters/images/console1.png[] +image::console1.png[] Username and password credentials are shown in <>. @@ -159,7 +159,7 @@ Deploy the application using the console with the following steps: . Go to '`Deployments`' tab. + .Deployments tab in WildFly Web Console -image::chapters/images/wildfly9-deployments-tab.png[] +image::wildfly9-deployments-tab.png[] + . Click on '`Add`' button. . On '`Add Deployment`' screen, take the default of '`Upload a new deployment`' and click '`Next>>`'. @@ -168,17 +168,17 @@ image::chapters/images/wildfly9-deployments-tab.png[] . Select '`Enable`' checkbox. + .Enable a deployment -image::chapters/images/wildfly9-add-deployments.png[] +image::wildfly9-add-deployments.png[] + . Click '`Finish`'. + .Java EE 7 Simple Sample Deployed -image::chapters/images/wildfly9-javaee7-simple-sample-deployed.png[] +image::wildfly9-javaee7-simple-sample-deployed.png[] 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: .Java EE 7 Simple Sample Output -image::chapters/images/wildfly9-javaee7-simple-sample-output.png[] +image::wildfly9-javaee7-simple-sample-output.png[] ### Deploy Application Using Management API @@ -195,24 +195,24 @@ In addition to application port 8080, the administration port 9990 is exposed as + . Create a new server adapter in JBoss Developer Studio and name it "`WildFly 9.0.0-Management`". Specify the host name as '`dockerhost`'. + -image::chapters/images/jbds8.png[] +image::jbds8.png[] + . Click on '`Next>`' and change the values as shown. + .Create New Server Adapter -image::chapters/images/jbds9.png[] +image::jbds9.png[] + . Take the default values in '`Remote System Integration`' and click on '`Finish`'. + . 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: + .Management Login Credentials -image::chapters/images/jbds10.png[] +image::jbds10.png[] + . Right-click on the newly created server adapter and click '`Start`'. Status quickly changes to '`Started`' as shown. + .Synchronized WildFly Server -image::chapters/images/jbds11.png[] +image::jbds11.png[] + . 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. . Stop WildFly when you're done. diff --git a/chapters/docker-eclipse.adoc b/chapters/docker-eclipse.adoc index 38ef716..a8a1f2a 100644 --- a/chapters/docker-eclipse.adoc +++ b/chapters/docker-eclipse.adoc @@ -16,12 +16,12 @@ Alternatively, download http://www.eclipse.org/downloads/index-developer-default Specify the '`Name:`' as "`Docker Nightly`" and '`Location:`' as http://download.eclipse.org/linuxtools/updates-docker-nightly/. + .Add Docker Tooling To JBoss Developer Studio -image::chapters/images/jbds-docker-tools1.png[] +image::jbds-docker-tools1.png[] + . Expand Linux Tools, select '`Docker Client`' and '`Docker Tooling`'. + .Add Docker Tooling -image::chapters/images/jbds-docker-tools-nightly-setup.png[] +image::jbds-docker-tools-nightly-setup.png[] + . Click on '`Next >`', '`Next >`', accept the terms of the license agreement, and click on '`Finish`'. This will complete the installation of plugins. + @@ -33,16 +33,16 @@ The Docker Explorer provides a wizard to establish a new connection to a Docker . Use the menu '`Window`', '`Show View`', '`Other...`'. Type '`docker`' to see the output as: + -image::chapters/images/jbds-docker-tools-docker-view.png[] +image::jbds-docker-tools-docker-view.png[] + . Select '`Docker Explorer`' to open Docker Explorer. + -image::chapters/images/jbds-docker-tools-docker-explorer-view.png[] +image::jbds-docker-tools-docker-explorer-view.png[] + . Click on the link in this window to create a connection to Docker Host. Specify the settings as shown: + .Docker Explorer -image::chapters/images/jbds-docker-tools2.png[] +image::jbds-docker-tools2.png[] + Make sure to get IP address of the Docker Host as: + @@ -56,24 +56,24 @@ Also, make sure to specify the correct directory for `.docker` on your machine. . Click on '`Test Connection`' to check the connection. This should show the output as: + .Docker Explorer -image::chapters/images/jbds-docker-tools-test-connection-output.png[] +image::jbds-docker-tools-test-connection-output.png[] + Click on '`OK`' and '`Finish`' to exit out of the wizard. + . Docker Explorer itself is a tree view that handles multiple connections and provides users with quick overview of the existing images and containers. + .Docker Explorer Tree View -image::chapters/images/jbds-docker-tools3.png[] +image::jbds-docker-tools3.png[] + . Customize the view by clicking on the arrow in toolbar: + .Docker Explorer Customize View -image::chapters/images/jbds-docker-tools-customize-view-option.png[] +image::jbds-docker-tools-customize-view-option.png[] + Built-in filters can show/hide intermediate and '`dangling`' images, as well as stopped containers. + .Docker Explorer Customize View Wizard -image::chapters/images/jbds-docker-tools-customize-view-wizard.png[] +image::jbds-docker-tools-customize-view-wizard.png[] ### Docker Images @@ -88,12 +88,12 @@ Lets take a look at it. . Use the menu '`Window`', '`Show View`', '`Other...`', select '`Docker Images`'. It shows the list of images on Docker Host: + .Docker Images View -image::chapters/images/jbds-docker-tools4.png[] +image::jbds-docker-tools4.png[] + . Right-click on the image ending with "`wildfly:latest`" and click on the green arrow in the toolbar. This will show the following wizard: + .Docker Run Container Wizard -image::chapters/images/jbds-docker-tools-run-container-wizard.png[] +image::jbds-docker-tools-run-container-wizard.png[] + 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. + @@ -102,7 +102,7 @@ Click on '`Finish`' to start the container. . When the container is started, all logs are streamed into Eclipse Console: + .Docker Container Logs -image::chapters/images/jbds-docker-tools5.png[] +image::jbds-docker-tools5.png[] ### Docker Containers @@ -111,18 +111,18 @@ Docker Containers view lets the user manage the containers. The view toolbar pro . Use the menu '`Window`', '`Show View`', '`Other...`', select '`Docker Containers`'. It shows the list of running containers on Docker Host: + .Docker Containers View -image::chapters/images/jbds-docker-tools6.png[] +image::jbds-docker-tools6.png[] + . 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`'. + .All Docker Containers -image::chapters/images/jbds-docker-tools-all-containers.png[] +image::jbds-docker-tools-all-containers.png[] + . Select the paused container, and click on the green arrow in the toolbar to restart the container. . Right-click on any running container and select "`Display Log`" to view the log for this container. + .Eclipse Properties View -image::chapters/images/jbds-docker-tools-display-log.png[] +image::jbds-docker-tools-display-log.png[] TODO: Users can also attach an Eclipse console to a running Docker container to follow the logs and use the STDIN to interact with it. @@ -135,9 +135,9 @@ Eclipse Properties view is used to provide more information about the containers Info view is shown as: + .Docker Container Properties View Info -image::chapters/images/jbds-docker-tools-properties-info.png[] +image::jbds-docker-tools-properties-info.png[] + Inspect view is shown as: + .Docker Container Properties View Inspect -image::chapters/images/jbds-docker-tools-properties-inspect.png[] +image::jbds-docker-tools-properties-inspect.png[] diff --git a/chapters/docker-javaee7.adoc b/chapters/docker-javaee7.adoc index 8e0c523..db4215b 100644 --- a/chapters/docker-javaee7.adoc +++ b/chapters/docker-javaee7.adoc @@ -4,7 +4,7 @@ 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. .Java EE 7 Application Architecture -image::chapters/images/javaee7-hol.png[] +image::javaee7-hol.png[] Pull the Docker image that contains WildFly and pre-built Java EE 7 application WAR file as shown: @@ -27,12 +27,12 @@ ifdef::public[docker run -it -p 8080:8080 arungupta/javaee7-hol] See the application in action at http://dockerhost:8080/movieplex7/. The output is shown: .Java EE 7 Application Output -image::chapters/images/javaee7-movieplex7.png[] +image::javaee7-movieplex7.png[] This uses an in-memory database with WildFly application server as shown in the image: .In-memory Database -image::chapters/images/javaee7-hol-in-memory-database.png[] +image::javaee7-hol-in-memory-database.png[] Only two changes are required to the standard `jboss/wildfly` image: diff --git a/chapters/docker-kubernetes.adoc b/chapters/docker-kubernetes.adoc index 5368125..f928b5b 100644 --- a/chapters/docker-kubernetes.adoc +++ b/chapters/docker-kubernetes.adoc @@ -24,7 +24,7 @@ At a very high level, there are three key components: A picture is always worth a thousand words and so this is a high-level logical block diagram for Kubernetes: .Kubernetes Key Components -image::chapters/images/kubernetes-key-components.png[] +image::kubernetes-key-components.png[] 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. @@ -134,18 +134,18 @@ By default, the Vagrant setup will create a single kubernetes-master and 1 kuber 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. + .Kubernetes Cluster using Vagrant -image::chapters/images/kubernetes-cluster-vagrant.png[] +image::kubernetes-cluster-vagrant.png[] + 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. + . 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: + -image::chapters/images/kubernetes-master-default-output-certificate.png[] +image::kubernetes-master-default-output-certificate.png[] + Click on '`Advanced`' and then on '`Proceed to 10.245.1.2`' to see the output as: + .Kubernetes Output from Master -image::chapters/images/kubernetes-master-default-output.png[] +image::kubernetes-master-default-output.png[] + Use '`vagrant`' as the username and '`vagrant`' as the password. + @@ -190,7 +190,7 @@ Pods, and the IP addresses assigned to them, are ephemeral. If a pod dies then K 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. .Kubernetes Service -image::chapters/images/kubernetes-service.png[] +image::kubernetes-service.png[] 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. diff --git a/chapters/docker-mod-cluster.adoc b/chapters/docker-mod-cluster.adoc index b726403..6455fa2 100644 --- a/chapters/docker-mod-cluster.adoc +++ b/chapters/docker-mod-cluster.adoc @@ -6,7 +6,7 @@ A frequent requirement for Java EE based applications is running them on a clust The diagram below shows what will be achieved in this section: .Standalone Cluster with WildFly and mod_cluster -image::chapters/images/wildfly_cluster1.png[] +image::wildfly_cluster1.png[] . Start Apache HTTPD server + @@ -18,7 +18,7 @@ docker run -d --name modcluster -p 80:80 classroom.example.com:5000/mod_cluster . Open http://dockerhost/mod_cluster_manager in your browser to see the empty console as: + .Apache HTTPD runing mod_cluster_manager interface -image::chapters/images/wildfly_cluster2.png[] +image::wildfly_cluster2.png[] + . Start Postgres database container, if not already running: + @@ -37,12 +37,12 @@ docker run -d --name server1 --link db:db --link modcluster:modcluster classroom Besides linking the database container using `--link db:db`, we also link the ``modcluster'' container. This should be done rather quickly and if you now revisit the http://dockerhost/mod_cluster_manager/[mod_cluster_manager] in your browser, then you can see that the first server was registered with the loadbalancer: + .First WildFly instance registered with Load Balancer -image::chapters/images/wildfly_cluster3.png[] +image::wildfly_cluster3.png[] + . To make sure the Ticket Monster application is also running just visit http://dockerhost/ticket-monster and you will be presented with the Ticket Monster welcome screen. + .Clustered Ticket Monster Application -image::chapters/images/wildfly_cluster4.png[] +image::wildfly_cluster4.png[] + . Start as many WildFly instances as you want (and your computer memory can handle): + diff --git a/chapters/docker-openshift.adoc b/chapters/docker-openshift.adoc index 17cd5ea..88219f4 100644 --- a/chapters/docker-openshift.adoc +++ b/chapters/docker-openshift.adoc @@ -7,7 +7,7 @@ OpenShift is Red Hat’s open source PaaS platform. OpenShift v3 (due to be rele 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. -image::chapters/images/openshiftv3-stack.png[] +image::openshiftv3-stack.png[] ### Download and Run OpenShift Origin @@ -43,7 +43,7 @@ df29f4cdff9e openshift/origin:latest "/usr/bin/openshift 57 seconds Here is the deployment diagram of our application: -image::chapters/images/openshiftv3-wildfly-mysql-deployment.png[] +image::openshiftv3-wildfly-mysql-deployment.png[] . WildFly and MySQL are running on separate pods. . Each of them is wrapped in a Replication Controller to enable simplified scaling. diff --git a/chapters/docker-swarm.adoc b/chapters/docker-swarm.adoc index 4ae4edb..2c45e00 100644 --- a/chapters/docker-swarm.adoc +++ b/chapters/docker-swarm.adoc @@ -5,7 +5,7 @@ Docker Swarm is native clustering for Docker. It allows you create and access to ### Key Components of Docker Swarm .Key Components of Docker Swarm -image::chapters/images/docker-swarm-components.png[] +image::docker-swarm-components.png[] *Swarm Manager*: Docker Swarm has a Manager, that is a pre-defined Docker Host, and is a single point for all administration. The swarm manager orchestrates and schedules containers on the entire cluster. Currently only a single instance of manager is allowed in the cluster. This is a SPOF for high availability architectures and additional managers will be allowed in a future version of Swarm with https://github.com/docker/swarm/issues/598[#598]. diff --git a/chapters/docker-ticket-monster.adoc b/chapters/docker-ticket-monster.adoc index 2394b6d..709b6fa 100644 --- a/chapters/docker-ticket-monster.adoc +++ b/chapters/docker-ticket-monster.adoc @@ -3,7 +3,7 @@ http://www.jboss.org/ticket-monster/[Ticket Monster] is an example application that focuses on Java EE6 - JPA 2, CDI, EJB 3.1 and JAX-RS along with HTML5 and jQuery Mobile. It is a moderately complex application that demonstrates how to build modern web applications optimized for mobile & desktop. TicketMonster is representative of an online ticketing broker - providing access to events (e.g. concerts, shows, etc) with an online booking application. .TicketMonster architecture -image::chapters/images/ticket-monster_tutorial_architecture.png[] +image::ticket-monster_tutorial_architecture.png[] The application uses Java EE 6 services to provide business logic and persistence, utilizing technologies such as CDI, EJB 3.1 and JAX-RS, JPA 2. These services back the user-facing booking process, which is implemented using HTML5 and JavaScript, with support for mobile devices through jQuery Mobile. @@ -124,29 +124,29 @@ Start JBoss Developer Studio, if not already started. . Create a server adapter + .Server adapter -image::chapters/images/jbds1.png[] +image::jbds1.png[] + . Assign or create a WildFly 8.x runtime (changed properties are highlighted.) + .WildFly Runtime Properties -image::chapters/images/jbds2.png[] +image::jbds2.png[] + . Setup server properties as shown in the following image. + 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. + .Server properties -image::chapters/images/jbds3.png[] +image::jbds3.png[] + . Specify a custom deployment folder on Deployment tab of Server Editor + .Server Editor -image::chapters/images/jbds4.png[] +image::jbds4.png[] + . Right-click on the newly created server adapter and click ``Start''. + .Start Server -image::chapters/images/jbds5.png[] +image::jbds5.png[] ### Deploy Application Using Shared Volumes @@ -155,7 +155,7 @@ Open Ticket Monster application source code. Right-click on the project, select The project runs and displays the start page of Ticket Monster application. .Start Server -image::chapters/images/jbds6.png[] +image::jbds6.png[] Congratulations! You've just deployed your first application to WildFly running in a Docker container from JBoss Developer Studio. @@ -217,7 +217,7 @@ And again, keep the container running, we're going to look into the last deploym WildFly comes with a web-based administration console. It 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 web browser. .WildFly Web Console -image::chapters/images/console1.png[] +image::console1.png[] Username and password credentials are shown in <>. Now navigate through the console and execute the following steps to deploy the application: @@ -244,22 +244,22 @@ There is no mapped volume in this case but an additional port exposed. The WildF . Create another new server adapter in JBoss Developer Studio. + .Create New Server Adapter -image::chapters/images/jbds7.png[] +image::jbds7.png[] + . Keep the defaults in the adapter properties. + .Adapter Properties -image::chapters/images/jbds8.png[] +image::jbds8.png[] + . Set up server properties by specifying the admin credentials (docker#admin). Note, you need to delete the existing password and use this instead: + .Management Login Credentials -image::chapters/images/jbds9.png[] +image::jbds9.png[] + . Right-click on the newly created server adapter and click ``Start''. Status quickly changes to ``Started, Synchronized'' as shown. + .Synchronized WildFly Server -image::chapters/images/jbds10.png[] +image::jbds10.png[] + . Right-click on the Ticket Monster project, select ``Run on Server'' and choose this server. The project runs and displays the start page of ticket-monster. . Stop WildFly when you're done. diff --git a/readme.adoc b/readme.adoc index 54c6169..8465368 100644 --- a/readme.adoc +++ b/readme.adoc @@ -8,6 +8,7 @@ v1.2.x, Aug 13, 2015 //// :public: :toc-placement!: +:imagesdir: ./chapters/images/ toc::[] diff --git a/readme.html b/readme.html index 11c4fbc..49035ac 100644 --- a/readme.html +++ b/readme.html @@ -879,7 +879,7 @@

Docker Basics

-docker architecture +docker architecture
Figure 1. Docker architecture
@@ -1170,7 +1170,7 @@

Pull Image

-plain wildfly0 +plain wildfly0
Figure 2. Docker Layers
@@ -1403,7 +1403,7 @@

Run Container with Specified Port
-plain wildfly1 +plain wildfly1
Figure 3. Welcome WildFly
@@ -1489,7 +1489,7 @@

Default Port Mapping

-wildfly admin console +wildfly admin console
Figure 4. Welcome WildFly
@@ -1625,7 +1625,7 @@

Deploy Java EE 7 Application (Pre-Built WAR)

-javaee7 hol +javaee7 hol
Figure 5. Java EE 7 Application Architecture
@@ -1653,7 +1653,7 @@

Deploy Java EE 7 Application (Pre-Built WAR)

-javaee7 movieplex7 +javaee7 movieplex7
Figure 6. Java EE 7 Application Output
@@ -1662,7 +1662,7 @@

Deploy Java EE 7 Application (Pre-Built WAR)

-javaee7 hol in memory database +javaee7 hol in memory database
Figure 7. In-memory Database
@@ -1699,7 +1699,7 @@

Deploy Java EE 7 Application (Container Linki
-javaee7 hol container linking +javaee7 hol container linking
Figure 8. Two Containers On Same Docker Host
@@ -1850,7 +1850,7 @@

Configure JBoss Developer Studio

Select ‘Servers’ tab, create a new server adapter

-jbds1 +jbds1
Figure 9. Server adapter
@@ -1859,7 +1859,7 @@

Configure JBoss Developer Studio

Assign an existing or create a new WildFly 9.0.0 runtime (changed properties are highlighted.)

-jbds2 +jbds2
Figure 10. WildFly Runtime Properties
@@ -1868,7 +1868,7 @@

Configure JBoss Developer Studio

If a new runtime needs to be created, pick the directory for WildFly 9.0.0:

-jbds3 +jbds3
Figure 11. WildFly 9.0.0.Final Runtime
@@ -1880,7 +1880,7 @@

Configure JBoss Developer Studio

Double-click on the newly selected server to configure server properties:

-jbds4 +jbds4
Figure 12. Server properties
@@ -1892,7 +1892,7 @@

Configure JBoss Developer Studio

Specify a custom deployment folder on Deployment tab of Server Editor

-jbds5 +jbds5
Figure 13. Custom deployment folder
@@ -1901,7 +1901,7 @@

Configure JBoss Developer Studio

Right-click on the newly created server adapter and click ‘Start’.

-jbds6 +jbds6
Figure 14. Started server
@@ -1926,7 +1926,7 @@

Deploy Application Using Share
-jbds7 +jbds7
Figure 15. Start Server
@@ -2015,7 +2015,7 @@

Deploy Application Using Web Cons
-console1 +console1
Figure 16. WildFly Web Console
@@ -2048,7 +2048,7 @@

Deploy Application Using Web Cons

Go to ‘Deployments’ tab.

-wildfly9 deployments tab +wildfly9 deployments tab
Figure 17. Deployments tab in WildFly Web Console
@@ -2069,7 +2069,7 @@

Deploy Application Using Web Cons

Select ‘Enable’ checkbox.

-wildfly9 add deployments +wildfly9 add deployments
Figure 18. Enable a deployment
@@ -2078,7 +2078,7 @@

Deploy Application Using Web Cons

Click ‘Finish’.

-wildfly9 javaee7 simple sample deployed +wildfly9 javaee7 simple sample deployed
Figure 19. Java EE 7 Simple Sample Deployed
@@ -2090,7 +2090,7 @@

Deploy Application Using Web Cons
-wildfly9 javaee7 simple sample output +wildfly9 javaee7 simple sample output
Figure 20. Java EE 7 Simple Sample Output
@@ -2117,7 +2117,7 @@

Deploy Application Using Manag

Create a new server adapter in JBoss Developer Studio and name it “WildFly 9.0.0-Management”. Specify the host name as ‘dockerhost’.

-jbds8 +jbds8
@@ -2125,7 +2125,7 @@

Deploy Application Using Manag

Click on ‘Next>’ and change the values as shown.

-jbds9 +jbds9
Figure 21. Create New Server Adapter
@@ -2137,7 +2137,7 @@

Deploy Application Using Manag

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:

-jbds10 +jbds10
Figure 22. Management Login Credentials
@@ -2146,7 +2146,7 @@

Deploy Application Using Manag

Right-click on the newly created server adapter and click ‘Start’. Status quickly changes to ‘Started’ as shown.

-jbds11 +jbds11
Figure 23. Synchronized WildFly Server
@@ -2384,7 +2384,7 @@

Install Docker Tools Plugins

-jbds docker tools1 +jbds docker tools1
Figure 24. Add Docker Tooling To JBoss Developer Studio
@@ -2393,7 +2393,7 @@

Install Docker Tools Plugins

Expand Linux Tools, select ‘Docker Client’ and ‘Docker Tooling’.

-jbds docker tools nightly setup +jbds docker tools nightly setup
Figure 25. Add Docker Tooling
@@ -2418,7 +2418,7 @@

Docker Explorer

Use the menu ‘Window’, ‘Show View’, ‘Other…​’. Type ‘docker’ to see the output as:

-jbds docker tools docker view +jbds docker tools docker view
@@ -2426,7 +2426,7 @@

Docker Explorer

Select ‘Docker Explorer’ to open Docker Explorer.

-jbds docker tools docker explorer view +jbds docker tools docker explorer view
@@ -2434,7 +2434,7 @@

Docker Explorer

Click on the link in this window to create a connection to Docker Host. Specify the settings as shown:

-jbds docker tools2 +jbds docker tools2
Figure 26. Docker Explorer
@@ -2454,7 +2454,7 @@

Docker Explorer

Click on ‘Test Connection’ to check the connection. This should show the output as:

-jbds docker tools test connection output +jbds docker tools test connection output
Figure 27. Docker Explorer
@@ -2466,7 +2466,7 @@

Docker Explorer

Docker Explorer itself is a tree view that handles multiple connections and provides users with quick overview of the existing images and containers.

-jbds docker tools3 +jbds docker tools3
Figure 28. Docker Explorer Tree View
@@ -2475,7 +2475,7 @@

Docker Explorer

Customize the view by clicking on the arrow in toolbar:

-jbds docker tools customize view option +jbds docker tools customize view option
Figure 29. Docker Explorer Customize View
@@ -2484,7 +2484,7 @@

Docker Explorer

-jbds docker tools customize view wizard +jbds docker tools customize view wizard
Figure 30. Docker Explorer Customize View Wizard
@@ -2519,7 +2519,7 @@

Docker Images

Use the menu ‘Window’, ‘Show View’, ‘Other…​’, select ‘Docker Images’. It shows the list of images on Docker Host:

-jbds docker tools4 +jbds docker tools4
Figure 31. Docker Images View
@@ -2528,7 +2528,7 @@

Docker Images

Right-click on the image ending with “wildfly:latest” and click on the green arrow in the toolbar. This will show the following wizard:

-jbds docker tools run container wizard +jbds docker tools run container wizard
Figure 32. Docker Run Container Wizard
@@ -2543,7 +2543,7 @@

Docker Images

When the container is started, all logs are streamed into Eclipse Console:

-jbds docker tools5 +jbds docker tools5
Figure 33. Docker Container Logs
@@ -2562,7 +2562,7 @@

Docker Containers

Use the menu ‘Window’, ‘Show View’, ‘Other…​’, select ‘Docker Containers’. It shows the list of running containers on Docker Host:

-jbds docker tools6 +jbds docker tools6
Figure 34. Docker Containers View
@@ -2571,7 +2571,7 @@

Docker Containers

Pause the container by clicking on the “pause” button in the toolbar (#469310). Show the complete list of containers by clicking on the ‘View Menu’, ‘Show all containers’.

-jbds docker tools all containers +jbds docker tools all containers
Figure 35. All Docker Containers
@@ -2583,7 +2583,7 @@

Docker Containers

Right-click on any running container and select “Display Log” to view the log for this container.

-jbds docker tools display log +jbds docker tools display log
Figure 36. Eclipse Properties View
@@ -2608,7 +2608,7 @@

Details on Images and Containers

-jbds docker tools properties info +jbds docker tools properties info
Figure 37. Docker Container Properties View Info
@@ -2617,7 +2617,7 @@

Details on Images and Containers

-jbds docker tools properties inspect +jbds docker tools properties inspect
Figure 38. Docker Container Properties View Inspect
@@ -2992,7 +2992,7 @@

Verify Application

-docker compose output +docker compose output
Figure 39. Output From Servers Run Using Docker Compose
@@ -3032,7 +3032,7 @@

Java EE Application on Doc

Key Components of Docker Swarm

-docker swarm components +docker swarm components
Figure 40. Key Components of Docker Swarm
@@ -3553,7 +3553,7 @@

Key Components

-kubernetes key components +kubernetes key components
Figure 41. Kubernetes Key Components
@@ -3718,7 +3718,7 @@

Verify the Cluster

-kubernetes cluster vagrant +kubernetes cluster vagrant
Figure 42. Kubernetes Cluster using Vagrant
@@ -3730,7 +3730,7 @@

Verify the Cluster

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:

-kubernetes master default output certificate +kubernetes master default output certificate
@@ -3738,7 +3738,7 @@

Verify the Cluster

-kubernetes master default output +kubernetes master default output
Figure 43. Kubernetes Output from Master
@@ -3798,7 +3798,7 @@

Deploy Java EE Application

-kubernetes service +kubernetes service
Figure 44. Kubernetes Service
@@ -4451,7 +4451,7 @@

References