热门标签 | HotTags
当前位置:  开发笔记 > 后端 > 正文

JNLP—thefoundametalofdistributedcomputingofJenkins

Overviewhttps:devopscube.comjenkins-architecture-explainedmaster跟各种类型的workernode建立连接,有两种过程

Overview

https://devopscube.com/jenkins-architecture-explained/

master跟各种类型的worker node建立连接,有两种过程。


 

 


 

SSH负责master向slave(物理主机或者虚拟机)建立连接,然后推送agent.jar文件到此机器上

然后运行agent.jar,为了通过JNLP反向连接到master

以后master上的所有的job都通过此连接下发到slave机器上,并执行。


You can connect a Jenkins master and agent in two ways



  1. Using the SSH method: Uses the ssh protocol to connect to the agent. The connection gets initiated from the Jenkins master. Ther should be connectivity over port 22 between master and agent.

  2. Using the JNLP method: Uses java JNLP protocol (Java Network Launch Protocol). In this method, a java agent gets initiated from the agent with Jenkins master details. For this, the master nodes firewall should allow connectivity on specified JNLP port. Typically the port assigned will be 50000. This value is configurable.


 


K8S POD

https://www.slideshare.net/VadimSolovey/scaling-jenkins-with-kubernetes-by-ami-mahloof

POD生成后, 先从master上下载JNLP文件, 然后跟master建立JNLP端口的连接。


 

 


https://ameswanda.ddns.us/what-is-jnlp-port

JNLP用于加载和连接你的java应用从远程地址(此处指master服务器)


Similarly, what port does Jnlp use?

TCP Port. Jenkins can use a TCP port to communicate with inbound (formerly known as “JNLP”) agents, such as Windows-based agents.

Furthermore, what is Jnlp in Jenkins? JNLP(JAVA NETWORK LAUNCH PROTOCOL) is used to Connect to/launch your java application( here Jenkins) from a remote location.


 


实例

如下pipeline代码会首先在服务器端编译程 JNLP 文件, 然后下载到 POD中, 基于JWS插件运行,

运行过程的log打印,通过JNLP连接反向回传给master, 进而显示在console页面。

 


 

 


 


Jenkins Remoting -- agent.jar

https://www.jenkins.io/projects/remoting/

此库是jenkins的通信层,包括基于TCP的通讯协议,远程过程调用, 类加载, 数据流。

是controller和agents之间的通讯通道。


Jenkins Remoting is a library, and executable Java archive, which implements the communication layer in Jenkins. This includes the TCP-based communication protocols, remote procedure calls, class loading, data streaming, etc. Currently Remoting is primarily used in communications between the Jenkins controller and Jenkins agents.

The Remoting sub-project includes the Remoting library itself, package for agents, and a number of Remoting-specific plugins and core modules.


Remoting Usage in Jenkins



  • Agent executables (remoting.jar is a named agent.jar or slave.jar in Jenkins)



  • Controller to Agent communication protocols being used in various Agent types, including Java Web Start (aka JNLP) and SSH agents



  • Jenkins CLI, Remoting mode is deprecated since 2.54 (announcement)



  • Communication with Maven instance in the Maven Integration plugin.




 


Java Network Launch Protocol

https://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jnlp.html

JNLP 可以让在web服务器上的资源文件,在客户端加载运行。


The Java Network Launch Protocol (JNLP) enables an application to be launched on a client desktop by using resources that are hosted on a remote web server. Java Plug-in software and Java Web Start software are considered JNLP clients because they can launch remotely hosted applets and applications on a client desktop. See Java Network Launching Protocol and API Specification Change Log for details.

Recent improvements in deployment technologies enable us to launch rich Internet applications (RIAs) by using JNLP. Both applets and Java Web Start applications can be launched by using this protocol. RIAs that are launched by using JNLP also have access to JNLP APIs. These JNLP APIs allow the RIAs to access the client desktop with the user's permission.

JNLP is enabled by a RIA's JNLP file. The JNLP file describes the RIA. The JNLP file specifies the name of the main JAR file, the version of Java Runtime Environment software that is required to run the RIA, name and display information, optional packages, runtime parameters, system properties, and so on.


 

http://setgetweb.com/p/WAS8/ccli_architect.html

JWS是一种应用部署技术, 包括小应用的可移动性, servlets和JSP文件技术的可维护性, 标签语言(XML 和 HTML)的简洁性

这个应用允许 全功能的 JAVA EE客户端应用的 加载 部署 更新, 从一个web服务器上。



ava Web Start architecture for deploying application clients

Java Web Start is an application-deployment technology that includes the portability of applets, the maintainability of servlets and JSP file technology, and the simplicity of mark-up languages such as XML and HTML. It is a Java application that allows full-featured Java EE client applications to be launched, deployed and updated from a standard Web server. The Java Web Start client is used with platforms that support a web browser.

 

 

 


出处:http://www.cnblogs.com/lightsong/

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。



推荐阅读
  • Jenkins的分布式构建,在Jenkins的配置中叫做节点,分布式构建能够让同一套代码或项目在不同的环境(如:Windows和Linux系统)中编译、部署等。将jenkins项目 ... [详细]
  • 本文介绍了一些Java开发项目管理工具及其配置教程,包括团队协同工具worktil,版本管理工具GitLab,自动化构建工具Jenkins,项目管理工具Maven和Maven私服Nexus,以及Mybatis的安装和代码自动生成工具。提供了相关链接供读者参考。 ... [详细]
  • ACMMM 2022 | 首个针对跨语言跨模态检索的噪声鲁棒研究工作
    作者:王雅冰方向:多模态学习论文:Cross-LingualCross-ModalRetrievalwithNoise-RobustLearning录取: ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • 禁止程序接收鼠标事件的工具_VNC Viewer for Mac(远程桌面工具)免费版
    VNCViewerforMac是一款运行在Mac平台上的远程桌面工具,vncviewermac版可以帮助您使用Mac的键盘和鼠标来控制远程计算机,操作简 ... [详细]
  • Google Play推出全新的应用内评价API,帮助开发者获取更多优质用户反馈。用户每天在Google Play上发表数百万条评论,这有助于开发者了解用户喜好和改进需求。开发者可以选择在适当的时间请求用户撰写评论,以获得全面而有用的反馈。全新应用内评价功能让用户无需返回应用详情页面即可发表评论,提升用户体验。 ... [详细]
  • DockerDataCenter系列(四)-离线安装UCP和DTR,Go语言社区,Golang程序员人脉社 ... [详细]
  • 验证识别之你讲武德了吗?
    说说那个试用版的打包软件,既然是试用版肯定要加个试用期限,但是里面的pb模型并没有放识别率最好的那个,而是放了一个识别率中等 ... [详细]
  • 1jdk去网站下载,然后拷贝到linux上;或直接wgethttp:download.oracle.comotn-pubjavajdk8u181-b1 ... [详细]
  • 解决jenkins下载慢的问题:替换下载源
    流程前两步与官网一致,然后点击下面的镜像网站华为镜像清华镜像进入选择需要的版本,右键复制链接在后面添加链接即可yum-yinstallhttps:m ... [详细]
  • Jenkins教程:使用Jenkins进行持续集成
    【注】本文译自:https:www.edureka.coblogjenkins-tutorial本文将重点介绍Jenkins架构和Jenkins构建管道,并向您展示如何在Jenki ... [详细]
  • Objective C接入Sonar代码扫描
    目录技术方案环境准备扫描器配置项目配置SonarQube配置jenkins接入一些坑技术方案Sonar本身有对OC的代码扫描插件——SonarCFamily,但是是收费的。出于成本 ... [详细]
  • 执行jenkins最简单的方法就是通过内置的Jetty的servlet容器。您可以执行jenkins是这样的:$java-jarjenkins.war当然,你可能想jenkins的 ... [详细]
  • 周末,受微软公司的邀请,参加微软主持的云容器培训会议,为参加培训的学院提供技术辅导,引导学员体验微软云端的DevOps实践。说是辅导,实际上自己也学到了许多的内容,包括K8S集群、负载、Azure中 ... [详细]
  • ps:本文转载于:https:www.ibm.comdeveloperworkscnjavaj-lo-git-mangeindex.htmlGit是目前最流行的源代码管理工具。大量 ... [详细]
author-avatar
空谷幽兰关小羽
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有