Please make sure you have read the RunBook Orchestrator & RunBook Concepts sections, before proceeding with this sub-section.

In this section, we will get into more details about following different topics :

  • RunBooks Repository
  • Creating RunBooks
  • Executing RunBooks
  • Saving RunBooks
  • Browsing RunBooks
  • Editing RunBooks
  • Version-control RunBooks

RunBooks Repository

Before we get into creating run-books, its important to understand run-book repository. RunBook repository provides a way of organizing run-books in groups. RunBook Repository is defined as a folder in a file system by user, and this folder acts as a root folder for storing all the run-books belonging to that run-book repository.
Figure below shows a sample run-book repository being created using RunBook Orchestrator:

Creating New RunBook Repository

Later as we create different run-books we will store them in the "Sample RunBook Repository 1" created in the figure above. There is also a "Default" RunBook Repository already available to user, when DivineCloud was installed. It is recommended to create a new repository as per your requirement rather than using the Default repository, other than for initial getting started purpose.

Creating RunBooks

To create a run-book, click the RunBook Orchestrator icon on the left menu, and select space "1". Spaces 1 to 8 are displayed at the top. Once you click on the Space 1, you will see RunBook Orchestrator's three modes - Code, Document, & Run.
We can create & access run-books in "code" mode. Let's create our first run-book. For the first run-book, let's create 2 steps, the 1st step is a simple "hostname" command, and the 2nd step is a simple echo "Greetings" script, as shown in the figure below. Also notice, we have changed the label for run-book name and both the steps.

Creating New RunBook

Executing RunBooks

Now that we have created a simple run-book let's execute it. To execute a run-book, we need to be in "Run" mode. Select the "Run" tab - one of the 3 Input mode tabs displayed at the top.
To execute a run-book, we need to select the server(s) on which this run-book needs to be executed. We can decide to run each step on different servers or all on the same servers. In our example, let's run Step 1 on Server 1 (S1), and let's run Step 2 on Server 2 (S2). You can select servers by selecting the Nodes icon button next to each step. Figure below shows our selection of servers for each step:

Selecting Servers Per Step for RunBook Execution

Once we have selected servers per step, we can now execute the run-book by clicking the "run" button. The figure below shows the screenshot of run-book execution output:

RunBook Execution Output

Saving RunBooks

Now that we have successfully executed the run-book, its a good idea to save the run-book in our file system, so we can re-use it again in future. To save the run-book, we need to be in "Code" mode. Let's click the "save" button located on the right side. This brings up a form for saving the run-book. In the form there are 3 inputs, we need to provide as shown below:

  • 1. Repository Name : Let's select "Sample RunBook Repository 1". This is the repository we created at start of the section
  • 2. Relative Path : Let's leave this empty for now. This is a relative folder path inside the repository.
  • 3. RunBook Name : Let's type simple-example.runbook
Saving RunBook

Browsing RunBooks

There are 2 options available for browsing run-books as shown below:

  • 1. RunBooks Grid View
  • 2. RunBooks Tree View
Two Options For Browsing RunBook

Editing RunBooks

To edit the run-book, let's open the run-book using one of the 2 options shown above. Make the changes to the run-book as you see fit, and click save. This will over-write the old run-book file with the new changes.

Version-Control RunBooks

The run-books are stored in the file system where DivineCloud is installed, in a regular text file format, so users can decide to version control the run-book file using the version-control system (e.g. Git) of their choice.