Skip to content

Latest commit

 

History

History
133 lines (97 loc) · 4.91 KB

File metadata and controls

133 lines (97 loc) · 4.91 KB

Setup Environments

This section describes the software needed for this workshop. This workshop is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab.

Hardware

  1. Operating System: Mac OS X (10.8+), Windows 7+, Ubuntu 12+, CentOS 7+, Fedora 21+

  2. Memory: At least 4 GB+, preferred 8 GB

Docker

Docker Toolbox or Packages

Docker runs natively on Linux. Because the Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in OS X or Windows. Instead, you must use docker-machine to create and attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker for you on your Mac or Windows. This can be easily installed using Docker Toolbox.

Follow the instructions to install Docker:

Complete set of operating systems are listed at Install Docker Engine.

Checkout docker-java workspace

git clone https://github.com/javaee-samples/docker-java

Pull Docker images

Important
For Mac and Windows, this commands need to be issued from the Docker shell or Command Prompt where eval $(docker-machine env default) command was issued. This command need to be issued in the attendees directory of docker-java workspace.
docker-compose pull -f docker-compose-pull-images.yml

Create Docker Swarm Cluster

Create Docker Swarm cluster as:

docker run swarm create

This will generate a token.

Important
Save the token generated by this command as it cannot be queried/recovered later.

Use this token to create a Swarm Master.

docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://<token> swarm-master

Detailed explanation for this is available in [Docker_Swarm].

Create Docker Host Mapping

  1. 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:

    docker-machine ip default

    This will provide the IP address associated with the Docker Machine created earlier.

  2. Edit /etc/hosts (Mac OS or Linux) or C:\Windows\System32\drivers\etc\hosts (Windows) and add:

    <IP ADDRESS>  dockerhost

Optional Software

The following software needs to be downloaded if you want to build/deploy a Java EE application.

Java Development Kit
Maven
  1. Download Apache Maven from https://maven.apache.org/download.cgi.

  2. Unzip to a directory of your choice and add it to the PATH.

WildFly
  1. Download WildFly 9.0 from http://download.jboss.org/wildfly/9.0.0.Final/wildfly-9.0.0.Final.zip.

  2. Install it by extracting the archive.

JBoss Developer Studio 9.0

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

  1. Download 9.0.0.

  2. Start the installer as:

    java -jar <JAR FILE NAME>

    Follow the on-screen instructions to complete the installation process.

Kubernetes

  1. Download Vagrant from https://www.vagrantup.com/downloads.html and install.

    Kubernetes requires Vagrant >= 1.6.2. So if you have an older version then make sure you install the latest one.

  2. If you’ve not installed Docker Toolbox, then you need to additionally download Virtual Box 5.0.8 from https://www.virtualbox.org/wiki/Downloads.

  3. Download Kubernetes (1.1.2) from https://github.com/kubernetes/kubernetes/releases/download/v1.1.2/kubernetes.tar.gz.

  4. On Windows, Python interpreter needs to be installed and included in the %PATH%. Download from https://www.python.org/downloads/windows/ and setup %PATH% in Control Panel.

  5. Extract the archive and install it:

    export KUBERNETES_PROVIDER=vagrant
    cd kubernetes
    ./cluster/kube-up.sh
    Note
    Vagrant provider should be included in the path. For example, for VirtualBox, vboxmanage command should work from the shell or command prompt where ./cluster/kube-up.sh script is invoked.

    If you installed more than one Vagrant provider (such as VirtualBox and Parallels), Kubernetes will usually pick the appropriate one. You can override which one Kubernetes will use by setting the VAGRANT_DEFAULT_PROVIDER environment variable:

    export VAGRANT_DEFAULT_PROVIDER=virtualbox
    export KUBERNETES_PROVIDER=vagrant
    ./cluster/kube-up.sh