Wednesday, October 24, 2018

Rundeck setup on CentOS 7

Rundeck setup on CentOS 7



  • Video Title : Rundeck: How to add Nodes


  • Youtube upload Title :   Rundeck: How to add Nodes by NCD0518H025

How to Add Nodes in rundeck

STEP 1:  after login to Rundeck server.Now create a new project to give access for jobs and Nodes
a)click on New Project
b)Name the project
c)check ssh , scp location
d) Create

STEP 2:Now create a new job for the project
a) click on “create job”
b) Give name to the job
c)Give name to “job group”
d) Give purpose of job Description
e) Add a command in Execute a remote command
f) Now Save the job

STEP 3 :Generate SSh Key and upload to rundeck server
1
                 # ssh-keygen -t rsa

STEP 4:use the cat command to view the key
1
                # cat .ssh/id_rsa
a)Now copy the key and upload to server in key storage
b)Key Type = Private Key
c) Enter Text = paste the key which is copied
d) Give Name=private.key
e) Save

STEP 5: Add a node to rundeck servera)Now go to Command Line Interface
1
           # cd /var/rundeck/projects/project name/etc

b) edit resources.xml file
1
           # sudo vi resources.xml

c)Give the node details in between <project> and </project>
d)Give details of “name”–>”description”–>”tags”–> “hostname”–>”osfamily”–>osNmae–>”username”–>”ssh-key-storage-path”

  • Hostname can be given or use ip-address
  • In ssh-key-storage-path which is to be given key storage /key/nodes/private.key
  • Save

≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
  • Video Title :  How add node to rundeck server and run a job on remote node


  • Youtube upload Title : How add node to rundeck server and run a job on remote node by NCD0518H025

How to add node to rundeck server and run a job on remote node

STEP 1: Install java latest version and rundeck

1
              # sudo yum -y instal java-1.8.0-openjdk-devel
1
             # rpm -Uvh http://repo.rundeck.org/latest.rpm
1
             # sudo yum -y instal rundeck

STEP 2:   After installing ,the service must be started
1
              # sudo systemctl start rundeckd

STEP 3: change directory to ” /etc/rundeck’

a) choose an editor and open “framework.properties”
1
             # sudo vi framework.properties

b) Replace “Ip address of server” with “localhost”

c) open rundeck-config.properties
1
             # sudo vi rundeck-config.properties

d) Replace “loaclhost” to “Ip address of server” for “grails.serverURL”

STEP 4: Restart rundeck make sure it is running ,stop firewalld and access it on browser 
1
              # sudo systemctl stop firewalld
1
              # sudo systemctl disable firewalld
1
              http://serverip:4440

STEP 5: after login to Rundeck server.Now create a new project to give access for jobs and Nodes
a)click on New Project
b)Name the project
c)check ssh , scp location
d) Create

STEP 6:Now create a new job for the project
a) click on “create job”
b) Give name to the job
c)Give name to “job group”
d) Give purpose of job Description
e) Add a command in Execute a remote command
f) Now Save the job

STEP 7:Generate SSh Key and upload to rundeck server
1
               # ssh-keygen -t rsa
STEP 8:  use the cat command to view the key
1
               # cat .ssh/id_rsa
a)Now copy the key and upload to server in key storage
b)Key Type = Private Key
c) Enter Text = paste the key which is copied
d) Give Name=private.key
e) Save

STEP 9: Add a node to rundeck server
a)Now go to Command Line Interface
1
            # cd /var/rundeck/projects/project name/etc

b) edit resources.xml file
1
            # sudo vi resources.xml

c)Give the node details in between <project> and </project>
d)Give details of “name”–>”description”–>”tags”–> “hostname”–>”osfamily”–>osNmae–>”username”–>”ssh-key-storage-path”

  • Hostname can be given or use ip-address

  • In ssh-key-storage-path which is to be given key storage /key/nodes/private.key

STEP 10: Now copy the public key to rundeck server using “ssh-copy-id” command
a) copy public key being “root” user
1
            # ssh-copy-id username@ipaddress
b) copy public key being “rundeck” user
1
            #su - rundeck
1
            #ssh-copy-id username@ipaddress
STEP 11:now restart rundeck server
1
            # systemctl restart rundeckd
check status of server whether it is running
1
           #systemctl status rundeckd
STEP 12: Now go to nodes section in server and check new node is added

a) select the project check nodes has been added
b) choose all nodes and list which was updated recently

STEP 13: Run the job on new node

No comments:

Post a Comment