Move /etc/hosts configuration to lib/env-setup.sh
Add replication support