当前位置:网站首页>[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 !
边栏推荐
- 1. Mx6ul core module use serial RTC test (XII)
- 【云原生】4.1 DevOps基础与实战
- i. Mx6ull snvs power domain GPIO status hold verification
- JS add random pixel noise background to the page
- Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)
- Worthington木瓜蛋白酶丨从纯化的蛋白聚糖生产糖肽(附文献)
- Relationship between HTC mobile official solution, s-on/s-off and super CID
- Jupiter notebook reported an error: notebook validation failed: non unique cell ID '2a4xx6' detected
- MPLS knowledge points
- Turn: do the right thing efficiently
猜你喜欢

PHP Alipay transfer to Alipay account

A pluggable am335x industrial control module onboard WiFi module
![[leetcode] 32. Longest valid bracket](/img/5e/45bb0b1ca3d9e429c6c5cf5c4c93ae.png)
[leetcode] 32. Longest valid bracket

(CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud

QT program beautification of the use of style sheets, QT uses pictures as the background and transparency of controls, QT custom button styles

Sqlyog data import and export graphic tutorial

Video game quiz? I think it's useless. It's better to do these well!

1. Mx6ul core module serial WiFi test (VIII)

National standard gb28181 protocol video platform easygbs message pop-up mode optimization

# Dest0g3 520迎新赛(更新中)
随机推荐
What are the functions of cloud notes, and how do browsers add cloud note plug-ins
AttributeError: ‘Document‘ object has no attribute ‘pageCount‘
I.MX6UL核心模块使用连载-nand flash读写测试 (三)
[C language brush leetcode] 1604. Warn people who use the same employee card more than or equal to three times within an hour (m)
[C language brush leetcode] 443. Compressed string (m)
微信小程序解密并拆包获取源码教程
Video game quiz? I think it's useless. It's better to do these well!
QT program beautification of the use of style sheets, QT uses pictures as the background and transparency of controls, QT custom button styles
Turn: do the right thing efficiently
Ti am335x industrial control module uses the Debian system of beaglebone (BBB)
I.MX6UL核心模块使用连载-eMMC读写测试 (四)
The third question of leetcode 302 weekly Games -- query the number with the smallest k after cutting the number
Master-slave replication in MySQL
LeetCode302场周赛第三题--裁剪数字后查询第 K 小的数字
我来图书馆小程序签到流程分析
登堂入室soc之arm汇编基础
18_请求文件
一种MCU事件型驱动C框架
2. Login - verification code function and saving login status
[paper reading] coat: CO scale conv attentional image transformers


