Update images build with repos checkout from gerrit

Change-Id: I27d19e248a1ded6b2a6a2a30b2955da57f23bc3f
diff --git a/day01-image/config-drive/meta-data b/day01-image/config-drive/meta-data
new file mode 100644
index 0000000..c7ba190
--- /dev/null
+++ b/day01-image/config-drive/meta-data
@@ -0,0 +1 @@
+hostname: ubuntu
diff --git a/day01-image/config-drive/user-data.yaml b/day01-image/config-drive/user-data
similarity index 100%
rename from day01-image/config-drive/user-data.yaml
rename to day01-image/config-drive/user-data
diff --git a/day01-image/run.example.sh b/day01-image/run.example.sh
index 25efd13..6732787 100755
--- a/day01-image/run.example.sh
+++ b/day01-image/run.example.sh
@@ -13,19 +13,18 @@
 #
 export IMAGE_NAME="cfg01"
 #
-export CLUSTER_MODEL=https://github.com/Mirantis/mcp-drivetrain-model.git
-export CLUSTER_MODEL_REF=master
+export CLUSTER_MODEL="http://gerrit.mcp.mirantis.com/mcp/mcp-drivetrain-model"
+export CLUSTER_MODEL_REF="master"
 export MCP_VERSION=proposed
 export SCRIPTS_REF=master
 export CLUSTER_NAME=mcp-day01
 export FORMULA_VERSION=proposed
-export BINARY_MCP_VERSION=proposed
 export UBUNTU_BASEURL="http://mirror.mirantis.com/proposed/ubuntu/"
 export SALTSTACK_REPO="http://mirror.mirantis.com/proposed/saltstack-2017.7/xenial xenial main"
 export APT_MIRANTIS_GPG="http://apt.mirantis.com/public.gpg"
 export SALTSTACK_GPG="https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/SALTSTACK-GPG-KEY.pub"
 export APT_MIRANTIS_SALT_REPO="http://apt.mirantis.com/xenial/ proposed salt"
-export GIT_SALT_FORMULAS_SCRIPTS=https://github.com/salt-formulas/salt-formulas-scripts.git
+export GIT_SALT_FORMULAS_SCRIPTS="https://gerrit.mcp.mirantis.com/salt-formulas/salt-formulas-scripts"
 export APT_REPOSITORY="deb [arch=amd64] http://apt.mirantis.com/xenial/ proposed salt"
 export APT_REPOSITORY_GPG=http://apt.mirantis.com/public.gpg
 ###
@@ -34,7 +33,26 @@
 mkdir -p "${PACKER_IMAGES_CACHE}"
 
 export PACKER_LOG=1
+pushd config-drive
+  [ -d model ] && rm -rf model
+  git clone ${CLUSTER_MODEL} model/
+  pushd model
+    git fetch ${CLUSTER_MODEL} ${CLUSTER_MODEL_REF} && git checkout FETCH_HEAD
+    pushd classes/system
+      git submodule init
+      git submodule update
+    popd
+  popd
+  [ -d salt_scripts ] && rm -rf salt_scripts
+  git clone ${GIT_SALT_FORMULAS_SCRIPTS} salt_scripts/
+  pushd salt_scripts
+    git fetch ${GIT_SALT_FORMULAS_SCRIPTS} ${SCRIPTS_REF} && git checkout FETCH_HEAD
+  popd
+popd
+
+[ -f config-drive/cloudata.iso ] && rm -v config-drive/cloudata.iso
+mkisofs -o config-drive/cloudata.iso -V cidata -r -J --quiet config-drive
+
 # For qemu test-build:
-cloud-localds  --hostname ubuntu --dsmode local config-drive/cloudata.iso  config-drive/user-data.yaml
 packer build -only=qemu -parallel=false -on-error=ask template.json
 #rm -rf ~/.packer.d/
diff --git a/day01-image/template.json b/day01-image/template.json
index 25de077..fd61aaa 100644
--- a/day01-image/template.json
+++ b/day01-image/template.json
@@ -103,7 +103,7 @@
           "8096M"
         ],
         [
-          "-fda",
+          "-cdrom",
           "config-drive/cloudata.iso"
         ],
         [