Skip to content

Commit b64b9a1

Browse files
committed
feat: add module 9
1 parent d357fc8 commit b64b9a1

11 files changed

+209
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
duration: 3 hours
3+
---
4+
5+
# Cloud-native applications. Microservice architecture | with Istio
6+
7+
Cloud-native is a term used to describe container-based environments. Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices, and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows.
8+
9+
[Cloud Native Computing Foundation (CNCF)](https://www.cncf.io/), [launched](https://www.cncf.io/announcements/2015/06/21/new-cloud-native-computing-foundation-to-drive-alignment-among-container-technologies/) in 2015 by the Linux Foundation.
10+
11+
## What is Cloud?
12+
13+
- remote data centers
14+
- offers software or hardware to a business or individual
15+
- you can access it through the Internet
16+
17+
## Why business is moving to the Cloud?
18+
19+
- **Flexibility and agility**
20+
Cloud computing makes it easy to quickly scale up/down the capacity.
21+
- **Security**
22+
Implement effective disaster recovery solutions without large, upfront investments.
23+
- **Automatic software and hardware updates**
24+
The servers are maintained by your supplier.
25+
- **Saves money on hardware, “pay as you go”**
26+
- **Increased collaboration**
27+
Team members can work anywhere.
28+
- **Сompetitive advantage**
29+
Small businesses have access to enterprise-class technology they couldn’t afford on their own.
30+
31+
[Read more](https://www.pointclick.net/moving-to-the-cloud/)
32+
33+
## Choose your service model
34+
35+
- How much you can and want **to manage yourself**?
36+
- How much you want **your service provider to manage**?
37+
38+
![Cloud service models](image/aaS.jpg)
39+
40+
Match services yourself: DigitalOcean, Wix, Heroku, Shopify, Amazon Web Services (AWS), Salesforce, Google Cloud Platform (GCP), GitHub, Youtube, GitLab, Travis CI, IBM cloud, Trello.
41+
42+
[Read more](https://www.bmc.com/blogs/saas-vs-paas-vs-iaas-whats-the-difference-and-how-to-choose/_)
43+
44+
## What are cloud-native applications?
45+
46+
Cloud-native applications are:
47+
- a collection of small, independent, and loosely coupled services
48+
- providing a consistent development and automated management
49+
- designed to run in the cloud.
50+
51+
**Key attributes of cloud-native:**
52+
53+
1. Packaged as lightweight **containers**
54+
2. Developed with best-of-breed **languages and frameworks**
55+
3. Designed as **loosely coupled microservices**
56+
57+
**Other attributes:**
58+
59+
4. **Centered around APIs** for interaction and collaboration
60+
5. **Architected** with a clean separation of **stateless and stateful** services
61+
6. **Isolated** from the server and operating system dependencies
62+
7. **Deployed** on self-service, elastic, cloud infrastructure
63+
8. **Managed** through agile DevOps processes
64+
Each service has an independent life cycle and CI/CD.
65+
9. **Automated** capabilities
66+
10. Defined, policy-driven resource allocation
67+
68+
[Read more](https://thenewstack.io/10-key-attributes-of-cloud-native-applications/)
69+
70+
## Monolithic vs Microservices architecture
71+
72+
![Monolithic vs Microservices architecture](image/monolithic-vs-microservices.jpg)
73+
74+
**Microservices** - a style that structures an application as a collection of services that are:
75+
76+
- highly maintainable and testable
77+
- [loosely coupled](https://en.wikipedia.org/wiki/Loose_coupling)
78+
- independently deployable
79+
- organized around business capabilities
80+
- owned by a small team
81+
- sourced as a separate Git repo with its tests
82+
83+
**Monolithic** - a style where a single-tiered software application in which different components are combined into a single program from a single platform.
84+
85+
## Microservices are NOT
86+
87+
1. Your SOA (service-oriented architecture) cut into services
88+
89+
2. Anything involving a large framework
90+
What part of "micro" are folks missing?
91+
92+
3. Development patterns where you deploy things into containers
93+
You want containers, do containers. Fine with me. Deployment decisions have nothing to do with microservices. If you're coupling your code to the architecture that tightly, re-read #2.
94+
95+
4. Things with some cool language
96+
Once again, if you like cool languages, use them. Sounds fun. It's just has nothing to do with microservices.
97+
98+
5. Systems with thousands of little tiny pieces of code scattered all over the place making it impossible to reason about anything
99+
You're loving the idea to death. You've gone too far the other way. Both the "micro" and "service" part are equally important.
100+
101+
[Reference](https://danielbmarkham.com/honest-microservices/)
102+
103+
## Application centered around APIs
104+
105+
![Application centered around APIs](image/api.jpg)
106+
107+
## Service mesh
108+
109+
**Service mesh** - an infrastructure layer for facilitating service-to-service communications between microservices, often using a **sidecar proxy**.
110+
111+
**Provides:**
112+
113+
- Connection between microservices
114+
- Monitoring, observability into communications
115+
- Securing
116+
- Managing
117+
118+
![Service mesh](image/service-mesh.jpg)
119+
120+
## Service mesh architecture
121+
122+
![Service mesh architecture](image/sm-architecture.jpg)
123+
124+
Platforms implementing service mesh:
125+
126+
- **Istio**
127+
- Consul
128+
- Linkerd
129+
130+
## Service mesh example
131+
132+
![Service mesh example](image/sm-bookinfo.jpg)
133+
134+
## Real large examples of service mesh
135+
136+
![Real big service mesh examples](image/sm-amazon-netflix.jpg)
137+
138+
## Istio
139+
140+
**Istio** - a platform that implements service mesh (provides a uniform way to secure, connect, and monitor microservices).
141+
142+
![Istio architecture](image/istio.jpg)
143+
144+
## What can you do with Istio?
145+
146+
Istio provides operational requirements:
147+
148+
- canary rollout (deployment)
149+
- A/B testing
150+
- rate-limiting
151+
- access control
152+
- end-to-end authentication
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
# Lab
3+
4+
## Objectives
5+
6+
1. Quickstart with Istio
7+
2. Route requests
8+
3. Traffic shifting (canary rollout)
9+
10+
## Before starting
11+
12+
1. Install Minikube and start a Kubernetes cluster
13+
14+
After Minikube installation run:
15+
16+
- `minikube config set vm-driver virtualbox` (or `vmware`, or `kvm2`)
17+
- `minikube start --memory=16384 --cpus=4 --kubernetes-version=v1.18.0`
18+
19+
> **Note!** If you don’t have enough RAM to allocate to the minikube virtual machine then try to put the maximum you have on your laptop.
20+
21+
Reference - https://istio.io/docs/setup/platform-setup/minikube/
22+
23+
## 1. Quick start with Istio
24+
25+
This task lets you quickly evaluate Istio.
26+
27+
Instructions - https://istio.io/docs/setup/getting-started/
28+
29+
Do everything until [Next steps](https://istio.io/docs/setup/getting-started/#next-steps) section.
30+
31+
**Results:**
32+
33+
- running [Bookinfo example application](https://istio.io/docs/examples/bookinfo/) and available at `http://$GATEWAY_URL/productpage` (where $GATEWAY_URL - is the specific IP and PORT for every deployment)
34+
- running [Kiali dashboard](https://kiali.io/) with an overview of your mesh with the relationships between the services
35+
36+
![Kiali dashboard](image/kiali-example2.jpg)
37+
38+
## 2. Request Routing
39+
40+
This task shows you how to route requests dynamically to multiple versions of a microservice.
41+
42+
Instructions - https://istio.io/docs/tasks/traffic-management/request-routing/
43+
44+
**Results:**
45+
46+
- sending 100% of the traffic to the `v1` version of each of the Bookinfo services
47+
- setting a rule to selectively send traffic to version `v2` of the reviews service based on a custom `end-user` header
48+
49+
## 3. Traffic Shifting (canary rollout)
50+
51+
This task shows you how to gradually migrate traffic from an older version to a new version.
52+
53+
Instructions - https://istio.io/docs/tasks/traffic-management/traffic-shifting/
54+
55+
**Results:**
56+
57+
- migrating traffic from an old to new version of the `reviews` service using Istio’s weighted routing feature

0 commit comments

Comments
 (0)