generated from FCJ-DNTU/workshop-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from FCJ-DNTU/1-introduction/2-preparation
update
- Loading branch information
Showing
18 changed files
with
613 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
content/2-preparation/2.1-configure-infrastructure/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
+++ | ||
title = "Infrastructure Configuration" | ||
date = 2024 | ||
weight = 1 | ||
chapter = false | ||
pre = "<b>2.1 </b>" | ||
+++ | ||
|
||
#### Infrastructure Configuration | ||
|
||
To participate in this workshop, you need to complete the configuration steps outlined in the workshop [Deploy Application on Docker Container](https://fcj-dntu.github.io/000015-deploy-app-docker). | ||
|
||
After finishing the workshop on deploying applications in Docker Containers, you will have the necessary infrastructure components to proceed with ECS, including: | ||
|
||
- EC2 Instance | ||
- RDS Database Instance | ||
- Application deployed as a Container | ||
- Image pushed to Docker Hub or Amazon ECR | ||
|
||
With the services and infrastructure set up, we will move forward with the workshop on deployment in ECS. |
20 changes: 20 additions & 0 deletions
20
content/2-preparation/2.1-configure-infrastructure/_index.vi.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
+++ | ||
title = "Cấu hình cơ sở hạ tầng" | ||
date = 2024 | ||
weight = 1 | ||
chapter = false | ||
pre = "<b>2.1 </b>" | ||
+++ | ||
|
||
#### Cấu hình cơ sở hạ tầng | ||
|
||
Để tham gia workshop này, bạn cần hoàn thành các bước cấu hình đã được hướng dẫn trong workshop [Deploy Application on Docker Container](https://fcj-dntu.github.io/000015-deploy-app-docker). | ||
|
||
Sau khi kết thúc workshop về triển khai ứng dụng trên Docker Container, bạn sẽ có sẵn các thành phần hạ tầng để tiếp tục với ECS, bao gồm: | ||
|
||
- EC2 Instance | ||
- RDS Database Instance | ||
- Ứng dụng đã được triển khai dưới dạng Container | ||
- Image đã được đẩy lên Docker Hub hoặc Amazon ECR | ||
|
||
Với các dịch vụ và hạ tầng trên đã được thiết lập, chúng ta sẽ tiến hành thực hiện workshop về triển khai trên ECS. |
36 changes: 36 additions & 0 deletions
36
content/2-preparation/2.2-create-code-deploy-role/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
+++ | ||
title = "Create CodeDeploy Role" | ||
date = 2024 | ||
weight = 2 | ||
chapter = false | ||
pre = "<b>2.2 </b>" | ||
+++ | ||
|
||
#### Create CodeDeploy Role | ||
|
||
Search for and select **IAM**. | ||
|
||
![3.29](/images/2-preparation/3.29.png) | ||
|
||
- Select **Roles** | ||
- Click **Create role** | ||
|
||
![3.30](/images/2-preparation/3.30.png) | ||
|
||
In the use case section, choose: | ||
|
||
- Service or use case: `CodeDeploy` | ||
- Select **CodeDeploy - ECS** | ||
- Click **Next** | ||
|
||
![3.31](/images/2-preparation/3.31.png) | ||
|
||
- Click **Next** | ||
|
||
![3.32](/images/2-preparation/3.32.png) | ||
|
||
- Role name: `CodeDeployServiceRole` | ||
|
||
![3.33](/images/2-preparation/3.33.png) | ||
|
||
- Click **Create role** |
36 changes: 36 additions & 0 deletions
36
content/2-preparation/2.2-create-code-deploy-role/_index.vi.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
+++ | ||
title = "Tạo role CodeDeploy" | ||
date = 2024 | ||
weight = 2 | ||
chapter = false | ||
pre = "<b>2.2 </b>" | ||
+++ | ||
|
||
#### Tạo CodeDeploy Role | ||
|
||
Tìm kiếm và chọn **IAM** | ||
|
||
![3.29](/images/2-preparation/3.29.png) | ||
|
||
- Chọn **Roles** | ||
- Nhấn **Create role** | ||
|
||
![3.30](/images/2-preparation/3.30.png) | ||
|
||
Trong phần Use case, chọn: | ||
|
||
- Service or use case: `CodeDeploy` | ||
- Chọn **CodeDeploy - ECS** | ||
- Nhấn **Next** | ||
|
||
![3.31](/images/2-preparation/3.31.png) | ||
|
||
- Nhấn **Next** | ||
|
||
![3.32](/images/2-preparation/3.32.png) | ||
|
||
- Role name: `CodeDeployServiceRole` | ||
|
||
![3.33](/images/2-preparation/3.33.png) | ||
|
||
- Nhấn **Create role** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
+++ | ||
title = "Add Subnet" | ||
date = 2024 | ||
weight = 3 | ||
chapter = false | ||
pre = "<b>2.3 </b>" | ||
+++ | ||
|
||
#### Add Private Subnet | ||
|
||
In the VPC management interface, from the left menu: | ||
|
||
- Select **Subnets** | ||
- Click on the **Create subnet** button | ||
|
||
![3.1](/images/2-preparation/3.1.png) | ||
|
||
- Choose VPC **FCJ-Lab-vpc** | ||
|
||
![3.2](/images/2-preparation/3.2.png) | ||
|
||
Configure the following information: | ||
|
||
- Subnet Name: `FCJ-Lab-subnet-private3` | ||
- Select an Availability Zone | ||
- IPv4 CIDR block of VPC: `10.0.0.0/16` | ||
- IPv4 CIDR block of Subnet: `10.0.32.0/20` | ||
- Click **Create subnet** | ||
|
||
![3.3](/images/2-preparation/3.3.png) | ||
|
||
Result: | ||
|
||
![3.4](/images/2-preparation/3.4.png) | ||
|
||
Similarly, create another subnet: | ||
|
||
- Subnet Name: `FCJ-Lab-subnet-private4` | ||
- Select a different Availability Zone than the previously created subnet | ||
- IPv4 CIDR block of VPC: `10.0.0.0/16` | ||
- IPv4 CIDR block of Subnet: `10.0.64.0/20` | ||
- Click **Create subnet** | ||
|
||
![3.5](/images/2-preparation/3.5.png) | ||
|
||
Result: | ||
|
||
![3.6](/images/2-preparation/3.6.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
+++ | ||
title = "Thêm Subnet" | ||
date = 2024 | ||
weight = 3 | ||
chapter = false | ||
pre = "<b>2.3 </b>" | ||
+++ | ||
|
||
#### Thêm Subnet Private | ||
|
||
Trong giao diện quản lý VPC, từ bảng chọn bên trái: | ||
|
||
- Chọn **Subnet** | ||
- Nhấn vào nút **Create subnet** | ||
|
||
![3.1](/images/2-preparation/3.1.png) | ||
|
||
- Chọn VPC **FCJ-Lab-vpc** | ||
|
||
![3.2](/images/2-preparation/3.2.png) | ||
|
||
Cấu hình các thông tin sau: | ||
|
||
- Tên Subnet: `FCJ-Lab-subnet-private3` | ||
- Chọn Availability Zone | ||
- IPv4 CIDR block của VPC: `10.0.0.0/16` | ||
- IPv4 CIDR block của Subnet: `10.0.32.0/20` | ||
- Nhấn **Create subnet** | ||
|
||
![3.3](/images/2-preparation/3.3.png) | ||
|
||
Kết quả: | ||
|
||
![3.4](/images/2-preparation/3.4.png) | ||
|
||
Tương tự, tạo thêm một subnet khác: | ||
|
||
- Tên Subnet: `FCJ-Lab-subnet-private4` | ||
- Chọn Availability Zone khác với subnet vừa tạo | ||
- IPv4 CIDR block của VPC: `10.0.0.0/16` | ||
- IPv4 CIDR block của Subnet: `10.0.64.0/20` | ||
- Nhấn **Create subnet** | ||
|
||
![3.5](/images/2-preparation/3.5.png) | ||
|
||
Kết quả: | ||
|
||
![3.6](/images/2-preparation/3.6.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
+++ | ||
title = "Configure NAT Gateway" | ||
date = 2024 | ||
weight = 4 | ||
chapter = false | ||
pre = "<b>2.4 </b>" | ||
+++ | ||
|
||
#### Create NAT Gateway | ||
|
||
First, you need to create an Elastic IP to associate with the NAT Gateway. From the left menu: | ||
|
||
- Select **Elastic IPs** | ||
- Click on **Allocate Elastic IP address** | ||
|
||
![3.7](/images/2-preparation/3.7.png) | ||
|
||
Configure the Elastic IP: | ||
|
||
- Public IPv4 address pool: **Amazon's pool of IPv4 address** | ||
- Network border group: **ap-southeast-1** (if you are using the same region) | ||
|
||
![3.8](/images/2-preparation/3.8.png) | ||
|
||
In the tags section (optional): | ||
|
||
- Key: `Name` | ||
- Value: `FCJ-Lab-IP` | ||
- Click **Allocate** | ||
|
||
![3.9](/images/2-preparation/3.9.png) | ||
|
||
Next, create the NAT Gateway: | ||
|
||
- Select **NAT gateways** | ||
- Click on **Create NAT gateway** | ||
|
||
![3.11](/images/2-preparation/3.11.png) | ||
|
||
Configure the NAT Gateway: | ||
|
||
- Name: `FCJ-Lab-nat` | ||
- Select the public subnet you created | ||
- Connectivity type: **Public** | ||
- Associate the Elastic IP you just created | ||
- Click **Create NAT gateway** | ||
|
||
![3.12](/images/2-preparation/3.12.png) | ||
|
||
After creation, wait for the status to change to **Available**. | ||
|
||
![3.14](/images/2-preparation/3.14.png) |
52 changes: 52 additions & 0 deletions
52
content/2-preparation/2.4-configure-nat-gateway/_index.vi.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
+++ | ||
title = "Cấu hình NAT gateway" | ||
date = 2024 | ||
weight = 4 | ||
chapter = false | ||
pre = "<b>2.4 </b>" | ||
+++ | ||
|
||
#### Tạo NAT Gateway | ||
|
||
Trước tiên, cần tạo Elastic IP để gán cho NAT Gateway. Từ bảng chọn bên trái: | ||
|
||
- Chọn **Elastic IPs** | ||
- Nhấn **Allocate Elastic IP address** | ||
|
||
![3.7](/images/2-preparation/3.7.png) | ||
|
||
Cấu hình Elastic IP: | ||
|
||
- Public IPv4 address pool: **Amazon's pool of IPv4 address** | ||
- Network border group: **ap-southeast-1** (nếu bạn dùng cùng region) | ||
|
||
![3.8](/images/2-preparation/3.8.png) | ||
|
||
Trong phần tags (tùy chọn): | ||
|
||
- Key: `Name` | ||
- Value: `FCJ-Lab-IP` | ||
- Nhấn **Allocate** | ||
|
||
![3.9](/images/2-preparation/3.9.png) | ||
|
||
Tiếp theo, tạo NAT Gateway: | ||
|
||
- Chọn **NAT gateways** | ||
- Nhấn **Create NAT gateway** | ||
|
||
![3.11](/images/2-preparation/3.11.png) | ||
|
||
Cấu hình NAT Gateway: | ||
|
||
- Name: `FCJ-Lab-nat` | ||
- Chọn Subnet public đã tạo | ||
- Connectivity type: **Public** | ||
- Gắn Elastic IP vừa tạo | ||
- Nhấn **Create NAT gateway** | ||
|
||
![3.12](/images/2-preparation/3.12.png) | ||
|
||
Sau khi tạo, chờ trạng thái **Available**. | ||
|
||
![3.14](/images/2-preparation/3.14.png) |
Oops, something went wrong.