0% found this document useful (0 votes)
16 views

springRoadMap

roadmap spring

Uploaded by

baotochi87
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

springRoadMap

roadmap spring

Uploaded by

baotochi87
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

https://docs.spring.io/spring-boot/documentation.

html

Spring framework core

Get started with spring

 ---------------------------Maven key concepts----------------------------

 POM.xml (Project Object Model) file

 Configuration file for your project

 Located at root project

 Structure Project meta data Dependencies Plug ins: Additional


custom tasks to run (generate JUnit test reports)

 Project Coordinates uniquely identifiy a project

 groupId: Name of company, group or organization. Convention is to


use reverse domain name

 artifactId: Name for the project

 version: A specific release version

 --------------------------- Spring Boot Project ----------------------------

 mvnw and mvnw.cmd are Maven wrapper files allow you to run
maven project. If correct version of Maven is not present on your
computer --> automatically go to the internet and download that
version. There are two maven's files: mvnw.cmd for MS Windows
and mvnw.sh for Linux Or Mac.

 application properties (resources dir): created Spring initializer

o static dir (inside resources) : locates some static resources:


HTML files, css, JavaScript, images, ...

o templates (inside resources): Spring boot includes auto-


conofiguration for following template engines: FreeMarket,
Thymleaf, Mustache,... --> WARNING: Do not use the
sec/main/webapp dir if your app is packaged as a JAR. It works
only with WAR package ---------------------------- Spring Boot
Starter ---------------------------- is a collection of Maven
dependencies grouped together that are tested and verified
by the Spring development team and make it easier for
developers to get started with Spring

 Spring boot provides : spring-boot-starter-web (What you choose in


Spring initializer) contains spring-web, spring-webmvc, hibernate-
validator, json, tomcat, ...
 Spring boot starter parent: this is special starter that provides
Maven defaults ---------------------------- Spring Boot Dev
Tool----------------------------

 When we use change code the server needs to restart to reflect the
new code --> Spring boot dev tool comes into play. It helps
automatically restart when your code is changed --> add
dependency to your pom file

---------------------------- Spring Boot Actuator----------------------------

Actuator endpoints let you monitor and interact with your application.
Spring Boot includes a number of built-in endpoints and lets you add your
own.

more endpoints:

https://docs.spring.io/spring-boot/docs/2.1.7.RELEASE/reference/html/
production-ready-endpoints.html#:~:text=Actuator endpoints let you
monitor,can be enabled or disabled.

What’s about security because when we expose a lot of info —> this is not
good

----------------------------Running Spring Boot With CLI----------------------------

 option 1: java -jar <your name project>

 option 2: mvnw spring-boot:run

o mvnw.cmd for MS Windows : use command ./nvnw clean


compile test or ./nvnw spring-boot:run

Steps: with option 1

 mvnw package —> create 1 target/<some file>

 Use that file with java -jar <file name>

Dependency Injection (DI)

Dependency is something relying on something else for support. In


programming language, Dependency indicates that a class uses other
class’s functionalities is dependency

Dependency Injection is the process of creating an object for some


other class and let the class directly using the dependency is called
Dependency Injection.
Types of Dependency Injection

 Constructor Injection: In this type of injection, the injector


supplies dependency through the client class constructor.

 Setter Injection / Property Injection: In this type of injection, the


injector method injects the dependency to the setter method
exposed by the client.

 Interface Injection: In this type of injection, the injector uses


Interface to provide dependency to the client class. The clients must
implement an interface that will expose a setter method which
accepts the dependency.

Spring IOC

Inversion of Control

I have mentioned above Inversion of Control is a principle based on which,


Dependency Injection is made. Also, as the name suggests, Inversion of
Control is basically used to invert different kinds of additional
responsibilities of a class rather than the main responsibility.

If I have to explain you in simpler terms, then consider an example,


wherein you have the ability to cook. According to the IoC principle, you
can invert the control, so instead of you cooking food, you can just directly
order from outside, wherein you receive food at your doorstep. Thus the
process of food delivered to you at your doorstep is called the Inversion of
Control.

Aspect Oriented Programming (AOP)

https://www.udemy.com/course/spring-hibernate-tutorial/?
couponCode=MTST7102224A2

Learn AOP part of this course

Spring MVC

Spring MVC architecture: https://medium.com/edureka/mvc-architecture-


in-java-a85952ae2684

 Web servers: Tomcat (learn this), Jetty, Undertow

 HTTP Request

o Get

o Post

o Put
o Patch

o Delete

 Configuration Profile (learn configuration to deploy your app


correctly)

 Bean validation (validate users, requests, data, …)

Annotations

https://roadmap.sh/spring-boot

Spring bean scope

https://roadmap.sh/spring-boot

Spring Architecture

https://www.interviewbit.com/blog/spring-boot-architecture/

Spring data

https://www.udemy.com/course/hibernate-jpa-tutorial-for-beginners-in-
100-steps/?couponCode=MTST7102224A2

Books: **Java Persistence with Spring Data and Hibernate (616 pages)**

Spring data JDBC

Should read before learning JDBC

https://medium.com/edureka/advanced-java-tutorial-f6ebac5175ec

Spring JPA

SQL : Hibernate (Entity, Relations, Transactions, Locking)

NoSQL: Mongo DB, Redis, Apache Cassandra

Caching

 Caffeine

 Distributed: Java-Redis

Search Engines

ElasticSearch

Spring security

https://docs.spring.io/spring-security/reference/index.html

 Must read before learning spring security


Security in applications is always a complex part and also due to the great
diversity of solutions, in the antiquity of programming, about 12 years ago
we follow JAAS (Java Authentication and Authorization Service) a beautiful
name, but the complexity of working with this solution and lack of
documentation.

Already in 2008 Spring Security was already evolving and programmers


were already looking for this solution, and in its version 4.0.0, in 2015, it
was already being applied in most applications, or even more tutorials
were being created, this year Spring Security its version reached version 6
.0.1, and has major updates since version 4.0.0.

With more and more applications evolving in terms of security, because


today we have several tools (Nexus, Fortify) that help you to discover your
application, looking for possible failures that are already known and can
be used to corrupt your application, these failures are widely disseminated
and often corrected, but your application has not yet updated to that
version.

Today it is necessary for the programmer to have a comprehensive view


around security issues, first to understand how the JWT(JSON Web
Token) and also how Spring Boot's Filters work.

At this point, some details are already part of your understanding, but the
forms of logging are increasingly evolving and organizations already want
to take advantage of a pre-existing registration keycloak, or even a login
that Access Lightweight Directory Access Protocol (LDAP) directory
services.

In my github there is a project spring-boot-keycloak , where we work with


authentication and authorization using Spring Boot and Keycloak,
remembering that here we use docker-compose to upload mysql and
keyCloak.

You should understand how to work with OAuth2 and with JWT and access
control,

And how do cryptographic algorithms that generate JWT tokens work, such
as a symmetric algorithm (HMAC SHA-256), or signing JWT with an
asymmetric algorithm (RSA SHA-256), and how spring Security helps you
verify user authentication with database data.

You can add public Claims in the JWT Payload (user name) and understand
how you can plan a topology of groups and system permissions, which
when used with Method Security can Restricting API access using
@PreAuthorize and SpEL

Authentication
https://docs.spring.io/spring-security/reference/features/authentication/
index.html

https://www.baeldung.com/spring-security-basic-authentication

Authorization

https://docs.spring.io/spring-security/reference/servlet/authorization/
index.html

Advanced authorization:
https://docs.spring.io/spring-security/site/docs/5.2.11.RELEASE/reference/
html/authorization.html

Authentication and Authorization In-Depth:


https://www.marcobehler.com/guides/spring-security

JWT

https://www.toptal.com/spring/spring-security-tutorial

https://springframework.guru/jwt-authentication-in-spring-microservices-
jwt-token/

https://www.tutorialspoint.com/spring_security/
spring_security_with_jwt.htm

OAuth2

https://spring.io/guides/tutorials/spring-boot-oauth2

https://www.tutorialspoint.com/spring_boot/
spring_boot_oauth2_with_jwt.htm

https://www.tutorialspoint.com/spring_security/
spring_security_with_oauth2.htm

Spring Boot Starters

https://www.javatpoint.com/spring-boot-starters

https://www.baeldung.com/spring-boot-starters

Autoconfiguration

https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/using-boot-
auto-configuration.html

https://www.javatpoint.com/spring-boot-auto-configuration

Actuators

https://www.baeldung.com/spring-boot-actuators
https://www.javatpoint.com/spring-boot-actuator

Embedded Server

https://subscription.packtpub.com/book/web-development/
9781789132588/3/ch03lvl1sec24/embedded-servers

https://www.springboottutorial.com/java-programmer-essentials-what-is-
an-embedded-server

https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/
howto-embedded-web-servers.html

Spring boot

Microservices

https://www.udemy.com/course/microservices-with-spring-boot-and-spring-
cloud/?couponCode=MTST7102224A2

 Reference

Day 9 - Lesson 4 - Xây dựng các thành phần của hệ thống


microservices

o Review Assignment & Lý thuyết Lesson 7

o Xây dựng khả năng chịu lỗi và phản hồi lỗi dùng circuit
Breaker Pattern với Netfix Hystrix

o Spring Security OAuth2

o Kết hợp Spring Clound và Spring Security OAuth2 bảo


mật API

Day 10 - Lesson 4 - Xây dựng unit test

o Review Assignment & Lý thuyết Lesson 9

o Cài đặt Jacoco Code Coverage Plugin

o Viết testcase đầu tiên cho account service

o Hoàn thành test class Account Controller

o Hoàn test business rule Account service

o Viết Intergration test cho Account Service

Day 11 - Lesson 4 - Quản lý chất lượng và an toàn code

o Review Assignment & Lý thuyết Lesson 10

o Tìm hiểu Sonarqube và cài đặt


o Khắc phục lỗ hổng code với Sonarqube

o Khắc phục lỗi Code Smell

o Khắc phục lỗi duplicate code

Day 12 - Lesson 4 - Xây dựng Centralised Log Analyses

o Review Assignment & Lý thuyết Lesson 11

o ELK stack là gì?

o Phân tích ưu và nhược điểm của Elasticsearch. Cài đặt


Elasticsearch trên windows và Linux

o Quản lý Elasticsearch trên UI với Kibana. Thực hành các


câu truy vấn co bản với Elasticsearch

Day 13 - Xây dựng Centralised Log Analyses

o Review Assignment & Lý thuyết Lesson 12

o Logstash là gì

o Cài đặt logstash

o Đẩy dữ liệu vào elasticsearch bằng logstash

o Xử lý filter tối ưu tìm kiếm trong elasticsearch bằng


java spring boot

Day 14 - Lesson 4 - Xây dựng các thành phần của hệ thống


microservices

o Review toàn bộ kiến thức trong package 4

o Kiểm tra lại tổng thể các thành phần trong hệ thống

o Run tất cả các services con, test hoạt động và


performance cho toàn bộ hệ thống

o Tổng kết kiến thức và khuyến khích học viên đặt các
câu hỏi mở rộng về kiến trúc hệ thống

 Microservices Patterns

25. Data Management

And how the CQRS architecture, defined in the Data


Management standards, works

!https://media.dev.to/dynamic/image/width=800%2Cheight=
%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F
%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles
%2Ffswt997gv9yoplugjcs4.png

Database per Service

Shared database

API Composition

Saga

CQRS

Domain event

Event sourcing

26. Transactional Messaging

Transactional outbox

Transaction log tailing

Polling publisher

 Books

Beginning Spring Boot 3: Build Dynamic Cloud-Native Java


Applications and Microservices

 Spring cloud

o API gateway, Load balancer

o HTTP Clients(OpenFeign)

o Distributed Logging, tracing, metric

 OpenTememetry

 Prometheus

 Grafana

 Zipkin

 ELK stack

 Log Frameworks: log4j

o Resilient microservices:
 SAGA pattern

 Circuit breaker pattern

 BulkHead

o Documenting with Swagger

The famous Swagger, as we are working with APIS, it is always good to


document, because who creates and who uses and who does the
integrations, in this agile model there are always different professionals, in
this case the frontEnd and BackEnd.

!https://media.dev.to/dynamic/image/width=800%2Cheight=
%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F
%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles
%2Fdqbyv9o7hfdk3ghtvzj1.png

This image above is just a model that shows us which parameters and
which urls are available to be used in the project, so in most projects the
swagger will be activated and requested by the analysis and business
rules team.

 Architecture

o Domain Driven Design(DDD)

o Event Driven Design

 Kafka

 RabbitMQ

 DevOps

o Docker

https://www.udemy.com/course/docker-course-with-java-and-spring-boot-
for-beginners/?couponCode=MTST7102224A2

Lesson 01. Giới thiệu Docker

 Tổng quan về Docker: Hiểu Docker là gì và tầm quan


trọng của nó trong chu trình phát triển phần mềm.

 Bắt đầu với Docker: Các bước ban đầu và điều kiện tiên
quyết.

 Cài đặt và Thiết lập Docker: Hướng dẫn chi tiết để thiết
lập Docker.

Lesson 02 - Docker Command


 Các Lệnh Docker Cơ bản: Giới thiệu về các lệnh Docker
cơ bản.

 Minh họa: Các minh họa thực hành về lệnh Docker.

 Thực hành Docker: Các bài tập và thực hành tập trung
vào các lệnh Docker cơ bản.

Lesson 03: Docker Run

 Khám phá Lệnh Docker Run

 Bài viết: Sử dụng Hình ảnh Jenkins

 Các Tính năng Nâng cao của Docker Run: Minh họa các
tính năng nâng cao của Docker Run.

 Thực hành: Các bài tập thực hành sử dụng lệnh Docker
Run.

Lesson 04: Docker Images

 Làm việc với Docker Images

 Tạo Một Docker Image Mới: Hướng dẫn từng bước và


minh họa.

 Thực hành: Các bài tập tập trung vào Docker Images.

 Biến Môi trường trong Docker

 Lệnh và Entrypoint trong Docker

 Thực hành: Bài tập về Biến Môi trường, Lệnh, và


Entrypoint.

Lesson 05: Docker Compose

 Hiểu về Docker Compose

 Ứng dụng: Minh họa sử dụng Docker Compose.

 Thực hành: Thực hành với Docker Compose.

Lesson 06: Docker Engine, Lưu trữ

 Docker Engine: Tìm hiểu sâu về Docker Engine.

 Lưu trữ Docker: Hiểu về lưu trữ trong Docker.

 Thực hành: Các bài tập thực hành về lưu trữ Docker.

Lesson 07: Docker Networking

 Mạng trong Docker


 Thực hành: Bài tập về mạng Docker.

Lesson 08: Docker Registry

 Sử dụng Docker Registry

 Thực hành: Thực hành với Docker Registry.

Lesson 09: Điều phối Container - Docker Swarm & Kubernetes

 Tổng quan về Điều phối Container

 Giới thiệu về Docker Swarm

 Giới thiệu về Kubernetes: Cơ bản về điều phối


Kubernetes.

o AWS/Azure/GCP

Lesson 1. Khái niệm về điện toán đám mây (Cloud computing) và


AWS Cloud

1. Giới thiệu về Cloud Computing

 Khái niệm Cloud Computing

 Lịch sử hình thành Cloud Computing

 Ứng dụng Cloud Computing trong doanh nghiệp

5. Lợi ích của Cloud Computing

6. Cloud Computing models

 IaaS, PaaS, SaaS

8. Những mô hình ứng dụng Cloud Computing trong các dự


án thực tế

9. Giới thiệu về AWS - Amazon Web Services

 Lịch sử và khái niệm về AWS

 -Những doanh nghiệp đang sử dụng AWS

12. Những dịch vụ mà AWS cung cấp

13. Tạo tài khoản trên AWS Cloud

14. AWS Free Tier

Lesson 2. Mô hình chia sẻ trách nhiệm | Shared Responsibility


Model

15. Trách nhiệm của AWS


16. Trách nhiệm của người dùng và Cloud Engineer

Lesson 3. Các thành phần trong AWS Cloud | AWS Cloud


Components

17. Regions và Availability Zones

18. Các dịch vụ cốt lõi của AWS Cloud

 Compute Services

 Storage Services

 Database Services

 Network Services

 Security, Identity, and Compliance Services

 Financial Management Services

 …

Lesson 4. Compute

26. Giới thiệu

27. What is Compute in AWS

28. EC2 - Elastic Compute Cloud

29. ECS - Elastic Container Service

30. ECR - Elastic Container Registry

31. EKS - Elastic Container Service for Kubernetes

32. AWS Elastic Beanstalk

33. AWS Lambda

34. AWS Batch

35. Amazon Lightsail

36. What is an Elastic Load Balancer (ELB)?

37. SSL Server Certificates

38. Application Load Balancers

39. Network Load Balancers

40. Classic Load Balancers

41. EC2 Auto Scaling


42. Components of EC2 Auto Scaling

43. Lab:Xây dựng máy ảo Linux trên AWS | AWC EC2 Linux
Virtual Machine

44. Lab:
Xây dựng máy ảo Windows trên AWS | AWC EC2
Windows Virtual Machine

Lesson 5. Storage

45. Khái niệm cơ bản

46. Giới thiệu về Amazon S3

47. AWS Integrated Storage

48. Amazon Elastic Block Store (EBS)

49. Introduction to Amazon EFS

50. Running Operations with the Snow Family

51. Lab: Amazon S3 Bucket

52. Lab: Elastic File System

53. Lab:
Setup S3 bucket to be backup storage for EC2 Linux
and EC2 Windows

Lesson 6. Databases

54. Khái niệm cơ bản

55. The AWS Database Landscape

56. Relational Databases

57. NoSQL Databases

58. Types of Managed NoSQL on AWS

59. Amazon Relational Database Service

60. Lab: Triển khai hệ thống Amazon RDS Database

61. Lab:
Setup RDS Database as a database for EC2 Linux to
keep Wordpress’s data

62. Amazon DynamoDB

63. Lab: Triển khai hệ thống DynamoDB Database

64. Amazon Redshift

65. Lab: Triển khai Amazon Redshift Cluster


Lesson 7. Networking

66. Khái niệm cơ bản

67. What is a VPC

68. Subnets

69. Network Access Control Lists (NACLs)

70. Security Groups

71. NAT Gateway

72. Bastion Hosts

73. VPN & Direct Connect

74. VPC Peering

75. Transit Gateway

76. Amazon Route 53

77. Amazon CloudFront

78. AWS Global Accelerator

79. Lab: Virtual Private Cloud (VPC)

80. Lab:Setup RDS Database to a separate Zone network,


isolated from internet and only be able to connect with
EC2 Linux and S3 bucket

Lesson 8. Decoupled and Serverless Architectures

81. Khái niệm cơ bản

82. What is a Decoupled and Event-Driven Architecture?

83. Decoupling Applications with Queuing Services

84. Notifications With Simple Notification Service

85. Migrating to AWS your existing queues and topics used


for application de-coupling without rewriting your code

86. Real-Time Messaging and Kinesis Data Streams

87. AWS Serverless Services

88. Lab:
Setup EFS as a Storage server for file uploads from
WordPress service in EC2 Linux

89. Lab:
Setup AWS Lambda to resize picture resolution from
EFS Storage
Lesson 9. Management Fundamentals

90. Khái niệm

91. AWS CloudTrail

92. AWS Config

93. What is Amazon Cloud Watch?

94. Lab: Setup CloudWatch

95. Lab:
Build monitoring to get Server information from
EC2 Linux, Database

96. Lab:Setup log alarming when a user enter password


incorrect 3 times

Lesson 10. Security and Compliance

97. Khái niệm

98. Finding Compliance Data With AWS Artifact

99. What is Identity and Access Management?

100. IAM Features

101. Overview of the User Dashboard

102. Creating IAM Users

103. Managing IAM Users

104. Managing Multiple Users with IAM User Groups

105. IAM Roles

106. Using AWS Service Roles to Access AWS Resources


on Your Behalf

107. Using IAM User Roles to Grant Temporary Access


for Users

108. Using Roles for Federated Access

109. IAM AWS Policy Types

110. Examining the JSON Policy Structure

111. Creating an AWS IAM Policy

112. Policy Evaluation Logic

113. What is AWS Trusted Advisor?


114. AWS Organizations

115. Implementing AWS Organizations

116. Securing Your Organizations with Service Control


Policies

117. An Overview of AWS WAF

118. AWS Firewall Manager and Prerequisites

119. What is AWS Shield?

120. Amazon Inspector Basic Features

121. Amazon Guard Duty Basic Features

122. Amazon Macie Basic Features

123. What is AWS KMS?

124. Lab: Working on IAM

125. Lab: Config Policy for Database specific login

126. Lab: Config policy to check DDos attack


connection

127. Final Lab to build a Wiki Webservice (Part 1):

128. Application is build on EC2 Linux

129. Database is build on EFS

130. Data is keep on RDS

Lesson 11. Container on AWS

131. Giới thiệu về Container

132. ECS Introduction

133. EKS

134. ECR

Lesson 12. Billing, Pricing, and Support

135. Giới thiệu

136. Cloud Economics Basics

137. Why Cost Optimization Matters

138. Total Cost of Ownership

139. Economies of Scale


140. Pricing Calculator

141. AWS Well-Architected Framework

142. Working with the Pillars of the AWS Well-


Architected Framework

143. General AWS Terminology

144. Terminology from Software Development &


Operations

145. Terminology from the Finance & Accounting World

146. Bills and Cost Drivers

147. Credits

148. Cost Explorer

149. Reports

150. Cost and Usage Reports

151. AWS Cost Management: Tagging

152. AWS-Generated Cost Allocation Tags

153. Backup server in S3 bucket

154. Database is on different subnet but still able to be


communicate with application server

155. Specific policy on database server and application


is only able to connect from VN’s IP address

156. Setup CloudWatch to monitoring status

157. Backup server in S3 bucket

158. Database is on different subnet but still able to be


communicate with application server

159. Specific policy on database server and application


is only able to connect from VN’s IP address

160. Setup CloudWatch to monitoring status

o Kubernetes

Lesson 01. Giới thiệu về Kubernetes

 Kiến trúc Kubernetes

 Xây dựng Kubernetes Cluster


 Role-Based Access Control (RBAC) trong Kubernetes

 Quản lý Kubernetes Cluster

Lesson 02 - Cài đặt & Cấu hình Cluster Architecture

 Understanding Kubernetes (k8s) Workloads

 ConfigMap and Secret in Kubernetes

 Deploying Applications on Kubernetes

 DaemonSet, Jobs, and StatefulSet

Lesson 03: Workload & Scheduling

 Kubernetes Networking Fundamentals

 Configuring and Managing Application Access with


Services

 Configuring and Managing Application Access with


Ingress

Lesson 04: Services & Networking

 Networking Configuration on Cluster Nodes

 Pod Networking Concepts

 Service Networking

 Deploying and Configuring Network Load


BalancersImplementing Ingress Rules

 Configuring and Utilizing Cluster DNS

 Understanding Container Network Interface (CNI)

Lesson 05: Storage

 Persistent Volumes in Kubernetes

 Volume Access Modes

 Grasping Persistent Volume Claims (PVCs)

 Overview of Kubernetes Storage Objects

 Configuring Applications with Persistent Storage

Lesson 06: CI/CD trong Kubernetes

 Introduction of ArgoCD

 Installing and configuring ArgoCD


 Deploying and managing applications with ArgoCD

o Jenkin & GitHub Actions, GitLab CI/CD

Lesson 01: Giới thiệu Jenkins

 Jenkins là gì?: Hiểu rõ khái niệm cơ bản và mục đích của


Jenkins trong phát triển phần mềm.

 Sử dụng Jenkins: Khám phá các ứng dụng khác nhau của
Jenkins trong tự động hóa, tích hợp, và triển khai.

 Labs:

 Install Jenkins on Windows.

 Install Jenkins on Linux.

 Install Jenkins on Docker.

 Getting familiar with Jenkins.

 Basic concepts in Jenkins.

 Exploring the Jenkins Dashboard.

 Using the Jenkins management interface.

 Understanding and configuring Jenkins jobs.

 Understanding nodes and slaves in Jenkins.

 Managing credentials in Jenkins.

 User policy and permissions.

Lesson 02 - Jenkins Jobs và quản lý user

 Labs:

 Create, configure, execute, and monitor a Jenkins


job.

 Extend Jenkins jobs with advanced options.

 Create nodes and run Jenkins on multiple slaves.

 Manage credentials including username-password


and SSH keys.

 User permissions and role management.

Lesson 03: CI/CD


 What is CI/CD?: A comprehensive introduction to
Continuous Integration, Continuous Delivery, and
Continuous Deployment.

 Distinguishing CI, CD, and Deployment: Understanding


the differences and connections between these
concepts.

 CI Workflow, Testing, and Notification Workflow:

 Labs: Configure a CI Workflow using


Gradle/Maven.

 Using JUnit for Unit Testing.

 Configure and use Slack for notifications.

Lesson 04: Pipeline as Code

 Introduction to Jenkinsfile: Understanding the role and


structure of Jenkinsfile in automation.

 Overview of CD Pipeline and Docker: Using Docker


commands, building, and deploying in different
environments.

 Labs:

 Install Docker and practice basic Docker


commands.

 Develop a Dockerfile for building a Docker image


for a Python web application.

 Develop a Jenkinsfile for automating the build,


test, and deployment of a Python website.

o Infrastructure Automation and Orchestration

Module 01 - Giới thiệu Terraform

 Environment Setup: Preparing for Terraform usage.

 Understanding Infrastructure as Code (IaC):

 Defining IaC, Declarative vs. Imperative


approaches.

 Concepts of Idempotence, Consistency, Push or


Pull methodologies.

 Benefits of IaC.
 Deploying Your First Terraform Configuration:

 Introduction to Terraform components and


scenarios.

 Hands-on deployment of initial configuration.

 Updating Configuration with More Resources:

 Understanding Terraform State and Plan.

 Expanding scenarios and resource updates.

 Configuring a Resource After Creation:

 Deep dive into Terraform syntax, block, and


references.

 Scenario-based resource provisioning and


configuration.

Module 02: Terraform Deep Dive

 Adding a New Provider to Your Configuration:

 Working with Terraform functions, CLI, and


providers.

 Adding and deploying AzureRM provider.

 Using Variables and Functions:

 Managing variables and secrets.

 Deploying configurations in different


environments.

 Using a Module for Common Configurations:

 Utilizing modules for VPC and S3 configurations.

Module 03: Terraform with AWS

 Using the AWS Provider:

 Terraform vs. CloudFormation comparison.

 Deploying VPC configurations with AWS provider.

 Creating Multiple Providers:

 Implementing multiple providers for different


regions.
 Integrating security and creating peering
connections.

 Using AWS for Remote State:

 Managing Terraform state data.

 Configuring and deploying remote state storage.

 Automated Kubernetes (EKS) Cluster Using Terraform:

 Introduction to Kubernetes and EKS cluster


architecture.

 Automating AWS EKS deployment with Terraform.

o Monitoring systems and Infrastructure

Lesson 01 - Giới thiệu giám sát trong DevOps

 Tại sao cần giám sát hệ thống

 Prometheus là gì

 Kiến trúc của Prometheus

 Ưu điểm và nhược điểm của Prometheus

 Triển khai Prometheus bằng systemd

 Triển khai Prometheus bằng docker

 Cấu hình Prometheus

Lab: Triển khai Prometheus

Lesson 02 - Triển khai node exporter, query các metrics trên


Prometheus

 Các loại dữ liệu trong Prometheus

 Thao tác query dữ liệu trong Prometheus

 Các hàm thường dùng trong Prometheus

 Triển khai node exporter

Lab: Triển khai node exporter, query các metrics trên Prometheus

Lesson 03 - Triển khai Alert manager

 Monitor uptime của một dịch vụ bằng blackbox exporter

 Prometheus record rules

 Visualize uptime bằng status map


 Alert bằng Grafana alert

 Alert bằng Alert Manager

Lab: Triển khai Alert manager

Lesson 04 - Building Dashboard from Prometheus from Grafana

 Grafana and It's Capabilities

 Install Grafana and Configure Prometheus with Grafana

 Create Custom DashBoard for Prometheus Metrics

 Configure Dashboard for Kubernetes Prometheus

Testing

https://www.udemy.com/course/testing-spring-boot-beginner-to-guru/?
couponCode=MTST7102224A2

 Spring boot test

JPA Test

Spring JPA (Java Persistence API) is a library that makes it easy to work
with databases and other data stores in a Spring application. Spring JPA
uses the Java Persistence API (JPA) to interact with databases and provides
an abstraction layer to work with different data stores.

Testing in Spring JPA involves testing the application’s persistence layer,


which includes the entities, repositories and data access objects (DAOs)
that interact with the database. Testing these components separately from
the rest of the application helps ensure that the persistence layer is
working correctly and that any issues can be identified and addressed
without affecting the rest of the application.

There are several ways to test the persistence layer using Spring JPA. One
way is to use in-memory databases, such as H2 or Derby, which can be
used during testing to mimic the production database. This allows the
tests to run quickly and eliminates the need to set up a separate test
database. Another way is to use real databases and to use TestContainers
to spin up a real instance of the database for testing purpose.

Spring Test module provides different annotations such as @DataJpaTest


and @AutoConfigureTestDatabase that facilitates the testing of JPA
specific functionality.

Additionally, Spring provides the JPA Testing Utilities, which provides a set
of utility classes and annotations to test JPA-based persistence layer
easily, such as @DataJpaTest, @AutoConfigureTestDatabase, and
TestEntityManager classes. These utilities can be used to create, read,
update, and delete entities, perform JPA queries, and interact with the
database during the test.

Testing the persistence layer separately from the rest of the application
allows to catch any issues early in the development process, making it
easy to identify and fix bugs and improve the quality of the application.

Visit the following links for more information on JPA testing:

https://reflectoring.io/spring-boot-data-jpa-test/https://
www.bezkoder.com/spring-boot-unit-test-jpa-repo-datajpatest/

https://www.baeldung.com/spring-boot-testing

 @SpringBootTest annotation

https://reflectoring.io/spring-boot-test/

https://docs.spring.io/spring-boot/api/java/org/springframework/boot/test/
context/SpringBootTest.html

 MockMVC

https://zetcode.com/spring/mockmvc/

https://howtodoinjava.com/spring-boot2/testing/spring-boot-mockmvc-
example/

https://www.baeldung.com/integration-testing-in-spring

 @MockBean Annotation

https://www.baeldung.com/java-spring-mockito-mock-mockbean

https://howtodoinjava.com/spring-boot2/testing/spring-mockbean-
annotation/

https://docs.spring.io/spring-boot/api/java/org/springframework/boot/
test/mock/mockito/MockBean.html

 Mocking

https://site.mockito.org/

 TestContainers

 Integration Tests

Speaking of testing as the saying goes and "rain in the wet", we always
need to be sharp in carrying out tests, here the QA or also known testers,
the guy who will always be your best friend (does not contain irony, he will
lead you to be better , every sprint).
When running an integration test with Spring Boot, we always think
of JUnit and AssertJ, but we have a huge possibility when we are
working with tests, below is a list of some that can help you and possibly
your next job may have one of them or more, already implanted or waiting
for you to do it.

1. JUnit

2. REST Assured

3. Mockito

4. Selenium

5. TestNG

6. Spock Framework

7. Cucumber

8. Spring Test

9. DBUnit

10. Testcontainers

11. AssertJ

12. Awaitility

13. Wiser

14. Memoryfilesystem

15. WireMock

I could talk about many here, I would even post several, on the subject,
but that is another moment.

Spring for Apache Kafka

https://spring.io/projects/spring-kafka

Other topics

 Caching

https://viblo.asia/p/caching-dai-phap-1-nac-thang-len-level-cua-developer-
V3m5WdO8KO7

 Memory management

https://www.udemy.com/course/java-application-performance-and-
memory-management/?couponCode=MTST7102224A2
 Thymeleaf

https://www.udemy.com/course/mastering-thymeleaf-with-spring/?
couponCode=MTST7102224A2

 Garbage Collector

 Basic Linux OS (Kiến thức căn bản về hệ điều hành Linux OS)

Day 1 - Hệ điều hành Linux OS

o Kiến thức về hệ điều hành linux và kernel

o Thực hành cài đặt hệ điều hành Linux và các lựa chọn
trong quá trình cài đặt (CentOS)

o Thực hành cài đặt hệ điều hành Linux và các lựa chọn
trong quá trình cài đặt (Ubuntu)

o Trắc nghiệm kiến thức lý thuyết và thực hành đã học


(Quiz and Assignment)

Day 2 - Command line Linux OS basic (Các khối lệnh trong Linux -
Day 1)

o Review bài tập Day 1

o Kiến thức cơ bản về các khối lệnh trong linux dùng để


quản lý thư mục (Directory); quản lý tệp (File)

o Thực hành gõ các khối lệnh dùng để quản lý thư mục


(Directory); quản lý tệp (File); quản lý phân quyền file
and folder; quản lý nội dung tệp tin (file contents);
quản lý tệp văn bản vi/vim; quản lý bộ lọc (filter); quản
lý nén và giải nén ( zip/unzip);trang hướng dẫn sử dụng
(man pages); tổ chức tệp tin trên linux (Filesystem
hierarchy); lọc thông tin trên linux (filters)

o Trắc nghiệm kiến thức lý thuyết và thực hành đã học


(Quiz and Assignment)

Day 3 - Command line Linux OS basic (Các khối lệnh trong Linux -
Day 2)

o Review bài tập Day 2

o Kiến thức cơ bản về các khối lệnh trong linux dùng để


quản lý user và group; quản lý ổ cứng ( disk manager);
quản lý tiến trình (process) ; Quản lý network; Quản lý
phần cứng ( hardware manager); quản lý lập lịch
(scheduling)

o Thực hành gõ các Khối lệnh cơ bản về Users ; quản lý


Users (Users Management) ; quản lý Password
(Password Management) ; quản lý Groups ; quản lý tiến
trình (Process); quản lý Disk ; quản lý Hardware; quản
lý Hardware (RAM) ; quản lý Network ; quản lý lập lịch
Cron(Scheduler)

o Trắc nghiệm kiến thức lý thuyết và thực hành đã học


(Quiz and Assignment)

Day 4 - Cài đặt/Gỡ cài đặt gói

o Review bài tập Day 3

o Kiến thức cơ bản về trình quản lý cài đặt gói (yum/apt-


get) và build gói từ source code

o Thực hành cài đặt/gỡ cài đặt gói thông qua yum/apt-get

o Thực hành cài đặt từ source code

o Trắc nghiệm kiến thức lý thuyết và thực hành đã học


(Quiz and Assignment)

 Real-time communication

o atmosphere

o webbit

 Task scheduling

o cron-utils —> recommend

o Aurora

 Java Reflection

https://medium.com/edureka/java-reflection-api-d38f3f5513fc

 Troubleshooting Java: Read, Debug, and Optimize JVM


Applications

 Design patterns
 Test-Driven Development with Java

 should understand all the main annotations of Spring

@Autowired

@bean

@Component

@ComponentScan

@Configuration

@ConfigurationProperties

@CookieValue

@CrossOrigin

@DeleteMapping

@EnableAutoConfiguration

@GetMapping

@lazy

@PathVariable

@primary

@PostMapping

@profile

@PropertySource

@PropertySources

@PutMapping

@Qualifier

@Required

@RestController/@Controller

@Repository

@RequestBody

@RequestMapping
@RequestParam

@scope

@Service

@SpringBootApplication

@Value

https://github.com/weder96/spring-boot-annotation-tips/tree/main/
documentation/Part01/us-en

Java Techie which can help you understand all these Spring boot

 Learn Kafka

 Observability with Spring Boot

Due to the great possibility of using microservices, the Galerinha do SRE


(Site Reliability Engineering), which currently plays a fundamental role in
tracking and control, as applications can be affected at any time with a
large amount of access, a point of microservices stop and affect
everything.

Spring has an observability team that has been working on adding


observability support to Spring applications for some time now and each
release is evolving.

But what is observability?

In our understanding, it is "how well you can understand the internals of


your system by examining its outputs". We believe that the
interconnection between metrics, logging and distributed tracing gives
you the ability to reason about the state of your system to debug
exceptions and latency in your applications. You can watch more about
what we think about observability in this episode of Enlightning with
Jonatan Ivanov.

Now it's time to add observability-related features!

In my github there is a project SpringBootActuatorPrometheus that I


created for studies only with this question:

Metrics

For Micrometer with Prometheus metrics,

Tracking
For Context Propagation Tracing with Micrometer Tracing, we need to
choose a tracer bridge (tracer is a library used to handle the lifecycle of a
span).

logs

Since we have Micrometer Trace in the classpath, the logs are


automatically correlated (that is, they contain a unique trace identifier).
Now we need to upload the logs. For this demo, we sent them to Grafana
Loki. We can achieve this by adding the com.github.loki4j:loki-logback-
appender dependency.

I advise you to read 3 books on the subject:

01. Site Reliability Engineering: How Google Runs Production


Systems (English Edition)

!https://media.dev.to/dynamic/image/width=800%2Cheight=
%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F
%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles
%2Fwk5z8f7tgsoyk67j5jt0.jpg

Site Reliability Engineering: How Google Runs Production Systems (English


Edition)

02. The Site Reliability Workbook: Practical Ways to Implement


SRE

!https://media.dev.to/dynamic/image/width=800%2Cheight=
%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F
%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles
%2Fwgpo62hjgcqp07mi05me.jpg

The Site Reliability Workbook: Practical Ways to Implement SRE

03. Establishing SRE Foundations A Step-by-Step Guide to


Introducing Site Reliability Engineering in Software Delivery
Organizations

!https://media.dev.to/dynamic/image/width=800%2Cheight=
%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F
%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles
%2Fvs0lsic582s41gs6sfys.jpg

Relevant knowledge

You might also like