- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经设置了一个运行 jenkins 的 CI 服务器和一个带有我们生产环境副本的从服务器。不过,我遇到了一个讨厌的小问题:Jenkins 显然在从服务器上运行 git clone
,这意味着每个从服务器都应该将其公钥添加到 GitHub。
对我来说,这听起来像是一个非常奇怪的架构设计。 我希望主服务器(拥有我所有的凭据)clone
/checkout
并将工作区复制到从服务器。但是经过相当长的一段时间谷歌搜索我还没有找到一种方法来做到这一点。我找到了 Copy to slave plugin但这并不能阻止从站在 git clone
上失败。
我希望有人知道实现此目的的方法,因为为每个从属设置 GitHub 公钥听起来很荒谬。
最佳答案
Jenkins apparently runs git clone on the slave which would mean that every slave should have it's publickey added to GitHub.
为什么不用一个 deployment key (供所有 Jenkins 代理使用)访问您的存储库?
A deploy key is an SSH key that is stored on the server and grants access to a single repository on GitHub.
This key is attached directly to the repository instead of to a user account.Pros
- Anyone with access to the server has access to deploy the repository
- Users don't have to change their local SSH settings
Cons
- Deploy keys only grant access to a single repository, more complex projects may have many repositories to pull to the same server
- The key has full read/write access to the repository
- Deploy keys are usually not protected by a passphrase, making the key easily accessible if the server is compromised
另一种方法是使用 Credentials Jenkins plugin (在 February 2012 中初始化),它允许在 Jenkins master 中存储凭据。
A single point for managing each credential. Change it in one place and you are done.
As of version 1.5, the plugin now supports categorizing credentials into different "domains" in order to allow plugins to restrict the choice of credentials to only those that are appropriate.
When a plugin is asking for a list of credentials, it can add some specifications about where and how the credential will be used.
凭证域配置示例:
关于Git clone on jenkins master,复制到slave,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20030247/
我想知道一个服务器是否可以同时是slave和master。我们的问题是我们有很多移动单元需要同步到主服务器,但它们只需要主服务器上 100 个表中的 6 个。除了延迟同步和增加数据成本之外,所有额外的
此站点上的许多帖子(例如 this、this 或 this)讨论了如何检测 Android 上丢失的蓝牙连接。本质上,一个人可以注册 Action 的广播 BluetoothAdapter.ACTIO
我有主从复制,我们有很多记录插入主服务器,以至于从服务器更新速度不够快。我们有 innodb,也许 slave 上的复制是单线程的。我想知道我们是否可以在数据库方面做些什么,而不是在编码或表结构等方面
正如标题所说,“从机启动”和“从机启动”有什么区别?当我接受DBA面试时,他问了这个问题,我搜索了google但没有找到答案,有人知道吗? 最佳答案 没有区别.. Slave start; 已弃用,现
我在设置主从配置时遇到困难。 Master Database 在 Ubuntu(亚马逊 AWS 实例)上运行并成功设置主复制。 我有本地主机作为从属服务器。 (Windows 机器)。 主数据库快照
我的权限被拒绝,但不知道为什么。从我的 Jenkins 大师那里,我能够使用 ssh-rsa-key 运行以下命令 scp /var/cache/jenkins/war/WEB-INF/slave.j
我计划在一台主服务器和几台从服务器上使用 MySQL 设置服务器。我会在其中一个从服务器上定期执行数据 EBS 的一致备份服务器(我总是会先停止数据库,然后在完成后重新启动它)。 从站故障转移 如果其
如果我使用 —expect-slaves 3 运行 headless Locust master,如果我连接 5 个 slave,master 会接受并使用所有连接的 slave 吗? 最佳答案 答案
当在有从属的从属的环境中使用 Redis 的复制功能时,connected_slaves 计数器是否会增加主控、充当主控的从属或两者?引用示例图:https://imgur.com/Ge1WLzX 在
我想配置slave以启用写入(slave-read-only no)。用例是启用临时缓存。 但是,文档中的这段让我担心: Normally slave nodes will redirect clie
我想设置一个 Linux 节点作为 Jenkins 主节点的从属节点。我正在浏览 the tutorial为 Linux 机器设置它。 Have master launch slave agent v
我现有的 jenkins 主从连接断开了。我尝试通过 scp 命令建立连接。 关于主人: scp ~/ .ssh/id_rsa.pub jenkins@:/tmp 在奴隶上: • ssh-keyg
所以我从从属虚拟机列表中删除了 vm4,当我运行以下命令时它不会访问它 hdfs dfsadmin -report 结果是: ubuntu@anmol-vm1-new:~$ hdfs dfsadmin
一.安装环境 这里也顺便记录一下如何在windows7上卸载解压版MySQL5.6数据库,如果无需卸载请忽略下一步,直接看第三步即可 二.windows7卸载解压版MySQL5.6 1.使
我已按照有关如何设置 Redis 主服务器集群的说明进行操作,但完成后我无法看到为什么服务器无法相互看到。这是我组装的第二个版本,我被困在同一个地方。我真的可以使用一些以前从未在 REDIS 上工作过
我有一个本地 Jenkins 服务器,我已经设置并为其创建了作业。我正在尝试注册新的 slave/build 机器,但 Jenkins 拒绝提供 slave.jar 或 slave-agent.jnl
我正在尝试在大型 redis 队列中使用哨兵进行故障转移(12 个哨兵,500 多个分片,每个分片一个主站和一个从站)。我遇到了一个非常奇怪的问题,我的哨兵反复向某些 redis 节点发出命令 +fi
我如何配置jenkins master slavemaster在linux上,slave在windows上我需要通过master在slave上执行一个文件我对 Jenkins 不太了解,所以我需要完整
如何将系统配置为有一个主多从,用 gmake 构建普通的 c 代码?从站如何从主站访问工作区?我想 NFS 共享是可行的,但如果这是不可能的任何 其他 选项? http://wiki.hudson-c
有没有人尝试过使用 Jenkins Rest/API 或任何其他方式在 Jenkins slave 的配置中添加或更新环境变量的方法。 使用 Jenkins Swarm 插件,我创建了一个从站(它使用
我是一名优秀的程序员,十分优秀!