Công Cụ Hỗ Trợ Tự Động Triển Khai Hệ Thống Thông Tin

Khóa luận trình bày công cụ hỗ trợ tự động triển khai hạ tầng lên đám mây bằng Terraform và CI/CD, tối ưu hóa quy trình phát triển.

Chuyên ngành

Information System Engineering

Người đăng

Ẩn danh

Thể loại

Graduation Thesis

2022

75
2
0

Phí lưu trữ

30 Point

Mục lục chi tiết

1. CHƯƠNG 1: OVERVIEW

1.1. Problem Statement

1.2. Objective and Particular objectives

1.3. Challenges

1.4. Thesis Structure

2. CHƯƠNG 2: RELATED RESEARCH

2.1. Survey of IaC in 2022

2.2. Overview about Pulumi

2.3. Pulumi vs Terraform

2.4. Overview about Ansible

3. CHƯƠNG 3: GOOGLE CLOUD PLATFORM (GCP)

3.1. Virtual Private Cloud

3.2. Subnet

3.3. Virtual Machine

3.4. Load Balancer

4. CHƯƠNG 4: AUTOMATION SUPPORT TOOL FOR CLOUD

4.1. Infrastructure as Code (IaC)

4.2. Configuration Workflow

4.3. Terraform State

4.4. Azure Pipeline Workflow

5. CHƯƠNG 5: EXPERIMENTS AND EVALUATIONS

5.1. Values of VPC and Subnet

5.2. Values for VM

5.3. Values for LB

5.4. Enable API, Create Service Account and Grant Permission

5.5. Template Virtual Private Cloud and Subnet

5.6. Virtual Machine with the Role Firewall

5.7. Virtual Machine with Single Network Interface Card

5.8. Load Balancer Preparation

5.9. Continuous Integration/Continuous Delivery Execute

5.10. Azure Pipeline Definition

5.11. Continuous Integration/Continuous Delivery

6. CHƯƠNG 6: CONCLUSION

Tóm tắt

I. Tổng Quan Về Công Cụ Hỗ Trợ Tự Động Triển Khai Hệ Thống Thông Tin

Công cụ hỗ trợ tự động triển khai hệ thống thông tin trên đám mây đang trở thành xu hướng quan trọng trong ngành công nghệ thông tin. Những công cụ này giúp giảm thiểu thời gian và công sức trong việc triển khai hạ tầng, đồng thời đảm bảo tính chính xác và an toàn cho dữ liệu. Việc áp dụng các công nghệ như Terraform và CI/CD đã mang lại nhiều lợi ích cho các tổ chức trong việc quản lý và triển khai hạ tầng đám mây.

1.1. Khái Niệm Về Triển Khai Đám Mây

Triển khai đám mây là quá trình thiết lập và quản lý các tài nguyên trên nền tảng đám mây. Điều này bao gồm việc tạo ra các máy chủ ảo, lưu trữ dữ liệu và cấu hình mạng. Việc sử dụng công cụ tự động hóa giúp đơn giản hóa quy trình này.

1.2. Lợi Ích Của Việc Sử Dụng Công Cụ Tự Động Hóa

Công cụ tự động hóa giúp tiết kiệm thời gian, giảm thiểu lỗi do con người và tăng cường khả năng mở rộng. Các tổ chức có thể dễ dàng triển khai và quản lý hạ tầng mà không cần phải can thiệp thủ công.

II. Thách Thức Trong Triển Khai Hệ Thống Thông Tin Trên Đám Mây

Mặc dù có nhiều lợi ích, việc triển khai hệ thống thông tin trên đám mây cũng gặp phải nhiều thách thức. Các vấn đề như chi phí, bảo mật và quản lý tài nguyên là những yếu tố cần được xem xét kỹ lưỡng. Đặc biệt, việc quản lý nhiều tài nguyên có thể trở nên phức tạp nếu không có công cụ hỗ trợ phù hợp.

2.1. Chi Phí Triển Khai Đám Mây

Chi phí là một trong những thách thức lớn nhất khi triển khai hạ tầng đám mây. Các tổ chức cần phải tính toán kỹ lưỡng để tránh phát sinh chi phí không cần thiết, đặc biệt là khi sử dụng nhiều máy chủ ảo.

2.2. Vấn Đề Bảo Mật Thông Tin

Bảo mật thông tin là một yếu tố quan trọng trong việc triển khai hệ thống trên đám mây. Các tổ chức cần phải đảm bảo rằng dữ liệu của họ được bảo vệ khỏi các mối đe dọa từ bên ngoài và bên trong.

III. Phương Pháp Triển Khai Hệ Thống Thông Tin Tự Động

Để giải quyết các thách thức trong việc triển khai hệ thống thông tin, nhiều tổ chức đã áp dụng các phương pháp tự động hóa như Terraform và CI/CD. Những công cụ này không chỉ giúp tiết kiệm thời gian mà còn đảm bảo tính chính xác trong quá trình triển khai.

3.1. Sử Dụng Terraform Để Triển Khai Hạ Tầng

Terraform là một công cụ mã nguồn mở cho phép người dùng định nghĩa hạ tầng dưới dạng mã. Điều này giúp dễ dàng quản lý và triển khai các tài nguyên trên đám mây một cách tự động.

3.2. CI CD Trong Quá Trình Triển Khai

CI/CD là phương pháp giúp tự động hóa quy trình phát triển phần mềm. Bằng cách tích hợp liên tục và triển khai liên tục, các tổ chức có thể nhanh chóng đưa sản phẩm đến tay người dùng mà không gặp phải sự cố.

IV. Ứng Dụng Thực Tiễn Của Công Cụ Tự Động Hóa

Công cụ tự động hóa đã được áp dụng rộng rãi trong nhiều lĩnh vực khác nhau, từ phát triển phần mềm đến quản lý hạ tầng. Các tổ chức đã ghi nhận được nhiều kết quả tích cực từ việc sử dụng các công cụ này, bao gồm tăng cường hiệu suất và giảm thiểu rủi ro.

4.1. Kết Quả Nghiên Cứu Về Terraform

Nghiên cứu cho thấy rằng việc sử dụng Terraform giúp giảm thiểu thời gian triển khai hạ tầng lên đến 50%. Điều này cho phép các tổ chức tập trung vào phát triển sản phẩm thay vì quản lý hạ tầng.

4.2. Ứng Dụng CI CD Trong Doanh Nghiệp

Nhiều doanh nghiệp đã áp dụng CI/CD để cải thiện quy trình phát triển phần mềm. Kết quả là thời gian đưa sản phẩm ra thị trường được rút ngắn đáng kể, đồng thời tăng cường chất lượng sản phẩm.

V. Kết Luận Về Tương Lai Của Triển Khai Hệ Thống Thông Tin

Tương lai của việc triển khai hệ thống thông tin trên đám mây hứa hẹn sẽ tiếp tục phát triển mạnh mẽ với sự hỗ trợ của các công cụ tự động hóa. Các tổ chức cần phải nắm bắt xu hướng này để tối ưu hóa quy trình làm việc và nâng cao hiệu quả kinh doanh.

5.1. Xu Hướng Tương Lai Trong Công Nghệ Đám Mây

Công nghệ đám mây sẽ tiếp tục phát triển với sự gia tăng của các công cụ tự động hóa. Điều này sẽ giúp các tổ chức dễ dàng hơn trong việc quản lý và triển khai hạ tầng.

5.2. Tầm Quan Trọng Của Bảo Mật Trong Tương Lai

Bảo mật sẽ trở thành một yếu tố quan trọng hơn bao giờ hết trong việc triển khai hệ thống thông tin. Các tổ chức cần phải đầu tư vào các giải pháp bảo mật để bảo vệ dữ liệu của mình.

10/07/2025

Trích đoạn nội dung tài liệu

VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY INFORMATION SYSTEM FACULTY PHAM TRUNG KIEN GRADUATION THESIS AN AUTOMATION SUPPORT TOOL FOR DEPLOYING INFORMATION SYSTEM ENGINEERING Ho Chi Minh City, 2022 VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY INFORMATION SYSTEM FACULTY PHAM TRUNG KIEN - 18520957 GRADUATION THESIS AN AUTOMATION SUPPORT TOOL FOR DEPLOYING INFRASTRUCTURE TO THE CLOUD USING TERRAFORM AND CI/CD INFORMATION SYSTEM ENGINEERING ADVISOR Dr. PHAN XUAN THIEN Ho Chi Minh City, 2022 INFORMATION OF THE GRADUATE THESIS COUNCIL ose Graduation thesis grading committee, established under Decision No. of the Rector of the University of Information Technology. — Commissioner ACKNOWLEDGE First of all, I would like to express our sincere thanks to the lecturers at the University of Information Technology - Vietnam National University, Ho Chi Minh City, and the Department of Information Systems teachers for helping me have a basic knowledge that underlies this thesis.

Our group would like to express deepest gratitude and gratitude to our instructor — Dr. Phan Xuan Thien. The teacher and your directly guided, corrected, and provided many valuable comments to help our group complete subject final report well. Once again, I sincerely thank you and wish you good health.

During one semester of implementing the project, our group applied the accumulated background knowledge and combined it with learning and researching new knowledge from teachers, friends, and many sources or references. From there, our team makes the most of what has been collected to complete the best project report. However, because of our limited professional knowledge and our lack of practical experience, the content of the report cannot avoid shortcomings, I look forward to receiving further advice and guidance from you to perfect our knowledge so that our group can use it as a luggage to carry out other topics in the future as well as in future study and work. Besides, I want to give thanks to my family for taking care of, support me and always give me a best condition.

Moreover, Thanks for all college student of class CTTT2018 have always been attached, helped each other. Signature TABLE OF CONTENTS Contents [Y0 0400 naa11.2 Objective and Particular ObjeCfÏVéS.011 1e6 CHAP 2: RELATED RESEARCH.1 Overview about Ansible 2.3 Terraform vs Ansible. CHAP 3: GOOGLE CLOUD PLATFORM (GCP).2 Virtual Private Cloud 6 RS he 20 3. ¿tt tt th t2 th tt 0 re 22 CHAP 4: AUTOMATION SUPPORT TOOL FOR CLOUD.1 Infrastructure as code (aC) Configuration Workflow.

tt tt th HH H1 11111010. tt tt rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrce DO 4.4 Terraform State hố .1 Azure pipeline WOTkfÏOW. CHAP 5: Experiments and EvaluatiOIS.1 Values of VPC and Subne 5.2 Values for VM 5.3 Values for LB.1 Enable Api, Create Service Account and Grant Permission.1 Template Virtual Private Cloud and Subnet: .3 Virtual machine with the role firewall: .4 Virtual machine with single network interface Card: .5 Load Balancer preparation .4 Continuous Integration/ Continuous Delivery eX€Ute.2 Azure pipeline DF€DATALÏO:.1 Continuous Integration/ Continuous Delivery 6. 64 LIST OF PICTURES Figure 1.

State Architecture of Pulumi. Ansible Architecture Figure 3. Sample Architecture on GCP. The half option to create VPC Figure 5.

Another option to create VPC. Option to create Subnet. First option to create VM. Configuration a storage of VM Figure 9.

Configuration Operating System. laC Workflow Figure 11. Example Provider Azure. The result of successful initialize.

The result of terraform plan. The sample resources Figure 15. Module structure Figure 16. example of variable structure.

Resource to create bucket of GCP Figure 18. Configuration a backend file .-‹---:-:---++ Figure 19, Example of variable for 5 VPC: Figure 20. CI/CD workflow. Pipeline concepts overview.

Option to create Service Account on GCP Figure 23. Grant permission for service account Figure 24. Permission need for Service Account Figure 25. Pipeline Library Figure 26.

CI/CD Workflow Figure 30. Result of Azure pipeline. VPC result on GCP. VM instance on GCP.

Load Balancer r€SuÏ(S.162 LIST OF TABLES Table 1. Compare Terraform and Pulumi. Source : Pulumi, Homepage, https://www.com/docs/intro/vs/terrafOrm/. Terraform vs Ansible.

Create Subnet on GCP. First option to create VÌM. Configuration storage Of VM. Configuration operating system Of VM.

Option to create a bucket on GCPP.cccsceeccesceseseeseeseseeseeseseseessseseessseseensseeseesssesseensseesessseeeseesens oA Table 10. Variable value Of VPC .cccsesssessessesestssesssseesesnssesssssssessssssessssesseeisseessessseesseissensseessensesessens DD Table 11. Variable Value for subnet. Values of5 VÌMs.

tt tt 2t 2 t2 1212111111 40 Table 13. Creating service aCCOUML. VPC template Option. cece cece eeeseseeeesesesseseseeseseestsnesessesnsseessssaeenssesaeesssesseesseeseseese 46 Table 16.

Subnet template OptÏOn.-- 5:52 S£SE9S£2t}EEE2EE22EE23931212111 71. Peering template option. VM (firewall) template option Table 19. VM template option Table 20.

Instance group template option he) Table 21. Health check template optio b9 Table 22. Frontend Load Balancer template option. Backend Load Balancer template option.

®a LIST OF ACRONYMS GCP: Google Cloud Platform VPC: Virtual Private Cloud VM: Virtual Machine LB: Load Balancer FE LB: Front End Load Balancer BE LB: Back End Load Balancer CI: Continuous Integration CD: Continuous Deployment ABSTRACT laC, known as, Infrastructure as Code, help us can design our server on code. Among other advantages, IaC deploy our desired server in automation, which reduces the need for manual intervention, and mitigates the risk of configuration error, and reuse the template with module and scalable code. One of the tools allow IaC is Terraform from Hashicorp. Nowadays, terraform is extremely popular today because the development of the cloud.

Another reason, terraform has a following advantages: 1. Terraform can support for a multi-provider. It means Terraform can run code on AWS or GCP and Azure. Although there is different provider, the flow or algorithm of the code is still the same.

The small different from the resource of each cloud. To GCP, to run code terraform we need grant permission to user (owner or editor) then we need create a credential to check authentication of the user. It is the json file and if it is leaked out, the hacker can use it to attack our data and a big money will be lost just on few minutes. To Azure, it is more secure than GCP.

We still need create a key but only the key ID not the file and we need login on our computer, more details, only our computer can run the code Terraform on Azure, for GCP, everyone have a json file can run code. It has another method with AWS. We can preview the cloud when we create or change any attribute of each resource. DevOp, IT culture , is a software development methodology often associated with specific practices and tools that help implement those practices.

It is mainly focused on increasing the frequency of software deliveries. The combination between processes, tools and peoples makes the culture become reality. CI/CD is the important part of a DevOps methodology, bringing developers and operations teams together to deploy software. CI/CD is a method to frequently deploy apps to customers by introducing automation into the stages of app development.

Specifically, CI/CD introduces ongoing automation and continuous testing throughout the lifecycle of apps. On the screen now 1s a simple example of a cycle where an update is made, it will be built, tested, and released to customers. When the customer feedback with a problem, an update will be made, and the cycle begins. After four months, we have a support tool to help us implement in a cloud.

We can easily create multiple resource with large quantity such as: 1. which just need input the value of this resource and we do not need run. Everything we need after input value that is push it on GitHub and it will automatic test, check and build to the cloud.1 Problem Statement Nowadays, a large number of companies uses cloud computing to store data and run their applications instead of using on-premises servers as in the past decades. With cloud computing, companies can easily and fast deploy their services and applications to approach their users.

However, cloud engineering has some drawbacks when managing infrastructures by point-and-click user interfaces. For instance, if we create 100 virtual machines on cloud, it will easily cause such problem because there are a lot of data from customer’s virtual machines. Another drawback that every cloud engineering has in common is configuring for cloud infrastructure deployment in the same way with configuring the web or application servers. Not only creating but also managing, the cloud engineer has a trouble with manage a lengthy list of cloud.

If the maximum of creating virtual machine is approximate 100, the resource will be managed is bigger than many times. For those reasons, terraform are created to make it comes true. This is a big step up for cloud engineer. It makes everything we deploy and manage on cloud in automation, and it is also a huge time saver for us.

The grown of terraform relate to another problem. First of all, only the developer who write a code can impact to the resource. Although they give us a code, we still cannot do anything like delete a resource or change configuration. Because the terraform depend on the state file to compare the different and apply the resource depend on it.

Secondly, we cannot merge all code terraform together because the different format. The terraform state should be stored remotely on cloud to enable collaboration between everyone on a project. If we hold a large number of source code, the managing will be out of control. Version control of terraform is important for the team working and managing.

Moreover, they want everything on a project work with the minimum error. So, topic an automation support tool for deploying infrastructure to the cloud using Terraform and CI/CD is chosen to help cloud engineering or developers understand the concept, benefit, and problem of terraform and CI/CD related to cloud computing.2 Objective and Particular objectives The thesis will focus on cloud computing, reviewing some resource on Google Cloud Platform. Analyst every option of each resource and describe the value input for example architecture. Research the method and element to create a template for creating resource on cloud using Terraform.

In addition, showing synthetic about CI/CD, creating a flow of CI/CD for improving the project. From that, we will execute the tools with the example value for each resource that I have created. Depend on the result, showing the advantage and disadvantage of this topic and giving the development.3 Challenges The first challenge that everyone use cloud must face, it is budget that we have to pay. Cloud is convenience but the money we need to pay this convenience is not cheap.

For the virtual machine with the minimum size and the operating system is Linux, taking approximate 30$ for month. And even that price is more double with the window operating system. The minimum size just helps us take some test such as: test connection, test ping or test port,. We cannot do anything else.

The best solution to decrease that stop the VM when you do not use it. For my demo, I have to create 5 virtual machine include 3 Windows and 2 Linux. It takes me about 80$ for first week. And about load balancing is 70$ per month for the minimum configuration.

For the college student, this price is so big. Not the same with the VM, we cannot turn of the load balancing. So, I often delete it when I create it. One more thing maybe will take from you a big money about security issue.

To run terraform code we need create key to cloud provider can check authentication. And when we work with the CI/CD we need upload the code to open source and maybe we upload the key to. The hacker can use this key to access to our cloud and create multiple resource. My partner faces with this trouble.

Unfortunately, He have granted permission Compute Admin (permission allows you can create a virtual machine on GCP) for his key.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ

Tài liệu có tiêu đề Công Cụ Hỗ Trợ Tự Động Triển Khai Hệ Thống Thông Tin Trên Đám Mây cung cấp cái nhìn tổng quan về các công cụ và phương pháp giúp tự động hóa quá trình triển khai hệ thống thông tin trên nền tảng đám mây. Nội dung chính của tài liệu nhấn mạnh vào lợi ích của việc sử dụng công nghệ đám mây, bao gồm khả năng mở rộng, tiết kiệm chi phí và tăng cường tính linh hoạt cho các doanh nghiệp. Đặc biệt, tài liệu cũng đề cập đến các công cụ hỗ trợ giúp giảm thiểu thời gian và công sức trong việc triển khai, từ đó nâng cao hiệu quả công việc.

Để mở rộng kiến thức của bạn về lĩnh vực này, bạn có thể tham khảo thêm tài liệu Luận văn thạc sĩ hệ thống thông tin quản lý công nghệ điện toán đám mây trong môi trường đại học, nơi cung cấp cái nhìn sâu sắc về việc áp dụng công nghệ đám mây trong giáo dục. Ngoài ra, tài liệu Luận văn tổ chức hệ thống thông tin kế toán theo định hướng erp tại công ty cổ phần thương mại nguyễn kim sẽ giúp bạn hiểu rõ hơn về việc tích hợp hệ thống thông tin trong doanh nghiệp. Cuối cùng, bạn cũng có thể tìm hiểu về Luận văn sổ tay hướng dẫn thiết kế xây dựng và lắp đặt cơ sở hạ tầng hệ thống cntt cho các nhà máy, tài liệu này sẽ cung cấp hướng dẫn chi tiết về thiết kế và quản lý hệ thống thông tin trong môi trường công nghiệp. Những tài liệu này sẽ giúp bạn có cái nhìn toàn diện hơn về việc triển khai và quản lý hệ thống thông tin trên nền tảng đám mây.