Rubrik : Php Framework

Background

I never formally introduced my php Framework, although I already used it many times for various tasks. I think, this is now the good time to write a little bit more about it. Indeed, on my daily job, I had some specific needs that cannot be solved by the "out of the box" cluster. It really does not matter since Rubrik offers the ability to make API calls for various tasks.

As a reminder, everything that can be seen on the UI is based on API calls. That make easy to "get", "post" and "delete" any type of events or objects.

Enhancing the product or adding features is then make easy and only limit is your imagination and/or programming skills.

Rubrik Build !

Rubrik developed SDKs in various languages (currently Go, Python, PowerShell) available on the Rubrik Build portal. There are also automation capabilities via Ansible. This is a good start, but I do not master any of the 3 main languages proposed here. 

Php Framework

I'm always defining myself as a "all-terrain" IT guy, I'm not a developer at all. The good thing is, I had some good background knowledge in Turbo Pascal/C++/Delphi since I was a young student. All this has been shifted to Php since this is more or less the same foundations. I'm using Php for quite a long time and nothing here related to dynamic websites - I'm using the CLI version of Php to create various administration scripts on my Linux servers. This is very handy with a wide scope of integrations. Ideal to me.

When I was looking at API calls for the first time, I immediately thought at using Php. Rubrik is proposing a very interesting "playground" to help user testing API calls. It can be found at the following address : https://<rubrik_ip>/docs/v1/playground/


There are actually 3 versions so far
  • https://<rubrik_ip>/docs/v1/playground/
    • This is the version 1, standardized and supported
  • https://<rubrik_ip>/docs/internal/playground/
    • This is the Internal version, subject to change and under development
  • https://<rubrik_ip>/docs/v2/playground/
    • This is version 2 API, with the latest available functions - at this stage very few possibilities
Based on that, you get used to the game, the first function creates the next one and so on and so on, ... at the end, your first script is built and you see a bunch of useful and reusable function list that can be the start of something bigger. All functions have been saved into a single file that I first called functions.inc.php and I realized that all those functions can be useful for others. This is the very beginning of the Php Framework concept.

Today, there is 56 functions in a file called rkFramework.php, freely available, not bug free of course (I cannot test everything, I only test on my environment), but usable.

UPDATE Oct 2021 : Today there are actually 96 functions ;)

The biggest project associated to it is my Rubrik Central portal. I'm quite happy with it and I will continue maintaining both the framework and the Rubrik Central portal at the same time.

I would love to see some feedback on this, this is my very first Open Source project and I'm actually quite happy to share it with you.


Comments

What's hot ?

ShredOS : HDD degaussing with style

ThingSpeak : Create some useful formulas