当前位置:网站首页>[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 !
边栏推荐
- JS add random pixel noise background to the page
- vite 本地运行首次进入页面加载慢问题
- Postman报Json序列化错误
- Make and makefile summary II
- js给页面添加随机像素噪声背景
- Slow query log in MySQL
- 转:高效做正确的事
- SQL manual blind injection and error reporting injection
- Leetcode algorithm 147. insert and sort the linked list
- How to install opengauss manually (non om mode)
猜你喜欢

【2020】【论文笔记】磁控溅射法生长Bi2Te3/CoFeB双层异质结——

1. Mx6ul core module serial USB interface test (VI)

BGP knowledge points summary

微信小程序解密并拆包获取源码教程

SQLyog数据导入导出图文教程

obsidian移动端PC段同步

1. Mx6ul core module uses serial EMMC read / write test (IV)

i.MX6ULL SNVS电源域GPIO状态保持验证

# Dest0g3 520迎新赛(更新中)

Navica tool imports remote MySQL into local MySQL database
随机推荐
Obsidian mobile PC segment synchronization
Characteristics and determination of neuraminidase from Clostridium perfringens in Worthington
Are you still using ==0 null equal to judge null values? How much do you know about isempty and isblank
MySQL transaction isolation level
[2021] [paper notes] biological effects of cell membrane under infrared and THz - effect is a phenomenon, action is a mechanism - the benefits of THz to medicine
Make and makefile summary II
1. Mx6ul core module uses serial EMMC read / write test (IV)
【云原生】4.1 DevOps基础与实战
1205 Lock wait timeout exceeded; Try restarting transaction processing
DQN Pytorch示例
vite 本地运行首次进入页面加载慢问题
BGP knowledge points summary
1. Mx6ul core module serial USB interface test (VI)
Navica工具把远程MySQL导入到本地MySQL数据库
The slow loading of the first entry page of vite local operation
DialogRPT-Dialog Ranking Pretrained Transformers
2022-07-17
(CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud
[2019] [paper notes] tunable THz broadband absorption based on metamaterials——
Error reporting caused by local warehouse


