Managing Cohesity with a RaspberryPi and Python

This week I was looking at the Cohesity Developer portal again and decided to see what was on GitHub. One of the repositories that Cohesity has is the Cohesity Management SDK for Python, which got me thinking. Python is a multi-platform programming language, and I have mostly used Python on a Raspberry Pi. Would the Cohesity SDK work on a Pi? What about other Cohesity management? So I downloaded the latest build of Raspbian Buster and got myself a desktop running on a Raspberry Pi 3. Naturally, a desktop on a Pi3 is nowhere near as powerful as my usual 2013 MacBook Pro, or the newer MacBook that I want to replace this old machine. You can see the video of me doing this all with my RapberryPi desktop here. I could still use Chromium to manage my Cohesity clusters through Helios, or directly through the cluster management page.

A screenshot of a computer

Description automatically generated

Disclosure: This post is part of my work with Cohesity.

No surprise, HTML5 pages should render on any HTML5 web browser. Next, I took a look at the install instructions for the Cohesity SDK for Python, a single PIP command to install.

A screenshot of a cell phone

Description automatically generated

Then a quick Git Clone brought down all of the repository contents, and I could take a look at the sample scripts.

A screenshot of a cell phone

Description automatically generated

To test the sample scripts, I needed to set the variables at the top of the script for my Cluster address and credentials.

A screenshot of a cell phone

Description automatically generated

Then I could run the script and see the Protection jobs on my Cohesity Virtual edition cluster in my lab.

A screenshot of a computer screen

Description automatically generated

The sample scripts to list protection run status and show unresolved errors were equally trivial to update for my site details.

I cannot think of a reason that you would use a Pi to manage your cluster, but it does demonstrate the multi-platform nature of Python as an automation tool. I do think that it might take me a while to work out what I would do with the SDK, what I would automate, but it is excellent to know that I have the option. I suspect that this Python SDK will be used to build an Ansible module and allow declarative configuration of Cohesity in your playbooks.

© 2019, Alastair. All rights reserved.

About Alastair

I am a professional geek, working in IT Infrastructure. Mostly I help to communicate and educate around the use of current technology and the direction of future technologies.
This entry was posted in General. Bookmark the permalink.