This section lists the pre-requisite tools needed to run Spring Boot, Dockers and Kubernetes. Installation steps needed for each of the tools is summarized.
Maven is the build tool used for this article. Maven is based on the concept of a project object model (POM) Maven can manage build, reporting and documentation from a central piece of information.
- Download Maven from this link https://maven.apache.org/download.cgi.
- For Windows download the Binary ZIP archive
- Unzip to a folder say C:\Program Files\apache-maven-3.5.0.
- Update the PATH environment variable to include C:\Program Files\apache-maven-3.5.0\bin.
- Verify status of installation using “mvn –v” from a command prompt.
C:\>mvn -vC:\Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:09:06+05:30)Maven home: C:\INSTALLS\apache-maven-3.5.0\bin\..Java version: 1.8.0_65, vendor: Oracle CorporationJava home: C:\Program Files\Java\jdk1.8.0_65\jreDefault locale: en_US, platform encoding: Cp1252OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
We are now good to go with Maven.
Spring Tool Suite (STS)
The Spring Tool Suite (STS) is an Eclipse based development environment that is customized for developing Spring applications. The Spring Tool Suite (STS) is a ready to use distribution of the latest Eclipse releases with the Spring IDE components pre-installed.
- Download STS from this link https://spring.io/tools/sts.
- Unzip the downloaded file to a folder say C:\INSTALLS\sts-bundle.
- The installation view of Spring Tool Suite (STS) would look as below.
- Launch the STS.exe and verify if the Spring Tool Suite IDE opens.
- We are not good to go with Spring Tool Suite (STS).
|Spring Tool Suite Installation View|
For older Windows systems (Windows 7) the recommended approach to experiment with Docker is to use the Docker Toolbox.
- Download DockerToolbox.exe from this link https://docs.docker.com/toolbox/toolbox_install_windows/ and launch the DockerToolbox.exe.
- Select full installation and follow the options.
- Sample Installation flow for Docker Toolbox would look as below.
|Docker Toolbox installation flow|
- The Docker Tool box installation creates the following applications on the desktop.
- Oracle VM Virtual Box
- Docker QuickStart Terminal
- Kitematic (Alpha)
- Sample installation view of Docker Toolbox installation.
|Docker Toolbox installation|
For newer Windows systems (e.g. Windows 10) the Docker for Windows package can be used. The Docker for Windows install package includes everything you need to run Docker on a Windows system.
- Download Docker for Windows from this link https://docs.docker.com/docker-for-windows/install/.
- Use Get Docker for Windows (Stable) and download and install using the InstallDocker.MSI file.
For rest of this article Docker Toolbox based installation would be used as reference.
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop.
- Download the minikube-windows-amd64.exe file from this link https://github.com/kubernetes/minikube
- Rename minikube-windows-amd64.exe to minikube.exe.
- Add minikube.exe to Windows path variable.
To deploy and manage applications on Kubernetes we will need to use the Kubernetes command-line tool, kubectl. It lets you inspect your cluster resources, create, delete, and update components.
- Download kubectl from this link http://storage.googleapis.com/kubernetes-release/release/v1.4.0/bin/windows/amd64/kubectl.exe
- Add kubectl.exe to Windows Path variable
Note: In the link v1.4.0 is the VERSION tag. If the above link is not working try this command to download the stable release of kubectl.
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/windows/amd64/kubectl.exe
Now we have the required tools to experiment and play around with Kubernetes, Docker containers and Spring boot applications.