Skip to content

Commit 89404b7

Browse files
committed
removing references to classroom/public macros
1 parent ab99dee commit 89404b7

7 files changed

Lines changed: 38 additions & 140 deletions

chapters/docker-compose.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ Docker Compose script is only available for OSX and Linux. https://github.com/ar
3535
[source, yml]
3636
----
3737
mysqldb:
38-
image: classroom.example.com:5000/mysql
38+
image: mysql
3939
environment:
4040
MYSQL_DATABASE: sample
4141
MYSQL_USER: mysql
4242
MYSQL_PASSWORD: mysql
4343
MYSQL_ROOT_PASSWORD: supersecret
4444
mywildfly:
45-
image: classroom.example.com:5000/wildfly-mysql-javaee7
45+
image: arungupta/wildfly-mysql-javaee7
4646
links:
4747
- mysqldb:db
4848
ports:

chapters/docker-container.adoc

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ At first, this list is empty. Now, let's get a vanilla `jboss/wildfly` image:
1515

1616
[source, text]
1717
----
18-
ifdef::classroom[docker pull classroom.example.com:5000/wildfly]
19-
ifdef::public[docker pull jboss/wildfly]
18+
docker pull jboss/wildfly
2019
----
2120

2221
By default, docker images are retrieved from https://hub.docker.com/[Docker Hub].
23-
ifdef::classroom[This lab is congfigured such a private registry is running on instructor's machine. This allows all the attendees to get the images from that machine instead.]
2422

2523
You can see, that Docker is downloading the image with it's different layers.
2624

@@ -65,8 +63,7 @@ Run WildFly container in an interactive mode.
6563

6664
[source, text]
6765
----
68-
ifdef::classroom[docker run -it classroom.example.com:5000/wildfly]
69-
ifdef::public[docker run -it jboss/wildfly]
66+
docker run -it jboss/wildfly
7067
----
7168

7269
This will show the output as:
@@ -109,8 +106,7 @@ Restart the container in detached mode:
109106

110107
[source, text]
111108
----
112-
ifdef::classroom[docker run -d classroom.example.com:5000/wildfly]
113-
ifdef::public[docker run -d jboss/wildfly]
109+
docker run -d jboss/wildfly
114110
972f51cc8422eec0a7ea9a804a55a2827b5537c00a6bfd45f8646cb764bc002a
115111
----
116112

@@ -136,8 +132,7 @@ We can check it by issuing the `docker ps` command which retrieves the images pr
136132
----
137133
> docker ps
138134
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
139-
ifdef::classroom[0bc123a8ece0 classroom.example.com:5000/wildfly:latest "/opt/jboss/wildfly/ 4 seconds ago Up 4 seconds 8080/tcp tender_wozniak]
140-
ifdef::public[922abbb9c63a jboss/wildfly "/opt/jboss/wildfly/ 3 seconds ago Up 2 seconds 8080/tcp desperate_lovelace]
135+
922abbb9c63a jboss/wildfly "/opt/jboss/wildfly/ 3 seconds ago Up 2 seconds 8080/tcp desperate_lovelace
141136
----
142137

143138
Also try `docker ps -a` to see all the containers on this machine.
@@ -168,8 +163,7 @@ docker run -d -P jboss/wildfly
168163
----
169164
> docker ps
170165
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
171-
ifdef::classroom[4545ced66242 classroom.example.com:5000/wildfly:latest "/opt/jboss/wildfly/ 3 seconds ago Up 3 seconds 0.0.0.0:32768->8080/tcp suspicious_wozniak ]
172-
ifdef::public[63a69bff9c69 jboss/wildfly "/opt/jboss/wildfly/ 14 seconds ago Up 13 seconds 0.0.0.0:32768->8080/tcp kickass_bohr]
166+
63a69bff9c69 jboss/wildfly "/opt/jboss/wildfly/ 14 seconds ago Up 13 seconds 0.0.0.0:32768->8080/tcp kickass_bohr
173167
----
174168

175169
The port mapping is shown in the `PORTS` column. Access the WildFly server at http://dockerhost:32768. Make sure to use the correct port number as shown in your case.
@@ -189,8 +183,7 @@ Restart the container as:
189183

190184
[source, text]
191185
----
192-
ifdef::classroom[docker run -it -p 8080:8080 classroom.example.com:5000/wildfly]
193-
ifdef::public[docker run -it -p 8080:8080 jboss/wildfly]
186+
docker run -it -p 8080:8080 jboss/wildfly
194187
----
195188

196189
The format is `-p hostPort:containerPort`. This option maps container ports to host ports and allows other containers on our host to access them.
@@ -218,16 +211,14 @@ The following command will override the default command in Docker file, start Wi
218211

219212
[source, text]
220213
----
221-
ifdef::classroom[docker run -P -d classroom.example.com:5000/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0]
222-
ifdef::public[docker run -P -d jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0]
214+
docker run -P -d jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
223215
----
224216

225217
Accessing WildFly Administration Console require a user in administration realm. A pre-created image, with appropriate username/password credentials, is used to start WildFly as:
226218

227219
[source, text]
228220
----
229-
ifdef::classroom[docker run -P -d classroom.example.com:5000/wildfly-management]
230-
ifdef::public[docker run -P -d arungupta/wildfly-management]
221+
docker run -P -d arungupta/wildfly-management
231222
----
232223

233224
`-P` map any exposed ports inside the image to a random port on Docker host.
@@ -238,8 +229,7 @@ Look at the exposed ports as:
238229
----
239230
docker ps
240231
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
241-
ifdef::classroom[6f610b310a46 classroom.example.com:5000/wildfly-management:latest "/bin/sh -c '/opt/jb 6 seconds ago Up 6 seconds 0.0.0.0:32769->8080/tcp, 0.0.0.0:32770->9990/tcp determined_darwin ]
242-
ifdef::public[af7d6914a1f9 arungupta/wildfly-management "/opt/jboss/wildfly/ 2 seconds ago Up 1 seconds 0.0.0.0:32770->8080/tcp, 0.0.0.0:32769->9990/tcp happy_bardeen]
232+
af7d6914a1f9 arungupta/wildfly-management "/opt/jboss/wildfly/ 2 seconds ago Up 1 seconds 0.0.0.0:32770->8080/tcp, 0.0.0.0:32769->9990/tcp happy_bardeen
243233
----
244234

245235
Look for the host port that is mapped in the container, `32769` in this case. Access the admin console at http://dockerhost:32769.
@@ -294,8 +284,7 @@ This management image can also be started with a pre-defined port mapping as:
294284

295285
[source, text]
296286
----
297-
ifdef::classroom[docker run -p 8080:8080 -p 9990:9990 -d classroom.example.com:5000/wildfly-management]
298-
ifdef::public[docker run -p 8080:8080 -p 9990:9990 -d arungupta/wildfly-management]
287+
docker run -p 8080:8080 -p 9990:9990 -d arungupta/wildfly-management
299288
----
300289

301290
In this case, Docker port mapping will be shown as:

chapters/docker-deployment-options.adoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ https://github.com/javaee-samples/javaee7-simple-sample[Java EE 7 Simple Sample]
1313

1414
mvn clean package
1515

16-
ifdef::classroom[Copy the Maven `lab-settings.xml` file that you have downloaded from the instructor machine and place it inside `docker-java` directory.]
17-
1816
### Start Application Server
1917

2018
Start WildFly server as:
@@ -110,9 +108,7 @@ The Command Line Interface (CLI) is a tool for connecting to WildFly instances t
110108

111109
Lets use the CLI to deploy javaee7-simple-sample to WildFly running in the container.
112110

113-
. CLI needs to be locally installed and comes as part of WildFly. Download WildFly 9.0 from
114-
ifdef::classroom[http://classroom.example.com:8082/downloads/wildfly-9.0.0.Final.zip]
115-
ifdef::public[http://download.jboss.org/wildfly/9.0.0.Final/wildfly-9.0.0.Final.zip]. Unzip into a folder of your choice (e.g. `/Users/arungupta/tools/`). This will create `wildfly-9.0.0.Final` directory here. This folder is referred to $WIDLFY_HOME from here on. Make sure to add the `/Users/arungupta/tools/wildfly-9.0.0.Final/bin` to your $PATH.
111+
. CLI needs to be locally installed and comes as part of WildFly. This should be available in the previously downloaded WildFly. Unzip into a folder of your choice (e.g. `/Users/arungupta/tools/`). This will create `wildfly-9.0.0.Final` directory here. This folder is referred to $WIDLFY_HOME from here on. Make sure to add the `/Users/arungupta/tools/wildfly-9.0.0.Final/bin` to your $PATH.
116112
+
117113
. Run the "`wildfly-management`" image with fixed port mapping as explained in <<Management_Fixed_Port_Mapping>>.
118114
. Run the `jboss-cli` command and connect to the WildFly instance.

chapters/docker-eclipse.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Docker tooling is aimed at providing at minimum the same basic level feature
66

77
As this is still in early access stage, you will have to install it first:
88

9-
. Download and Install http://classroom.example.com:8082/downloads/jboss-devstudio-9.0.0.Beta2-v20150609-1026-B3346-installer-standalone.jar[JBoss Developer Studio 9.0 Beta 2], take defaults through out the installation.
9+
. Use JBoss Developer Studio 9.0 Beta 2.
1010
+
1111
Alternatively, download http://www.eclipse.org/downloads/index-developer-default.php[Eclipse Mars latest build] and configure JBoss Tools plugin from the update site http://download.jboss.org/jbosstools/updates/nightly/mars/.
1212
+

chapters/docker-javaee7.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Pull the Docker image that contains WildFly and pre-built Java EE 7 application
1010

1111
[source, text]
1212
----
13-
ifdef::classroom[docker pull classroom.example.com:5000/javaee7-hol]
14-
ifdef::public[docker pull arugupta/javaee7-hol]
13+
docker pull arugupta/javaee7-hol
1514
----
1615

1716
The https://github.com/arun-gupta/docker-images/blob/master/javaee7-hol/Dockerfile[javaee7-hol Dockerfile] is based on `jboss/wildfly` and adds the movieplex7 application as war file.
@@ -20,8 +19,7 @@ Run it:
2019

2120
[source, text]
2221
----
23-
ifdef::classroom[docker run -it -p 8080:8080 classroom.example.com:5000/javaee7-hol]
24-
ifdef::public[docker run -it -p 8080:8080 arungupta/javaee7-hol]
22+
docker run -it -p 8080:8080 arungupta/javaee7-hol
2523
----
2624

2725
See the application in action at http://dockerhost:8080/movieplex7/. The output is shown:

chapters/docker-setup.adoc

Lines changed: 22 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22

33
This section describes what, how, and where to install the software needed for this lab. This lab is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab.
44

5-
ifdef::classroom[]
6-
### Instructor
7-
8-
The instructor setup is designed to make the lab most reliable even with bad Internet connections. Most, if not all, of the software can be directly downloaded from the instructor's machine. The machine is setup as _Docker Host_ and also runs a _Docker Registry_ and Nexus container.
9-
10-
Follow all the https://github.com/javaee-samples/docker-java/blob/master/instructor/readme.adoc[instructor setup instructions] at least a day before the lab. Make sure there is a decent Internet connection available.
11-
12-
### Attendees
13-
endif::classroom[]
14-
15-
ifdef::classroom[]
16-
This section provide instructions to setup an attendee environment from an instructor's machine.
17-
endif::classroom[]
18-
195
### Hardware
206

217
. Operating System: Mac OS X (10.8 or later), Windows 7 (SP1), Fedora (21 or later)
@@ -28,49 +14,20 @@ endif::classroom[]
2814
.. https://www.google.com/chrome/browser/desktop/[Chrome]
2915
.. link:http://www.getfirefox.com[Firefox]
3016

31-
ifdef::classroom[]
32-
[[Configure_Instructor_Host]]
33-
#### Configure Instructor Host
34-
35-
All downloads and relevant infrastructure is setup on instructor's machine. Configure IP address of the instructor's machine into so that your machine can resolve it correctly.
36-
37-
Edit the `/etc/resolv.conf` (Mac OS / Linux)
38-
39-
[source, text]
40-
----
41-
nameserver <INSTRUCTOR IP>
42-
----
43-
44-
On Windows, configure Domain Suffixes or DNS Suffixes as explained at http://www.pc-freak.net/blog/configure-equivalent-linux-etcresolvconf-search-domaincom-ms-windows-dns-suffixes/.
45-
endif::classroom[]
46-
4717
### Git Client
4818

49-
ifdef::public[]
5019
Install Git Client as explained at: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
51-
endif::public[]
52-
53-
ifdef::classroom[]
54-
Mac client: ??
55-
Linux client: ??
56-
Windows client is available at http://classroom.example.com:8082/downloads/Git-1.9.5-preview20150319.exe.
57-
endif::classroom[]
5820

5921
### Maven
6022

61-
. Download Apache Maven from
62-
ifdef::classroom[http://classroom.example.com:8082/downloads/apache-maven-3.3.3-bin.zip]
63-
ifdef::public[https://maven.apache.org/download.cgi]
23+
. Download Apache Maven from https://maven.apache.org/download.cgi.
6424
. Unzip to a directory of your choice and add it to the `PATH`.
6525

6626
### VirtualBox
6727

6828
Docker currently runs natively on Linux. It can be configured to run in a virtual machine on Mac or Windows. This is why Virtualbox is a requirement for Mac or Windows.
6929

70-
Downloads are available from
71-
ifdef::classroom[http://classroom.example.com:8082/downloads/virtualbox]
72-
ifdef::public[https://www.virtualbox.org/]
73-
.
30+
Downloads are available from https://www.virtualbox.org/.
7431

7532
Virtual Box 5.0.0 does not allow Kubernetes cluster to be started: https://github.com/kubernetes/kubernetes/issues/12614. Make sure to download VirtualBox 4.3.30[https://www.virtualbox.org/wiki/Download_Old_Builds_4_3].
7633

@@ -85,59 +42,35 @@ Linux Users
8542

8643
### Vagrant
8744

88-
Download Vagrant from
89-
ifdef::classroom[http://classroom.example.com:8082/downloads/vagrant]
90-
ifdef::public[https://www.vagrantup.com/downloads.html]
91-
and install.
45+
Download Vagrant from https://www.vagrantup.com/downloads.html and install.
9246

9347
### Docker Machine
9448

9549
Docker Machine makes it really easy to create Docker hosts on your computer, on cloud providers and inside your own data center. It creates servers, installs Docker on them, then configures the Docker client to talk to them.
9650

97-
ifdef::classroom[]
98-
Download your binary from http://classroom.example.com:8082/downloads/docker
99-
10051
[source, text]
10152
----
10253
# Mac
103-
curl -L http://classroom.example.com:8082/downloads/docker/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
54+
curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
10455
chmod +x /usr/local/bin/docker-machine
10556
10657
# Linux
107-
curl -L http://classroom.example.com:8082/downloads/docker/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
58+
curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
10859
chmod +x /usr/local/bin/docker-machine
10960
11061
#Windows
111-
curl http://classroom.example.com:8082/downloads/docker/docker-machine.exe
62+
curl https://github.com/docker/machine/releases/download/v0.4.0/docker-machine.exe
11263
----
113-
endif::classroom[]
114-
115-
ifdef::public[]
116-
Install as explained at: https://docs.docker.com/machine/#installation
117-
endif::public[]
118-
119-
On Windows copy the file in a convenience directory that is included in the `PATH` variable.
12064

12165
### Create Lab Docker Host
12266

12367
. Create Docker Host to be used in the lab:
12468
+
125-
ifdef::classroom[]
126-
[source, text]
127-
----
128-
docker-machine create --driver=virtualbox --engine-opt dns=<INSTRUCTOR IP> --virtualbox-boot2docker-url=http://classroom.example.com:8082/downloads/boot2docker.iso --engine-insecure-registry=classroom.example.com:5000 lab
129-
eval "$(docker-machine env lab)"
130-
----
131-
+
132-
Substitute `<INSTRUCTOR_IP>` with the IP address of the instructor's machine.
133-
endif::classroom[]
134-
ifdef::public[]
13569
[source, text]
13670
----
13771
docker-machine create --driver=virtualbox lab
13872
eval "$(docker-machine env lab)"
13973
----
140-
endif::public[]
14174
+
14275
. To make it easier to start/stop the containers, an entry is added into the host mapping table of your operating system. Find out the IP address of your machine:
14376
+
@@ -159,7 +92,6 @@ This will provide the IP address associated with the Docker Machine created earl
15992

16093
Docker Client is used to communicate with Docker Host.
16194

162-
ifdef::public[]
16395
[source, text]
16496
----
16597
# Mac
@@ -173,29 +105,10 @@ chmod +x /usr/local/bin/docker
173105
# Windows
174106
curl -L http://test.docker.com.s3.amazonaws.com/builds/Windows/x86_64/docker-1.7.0.exe -o docker.exe
175107
----
176-
endif::public[]
177-
178-
ifdef::classroom[]
179-
[source, text]
180-
----
181-
# Mac
182-
curl -L http://classroom.example.com:8082/downloads/docker-latest-mac > /usr/local/bin/docker
183-
chmod +x /usr/local/bin/docker
184-
185-
# Linux
186-
curl -L http://classroom.example.com:8082/downloads/docker-latest-linux > /usr/local/bin/docker
187-
chmod +x /usr/local/bin/docker
188-
189-
#Windows
190-
curl http://classroom.example.com:8082/docker/docker-1.7.0.exe -o docker.exe
191-
----
192-
endif::classroom[]
193108

194109
### Kubernetes
195110

196-
. Download Kubernetes (1.0.1) from
197-
ifdef::classroom[http://classroom.example.com:8082/downloads/kubernetes.tar.gz]
198-
ifdef::public[https://github.com/kubernetes/kubernetes/releases/download/v1.0.1/kubernetes.tar.gz]
111+
. Download Kubernetes (1.0.1) from https://github.com/kubernetes/kubernetes/releases/download/v1.0.1/kubernetes.tar.gz.
199112
. Extract the archive and install it by:
200113

201114
[source, text]
@@ -209,21 +122,15 @@ NOTE: Kubernetes 1.0.1 is the only version verified to work with Virtual Box. Mo
209122

210123
### WildFly
211124

212-
. Download WildFly 9.0 from
213-
ifdef::classroom[http://classroom.example.com:8082/downloads/wildfly-9.0.0.Final.zip]
214-
ifdef::public[http://download.jboss.org/wildfly/8.2.0.Final/wildfly-9.0.0.Final.zip]
125+
. Download WildFly 9.0 from http://download.jboss.org/wildfly/8.2.0.Final/wildfly-9.0.0.Final.zip.
215126
. Install it by extracting the archive.
216127

217128
### JBoss Developer Studio 9 - Beta 2
218129

219130
To install JBoss Developer Studio stand-alone, complete the following steps:
220131

221-
. Download
222-
ifdef::classroom[http://classroom.example.com:8082/downloads/jboss-devstudio-9.0.0.Beta2-v20150609-1026-B3346-installer-standalone.jar]
223-
ifdef::public[]
224-
http://tools.jboss.org/downloads/devstudio/mars/9.0.0.Beta2.html[9.0.0 Beta 2]
225-
https://devstudio.redhat.com/9.0/snapshots/builds/devstudio.product_master/latest/installer/[Laest Nightly] (used with the lab)
226-
endif::public[]
132+
. Download http://tools.jboss.org/downloads/devstudio/mars/9.0.0.Beta2.html[9.0.0 Beta 2] or
133+
https://devstudio.redhat.com/9.0/snapshots/builds/devstudio.product_master/latest/installer/[Latest Nightly].
227134
. Start the installer as:
228135
+
229136
[source, text]
@@ -232,3 +139,15 @@ java -jar <JAR FILE NAME>
232139
----
233140
+
234141
Follow the on-screen instructions to complete the installation process.
142+
143+
### Pull Docker images
144+
145+
[source, text]
146+
----
147+
docker pull jboss/wildfly
148+
docker pull arungupta/wildfly-management
149+
docker pull arungupta/javaee7-hol
150+
docker pull mysql
151+
docker pull swarm
152+
docker pull arungupta/wildfly-mysql-javaee7
153+
----

readme.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ v1.2.x, Aug 13, 2015
33
:toc:
44
:toc-title: Table of Dockernetes
55
:toclevels: 3
6-
////
7-
:classroom:
8-
////
9-
:public:
106
:toc-placement!:
117
:imagesdir: ./chapters/images/
128

0 commit comments

Comments
 (0)