refactor base and ports databags. initialize hostname before running chef