4

How to build microsservices with Spring Boot and AWS with Fargate and DOCKER - P...

 2 years ago
source link: https://dev.to/pedrospiet/how-to-build-microsservices-with-spring-boot-and-aws-with-fargate-and-docker-part-4-4ldp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to build microsservices with Spring Boot and AWS with Fargate and DOCKER - Part 4

Aws CDK

If you have a personal account or paid account, you need to create a IAM user .

In this train, i will use Aws Student, where dont have the IAM User.

How i take the user on AWS Student?

make login in your student account.

in Vocaerum Labs, tap on "Account details" and copy the AWS CLI.

Then, you need install AWS-CLI

Next, you to go to the archive "Credentials" on .aws directory and paste, LIKE THAT:

Creating a project with CDK

First, Create a new Directory and put the command below:

cdk init --language java

Then, open the project on IDE

KNOWING CDK project structure

We have two classes

the class AwsSpringCdkApp is the entrypoint

What is VPC

The Virtual Private Cloud will be our virtual lan, where permit us to create our components inside it that we want still isolated. like RDS instance he will still visible to just components inside the VPC instance.

What is ECS Cluster

cluster is the architecture that will permit our have a quantity of computational resources to be utilized by our application.

The ECS is a container composer, with AWS Fargate not is necessary manage machines instances.

Task and Task Definition

to run our application inside a cluster, we need to create a Task Definition. The task definition is like a recipe, as our service will be executed. The task definition to take our docker image and to execute that image with some configurations, like how much cpu will be utilized to execute that service.

Thats it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK