Export/Import of Service Objects


#1

Hi,
We want to update our Cloudforms infrastructure in the next couple of weeks, but instead of doing a normal upgrade, we want to rebuild the environment from scratch and switch over, once the new environment is fully functional.

Most of the data we need to migrate is covered either by the rh-consulting scripts or can be configured via API, however Services are not directly exposed

Some assumptions & background:

  • Services cannot be created through the API or Automate
  • The only “official” way to get a Service, is to order it via a Catalog Item
  • We are ok with losing some data and putting some programming effort into it
  • It does not need to have a lot of polish and be production-ready

Our approach would be to re-create all the services in rails and modify them until they look right

 svc = Service.create!(name: "Service2", description: "My Second Service", ...)

Has anyone done this before and can point me in the right direction?
Is our approach plausible or are we begging for trouble if we do it that way? Any pitfalls we should be aware of?

Any advice greatly appreciated

Update:
It is actually exposed in Automate through $evm.vmdb('service').create() which increases my confidence quiet a bit.