Php : Welcome to Rubrik Central !



Background

You managed to be a happy Rubrik customer and you just rolled out your second cluster. Now, you need visibility, a dashboard, anything that can help you to visualize your investment, in a nice and easy way with only what you are looking for ... [for free!]
You eventually reach out to your Rubrik salesman and guess what ? Answer will be we don't have. Well, nothing else than a SaaS platform called Polaris doing a lot of stuff that you do not need now. But I have an answer for you !


Rubrik Central

I must admit, I was very much inspired by Nutanix and their Prism Central to name this few php code lines. Indeed, the philosophy is the same : a single pane of glass to see all your Rubrik clusters.
After spending some long nights to create the start of a php framework calling Rubrik APIs, adding functionalities, I thought this is now the time to find a use case. I really think this one is the perfect usage !

Before you start, please take the following into consideration :

  • I'm not a professional developer, I just know how to solve issues using simple methods;
  • I'm not a UX/UI specialist, so I'm using the bootstrap CSS package to move fast;
  • My code might be dirty and not optimized, but it works;
  • I'm a full time employee and I'm coding at night or during my free time.
Now, you are aware, please go ahead with the below reading.

You can get the code on my GitHub repo dedicated to Rubrik Central. This blog post is only extra supporting material.

You basically need to create the following folder structure, based on the files found on GitHub :



You need to have a Php-enabled web-server to store/serve the files. Next you need to configure the rkClusters.php file with the relevant access to your various clusters. In the below example, there are 4 clusters. In this file, you are storing passwords, this is not safe to have just the clear text password, so I have decided to "encrypt" them using a reversible algorithm (bin2hex, hex2bin). This is obviously not strong encryption but at least, you can let the screen open for viewing by anyone, t will not be able to guess the password. In order to crypt the password you need to configure, just run the rkCluster.php file directly on the server :

$ php -f rkClusters.php
Encrypted password is  : 70617373776f7264
Decrypted : password

Then copy paste the provided string in the relevant variable :

<?php
$clusterConnect=array(
0 => array(
"cluster" => "Cluster 1",
"username" => "username",
"password" => "70617373776f7264",
"ip" => "192.168.1.1"
),
[...]

Once done, you can access the front page. Ideally, create a symlink called index.php :

$ ln -s rkCentral.php index.php
$ ll
total 64
[...]
 0 lrwxr-xr-x   1 www  www    13B Feb 10 17:51 index.php -> rkCentral.php

When you are done, you will see the main screen of Rubrik Central, it looks like this :

Rubrik Central - Main screen

By clicking on any of the above cluster, you will dig into some more details :

Rubrik Central - Details mode

Note : on the Unamanged Objects section above, there is an action column where you a delete button should in a new future delete the object directly from the interface. For now, this functionality is not operational - yet.

When clicking on the objects number (when bigger than 0) in the SLAs listing, you can get access to the various objects part of this SLA :

Rubrik Central - Object details

Of course, this portal will be enhanced by the time with more feature and functionalities. Keep an eye on it and feel free to use it and report any issues. I do not have all the cases on my environment so I cannot test everything.

TODO

  • Make the delete button for unmanaged objects working
  • Add a login screen to be enterprise ready


Thanks.

Comments

What's hot ?

Raspberry Pi : WiFi Hotspot for the Garden!

ShredOS : HDD degaussing with style

Wallbox : Get The Most Of It (with API)