Split out settings.yml creation and env setup to separate script

Change-Id: Id1a2368ad721bb52ea621212907499b953a60de2