当前位置:网站首页>[cloud native] 4.1 Devops foundation and Practice
[cloud native] 4.1 Devops foundation and Practice
2022-07-26 02:11:00 【Program ape chase】
hello ~ Hello, everyone , In the previous expansion, I briefly introduced DevOps , From the beginning of this article, we have entered into the automated deployment project . Some of the projects we wrote earlier , They are manually added step by step , It seems too cumbersome , How we have 1000 A project , This cannot be deployed manually
( It will be tiring si One of the ), So the official for efficiency , Launched DevOps.
Personal home page : Personal home page
Series column :【 Cloud native series 】
Articles related to this article :
【 Cloud native 】3.4 RuoYi-Cloud Deploy the actual battle ( On ) 【 Cloud native 】3.4 RuoYi-Cloud Deploy the actual battle ( On )_ Program ape chase blog -CSDN Blog 【 Cloud native 】3.5 RuoYi-Cloud Deploy the actual battle ( Next ) 【 Cloud native 】3.5 RuoYi-Cloud Deploy the actual battle ( Next )_ Program ape chase blog -CSDN Blog Cloud primitives 【 Extensions 】 Cloud primitives 【 Extensions 】_ Program ape chase blog -CSDN Blog
Catalog
One 、DevOps brief introduction
Two 、 Shangyitong project goes to the cloud
5、 ... and 、 Production environment configuration extraction
One 、DevOps brief introduction
DevOps Is a series of practices and tools , You can make IT And the software development team Process automation . among , With the increasing popularity of agile software development , Continuous integration (CI) and Continuous delivery (CD) It has become an ideal solution in this field . stay CI/CD In workflow , Each set is verified by automated construction , Including coding 、 Release and test , So as to help developers find integration errors in advance , Teams can also quickly 、 Security 、 Reliably deliver internal software to the production environment .
Two 、 Shangyitong project goes to the cloud
Here is the server 、 client 、 And gateway ; After the deployment of server and client , Send a request to the gateway , The gateway sends each request to the microservice
Project framework
yygh-parent
|---common // General module
|---hospital-manage // Hospital backstage [9999]
|---model // Data model
|---server-gateway // gateway [80]
|---service // Micro service layer
|-------service-cmn // Public service [8202]
|-------service-hosp // Hospital data services [8201]
|-------service-order // Make an appointment to order [8206]
|-------service-oss // Object storage service [8205]
|-------service-sms // SMS service [8204]
|-------service-statistics // Statistical services [8208]
|-------service-task // Regular service [8207]
|-------service-user // Member services [8203]
====================================================================
yygh-admin // Hospital management backstage [9528]
yygh-site // Registration platform [3000]3、 ... and 、sentinel Deploy
Before going to the cloud, we must first deploy middleware , image Nacos、MySQL、Redis It has been deployed before , So next, deploy the rest .
1、Sentinel
It is used for flow protection
In the application load ——> Create a service in the service ( Set the basic information 、 Container mirror 、 Mount storage 、 Advanced settings and other settings )

Four 、mongo Deploy
alike , In the application load ——> Select a template to create in the application , Click the deployment ( Set the basic information 、 Application configuration
Wait for settings ), For Hou Hao's convenient visit , You can expose the port number .

Then specify the workload to create the service ( Setting basic information 、 Service settings 、 Advanced settings ), After deployment, we can use a tool to test whether the deployment is complete (MongoDB Compass Software for ), Connect , No problem
mysq| Data initialization
Using tools (SQLyog) Connected to the mysql , Will we use sql The statement is imported and run .
5、 ... and 、 Production environment configuration extraction
Project default rules
- Each microservice item , In the production environment , Will automatically get
Microservice name -prod.ymlAs your own core configuration file - Each microservice item , In the production environment , The default is to use
8080port
Create a service-cmntprod.yml Change the address of all middleware to the address of our production , The same for every microservice (Sentinel、MongoDB、RabbitMQ、Redis etc. ) Such operations are required , Configured in the back deploy.yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: service-cart
name: service-cart
namespace: his # Be sure to write a namespace
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app: service-cart
strategy:
rollingUpdate:
maxSurge: 50%
maxUnavailable: 50%
type: RollingUpdate
template:
metadata:
labels:
app: service-cart
spec:
imagePullSecrets:
- name: aliyun-docker-hub # Configure the account and password for accessing alicloud under the project in advance
containers:
- image: $REGISTRY/$ALIYUNHUB_NAMESPACE/service-cart
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
timeoutSeconds: 10
failureThreshold: 30
periodSeconds: 5
imagePullPolicy: Always
name: app
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 300m
memory: 600Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
labels:
app: service-cart
name: service-cart
namespace: his
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: service-cart
sessionAffinity: None
type: ClusterIPEvery step is worth a thousand miles , young , Work hard , Give future self an account ! Move forward to better yourself tomorrow !
边栏推荐
- What are the functions of cloud notes, and how do browsers add cloud note plug-ins
- [C language brush leetcode] 735. Planetary collision (m)
- i. Mx6ull snvs power domain GPIO status hold verification
- Composition API的优势
- 1. Mx6ul core module serial -iot-6ulx core module brief introduction (I)
- The third question of leetcode 302 weekly Games -- query the number with the smallest k after cutting the number
- Bitmap这个“内存刺客”你要小心~
- 一种MCU事件型驱动C框架
- 3. Upload the avatar to qiniu cloud and display it
- Worthington核酸酶、微球菌相关研究及测定方案
猜你喜欢

还在用==0 null equal 判断空值吗,对isEmpty 和 isBlank有多少了解呢

C# 迭代器的实现

Characteristics and determination of neuraminidase from Clostridium perfringens in Worthington

【2019】【论文笔记】基于超材料可调谐THz宽频吸收——

SQL手工盲注、报错注入
![[2020] [paper notes] growth of bi2te3/cofeb double-layer heterojunction by magnetron sputtering——](/img/5d/7d26e2d0d832c95e1cc011995ce774.png)
[2020] [paper notes] growth of bi2te3/cofeb double-layer heterojunction by magnetron sputtering——

DialogRPT-Dialog Ranking Pretrained Transformers

Tenant issues.

I.MX6UL核心模块使用连载-TF卡读写测试 (五)

Worthington产气荚膜梭菌神经氨酸酶的特征及测定
随机推荐
SQL manual blind injection and error reporting injection
JS add random pixel noise background to the page
我来图书馆小程序一键签到和一键抢位置工具
The import and Export button of Damon database table is gray, and the DMP file cannot be imported
[independent station construction] Shopify seller: learn these points and double the sales volume of online stores!
1. Mx6ul core module use serial -rs485 test (x)
Redis cluster construction (based on 6.x)
1. Mx6ul core module uses serial NAND FLASH read / write test (III)
I.MX6UL核心模块使用连载-CAN、蜂鸣器测试 (十一)
G2. passable paths (hard version) (tree diameter + LCA)
Sqlyog data import and export graphic tutorial
Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)
Common shell operations in Phoenix
[xxl-job] xxl-job learning
LeetCode302场周赛第三题--裁剪数字后查询第 K 小的数字
I.MX6UL核心模块使用连载-eMMC读写测试 (四)
Worthington产气荚膜梭菌神经氨酸酶的特征及测定
I.MX6UL核心模块使用连载-WIFI测试 (八)
Make and makefile summary I
数仓:浅谈银行业的数仓构建实践


