简体   繁体   中英

Adding a remote node in Rundeck 3

I'm trying out rundeck (3.0.13) for the first time. 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. 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

  • Create a file called resources.xml in the project /etc folder, and specify the remote node in there.

  • 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. My remote node has an IP address, but as this is a test, I didn't make a DNS entry for it. 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.

UPDATE

I was able to get this working by using the GUI to load the resources.xml file after project creation.

In the tutorial, the author puts this file into the /etc of the project and rundeck just finds it. If instead, the same resources.xml file is specified as a "File" source of nodes, it loads.

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. (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
  2. Add a source from type 'File'.
    • format: select the 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
  3. select generate
  4. save and restart the rundeck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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