Automate deployment using Rundeck

What is Rundeck?

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.

 

Rundeck features

  • Web API
  • distributed command execution
  • pluggable execution system (SSH by default)
  • multi-step workflows
  • job execution with on demand or scheduled runs
  • graphical web console for command and job execution
  • role-based access control policy
  • history and auditing logs
  • command line interface tools

Essential Concepts

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.

  • Role-based Access Control Policies: A Rundeck access control policy grants users and user groups certain privileges to perform actions against rundeck resources like projects, jobs, nodes, commands and API.
  • Projects: A project is a place to separate management activity. All Rundeck activities occur within the context of a project. Multiple projects can be maintained on the same Rundeck server.
  • Jobs : A job encapsulate a sequence of steps, job options and nodes where the steps execute.
  • Nodes: A node is a resource that is either a physical or virtual instance of a network accessible host. A resource model is a representation of Nodes in a project.
  • Commands: A command is a single executable string executed on a Node. Rundeck invokes commands on nodes via a node executor which evaluates the command string and executes it.
  • Executions: An execution is a representation of the activity of a running or completed command or job. The data about the execution is used in rundeck to monitor the progress of a job or command and later for reporting about what happened.
  • Plugins: Most of what Rundeck does is via one of its plugins. Plugins exist to execute commands on nodes, perform steps in a job, send a notification about job status, gather information about the hosts in your network, copy a file to a remote server, store and stream logs, or talk to a user directory.

 

Download and Installation

If a running Rundeck instance isn’t already available to you, there are a couple ways you can try it.

  • You can download and install the Rundeck software. There are several package formats. Choose the one that best suits your infrastructure. After installation, be sure Rundeck has been started.
  • The default port for the web interface is 4440. If you installed Rundeck on your local machine, go to this URL: http://localhost:4440

Installation

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.

Login

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.

 

Project setup

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.

Rundeck Graphical Console

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.

Project menu

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.

Jobs

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.

 

Nodes

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.

Commands

The Commands page lets you execute abitrary commands against the nodes that match the node filter. 

Activity

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).

Configure

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.

User

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.

Command Line Tools

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.

Automation Features

End-to-end Orchestration across Local or Remote Servers:

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.

Cross-Platform:

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.

 

Security Access Control:

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.

 Notifications:

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.

 Ad-Hoc Commands:

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.

 Designed for Today’s Tools and Infrastructure:

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.


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s