We have a tendency to forget things when we have a bunch of things on our plate. Imagine the impact of forgetting crucial steps while deploying critical applications on multiple servers. This is when automation tools like Rundeck come handy and you can configure steps for it to execute on different remote servers.
Rundeck is a cross-platform open source tool for running jobs on remote machines. It helps us run tasks on remote server node using web interface. Using Rundeck we can also schedule jobs & build workflows.
Below is the step by step guide on how to create jobs in Rundeck. I have executed all steps on Ubuntu16.4 version. Basically I have used two servers to execute all the commands.
Server1: Rundeck Server (IP: 127.0.0.1)
Server2: Remote Server (IP: 192.168.56.101)\
Step1: Download Rundeck package from http://rundeck.org/downloads.html and run the below command to setup it on Server1.
root@ubuntu:~# dpkg -i rundeck-2.10.2-1-GA.deb
Following commands are used to start/stop Rundeck service,
root@ubuntu:~# service rundeckd start
root@ubuntu:~# service rundeckd stop
Once all the setup is done you can hit URL in browser http://localhost:4440
To login into Rundeck use default user name as ‘admin’ and password as ‘admin’
Step2: Click on “New Project” and create a new job
Step3: To execute the command on Remote Server you have to add the server as a node into Rundeck Server, and you can do this by,
Logging in to remote Linux server, and creating a new Rundeck user and setting user password
root@ubuntu:~# adduser rundeck
root@ubuntu:~# usermod -aG sudo rundeck
root@ubuntu:~# su rundeck
Step4: On Rundeck Server we have to add Remote Server as a new entry under
Step5: Create a new Job to execute commands on selected/all configured nodes
Now you can run the job by clicking play button before the job name and it will execute the command on all specified nodes.
Above steps should help you in setting up jobs in Rundeck.
I hope this blog helps serve the purpose and further makes your life easier on deployment of large applications! You are good to go!