Jenkins通知目标服务器拉取Harbor镜像部署

1.告诉目标服务器拉取哪个镜像

2.判断当前有没有正在运行此容器,有就删除

3.接着查看拉取的镜像目标服务器上是否已存在,有就删除

4.拉取Harbor镜像

5.运行容器

目标服务器编写脚本

创建个部署脚本

vim deploy.sh

告诉目标服务器Harbor地址、仓库、镜像、版本号、端口信息

#第一个参数,仓库地址
harbor_addr=$1
#第二个参数,仓库名
harbor_warehouse=$2
#第三个参数,镜像名
harbor_image=$3
#第四个参数,镜像版本号
image_version=$4
#第五个参数,宿主机端口号
host_port=$5
#第六个参数,容器端口号
container_port=$6#1.将参数都拼接起来,告知服务器要拉取的镜像
imageName=$harbor_addr/$harbor_warehouse/$harbor_image:$image_version#2.判断当前有没有正在运行此容器,有就删除
#获取当前容器的ID
containerId=`docker ps -a | grep ${harbor_image} | awk '{print $1}'`
#判断容器是否存在
if [ "$containerId" != "" ] ; then
docker stop $containerId
docker rm $containerId
fi#3.接着查看拉取的镜像目标服务器上是否已存在,有就删除
images=`docker images | grep ${harbor_image} | awk '{print $2}'`
#判断语句,包含我要拉取的镜像就执行删除动作
if [[ "$images" =~ $image_version ]] ; then
docker rmi $images
fi#4.拉取Harbor镜像
#登录Harbor
docker login -u admin -p Harbor12345 $harbor_addr:80/$harbor_warehouse/$harbor_image:$image_version
#拉取镜像
docker pull $imageName
#运行容器
docker run -d --name $harbor_image -p $host_port:$container_port $imageName

添加权限,让所有用户可执行脚本

chmod a+x deploy.sh

将deploy脚本移到bin目录下,让其在任何位置都能直接使用

mv deploy.sh /usr/bin/

修改Jenkins任务

在镜像推送到Harbor仓库步骤的下面,再添加一个构建后操作

在这里插入图片描述
选择目标服务器,添加执行脚本和参数命令

deploy.sh 192.168.170.111:80 monster ${JOB_NAME} $version $host_port $container_port

直接deploy.sh,目标服务器放在bin目录下可以直接运行

紧跟着Harbor地址,Monster仓库

JOB_NAME就是当前Jenkins任务的名称mytest

version就是获取上面拉取的Gitlab标签版本号

在这里插入图片描述
host_port、container_port两个参数现在是获取不到的

所以需要再添加两个参数,在上面的参数化构建添加字符参数

在这里插入图片描述
一个宿主机端口host_port,默认值8081

一个容器端口container_port,默认值8080

在这里插入图片描述

构建验证

开始构建,界面可以看见多了两个默认值的参数

在这里插入图片描述

Started by user 我是真滴帅
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/mytest
The recommended git tool is: NONE
No credentials specified> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/mytest/.git # timeout=10
Fetching changes from the remote Git repository> git config remote.origin.url http://192.168.170.111:8888/root/jenkins-cicd-mytest.git # timeout=10
Fetching upstream changes from http://192.168.170.111:8888/root/jenkins-cicd-mytest.git> git --version # timeout=10> git --version # 'git version 2.30.2'> git fetch --tags --force --progress -- http://192.168.170.111:8888/root/jenkins-cicd-mytest.git +refs/heads/*:refs/remotes/origin/* # timeout=10> git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision b92e927c41d08ab99a8ac8a462535deadc68c972 (refs/remotes/origin/main)> git config core.sparsecheckout # timeout=10> git checkout -f b92e927c41d08ab99a8ac8a462535deadc68c972 # timeout=10
Commit message: "删除docker-compose.yml,修改页面内容"> git rev-list --no-walk b92e927c41d08ab99a8ac8a462535deadc68c972 # timeout=10
[mytest] $ /bin/sh -xe /tmp/jenkins13710554383855071698.sh
+ git checkout v1.0.2
HEAD is now at b92e927 删除docker-compose.yml,修改页面内容
[mytest] $ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/bin/mvn clean package -DskipTests
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< com.monster:mytest >-------------------------
[INFO] Building mytest 0.0.1-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] Parameter 'archive' is unknown for plugin 'spring-boot-maven-plugin:2.6.13:repackage (repackage)'
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ mytest ---
[INFO] Deleting /var/jenkins_home/workspace/mytest/target
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ mytest ---
[INFO] Copying 2 resources from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.8.1:compile (default-compile) @ mytest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /var/jenkins_home/workspace/mytest/target/classes
[INFO] 
[INFO] --- resources:3.3.1:testResources (default-testResources) @ mytest ---
[INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/mytest/src/test/resources
[INFO] 
[INFO] --- compiler:3.8.1:testCompile (default-testCompile) @ mytest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/jenkins_home/workspace/mytest/target/test-classes
[INFO] 
[INFO] --- surefire:3.2.2:test (default-test) @ mytest ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- jar:3.3.0:jar (default-jar) @ mytest ---
[INFO] Building jar: /var/jenkins_home/workspace/mytest/target/mytest.jar
[INFO] 
[INFO] --- spring-boot:2.6.13:repackage (repackage) @ mytest ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.677 s
[INFO] Finished at: 2024-03-16T17:27:43Z
[INFO] ------------------------------------------------------------------------
[mytest] $ /var/jenkins_home/sonar-scanner/bin/sonar-scanner -Dsonar.host.url=http://192.168.170.111:9000 ******** -Dsonar.projectKey=mytest -Dsonar.projectname=mytest -Dsonar.java.binaries=target -Dsonar.source=./ -Dsonar.projectBaseDir=/var/jenkins_home/workspace/mytest
INFO: Scanner configuration file: /var/jenkins_home/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.7 Eclipse Adoptium (64-bit)
INFO: Linux 3.10.0-1160.el7.x86_64 amd64
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Analyzing on SonarQube server 9.2.3
INFO: Default locale: "en", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=614ms
INFO: Server id: 54000601-AYjKh1Zs1hD1Rss9XdjF
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=218ms
INFO: Plugin [l10nzh] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
INFO: Load/download plugins (done) | time=297ms
INFO: Process project properties
INFO: Process project properties (done) | time=1ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: mytest
INFO: Base dir: /var/jenkins_home/workspace/mytest
INFO: Working dir: /var/jenkins_home/workspace/mytest/.scannerwork
INFO: Load project settings for component key: 'mytest'
INFO: Load project settings for component key: 'mytest' (done) | time=191ms
INFO: Load project branches
INFO: Load project branches (done) | time=253ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=26ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=1ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=600ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load active rules
INFO: Load active rules (done) | time=2826ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 10 files indexed
INFO: 14 files ignored because of scm ignore settings
INFO: Quality profile for java: Easyspeed
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module mytest
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=111ms
INFO: Sensor JavaSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=7ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java "Main" source files AST scan
INFO: 5 source files to be analyzed
INFO: Load project repositories
INFO: Load project repositories (done) | time=225ms
INFO: 5/5 source files have been analyzed
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java "Main" source files AST scan (done) | time=1189ms
INFO: No "Test" source files to scan.
INFO: No "Generated" source files to scan.
INFO: Sensor JavaSensor [java] (done) | time=1406ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor CSS Rules [javascript]
WARN: Error when running: 'node -v'. Is Node.js available during analysis?
INFO: Sensor CSS Rules [javascript] (done) | time=1721ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=16ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/var/jenkins_home/workspace/mytest/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=2ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=50ms
INFO: Sensor XML Sensor [xml]
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=179ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=12ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor
INFO: Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=7ms
INFO: Sensor Java CPD Block Indexer
INFO: Sensor Java CPD Block Indexer (done) | time=22ms
INFO: CPD Executor 3 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 3 files
INFO: CPD Executor CPD calculation finished (done) | time=6ms
INFO: Load New Code definition
INFO: Load New Code definition (done) | time=22ms
INFO: Analysis report generated in 88ms, dir size=101.0 kB
INFO: Analysis report compressed in 25ms, zip size=24.7 kB
INFO: Analysis report uploaded in 55ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://ci.hkeasyspeed.com/dashboard?id=mytest
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://ci.hkeasyspeed.com/api/ce/task?id=AY5IRf2h3PsONgf4Xut0
INFO: Analysis total time: 9.763 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 11.504s
INFO: Final Memory: 18M/67M
INFO: ------------------------------------------------------------------------
[mytest] $ /bin/sh -xe /tmp/jenkins15276106874998699608.sh
+ mv target/mytest.jar docker
+ docker build -t mytest:v1.0.2 docker/
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.Install the buildx component to build images with BuildKit:https://docs.docker.com/go/buildx/Sending build context to Docker daemon  17.57MBStep 1/4 : FROM daocloud.io/library/java:8u40-jdk---> 4aefdb29fd43
Step 2/4 : COPY mytest.jar /usr/local/---> ee2b2d803137
Step 3/4 : WORKDIR /usr/local---> Running in 174dacdeaca1---> Removed intermediate container 174dacdeaca1---> 8759ed1a2fd5
Step 4/4 : CMD java -jar mytest.jar---> Running in 735d3d6093e4---> Removed intermediate container 735d3d6093e4---> 7180e79a6982
Successfully built 7180e79a6982
Successfully tagged mytest:v1.0.2
+ docker login -u admin -p Harbor12345 192.168.170.111:80
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /var/jenkins_home/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-storeLogin Succeeded
+ docker tag mytest:v1.0.2 192.168.170.111:80/monster/mytest:v1.0.2
+ docker push 192.168.170.111:80/monster/mytest:v1.0.2
The push refers to repository [192.168.170.111:80/monster/mytest]
b4d16baca513: Preparing
50ecdabc71b7: Preparing
3e9cda2eceec: Preparing
5f70bf18a086: Preparing
5f70bf18a086: Preparing
5f70bf18a086: Preparing
bb7b60f93aea: Preparing
0ef3d186e2bd: Preparing
1e0931f30489: Preparing
5f70bf18a086: Preparing
fd97e4a10f39: Preparing
5f70bf18a086: Preparing
0ef3d186e2bd: Waiting
1e0931f30489: Waiting
fd97e4a10f39: Waiting
3e9cda2eceec: Layer already exists
bb7b60f93aea: Layer already exists
5f70bf18a086: Layer already exists
50ecdabc71b7: Layer already exists
fd97e4a10f39: Layer already exists
0ef3d186e2bd: Layer already exists
1e0931f30489: Layer already exists
b4d16baca513: Pushed
v1.0.2: digest: sha256:bdcbb6cfc266ddb11da8c16f021ecb90785546a8300582dff7c5969d044f0882 size: 2828
SSH: Connecting from host [1dc2bb3ce84f]
SSH: Connecting with configuration [应用服务器-170.111] ...
SSH: EXEC: completed after 13,608 ms
SSH: Disconnecting configuration [应用服务器-170.111] ...
SSH: Transferred 0 file(s)
Build step 'Send files or execute commands over SSH' changed build result to SUCCESS
Finished: SUCCESS

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/2871650.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

小白DB补全计划Day1-LeetCode:SQL基本操作select

前言&#xff1a;找工作&#xff08;主人&#xff09;的任务罢了 链接&#xff1a;1757. 可回收且低脂的产品 - 力扣&#xff08;LeetCode&#xff09; 584. 寻找用户推荐人 - 力扣&#xff08;LeetCode&#xff09; 来源&#xff1a;LeetCode 对DB篇的SQL章不太知道怎么写…

智能合约设计模式:讲解代理模式及其安全漏洞

苏泽 大家好 这里是苏泽 一个钟爱区块链技术的后端开发者 本篇专栏 ←持续记录本人自学两年走过无数弯路的智能合约学习笔记和经验总结 如果喜欢拜托三连支持~ 我们首先来看看什么是设计模式 和我们软件工程里面的设计模式有什么异同&#xff1f; 智能合约设计模式是一种在区…

使用 GitHub Actions 通过 CI/CD 简化 Flutter 应用程序开发

在快节奏的移动应用程序开发世界中&#xff0c;速度、可靠性和效率是决定项目成功或失败的关键因素。持续集成和持续部署 (CI/CD) 实践已成为确保满足这些方面的强大工具。当与流行的跨平台框架 Flutter 和 GitHub Actions 的自动化功能相结合时&#xff0c;开发人员可以创建无…

实战!wsl 与主机网络通信,在 wsl 中搭建服务器。学了计算机网络,但只能刷刷面试题?那也太无聊了!这篇文章可以让你检测你的计网知识!

前言&#xff08;碎碎念&#xff09;&#xff1a;每次发布文章时&#xff0c;我都是一个纠结的过程。因为我给自己写笔记时&#xff0c;只需要记录自己不清晰或者易忘的知识点就可以了&#xff0c;但一旦想要作为文章发布&#xff0c;那么我就得考虑到很多人是纯新手&#xff0…

智慧公厕是什么?让公共厕所的“生命体征”有了“监测大脑”

智慧公厕是指将公共厕所进行信息化、数字化、智慧化的升级改造&#xff0c;针对公共厕所使用、运行、管理、养护等全方位业务流程进行优化。它不仅仅是传统公共厕所的升级版&#xff0c;更是公共厕所管理的一种全新方式。智慧公厕的独特之处在于&#xff0c;把公共厕所作为一个…

RequestResponse案例

文章目录 一、用户登录1、环境准备数据库准备导入MyBatis坐标&#xff0c;MySQL驱动坐标mybatis-config.xml准备UserMapper.xml 2、流程说明UserMapper接口login.htmlLoginServlet 二、用户注册register.htmlRegisterServlet 一、用户登录 1、环境准备 数据库准备 create data…

深度学习-面经(part2、CNN)

2 CNN 对图像&#xff08;不同的数据窗口数据&#xff09;和滤波矩阵做内积&#xff08;逐个元素相乘再求和&#xff09;的操作就是所谓的『卷积』操作。 卷积神经网络由输入层、卷积层、激励层、池化层、全连接层组成。 ① 最左边: 数据输入层&#xff0c;对数据做一些处理…

2024年腾讯云免费服务器在哪领取?

腾讯云免费服务器申请入口 https://curl.qcloud.com/FJhqoVDP 免费服务器可选轻量应用服务器和云服务器CVM&#xff0c;轻量配置可选2核2G3M、2核8G7M和4核8G12M&#xff0c;CVM云服务器可选2核2G3M和2核4G3M配置&#xff0c;腾讯云服务器网txyfwq.com分享2024年最新腾讯云免费…

wordpress子比主题7.6美化插件及新手零基础搭建教程源码下载

版权申请&#xff1a;本文A5资源网原创&#xff0c;经原创作者允许转载许可声明。下载地址http://a5.org.cn/a5_ziyuan/39172.html 本源码由网友在某宝二十几元购买&#xff0c;现分享给大家。下图为源码文件及演示图&#xff0c;安装教程比较详细新手零基础就可搭建 子比主…

操作系统IO模型

IO模型 如何进行网络通信 Socket通信是进程通讯的一种方式&#xff0c;通过调用这个网络库的一些API函数可以实现分布在不同主机的相关进程之间的数据交换 网络编程的基本流程是什么&#xff1f; 服务端先创建socket套接字&#xff0c;然后用这个套接字去绑定并监听某个端口&a…

YOLOv9改进策略:注意力机制 | 用于微小目标检测的上下文增强和特征细化网络ContextAggregation,助力小目标检测,暴力涨点

&#x1f4a1;&#x1f4a1;&#x1f4a1;本文改进内容&#xff1a;用于微小目标检测的上下文增强和特征细化网络ContextAggregation&#xff0c;助力小目标检测 yolov9-c-ContextAggregation summary: 971 layers, 51002153 parameters, 51002121 gradients, 238.9 GFLOPs 改…

Redis数据结构对象之列表对象

列表对象 概述 ziplist编码的列表对象使用压缩列表作为底层实现&#xff0c;每个压缩列表节点(entry)保存了一个列表元素。 例子如下。如果numbers键的值对象使用的是ziplist编码&#xff0c;这个这个值对对象将会是如图所示的样子。 另一方面&#xff0c;linkedlist编码的列…

SAR ADC教程系列5——FFT频谱泄露以及相干采样

频谱泄露的出现以及如何规避&#xff1f; 为什么要相干采样&#xff1f; 1.分析ADC输出信号的频谱工具&#xff1a;DFT&#xff08;Discrete Fourier Transform) 重点&#xff1a;DFT相邻频谱频率间隔为fs/N 如何规避频谱泄露&#xff1f; 对于DFT&#xff0c;它对于接收到的信…

算法打卡day15|二叉树篇04|Leetcode 110.平衡二叉树、257. 二叉树的所有路径、404.左叶子之和

算法题 Leetcode 110.平衡二叉树 题目链接:110.平衡二叉树 大佬视频讲解&#xff1a;平衡二叉树视频讲解 个人思路 可以用递归法&#xff0c;计算左右子树的高度差&#xff0c;当超过1时就不为平衡二叉树了&#xff1b; 解法 回顾一下二叉树节点的深度与高度&#xff1b; …

旧华硕电脑开机非常慢 电脑开机黑屏很久才显示品牌logo导致整体开机速度非常的慢怎么办

前提条件 电池需要20&#xff05;&#xff08;就是电池没有报废&#xff09;且电脑接好电源&#xff0c;千万别断电&#xff0c;电脑会变成砖头的 解决办法 更新bios即可解决&#xff0c;去对应品牌官网下载最新的bios版本就行了 网上都是一些更新驱动啊

leetcode代码记录(每日温度

目录 1. 题目&#xff1a;2. 我的代码&#xff1a;小结&#xff1a; 1. 题目&#xff1a; 给定一个整数数组 temperatures &#xff0c;表示每天的温度&#xff0c;返回一个数组 answer &#xff0c;其中 answer[i] 是指对于第 i 天&#xff0c;下一个更高温度出现在几天后。如…

Docker 哲学 - 容器操作 -cp

1、拷贝 容器绑定的 volume的 数据&#xff0c;到指定目录 2、匿名挂载 volume 只定义一个数据咋在容器内的path&#xff0c;docker自动生成一个 sha256 的key作为 volume 名字。这个 sha256 跟 commitID 一致都是唯一的所以 &#xff0c;docker利用这个机制&#xff0c;可以…

5分钟教你激活喀秋莎Camtasia2023中文破解Crack下载附安装教程

Camtasia2023又称喀秋莎2023&#xff0c;集屏幕录制和视频剪辑功能于一体的软件&#xff0c;提供屏幕录制、区域录制、摄像头录制等多种录制方式&#xff0c;Camtasia2023版本带来了新的动态背景库、霓虹光标图像、录制语音旁白等多种新功能&#xff0c;适用于游戏录制、课程录…

ISIS接口MD5 算法认证实验简述

默认情况下&#xff0c;ISIS接口认证通过在ISIS协议数据单元&#xff08;PDU&#xff09;中添加认证字段&#xff0c;例如&#xff1a;MD5 算法&#xff0c;用于验证发送方的身份。 ISIS接口认证防止未经授权的设备加入到网络中&#xff0c;并确保邻居之间的通信是可信的。它可…

springboot使用socket和端口启动gRPC服务器的比较

gRPC 服务器启动方式比较 一. 介绍二. 套接字地址方式三. 端口方式四. 如何选择 前言 这是我在这个网站整理的笔记,有错误的地方请指出&#xff0c;关注我&#xff0c;接下来还会持续更新。 作者&#xff1a;神的孩子都在歌唱 一. 介绍 百度百科套接字 gRPC 是一种高性能的远…