StackStalk
  • Home
  • Java
    • Java Collection
    • Spring Boot Collection
  • Python
    • Python Collection
  • C++
    • C++ Collection
    • Progamming Problems
    • Algorithms
    • Data Structures
    • Design Patterns
  • General
    • Tips and Tricks

Sunday, April 16, 2017

Spring Boot micro service as a Docker container inside Kubernetes on Windows – Installing tools

 April 16, 2017     No comments   


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.

Apache Maven 

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.
  1. Download Maven from this link https://maven.apache.org/download.cgi. 
  2. For Windows download the Binary ZIP archive
  3. Unzip to a folder say C:\Program Files\apache-maven-3.5.0.
  4. Update the PATH environment variable to include C:\Program Files\apache-maven-3.5.0\bin. 
  5. Verify status of installation using “mvn –v” from a command prompt.
C:\>mvn -v
C:\
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:09:0
6+05:30)
Maven home: C:\INSTALLS\apache-maven-3.5.0\bin\..
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_65\jre
Default locale: en_US, platform encoding: Cp1252
OS 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.

  1. Download STS from this link https://spring.io/tools/sts. 
  2. Unzip the downloaded file to a folder say C:\INSTALLS\sts-bundle. 
  3. The installation view of Spring Tool Suite (STS) would look as below.
  4. Launch the STS.exe and verify if the Spring Tool Suite IDE opens.
  5. We are not good to go with Spring Tool Suite (STS).
Spring Tool Suite Installation View

Docker

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.
  1. Oracle VM Virtual Box
  2. Docker QuickStart Terminal
  3. 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.

Kubernetes

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.

Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Follow @StackStalk
Get new posts by email:
Powered by follow.it

Popular Posts

  • Python FastAPI file upload and download
    In this article, we will look at an example of how to implement a file upload and download API in a Python FastAPI microservice. Example bel...
  • Avro Producer and Consumer with Python using Confluent Kafka
    In this article, we will understand Avro a popular data serialization format in streaming data applications and develop a simple Avro Produc...
  • Monitor Spring Boot App with Micrometer and Prometheus
    Modern distributed applications typically have multiple microservices working together. Ability to monitor and manage aspects like health, m...
  • Server-Sent Events with Spring WebFlux
    In this article we will review the concepts of server-sent events and work on an example using WebFlux. Before getting into this article it ...
  • Accessing the Kubernetes API
    In this article, we will explore the steps required to access the Kubernetes API and overcome common challenges. All operations and communic...
  • Python FastAPI microservice with Okta and OPA
    Authentication (AuthN) and Authorization (AuthZ) is a common challenge when developing microservices. In this article, we will explore how t...
  • Scheduling jobs in Python
    When developing applications and microservices we run into scenarios where there is a need to run scheduled tasks. Examples include performi...
  • Using Tekton to deploy KNative services
    Tekton is a popular open-source framework for building continuous delivery pipelines. Tekton provides a declarative way to define pipelines ...

Copyright © StackStalk