Quick Guide: Dev Environment IP Change!

A nice tip that would save you some pain when dealing with change! I am talking about development environment servers and the possibility of an IP address change on their network interface.


Related: Tip No. 1 | Tip No. 2 | Tip No. 3 | Tip No. 4 | Tip No. 5 | Tip No. 6 | Tip No. 7 | Tip No. 8 | Tip No. 9 | Tip No. 10 | Eclipse Java Project Export


Let us get directly to the point, I got used to this simple trick/habit during working in my previous company and it proved to be a life saver.

Define some host name in your hosts file and have it point to the development environment server's IP address. It could be one or many servers for version control, bug tracking, and so on.. in the latter case you'll need to define many host names.

The reason for doing that is because the server might have its IP address change at any time, due to various reasons. In which case you'll only need to update the IP address in the host file and not everywhere on your machine ;)

A special note for SVN users on Eclipse! If you are caught in a change while using IP address to your repository and need to update, do the following:

  1. Take a backup of your workspace (I never needed this, but better be safe then sorry)
  2. Open the SVN Repository Exploring perspective
  3. Right-click on your repository link
  4. Choose Relocate
A dialog will show up in which you will have to specify the new URL to the SVN server (I hope you defined a host name for this change as described earlier) and there you go. You're connection will be relocated to the new SVN server, all your pending changes, all your workspace changes should stay intact. And when it is time to commit, it'll run smoothly as if nothing had happened!

Happy coding!

Comments

Popular posts from this blog

Tech Tips Digest: 2