Book Image

Mastering Spring Boot 2.0

By : Dinesh Rajput
Book Image

Mastering Spring Boot 2.0

By: Dinesh Rajput

Overview of this book

Spring is one of the best frameworks on the market for developing web, enterprise, and cloud ready software. Spring Boot simplifies the building of complex software dramatically by reducing the amount of boilerplate code, and by providing production-ready features and a simple deployment model. This book will address the challenges related to power that come with Spring Boot's great configurability and flexibility. You will understand how Spring Boot configuration works under the hood, how to overwrite default configurations, and how to use advanced techniques to prepare Spring Boot applications to work in production. This book will also introduce readers to a relatively new topic in the Spring ecosystem – cloud native patterns, reactive programming, and applications. Get up to speed with microservices with Spring Boot and Spring Cloud. Each chapter aims to solve a specific problem or teach you a useful skillset. By the end of this book, you will be proficient in building and deploying your Spring Boot application.
Table of Contents (23 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
Index

Spinning up an AWS EC2 instance


Amazon Web Services (AWS) provides lots of platforms for cloud computing solutions. You can use AWS to build and deploy applications. Amazon EC2 is a service that provides resizable computing capacity in the cloud and makes web-scale cloud computing easier for developers.

Another platform is the AWS Elastic Container Service. It is used to deploy microservices using Docker. Microservices can be deployed to Amazon ECS by creating a Docker image of your application. You can easily push this Docker image to the Amazon Elastic Container Registry (ECR).

In this chapter, I will deploy a microservice using a Docker image of your application to the Amazon EC2. I will use the Docker registry to the Docker Hub to push a Docker image. Let's see how to set up an Amazon EC2 instance:

  1. First of all, we need to have an Amazon account. You can create an Amazon Free Tier account at https://aws.amazon.com/free/:
  1. Log in to the AWS Management Console. After a successful login, you...