Deploy Java Spring Boot Applications to AWS, Azure, GCP with Docker and Kubernetes


NEW COURSE RELEASED! - 21 HOURS, 200+ VIDEOS - Master DevOps with Docker, Kubernetes and Azure DevOps


In this article, we focus our attention on the cloud. Why do we need the cloud? And how can you learn the cloud?

You will learn

  • What is Cloud?
  • Why do we need the Cloud?
  • What are the popular cloud providers?
  • What is IAAS and PAAS?
  • What is Docker?
  • What is Kubernetes?
  • What are the PAAS offerings provided by AWS, Azure and GCP?
  • How can you learn about the cloud?

Free Courses - Learn in 10 Steps

Introduction

You want to learn about the cloud. But you don’t know where to start.

One of the best option to learn the cloud is to deploy some of the applications that you have developed to different cloud providers.

When we talk about the Java Spring Boot world, typically we talk about

  • Web Applications
  • REST APIs
  • Microservices
  • Full Stack Applications

How about deploying these applications to different cloud platforms?

That’s the kind of courses that we would be talking about in the article.

Introduction to Cloud

Let’s start with understanding why we need the cloud.

Why do we need the cloud?

The three reasons are

  • On Demand Resource Provisioning
  • Avoid “Undifferentiated Heavy Lifting”
  • Improved Latency and Availability

On Demand Resource Provisioning

If you are amazon or a startup, the load on your application varies a lot during the year. Load during peak season like holidays might 2-10 times the regular load. If you provision infrastructure in your data center for peak load, then what would it be doing during the rest of year? Sitting Idle!

That’s the problem cloud solves!

You can provision and release resources on demand.

Avoid “Undifferentiated Heavy Lifting”

What is the focus of a business?

To create amazing solutions and provide great service to their customers.

If business focus on automation, tools and infrastructure, the focus shifts from their core job.

Why not leave the “Undifferentiated Heavy Lifting” to the cloud providers?

Improved Latency and Availability

Each of the cloud providers have mutliple data centers available in multiple continents and multiple countries.

It would be difficult for businesses to set up such wide spread infrastructure.

However, to have high availability and low latency for end users, you would need to have multiple deployments around the world.

Cloud Providers make it easy for you to have multiple deployments of your application across the world.

IAAS vs PAAS

Now, you want to go the cloud. You have an important choice to make.

Do you want to deploy your applications the same way you deploying while using your data center or do you want to use facilities provided by your cloud provider?

For example, if you are using AWS (Amazon Web Services), you have two options

  • Approach 1 - You can create virtual servers (EC2 - Elastic Compute Cloud) and deploy your applications to the virtual servers.
  • Approach 2 - You can use a service provided by AWS - for example, AWS Elastic Beanstalk - to deploy your application and not worry about the virtual servers.

Approach 1 is typically called IAAS - Infrastructure as a Service. You are getting the infrastructure from the cloud provider and deploying the applications the usual way you do. The cloud provider is responsible only for providing the virtual servers. You are responsible for installing OS, OS Upgrades, Installing Runtime, Runtime upgrades and everything that goes along with them.

Different clouds provide differerent IAAS Services. The virtual servers are also called differently in different clouds

  • AWS calls them EC2 (Elastic Compute Cloud)
  • Azure Virtual Machines
  • Google Compute Engines

Approach 2 is called PAAS - Platform as a Service. You are only responsible for your application deployable unit. The cloud provider is responsible for Platform Upgrades, Runtime Upgrades and OS Upgrades.

PAAS Examples are Managed Services provided by different cloud providers. A good examples are the database management sevices provided.

  • AWS provides RDS - Relational Database Service
  • Azure provides DB for MySQL

Great thing about these managed services is that the cloud provider would take care of most non functional requirments.

  • Reliability
  • Availability
  • Backups

Platform as a Service in Depth

If we look at PAAS in depth, there are a number of application PAAS services offered by different cloud providers

  • AWS Elastic Beanstalk
  • Google App Engine
  • Azure Web Apps

These services make it easy to deploy Java applications, Containers and a wide variety of applications to the cloud.

These PAAS offering come with Support for

  • Multiple Environments
  • Multiple Platforms and Language Support
  • Container and Multi Container Support
  • Deployment Strategies - Blue Green Deployment
  • Auto Scaling
  • Load Balancing
  • CI/CD (AWS Code Pipeline, AWS Code Build, Azure DevOps, Google Cloud Build)

Cloud Specific Container Orchestration Solutions

One of the important developments of the last few years is the evolution of containers as a platform neutral, language neutral deployment options.

Cloud providers provide PAAS options around containers and container orchestration. The most important offerings are

  • AWS Fargate or ECS (Elastic Container Service)
  • Azure Container Instance - Azure is actually moving towards AKS (Azure Kubernetes Service)

Cloud Neutral Kubernetes Based Container Orchestration Solutions

Other important evolution of last few years is the evolution of Kubernetes as the Cloud Neutral Container Orchestration Service.

Each of the cloud providers provide Container Orchestration Solution around Kubernetes.

  • GKE (Google Kubernetes Engine)
  • AKS (Azure Kubernetes Service)
  • EKS (AWS Container Services for Kubernetes)

Spring Boot to AWS, Azure, GCP, Docker and Kubernetes

Here are some of the amazing courses that help you learn cloud, containers and orchestration by deploying a variety of Spring Boot applications to the cloud.

Docker for Java Developers - with Spring Boot Microservices

Docker is the No 1 Tool to Containerize your Java Spring Boot Applications. Learning Docker would help you streamline your deployment processes and experiment easily with new frameworks and tools.

The first course we are going to talk about is “Docker for Java Developers - with Spring Boot Microservices”.

Image

In this hands-on course, you will containerize - create docker images and create containers - a variety of Spring Boot Applications:

  • REST APIs - Hello World and Todo - Jar
  • Todo Web Application War
  • Full Stack Application with React and Spring Boot
  • CCS and CES Microservices
  • Eureka Naming Server and Zuul API Gateway

This course would be a perfect first step as an introduction to Docker.

You will Learn Docker Architecture and the Fundamentals of Docker - Registry, Repository, Tag, Image, Container and Volumes and also learn the important Docker commands.

You will learn to use Dockerfile to Automate Building of your Docker Image and also use various maven plugins - Dockerfile Spotify Plugin, JIB Plugin and Fabric8 Docker Maven Plugin - to create Docker images. You will also learn to follow the best practices with creating Docker Images - Improve Caching of Docker Images and create Multi Stage Docker Builds.

Learn AWS - Deploy Java Spring Boot to AWS Elastic Beanstalk

AWS is the most popular cloud and AWS Elastic Beanstalk makes it easy to deploy a variety of applications to AWS.

“Learn AWS - Deploy Java Spring Boot to AWS Elastic Beanstalk” is another amazing hands-on course on AWS to help you deploy Spring Boot applications to AWS.

Image

In this course, you will learn to deploy a variety of Spring Boot Applications to the Cloud:

  • REST APIs - Hello World and Todo - Jar
  • Todo Web Application War
  • Full Stack Application with React and Spring Boot
  • Single Container with Java REST API
  • Multi Container with Todo REST API talking to MySQL

This course would be a perfect first step as an introduction to AWS and the Cloud, especially for Java Developers.

You will learn about automating deployments with Elastic Beanstalk CLI and creating a continuous delivery pipeline with AWS Code Pipeline. You will learn how to Auto Scale applications based on load as well as deploy multiple instances behind a load balancer using Elastic Beanstalk.

You will be using a number of AWS Services - EC2, S3, AWS CodePipeLine, AWS CodeBuild, SQS, IAM, CloudWatch.

Master AWS Fargate & ECS with Java Spring Boot Microservices

We learnt about docker earlier. AWS Elastic Container Service and AWS Fargate are the container orchestration services provided by AWS.

“Master AWS Fargate & ECS with Java Spring Boot Microservices” is another awesome course to help you learn AWS and container orchestration.

Image

This course would be a perfect first step as an introduction to Amazon Web Services - AWS and the Cloud.

In this course, you will deploy a variety of Java Spring Boot Microservices to Amazon Web Services using AWS Fargate and ECS - Elastic Container Service.

You will learn the basics of implementing Container Orchestration with ECS (Elastic Container Service) - Cluster, Task Definitions, Tasks, Containers and Services. You will learn about the two launch types of ECS - EC2 and AWS Fargate. In this course, we would focus extensively on AWS Fargate to simplify your Container Orchestration. You will learn to deploy multiple containers in the same ECS task.

You will learn to Build Container Images for your Java Spring Boot Microservice Projects.

You will implement the following features for your Microservices

  • Centralized Configuration Management with AWS Parameter Store
  • Distributed Tracing with AWS X Ray
  • Auto Scaling and Load Balancing with ECS, Elastic Load Balancers and Target Groups
  • Service Mesh using AWS App Mesh. You will learn the basics of AWS App Mesh - Mesh, Virtual Nodes and Virtual Services. You will learn to perform Canary Deployments using AWS AppMesh.
  • Service Discovery with Route 53 Hosted Zones and DNS.
  • Continuous Integration and Continuous Deployment with AWS Code Pipeline

You will learn to debug problems with deploying containers using Service events and AWS CloudWatch logs.

You will learn about automating deployments and creating a continuous delivery pipeline with AWS Code Pipeline. You will learn how to Auto Scale applications based on load as well as deploy multiple instances behind a load balancer using AWS ECS Fargate.

You will be using a number of AWS Services - ECS - Elastic Container Services, AWS Fargate, EC2 - Elastic Compute Cloud, S3, AWS CodePipeLine, AWS CodeBuild, IAM, CloudWatch, ELB, Target Groups, X Ray, AWS Parameter Store, AWS App Mesh and Route 53.

Master Pivotal Cloud Foundry with Spring Boot Microservices

Pivotal Cloud Foundry (PCF) provides a great cloud-native platform to deploy Spring Boot Applications.

Master Pivotal Cloud Foundry with Spring Boot Microservices is a great course to learn about PCF and get a feel for how you deploy application to Cloud using PCF.

Image

In this course, you will learn the basics of Pivotal Cloud Foundry by deploying several full featured Spring Boot applications to PCF. You will deploy a REST API, a web application, a full stack application built using Spring Boot and React. You will learn to deploy Java Spring Boot applications containerized using Docker to PCF.

This course also focuses on help you deploy amazing Spring Boot microservices to PCF using several Spring Cloud Services like Service Registry, Config Server and Hystrix.

You will learn how to Auto Scale applications based on load as well as deploy multiple instances behind a load balancer using Pivotal Cloud Foundry.

This course would be a perfect first step as an introduction to PCF and the Cloud.

Master Azure Web Apps - Take Java Spring Boot Apps to Azure

Microsoft Azure is the second most popular cloud platform today. Azure Web App is a PAAS offering from Azure to help you deploy applications easily to the Cloud.

Master Azure Web Apps - Take Java Spring Boot Apps to Azure is an amazing course to help you get started with Azure.

Image

In this course, you will deploy a variety of Spring Boot Applications to the Cloud:

  • REST APIs - Hello World and Todo - Jar
  • Todo Web Application War
  • Full Stack Application with React and Spring Boot
  • Single Container with Java REST API
  • Multi Container with Todo REST API talking to MySQL

This course would be a perfect first step as an introduction to Azure and the Cloud, especially for Java Developers.

You will learn about automating deployments with Azure and creating a continuous delivery pipeline with Azure DevOps. You will learn how to Auto Scale applications based on load as well as deploy multiple instances behind a load balancer using Azure App Service.

You will be using a number of Azure Services - Azure App Service, Azure Web Apps, Azure DevOps, Azure Database for MySQL Services, Resource Groups, Azure App Service Plans, and Azure Subscriptions.

Kubernetes Crash Course for Java Developers on Google Cloud

Kubernetes makes it easy to manage clusters with 1000’s of containers running 1000’s of microservices. Google Kubernetes Engine (GKE) makes it super easy to create Kubernetes Clusters.

How about getting them all together and deploying Spring Boot Microservices to Kubernetes Clusters created on Google Cloud Platform using Google Kubernetes Engine (GKE)?

Kubernetes Crash Course for Java Developers on Google Cloud is an amazing course to help you get started with Kubernetes.

Image

In this hands-on course, you will use Docker and Kubernetes to deploy a variety of Spring Boot Applications on Google Cloud using Google Kubernetes Engine:

  • REST APIs - Hello World
  • Todo Web Application War
  • Spring Boot Microservices

You will implement Service Discovery, Centralized Configuration, Distributed Tracing and Load Balancing for Spring Boot Microservices deployed in Kubernetes Clusters.

You will learn to use Helm Charts, Istio Service Mesh, Google Stackdriver, and Spring Cloud Kubernetes to play with Spring Boot Java Microservices on Kubernetes.

This course would be a perfect first step as an introduction to Kubernetes.

What to Learn Next?

NEW COURSE RELEASED! - 21 HOURS, 200+ VIDEOS - Master DevOps with Docker, Kubernetes and Azure DevOps


350,000 Learners are learning everyday with our Best Selling Courses : Spring Boot Microservices, Spring, Spring Boot, Web Services, Hibernate, Full Stack React, Full Stack Angular, Python, Spring Interview Guide, Java Interview, Java Functional Programming, AWS, Docker, Kubernetes, PCF, AWS Fargate and Azure


85,000 Subscribers are learning from our Free Videos on YouTube : JSP Servlets, Spring, Spring Boot, Spring MVC, Hibernate, Eclipse, Maven, JUnit, Mockito, Full Stack - React, Full Stack - Angular, Docker, Kubernetes, AWS, AWS Fargate, PCF and Azure


Here are the recommend articles to read next : Spring Interview Questions, Spring Boot Interview Questions, Microservices, Hibernate, Spring Security, REST API with Spring Boot, Full Stack with React, SOAP Web Services, Exception Handling, Embedded Servers, Spring Data Rest, Spring vs Spring MVC vs Spring Boot, Building Web Application and Spring Data JPA. You can checkout all our 100+ articles here - All Articles.


Do not know where to start your learning journey? Check out our amazing learning paths: Learning Path 01 - Spring and Spring Boot Web Applications and API Developer, Learning Path 02 - Full Stack Developer with Spring Boot, React & Angular, Learning Path 03 - Cloud Microservices Developer with Docker and Kubernetes, Learning Path 04 - Learn Cloud with Spring Boot, AWS, Azure and PCF and Learning Path 05 - Learn AWS with Microservices, Docker and Kubernetes


Related Posts

Docker Tutorial for Beginners - with Java and Spring Boot

Learn about Docker - What is Docker? Why Is Docker Popular? How to create Docker Image for a Java Spring Boot App?

Devops Tutorial | DevOps with Docker, Kubernetes and Azure DevOps

What is DevOps? How is it different from Agile? What are the popular DevOps Tools? What is the role of Docker, Kubernetes and Azure DevOps in DevOps. Let's get started with a simple usecase.

Microservices Architectures - Non Functional Requirements - Performance

In this article, we explore an important non functional requirement called performance.

Spring Boot Tutorials for Beginners

At in28Minutes, we are creating a number of tutorials with videos, articles & courses on Spring Boot for Beginners and Experienced Developers. This resources will help you learn and gain expertise at Spring Boot.

Microservices with Spring Boot and Java - Part 1 - Getting Started

Let's learn the basics of microservices and microservices architectures. We will also start looking at a basic implementation of a microservice with Spring Boot. We will create a couple of microservices and get them to talk to each other using Eureka Naming Server and Ribbon for Client Side Load Balancing. In part 1 of this series, lets get introduced to the concept of microservices and understand how to create great microservices with Spring Boot and Spring Cloud.

20+ Spring Boot Projects with Code Examples

At in28Minutes, we have created more than 20 projects with code examples on Github. We have 50+ articles explaining these projects. These code examples will you learn and gain expertise at Spring Boot.

REST API Best Practices - With Design Examples from Java and Spring Web Services

Designing Great REST API is important to have great microservices. How do you design your REST API? What are the best practices?

Index - 500+ Videos

At in28Minutes, we are creating a number of tutorials with videos, articles & courses on Spring Boot for Beginners and Experienced Developers. Here's a list of video tutorials and courses for you

Creating Spring Boot and React Java Full Stack Application with Maven

This guide helps you create a Java full stack application with all the CRUD (Create, Read, Update and Delete) features using React as Frontend framework and Spring Boot as the backend REST API. We use Maven as the build tool.