Allow to pass docker UCP image via env file

Related-Prod: PRODX-3456
Change-Id: I2f34e6912b108df68092ab29d8baed87e56ce861
diff --git a/de/heat-templates/fragments/SrvInstancesBM.yaml b/de/heat-templates/fragments/SrvInstancesBM.yaml
index 805179c..a2ae698 100644
--- a/de/heat-templates/fragments/SrvInstancesBM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBM.yaml
@@ -46,6 +46,9 @@
     type: string
   docker_ee_url:
     type: string
+  docker_ucp_image:
+    type: string
+    default: 'docker/ucp:3.2.4'
   hardware_metadata:
     description: The content of lab metadata.
     default: ''
@@ -73,6 +76,7 @@
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
             $functions_override: { get_param: functions_override }
+            $docker_ucp_image: { get_param: docker_ucp_image }
 
   inject_files:
     type: "OS::Heat::CloudConfig"
diff --git a/de/heat-templates/fragments/SrvInstancesVM.yaml b/de/heat-templates/fragments/SrvInstancesVM.yaml
index f89e470..5d0c936 100644
--- a/de/heat-templates/fragments/SrvInstancesVM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVM.yaml
@@ -45,6 +45,9 @@
     type: string
   docker_ee_url:
     type: string
+  docker_ucp_image:
+    type: string
+    default: 'docker/ucp:3.2.4'
   hardware_metadata:
     description: The content of lab metadata.
     default: ''
@@ -72,6 +75,7 @@
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $functions_override: { get_param: functions_override }
+            $docker_ucp_image: { get_param: docker_ucp_image }
 
   inject_files:
     type: "OS::Heat::CloudConfig"
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 98eadf1..b55a006 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -28,6 +28,7 @@
 NODE_METADATA='$node_metadata'
 DOCKER_EE_URL='$docker_ee_url'
 DOCKER_EE_RELEASE='$docker_ee_release'
+DOCKER_UCP_IMAGE='$docker_ucp_image'
 FLOATING_NETWORK_PREFIXES=$private_floating_network_cidr
 #
 # End of block
@@ -155,7 +156,7 @@
         docker container run --rm --name ucp \
         -v /var/run/docker.sock:/var/run/docker.sock \
         -v $tmpd/docker_subscription.lic:/config/docker_subscription.lic \
-        docker/ucp:3.2.4 install \
+        ${DOCKER_UCP_IMAGE} install \
         --host-address $UCP_IP_ADDRESS \
         --admin-username $UCP_USERNAME \
         --admin-password $UCP_PASSWORD \
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index 8f40a87..6ec1e76 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -199,6 +199,9 @@
   docker_ee_release:
     type: string
     default: 'stable-19.03'
+  docker_ucp_image:
+    type: string
+    default: 'docker/ucp:3.2.4'
   tunnel_interface:
     type: string
     default: ''
@@ -259,6 +262,7 @@
       metadata: { get_param: ucp_metadata}
       docker_ee_url: { get_param: docker_ee_url }
       docker_ee_release: { get_param: docker_ee_release }
+      docker_ucp_image: { get_param: docker_ucp_image}
       node_type: "ucp"
       key_name: { get_param: "OS::stack_name" }
       image: { get_param: image }