Automate deployment using Rundeck
Contributor - 24 March 2017 - 12min
Contributor - 24 March 2017 - 12min
Rundeck is open source software that helps you automate routine operational procedures in data center or cloud environments. Rundeck provides a number of features that will alleviate time-consuming grunt work and make it easy for you to scale up your automation efforts and create self service for others. Teams can collaborate to share how processes are automated while others are given trust to view operational activity or execute tasks.
Rundeck allows you to run tasks on any number of nodes from a web-based or command-line interface. Rundeck also includes other features that make it easy to scale up your automation efforts including: access control, workflow building, scheduling, logging, and integration with external sources for node and option data.
Several fundamental concepts underly and drive the Rundeck system. If you are a new user, knowing about them will help you use or integrate Rundeck into your environment.
If a running Rundeck instance isn’t already available to you, there are a couple ways you can try it.
There are several install options: a self-contained jar file, or RPM
To start from the rundeck-launcher.jar, put it in a directory named ~/rundeck, then execute:
java -XX:MaxPermSize=256m -Xmx1024m -Xms256m -server -jar rundeck-launcher-2.0.0.jar
If you’d like to install via RPM, you can use Yum:
rpm -Uvh http://repo.rundeck.org/latest.rpm yum install rundeck
OR install directly from RPM:
rpm -ivh rundeck-2.0.0-xxx.rpm rundeck-config-2.0.0-xxx.rpm
Once the RPM is installed, execute:
sudo /etc/init.d/rundeckd start
The server should launch on port 4440, with default username/password of admin/admin.
Rundeck requires every user to login. The default installation defines an “admin” user with access to perform all actions. Use “admin” for username and password.
A new installation will not contain any projects so Rundeck will present you with a dialog to create one. Press the “New Project” button to create a project. Fill the project creation form with a desired name. Project names can contain letters and numbers but do not use spaces or special characters. The Project setup chapter in the Administrator guide will show you how to learn to add Nodes, automate the creation and maintenance of Rundeck projects.Once the project has been created you are ready to use your Rundeck instance.
The Rundeck page header contains global navigation control to move between tabbed pages: Jobs, Nodes, Commands and Activity. It also has links to Configure the project, logout, view your user profile and a link to this online help.
The top navigation bar contains a menu to select the desired project. If only one project exists, the menu will automatically be selected. You can create new projects from this menu, too.
From the Jobs page, one can list, create and run Jobs. A configurable filter allows a user to limit the Job listing to those Jobs matching the filtering criteria. These filter settings can be saved to a Users profile. Only authorized jobs will be visible.
The Nodes page is used to browse your Nodes configured in your Project resource model. A filter control can be used to limit the listing to just the Node resources matching the filter criteria. Given the appropriate authorization you can also execute ad hoc commands to your filtered node set.
The Commands page lets you execute abitrary commands against the nodes that match the node filter.
From the Activity page, one can view currently executing commands and Jobs or browse execution history. The execution history can be filtered based on user selected parameters. Once the filter has been set, the matching history is displayed. The current filter settings also configure an RSS link, found in the top right of the page (see Rundeck Administration to enable RSS).
If your login belongs to the “admin” group and therefore granted “admin” privileges, a “Configure” icon will be displayed in the top navigation bar. From the Configure page you can edit project configuration, export and import project archives, view system information, and see what plugins are installed.
The User menu lets you logout and view your profile page. Your user profile lists your group memberships and a form to list and generate API tokens.
Rundeck includes a number of shell tools to dispatch commands, load and run Job definitions and interact with the dispatcher queue. These command tools are an alternative to functions accessible in the graphical console.
Rundeck workflows can coordinate steps across local or remote servers. Remote servers are targeted using filters, query expressions that match servers based on attributes and tags.
Rundeck improves efficiency across multiple tools, systems, and departments by eliminating or crossing technology and organizational process structures. Rundeck workflows can be executed across Windows and Unix platforms and can be extended to new platforms (including network gear) via Node Executor or Step plugins.
Workflows can be delegated to other users to provide self service or reduce request load from operations teams. Rundeck provides fine-grained role based access control policy to safely grant or deny access to job workflows, nodes or activity logs.
The start, success or failure of a job workflow can be forwarded to interested parties via Notifications. Email, webhooks or a variety of plugins can be configured to be sent by each Job.
Every company has a different policy for when to allow shell access to servers. Rundeck has the capability to allow systems administrators with the necessary privilege level to execute ad-hoc commands on servers where the access control policy allow it. Rundeck captures the command, the output, and the Node context in which it ran. This allows for both access control and logging to be managed in one consistent way across all types of operations activity simplifying management and compliance auditing.
Rundeck comes ready to manage dynamic and complex datacenter and cloud environments, integrates well with modern configuration management tools, and supports the increasingly popular DevOps and Agile inspired styles of working.