RunDeck: Difference between revisions
Line 20: | Line 20: | ||
In PuTTY left-click and hold to select the md5 output, with that selected go into the text editor of your choice like Notepad++ and paste | In PuTTY left-click and hold to select the md5 output, with that selected go into the text editor of your choice like Notepad++ and paste | ||
ex. MD5: | ex. MD5:a98c74fe257719c0d0498cf68a7c68e4 | ||
then edit the realm.properties file | then edit the realm.properties file | ||
Line 32: | Line 32: | ||
* Right-Click in PuTTY to paste | * Right-Click in PuTTY to paste | ||
<username>: MD5: | <username>: MD5:a98c74fe257719c0d0498cf68a7c68e4,user,admin | ||
To exit the vim editor, press the ESC key, then type <code>:wq <enter></code> | To exit the vim editor, press the ESC key, then type <code>:wq <enter></code> |
Revision as of 14:19, 26 March 2020
Rundeck Installation
- source: https://thedataguy.in/rundeck-install-configure-centos-with-mysql/
- source: https://www.techrepublic.com/article/how-to-add-remote-nodes-to-rundeck/
- source: https://stackoverflow.com/questions/54448600/adding-a-remote-node-in-rundeck-3
Rundeck User Creation
Log in to the rundeck server.
java -jar /var/lib/rundeck/bootstrap/rundeck-3.1.2-20190927.war --encryptpwd Jetty
(Built in encryption provided by Rundeck, default jetty returning a MD5 hash) Enter values for
user: <Enter> password: <yourpassword>
In PuTTY left-click and hold to select the md5 output, with that selected go into the text editor of your choice like Notepad++ and paste
ex. MD5:a98c74fe257719c0d0498cf68a7c68e4
then edit the realm.properties file
sudo vim /etc/rundeck/realm.properties
- Navigate down to the users (ex.): admin:admin,user,admin,architect,deploy,build
- Press i to be able to insert text, and enter your username followed the md5 hash in a new entry:
- Right-Click in PuTTY to paste
<username>: MD5:a98c74fe257719c0d0498cf68a7c68e4,user,admin
To exit the vim editor, press the ESC key, then type :wq <enter>
Finally restart the service for it to take effect
sudo systemctl restart rundeckd
Rundeck Project & Nodes Setup
Create Project in GUI Navigate to Project Settings -> Edit Configuration (bottom left) Select 'Edit Configuration File' in GUI (top right corner) Add to bottom:
resources.source.1.config.file=/var/lib/rundeck/projects/<MyProjectName>/etc/resources.xml
resources.source.1.config.generateFileAutomatically=true
resources.source.1.config.includeServerNode=false
resources.source.1.type=file
resources.source.1.config.writeable=true
Create directories under /var/lib/rundeck/projects:
sudo mkdir /var/lib/rundeck/projects/<myprojectname>
sudo mkdir /var/lib/rundeck/projects/<myprojectname>/etc
sudo chown -R rundeck:rundeck /var/lib/projects/<myprojectname>
Create resources.xml file:
sudo vi /var/lib/rundeck/projects/<myprojectname>/etc/resources.xml
insert:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<node name="TheNodeName" tags="SomeTag" hostname="<ip address or DNS name>" osName="OSName" username="rundeck"/>
</project>
Change ownership of new resources.xml:
sudo chown -R rundeck:rundeck /var/lib/rundeck/projects/<myprojectname>/etc/resources.xml
Nodes should now appear in GUI
Sources:
- https://thedataguy.in/add-nodes-to-the-rundeck/
- https://stackoverflow.com/questions/54448600/adding-a-remote-node-in-rundeck-3
- https://geekdudes.wordpress.com/2018/02/06/installing-and-configuring-rundeck-on-centos-7/
Rundeck Key Storage
When using a different user / ssh private key than the default 'rundeck' user.
- Navigate to Key Storage via top right menu (gear)
- Click 'Add or Upload Key'
- Select values (key type, upload file, name, etc.)
- Save the new key
- Navigate to project configuration edit in GUI
- Navigate to 'Default Node Executor'
- Select path / new key for the project
- Remove default key entry (project.ssh-keypath=/var/lib/rundeck/.ssh/id_rsa)