Setup Active Directory Authentication for Rundeck

Rundeck is a simple & easy product to setup workflow and automation tool. By default, it comes with the default local user accounts. Rundeck supports LDAP, AD, PAM and Pre-Auth methods. But the downside is Rundeck’s documentation which is not that great to configure LDAP/AD based authentication.

After multiple attempts and spending a whole day searching on the internet; able to configure AD authentication… Here are the simple steps for Rundeck AD auth configuration.

Continue reading “Setup Active Directory Authentication for Rundeck”

Advertisements

VMAX SRP Utilization Report & Upload to MySQL DB using Python

I had an opportunity to attend Python Basics Training imparted by Mr. Ashish Gulati. Ashish, a technology coach; was really good in explaining basics of language, data types and Pro & Cons of this language. The way he imparted knowledge was an unique experience. He was flexible to explain some of the real time use cases in data analytics, JSON, SSH connectivity etc.. and explained in detail about the various module’s functionality.

Thank much Ashish for the session, it was informative, very simple topics but effective learning experience, hands on coding was a big plus point. I have learned much that will assist me in my workplace. As an outcome, I have already started migrating from Perl to Python.  This blog is about my first attempt to write Python scripts @ work.

Scripts written in Python would run from several VMAX3 Enterprise Storage Management Servers located at various data centers.

Python_vmax_cap

Continue reading “VMAX SRP Utilization Report & Upload to MySQL DB using Python”

Add a remote node in Rundeck

To add a remote node in Rundeck, we need to have SSH connectivity (usually port # 22) and to setup a SSH based key based authentication between Rundeck server & client. Please click here and follow the guide to setup key based authentication as a first step.

After setting up key based auth, test the SSH connectivity. Copy the file id_rsa from your home directory to the below path

# cp/home/<USERNAME>/.ssh/id_rsa  /var/lib/rundeck/.ssh/id_rsa

Third step is to add node details in the resources.xml file

Path – /var/rundeck/projects/VEC-Storage/etc/resources.xml and add entries as shown below. By default, Rundeck server information which is a first node definition would be there already. (open with your favorite {nano} editor)

<?xml version=”1.0″ encoding=”UTF-8″?>

<project>
<node name=”SAS” description=”Rundeck server node” tags=”RDS” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” osVersion=”4.9.0-2-amd64″ username=”rundeck”/>
<node name=”Name” description=”Windows Jump2″ tags=”JMP” hostname=”<name/IP>” osFamily=”windows” username=”user” ssh-keypath=”/var/lib/rundeck/.ssh/id_rsa”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>

<node name=”Name” description=”Windows Jump1″ tags=”JMP1″ hostname=”<name/IP>” osFamily=”windows” username=”user” ssh-keypath=”/var/lib/rundeck/.ssh/id_rsa”/>

<node name=”Name” description=”SYMCLI SRV” tags=”SYM” hostname=”<name/IP>” osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”user”/>
</project>

There are multiple nodes definitions of both OS types (both *nix & Windows) added to Rundeck. Tags come in handy while defining the node attributes which helps in grouping similar type of clients. As an example shown above, tags=’SYM’ represent that the client is a EMC VMAX Mgmt. Host running with SYMCLI & Unisphere for VMAX services.

To run a command across all nodes, simply type in the tag name and run the command from Rundeck >Menu Bar > Commands. PFB Screenshots for reference.

2017-12-12 21_29_03-Commands - VEC-Storage

Output of above command from all the nodes are as under.

2017-12-12 21_53_06-192.168.60.63_4440_project_VEC-Storage_execution_downloadOutput_11924_view=inlin

Troubleshooting: In case of SSH connectivity issue, edit the sudoers file (visudo) and remove the comment of below line. But before making changes, consult your administrator whether this incline with standard policies.

Defaults !requiretty