Welcome to Epiphani Playbooks Tutorial!


This tutorial will help you 

  • Understand basic elements of Epiphani Playbooks
  • Create an example playbook
  • Execute the example playbook


You can take a look at the video OR follow our step-by-step guide below and let us help you create your first Playbook!




Once you login, this is your home page:


We have included some ready-to-use sample playbooks for you to try them out directly from the home page.


Now let's see how you can create your own playbook. You can either start creating a brand new playbook from our editor or clone one of our sample playbook and edit it to create your own. 


Creating a New Playbook:


In this example, we will create a playbook that will send you the current status of your EC2 instances. This would need you to use AWS-EC2 connector from our library. 


Step 1: Click on "Playbook Editor" from the left side panel to goto the blank canvas of the visual editor as shown below. NOTE: The "START" and "END" nodes on the blank canvas cannot be removed. They are used as control nodes to tell the first and the last node of the playbook.



    

Now drag and drop the blank node (with '+') from the left side palette onto the canvas.



When selected, the Node will prompt you to configure it.




Selecting the node will change the left side palette to Node configuration mode. You can now see Connectors that are available to associate with the node in the left side palette.




For our example, search for EC2 and it will lead to the EC2 connector in the left side palette




Once you select "IT Services - AWS EC2" connector from the left panel, you can see list of all possible available actions.




For our example Playbooks, lets select "aws-ec2-describe-instances" from the list. This action fetches instances from EC2 and gives their status as output. Once selected, you will see the node on canvas change its appearance and will display the Connector (AWS EC2) and the action in the bottom half of the node as shown below. 


The left side palette will now show three tabs: Config, Command and Arguments. Let's configure the action now.




The mandatory fields are always marked with '*'. There are three such parameters that must be configured. defaultRegion, access_key and secret_key. You can either type in your keys here which would be visible to people viewing the playbook. To avoid this, you can save your keys in "Secure Stash" and then use those keys from Secure Stash directly. To chose a key saved in stash type "@" in config parameter field and it will list all available keys stored under Secure Stash. Select the correct key from the list.




The selected keys will appear like this.




After Config, click on "Next" OR switch to the "Command" tab above and configure the parameters needed there. In our case, we need to configure only Region. Here also you can select values from secure stash like previous step.




And finally, give the Node a name under "Arguments" as shown below




Give a name and description to the Playbook and connect the Node to the "Start" and "End" as shown below to complete the workflow.




Step 3: Saving the Playbook

Now click on "Save" to save the playbook. 



And now we are ready to execute our single node playbook to see if it works.


Step 5: Run a Playbook


Click on "Run" as shown below.




As the Playbooks gets executed, you will notice two things happen: The Node's display play button will shift from Orange (running) to either Green (successful execution) OR Red (failure). You will also see the output of the Playbook under "Output" tab as shown below.




As you can see, the Node's play button turns "Green" and that means a successful execution. AWS EC2 returned with a whole bunch of information as its output and you can see and check it under "Output" tab.





Congratulations on first successful execution of a single node playbook!