This section describes the relevant steps for both attendees and instructors to setup the environments. Please follow the parts, that are appropriate for you.
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.
Follow all the instructor setup instructions at least a day before the lab. Make sure there is a decent Internet connection available.
This lab is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab. This section provide instructions to setup an attendee environment from an instructor’s machine.
The lab contents are at https://github.com/javaee-samples/docker-java/.
-
CPU
-
Mac: X64 (i5 or superior)
-
Linux / Windows: x64 (i5 and comparable)
-
-
Memory
-
At least 4GB, preferred 8 GB
-
-
Operating System
-
Mac OS X (10.8 or later), Windows 7 (SP1), Fedora (21 or later)
-
-
Java: Oracle JDK 8u45
-
Webbrowser
This tutorial only uses software which is open source or at least free to use in development and/or education. Please refer to the individual products/tools used in this tutorial.
All downloads and relevant infrastructure is setup on instructor’s machine. Configure the IP address of instructor’s machine into the resolver configuration of your operating system.
Edit the /etc/resolv.conf (Mac OS / Linux)
nameserver <INSTRUCTOR IP>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/.
Install Git Client as explained at: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Windows client is available at http://classroom.example.com:8082/downloads/Git-1.9.5-preview20150319.exe.
-
Download Apache Maven from http://classroom.example.com:8082/downloads/apache-maven-3.3.3-bin.zip
-
Unzip to a folder of your choice and add the folder to your PATH environment variable.
Docker currently runs natively on Linux, but you can use VirtualBox to run Docker in a virtual machine on your box, and get the best of both worlds. This is why Virtualbox is a requirement to have on your machine. Get the latest downloads from the instructur machine:
|
Warning
|
Linux Users
|
Download your binary from http://classroom.example.com:8082/downloads/
# MacOS
curl -L http://classroom.example.com:8082/downloads/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine
# Linux
curl -L http://classroom.example.com:8082/downloads/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine
#Windows
curl http://classroom.example.com:8082/downloads/docker-machine_windows-amd64.exeOn Windows copy the script into C:\docker directory and rename to: docker-machine.exe. Add C:\docker to your PATH variable.
Download your binary from http://classroom.example.com:8082/downloads/
# MacOS
curl -L http://classroom.example.com:8082/downloads/docker-latest-mac > /usr/local/bin/docker
chmod +x /usr/local/bin/docker
# Linux (other distros)
curl -L http://classroom.example.com:8082/downloads/docker-latest-linux > /usr/local/bin/docker
chmod +x /usr/local/bin/docker
#Windows
curl http://classroom.example.com:8082/docker-1.6.0.exeOn Windows rename the file to C:\docker\docker.exe.
-
Create the Docker Host to be used in the lab:
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 eval "$(docker-machine env lab)"Substitute
<INSTRUCTOR_IP>with the IP address of the instructor’s machine. -
To make it easier to access the containers, we add an entry into the host mapping table of your operating system. Add a host entry for this Docker Host running on your machine. Find out the IP address of your machine:
docker-machine ip labEdit
/etc/hosts(Mac OS or Linux) orC:\Windows\System32\drivers\etc\hosts(Windows) and add:<OUTPUT OF DOCKER MACHINE COMMAND> dockerhost
-
Download Kubernetes (0.18.1) from http://classroom.example.com:8082/downloads/kubernetes.tar.gz
-
Install it by clicking on the archive.
-
Download WildFly 8.2 from http://classroom.example.com:8082/downloads/wildfly-8.2.0.Final.zip
-
Install it by clicking on the archive.
To install JBoss Developer Studio stand-alone, complete the following steps:
-
Start the installer as:
java -jar jboss-devstudio-9.0.0.Beta2-v20150609-1026-B3346-installer-standalone.jarFollow the on-screen instructions to complete the installation process.
-
Chrome or Firefox
-
Latest Virtual Box
-
Docker
-
Docker Client
-
Mac:
curl https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker -
Windows: http://test.docker.com.s3.amazonaws.com/builds/Windows/x86_64/docker-1.6.0.exe
-
Linux:
apt-get install docker.io
-
-
JBoss