简体   繁体   English

在 Rundeck 3 中添加远程节点

[英]Adding a remote node in Rundeck 3

I'm trying out rundeck (3.0.13) for the first time.我第一次尝试 rundeck (3.0.13)。 I've followed the instructions in this web page: https://www.techrepublic.com/article/how-to-add-remote-nodes-to-rundeck/ , but unfortunately it doesn't seem to create a remote node.我已按照此网页中的说明进行操作: https://www.techrepublic.com/article/how-to-add-remote-nodes-to-rundeck/ ,但不幸的是它似乎没有创建远程节点. In brief, the steps are简而言之,步骤是

  • Add a key to key storage that has the username/password for the remote node.将密钥添加到具有远程节点的用户名/密码的密钥存储中。 (I left the default storage path as "keys") (我将默认存储路径保留为“键”)

  • Create a project, change the ssh/scp parameters to use password au8thentication using that username/pass combo创建一个项目,使用该用户名/密码组合更改 ssh/scp 参数以使用密码身份验证

  • Create a file called resources.xml in the project /etc folder, and specify the remote node in there.在项目/etc 文件夹中创建一个名为resources.xml 的文件,并在其中指定远程节点。

  • Restart rundeck重新启动跑道

  • Wait a few minutes and the node should be visible on the nodes page of the project等待几分钟,该节点应该在项目的节点页面上可见

    Unfortunately, this doesn't work.不幸的是,这行不通。 All I see is the default local server node.我看到的只是默认的本地服务器节点。 (I used the "Select All Nodes" feature, so it's not a filter problem.) (我使用了“选择所有节点”功能,所以这不是过滤器问题。)

    I don't see any errors in the logs;我在日志中没有看到任何错误; I verified that I can log into the remote node from the rundeck server node using ssh and the credentials I provided.我验证了我可以使用 ssh 和我提供的凭据从 rundeck 服务器节点登录到远程节点。 My remote node has an IP address, but as this is a test, I didn't make a DNS entry for it.我的远程节点有一个 IP 地址,但由于这是一个测试,我没有为其创建 DNS 条目。 Is there anything else I can try or look at for diagnostic information?还有什么我可以尝试或查看的诊断信息吗? I'm not even sure it's hitting the resources.xml file.我什至不确定它是否命中了 resources.xml 文件。

UPDATE更新

I was able to get this working by using the GUI to load the resources.xml file after project creation.通过在项目创建后使用 GUI 加载 resources.xml 文件,我能够使其工作。

In the tutorial, the author puts this file into the /etc of the project and rundeck just finds it.教程中,作者把这个文件放到项目的/etc下,rundeck刚好找到。 If instead, the same resources.xml file is specified as a "File" source of nodes, it loads.相反,如果将相同的 resources.xml 文件指定为节点的“文件”源,则会加载。

Ironically not seeing any errors in the logs was the biggest clue.具有讽刺意味的是,在日志中没有看到任何错误是最大的线索。

I had the same issue that I resolved as follow:我有同样的问题,我解决如下:

  1. Add a file named resources.xml in the project folder / etc folder.在项目文件夹/etc 文件夹中添加一个名为resources.xml的文件。 (if it's not there, create one). (如果它不存在,创建一个)。 It should have the following content:它应该有以下内容:
<?xml version="1.0" encoding="UTF-8"?>

<project>
  <node name="somename" description="Rundeck 1" tags="" hostname="xx.xx.xx.xx" osArch="amd64" osFamily="unix" osName="Linux" osVersion="3.10.0-514.el7.x86_64" username="xyz"/>
</project>
  1. go to project setings via UI --> edit nodes通过UI --> edit nodes转到项目设置UI --> edit nodes
  2. Add a source from type 'File'.从“文件”类型添加源。
    • format: select the resourcexml.格式:选择resourcexml。
    • file path: use pwd and get the path, it should also include the /resources.xml file name at the end, like /home/xxx/rundeck/projects/test/etc/resources.xml文件路径:使用pwd获取路径,最后还要包含/resources.xml文件名,如/home/xxx/rundeck/projects/test/etc/resources.xml
  3. select generate选择生成
  4. save and restart the rundeck保存并重新启动 rundeck

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM