Manage multiple cluster from single Ambari Server

Since there was a relatively high interrest about my plain old Apache Ambari patch, I will try to summarize my experiences in short.

I must emphasize that my investigations took place years ago, on April, 2013 so during this long time Ambari must have been updated a lot as it is shown by its GitHub repository. The latest version of Ambari is 2.1.2, released two days ago, but mine could not be more recent than 1.2.2.

Essentially, Ambari version 1.2.2 was able to manage multiple clusters but this could not be seen at the web user interface at all. Fortunately, Ambari has REST API used by the javascript UI as well, so if my old findings are accurate, you should be able to create and install two clusers via curl calls. You can find my REST call set here. Of course, I know these calls may not be clear enough to be easily used and thus difficult to understand but I hope it will help. At the end of setting up a cluster, do not forget to set CLUSTER_CURRENT_STATUS to disable the setup wizard according to the above linked file.

Well, if you succeed with the above, the last thing to do is showing cluster details on the web user interface. All clusers, of course. And, yeah, that is the most difficult part since the UI must have changed a lot since I made this patch. Download that patch file and apply on app.js, located in /usr/lib/ambari-server/web/javascripts.

If everything went fine you should be able to define which cluster to show by adding an extra HTTP GET variable to the URL of the web UI, like this:

That's all and I hope it works. If you have any further hands on experience please feel free to contact me and I will update this post.

There are absolute no guarantees that this will work so do it at your own risk!