-1

Due to a location change, we have to move a number of servers to new IP addresses (from 10.X.*.* to 10.Y.*.*). We're taking the opportunity to clean up our IP allocations from a haphazard setup to a more orderly one, so there's not much correspondence between old and new IPs. The systems are nearly all:

  • running Ubuntu (14.04, with a couple of 12.04 and one odd 10.04 that we're planning to upgrade)
  • managed somewhat by Puppet and Foreman (mostly package installation and service configuration)
  • configured with etckeeper to keep functionality-related configuration in git
  • configured with static IPs via /etc/network/interfaces.

Currently, we have two options:

  • Make all the changes in advance in copies of files, and when the server is brought back up after the move, switch the files using a script.
  • Make all the changes in advance in a git branch, and when the server is brought back up after the move, do a git checkout new-branch (or a merge changes, as per convenience).

Essentially, both methods are the same, just the tools used are different. Of course, there's also the manual method, but that would be error-prone.

Changes to be made involve updating IPs in interfaces, DNS server IP, nagios, munin configuration IPs, and so on.

What other options do I have?

muru
  • 569
  • 7
  • 26
  • Not an option per-se but configuring all your hosts with DHCP (With reservations if required) and Dynamic DNS would make this problem virtually disappear. Doesn't help you for this move, but you might consider implementing it to make the next move easier. – GeoSword May 02 '16 at 13:22
  • @GeoSword Thanks, I have forwarded that suggestion to my team to consider. It could help us for this move: If we make the change to DHCP now, we could spread the change over a few days, and the changes required on the day of the move would be considerably reduced. – muru May 02 '16 at 13:38

1 Answers1

1

In the end, we decided to use the git method, and changing IPs was the least of our troubles. :)

The procedure:

  • Use Puppet to install and set up etckeeper, and create a repo for each server on our Gitlab instance. We chose to use a gitignore that ignored everything except select files and directories.
  • Have team members create a branch (with a common name, like newip) with the required changes.This exercise also involved adding any files or directories of interest to git, adding exceptions to gitignore.
  • Review the commits on the new branch.
  • On the day of the switch, cd /etc; git fetch origin newip:newip && git merge newip on each system, before bringing it down.

We got a couple of merge conflicts, from changes made to test other options (and were not undone), but these were easily resolved.

muru
  • 569
  • 7
  • 26