如何访问我的远程Droplet服务器上的Jenkins仪表板? [英] How can I access my Jenkins dashboard on my remote droplet server?

查看:99
本文介绍了如何访问我的远程Droplet服务器上的Jenkins仪表板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对詹金斯有点困惑,希望有人能为我澄清一些事情. 在从官方文档和各种教程中阅读了Jenkins之后,我得到了:

I'm little confused about Jenkins and was hoping someone could clarify some matter for me. After reading up on Jenkins, both from official docs and various tutorials I get this:

  1. 如果我想设置自动部署或任何与Jenkins相关的东西,我可以只安装docker jenkins映像,启动它并通过本地主机访问它.这对我来说很清楚.
  2. 然后,我只是将Jenkinsfile放入存储库中,以使它知道如何以及如何构建我的存储库和内容.

我的问题是:

  • 在我看来,Jenkins需要一直运行,以便它可以监视所有回购更改并触发代码构建,测试和部署.如果是这种情况,我将不得不在我的Droplet服务器上安装Jenkins.但是,如果我只有ssh访问权限,该如何访问仪表板?
  • 如果Jenkins不需要24/7全天候运行,那么它如何监视任何变化?

我将尝试在服务器上的docker-compose文件中部署后端和前端应用程序.我不确定Jenkins在所有方面都集成了什么.

I'll try to deploy my backend and front apps on docker-compose file on my server. I'm not sure where does Jenkins integrates in all that.

推荐答案

  • Jenkins如何监视所有存储库更改并触发代码构建,测试和部署?
  • 如果Jenkins不需要24/7全天候运行,那么它如何监视任何变化?

    • How Jenkins can watch for all the repository changes and trigger code building, testing and deploying?
    • If Jenkins doesn't need to be up and running 24/7, then how does it watch for any changes?

      • Jenkins和其他自动化服务器提供两个选项来监视源代码更改:

      • 轮询SCM:以预定义的时间间隔下载和比较源代码.这很简单,但是硬件消耗却增加了,并且已经过时了
      • Webhooks::由github,bitbucket,gitlab等提供的最佳功能,例如,在任何git事件中,Github都会向您的自动化服务器发出一个http请求,并发送所有信息,例如分支名称,提交作者等). 此处有关webhooks和jenkins的更多信息.
      • Poll SCM: Download and compare source code at predefined intervals.This is simple but, hardware consumption is elevated and is a little outdated
      • Webhooks: Optimal functionality offered by github, bitbucket, gitlab, etc. in which Github, for example, at any git event, makes an http request to your automation server, sending all the information like branch name, commit author, etc). Here more info about webhooks and jenkins.

      如果您不想使用24/7全天候专用服务器,则可以使用:

      If you don't want a 24/7 dedicated server, you can use:

      • 某些无服务器平台或仅是一个简单的应用程序,即可接收http帖子+ webhook策略.例如,Github将对您的应用程序/服务无执行者执行后期处理,此时,只需执行您的构建,测试或任何其他命令来部署您的应用程序.
      • https://buddy.works/.就像一个迷你牛仔裤.
      • Some serverless platform or just a simple application able to receive http posts + webhook strategy. For instance, Github will perform a post requet to your app/servlerless and at this point, just execute your build, test or any other commands to deploy your application.
      • https://buddy.works/. It is like a mini-jenkins.

      如果我必须在我的Droplet服务器上安装Jenkins.但是,如果我只有ssh访问权限,该如何访问仪表板?

      If I'd have to install Jenkins on my droplet server. But how do I then access my dashboard, if all I have is ssh access?

      • 是的. Jenkins是自动化的服务器,因此它需要自己的专用服务器.
      • 您可以手动安装jenkins或在您的Droplet中使用docker.为您的詹金斯配置8080端口.如果一切正常,只需访问digitalocean提供的Droplet公共IP,例如: http://197.154.458.456:8080 .该URL必须加载Jenkins仪表板.
      • Yes. Jenkins is an automation server, so it needs its own dedicated server.
      • You can install jenkins manually or use docker in your droplet. Configure 8080 port for your jenkins. If everyting is ok, just access to your droplet public ip offered by digitalocean, like: http://197.154.458.456:8080. This url must load the Jenkins dashboard.

      这篇关于如何访问我的远程Droplet服务器上的Jenkins仪表板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆