Skip to content

Latest commit

 

History

History
182 lines (135 loc) · 5.3 KB

File metadata and controls

182 lines (135 loc) · 5.3 KB

Setup Environments

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.

Hardware

  1. Operating System: Mac OS X (10.8 or later), Windows 7 (SP1), Fedora (21 or later)

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

Software

  1. Java: Oracle JDK 8u45

  2. Web Browser

Git Client

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.

VirtualBox

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.

Virtual Box 5.0.0 does not allow Kubernetes cluster to be started: kubernetes/kubernetes#12614. Make sure to download VirtualBox 4.3.30[https://www.virtualbox.org/wiki/Download_Old_Builds_4_3] and install.

Warning

Linux Users

  1. Have your kernel updated

  2. Users should have the GNU compiler, build and header files for your current Linux kernel

  3. Create a /usr/src/linux link to the current kernel source

Vagrant

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

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

Docker Machine

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.

# Mac
curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

# Linux
curl -L  https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

#Windows
curl https://github.com/docker/machine/releases/download/v0.4.0/docker-machine.exe

Create Lab Docker Host

  1. Create Docker Host to be used in the lab:

    docker-machine create --driver=virtualbox lab
    eval "$(docker-machine env lab)"

    Use the following command on Windows:

    (docker-machine env lab --shell cmd

    And then execute all the set commands.

  2. 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 lab

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

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

    <IP ADDRESS>  dockerhost

Docker Client

Docker Client is used to communicate with Docker Host.

# Mac
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker
chmod +x /usr/local/bin/docker

# Linux
curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest > docker-latest-linux
chmod +x /usr/local/bin/docker

# Windows
curl -L http://test.docker.com.s3.amazonaws.com/builds/Windows/x86_64/docker-1.7.0.exe -o docker.exe

Kubernetes

  1. Download Kubernetes (1.0.1) from https://github.com/kubernetes/kubernetes/releases/download/v1.0.1/kubernetes.tar.gz.

  2. Extract the archive and install it by:

export KUBERNETES_PROVIDER=vagrant
cd kubernetes
./cluster/kube-up.sh
Note
Kubernetes 1.0.1 is the only version verified to work with Virtual Box. More details at: kubernetes/kubernetes#12614

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 - Beta 2

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

  1. Download 9.0.0 Beta 2 or Latest Nightly.

  2. Start the installer as:

    java -jar <JAR FILE NAME>

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

Pull Docker images

Important
These commands need to be issued from the shell or command prompt where docker-machine env lab and associated commands were issued.
docker pull jboss/wildfly
docker pull arungupta/wildfly-management
docker pull arungupta/javaee7-hol
docker pull mysql
docker pull swarm
docker pull arungupta/wildfly-mysql-javaee7

Create Docker Swarm Cluster

Create Docker Swarm cluster as:

docker run swarm create

This will generate a token. 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].