{{tag>rundeck ssh docker}} ====== Rundeck add remote node ====== This example has a rundeck running in a docker container with a volume path set to ///home/rundeck/server/data// ===== Add private key ===== Must be in rsa format which begins like -----BEGIN RSA PRIVATE KEY----- xxxxxxx You likely have openssh format -----BEGIN OPENSSH PRIVATE KEY----- so this needs to be converted to rsa with ssh-keygen -p -m PEM -f .ssh/id_rsa Once its converted add it to Rundeck //Cog wheel in upper right corner > Key Storage > Add or Upload Key // ===== Use it in project ===== If you already added a project select it, go to //Project settings > Edit Configuration > Default node executor//, select SSH then in SSH Key Storage Path browse to the added key above. Set SSH Authentication to "privateKey". In "Default File Copier" tab select "SCP" with same settings as above. When adding the new project the steps are the same. ===== Add a remote node ===== Go to //Project settings > Edit Configuration > Edit nodes//. Go to "Sources" and "Add a new node source" then choose "File" and set the "Format" to resourceyml and "File Path" to the name of the yaml file e.g. ///home/rundeck/server/data/nodes.yml//. Also tick the "Generate" and "Writeable" option. Now go to "Edit" tab and click "Modify" and paste the configuration for the node, example: node1: nodename: node1 hostname: 10.10.10.5 description: '' username: username osFamily: Linux ===== Test execution ===== Select "Commands" from the sidebar, in the dropdown click "Show all nodes" and select the node you added. Now run some simple command like ''ls'' to see if it works. ===== Use in job ===== When defining a job, in "Nodes" tab select "Dispatch to Nodes" and select your node(s) in "Node Filter". ====== Tested on ====== * Rundeck 4.3.0 (docker container) * Docker version 20.10.17, build 100c701 * Debian 11 ====== See also ====== ====== References ====== * https://tech.davidfield.co.uk/2020/05/16/rundeck-3-install-setup-and-an-example-project/ * https://docs.rundeck.com/docs/learning/tutorial/creatingnodes.html * https://docs.rundeck.com/docs/learning/howto/ssh-on-linux-nodes.html