This section describes the software needed for this workshop. This workshop is designed for a BYOL (Brying Your Own Laptop) style hands-on-lab.
-
Operating System: Mac OS X (10.8+), Windows 7+, Ubuntu 12+, CentOS 7+, Fedora 21+
-
Memory: At least 4 GB+, preferred 8 GB
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.
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 -f docker-compose-pull-images.yml pull
-
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.
-
Edit
/etc/hosts
(Mac OS or Linux) orC:\Windows\System32\drivers\etc\hosts
(Windows) and add:<IP ADDRESS> dockerhost
The following software needs to be downloaded if you want to build/deploy a Java EE application.
-
Java: Oracle JDK 8u65
-
Download Apache Maven from https://maven.apache.org/download.cgi.
-
Unzip to a directory of your choice and add it to the
PATH
.
-
Download WildFly 10.0 from http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.zip.
-
Install it by extracting the archive.
To install JBoss Developer Studio stand-alone, complete the following steps:
-
Download 9.0.0.
-
Start the installer as:
java -jar <JAR FILE NAME>
Follow the on-screen instructions to complete the installation process.
-
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.
-
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.
-
Download Kubernetes (1.1.2) from https://github.com/kubernetes/kubernetes/releases/download/v1.1.3/kubernetes.tar.gz.
-
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. -
Extract the archive and install it:
export KUBERNETES_PROVIDER=vagrant cd kubernetes ./cluster/kube-up.sh
NoteVagrant 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 more than one Vagrant provider (such as VirtualBox and Parallels) are installed, Kubernetes will usually pick the appropriate one. You can override by setting the VAGRANT_DEFAULT_PROVIDER environment variable:
export VAGRANT_DEFAULT_PROVIDER=virtualbox export KUBERNETES_PROVIDER=vagrant ./cluster/kube-up.sh
NoteThis will take a few minutes, so be patience! Vagrant will provision each machine in the cluster with all the necessary components to run Kubernetes. It shows the output as:
kubernetes > ./cluster/kube-up.sh ... Starting cluster using provider: vagrant ... calling verify-prereqs ... calling kube-up Bringing machine 'master' up with 'virtualbox' provider... Bringing machine 'minion-1' up with 'virtualbox' provider... ==> master: Importing base box 'kube-fedora21'... ==> master: Matching MAC address for NAT networking... ==> master: Setting the name of the VM: kubernetes_master_1450804087843_75902 . . . ... calling validate-cluster Found 1 node(s). NAME LABELS STATUS AGE 10.245.1.3 kubernetes.io/hostname=10.245.1.3 Ready 5s Validate output: NAME STATUS MESSAGE ERROR controller-manager Healthy ok nil scheduler Healthy ok nil etcd-0 Healthy {"health": "true"} nil etcd-1 Healthy {"health": "true"} nil Cluster validation succeeded Done, listing cluster services: Kubernetes master is running at https://10.245.1.2 Heapster is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/heapster KubeDNS is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-dns KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-ui Grafana is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana InfluxDB is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb
Note down the address for Kubernetes master,
https://10.245.1.2
in this case.