I have a requirment here wherein I need to check if the published services (policies) are in sync across all environments. We have 4 Non-Prod environments, a DR and a production environment. We migrate new policies and modifed policies from lower non-prod environment to higher non-prod environments and then to production and DR finally. At any given point of time we need a functionality to monitor if the 'Active' policy for a service is same across all the environments (Prod, DR and Non-Prod). Is it possible to do so through some scripting or through any functionality currently available? If yes, Can someone please guide me on how to do it?
There is no OOTB feature that enables this, but if you're going to automate the check I would look at the REST Management API (RESTMAN) and the Gateway Management Utility (GMU) which leverages RESTMAN as a starting point. Doc links are here:
pseudo code for such a script might do something like this:
Depending on network architecture, and where the script is run, it may not be possible to access all environments at the same time which is something to keep in mind.
Thanks for the info. So, If I install my GMU and the script for the above mentioned function in a central utility server which has connectivity to all environments of my gateway, I would be able to acheive my desired functionality (Assuming that I have retrieved my policy XML through RESTMAN and have a shell script which can compare two XMLs)...Am I correct?
Yes, I think using Restman you can download the policy xml and write scripts to compare the service XML or use tools like Beyond Compare.
Thanks. I would try more on this option as well.
In reference to using RestMan:
Thanks. It looks more interseting to use a gateway policy. I would explore more on that.