Looking for some advice/tips migrating foreman to new hardware

Hi,

I am planning to migrate my foreman node to more newer more powerful
hardware and I figured I would ask for any tips or advice folks might have
to make this a smooth process.

As I see it I have a couple options.

  • I could create a new host with the same hostname and OS and then treat
    the situation as if I had a failure and I am restoring from backup.
  • I could create a new host with a new hostname and transition my nodes to
    this new node over time.

The advantage to the first is I get things up and going fairly quickly, but
the whole setup will be effectively the same as before. The advantage of
the second is while it is much slower I can take the time to
redesign/refactor my puppet modules and take advantage of everything I have
learned over the past year and a half. Maybe take advantage of new features
that have come out since I first set things up.

I am leaning towards option 2 so if anyone has any suggestions or advice
if they have done something similar to help the transition I am definitely
interested. For example, when inserting node into the new foreman I expect
I would use the hammer cli. Is there any more direct way to do this them
query a node, then take that output and re-make a hammer command with a
scripting language to insert it into the new foreman database?

Thanks,

Terrence