Remove taint from UCP master node

The patch adds ability to remove taint from UCP master node if single_node
(all-in-one) is set to true. However this parameter is set to false by
default.

Related-PRODX: PRODX-9383
Change-Id: If9f5a025415882cd6e4f18b75871619904d47c4b
diff --git a/de/deploy.sh b/de/deploy.sh
index ee76897..12392b8 100644
--- a/de/deploy.sh
+++ b/de/deploy.sh
@@ -1,5 +1,5 @@
 STACK_NAME=${STACK_NAME:-"$(whoami)-de-ucp-$((1 + RANDOM % 100))"}
 TEMPLATES_FOLDER="heat-templates"
-STACK_ENVIRONMENT=${STACK_ENVIRONMENT:-converged.yaml}
+STACK_ENVIRONMENT=${STACK_ENVIRONMENT:-aio.yaml}
 
 openstack stack create -t ${TEMPLATES_FOLDER}/top.yaml -e ${TEMPLATES_FOLDER}/env/$STACK_ENVIRONMENT $STACK_NAME
diff --git a/de/heat-templates/env/aio.yaml b/de/heat-templates/env/aio.yaml
new file mode 100644
index 0000000..af4c87e
--- /dev/null
+++ b/de/heat-templates/env/aio.yaml
@@ -0,0 +1,54 @@
+resource_registry:
+  "MCP2::NetworkAcc": ../fragments/NetworkAccVM.yaml
+  "MCP2::NetworkAccStorage": ../fragments/NetworkAccVMStorage.yaml
+  "MCP2::NetworkPrvFl": ../fragments/NetworkPrvFl.yaml
+  "MCP2::NetworkIronicFlat": ../fragments/NetworkIronicFlat.yaml
+  "MCP2::SrvInstances": ../fragments/SrvInstancesVM.yaml
+  "MCP2::SrvInstancesCeph": ../fragments/SrvInstancesVMCeph.yaml
+  "MCP2::SrvInstancesCephOSD": ../fragments/SrvInstancesVMCephOSD.yaml
+  "MCP2::NetworkTun": ../fragments/NetworkTun.yaml
+
+parameters:
+  image: bionic-server-cloudimg-amd64-20190612
+  public_net_id: public
+  masters_size: 0
+  worker_size: 0
+  cmp_size: 0
+  gtw_size: 0
+  lma_size: 0
+  osd_size: 0
+  ucp_boot_timeout: 3600
+  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
+  private_floating_network_cidr: '10.11.12.0/24'
+  private_floating_interface: ''
+  tunnel_interface: 'ens3'
+  worker_metadata: {"labels": {"openstack-control-plane":"enabled","openstack-compute-node":"enabled","openvswitch":"enabled", "openstack-gateway":"enabled","role":"ceph-osd-node","local-volume-provisioner": "enabled"}}
+  cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
+  gtw_metadata: {"labels": {"openvswitch":"enabled"}}
+  #compact.cid: RAM 32768 | Disk 100 | VCPU 8
+  ucp_flavor: 'compact.cid'
+  # hardware_metadata which is used for Ceph requires flavor with
+  # ephemeral storage because it is used for Ceph bluestore.
+  workers_flavor: 'system.compact.openstack.control.ephemeral'
+  cmps_flavor: 'system.compact.openstack.control.ephemeral'
+  storage_frontend_network_cidr: '10.10.0.0/24'
+  storage_backend_network_cidr: '10.10.0.0/24'
+  single_node: 'true'
+  hardware_metadata: |
+    '00:00:00:00:00:00':
+      write_files:
+        - path: /usr/share/metadata/ceph.yaml
+          content: |
+            storageDevices:
+              - name: vdb
+                role: hdd
+                sizeGb: 20
+            ramGb: 8
+            cores: 2
+            # The roles will be assigned based on node labels.
+            # roles:
+            #   - mon
+            #   - mgr
+            ips:
+              - 192.168.122.101
+            crushPath: {}
diff --git a/de/heat-templates/fragments/SrvInstancesVM.yaml b/de/heat-templates/fragments/SrvInstancesVM.yaml
index 6d2bbb9..a9a305d 100644
--- a/de/heat-templates/fragments/SrvInstancesVM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVM.yaml
@@ -52,6 +52,8 @@
     description: The content of lab metadata.
     default: ''
     type: string
+  single_node:
+    type: string
 
 resources:
 
@@ -76,6 +78,7 @@
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $functions_override: { get_param: functions_override }
             $docker_ucp_image: { get_param: docker_ucp_image }
+            $single_node: { get_param: single_node }
 
   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 dd25bf8..a5f1b2c 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -39,6 +39,7 @@
 IRONIC_BAREMETAL_TUNNEL_NETWORK_PREFIX=$(sed 's/[0-9]*\/[0-9]*$//' <<< $IRONIC_BAREMETAL_TUNNEL_NETWORK)
 HUGE_PAGES=$huge_pages
 TUNGSTENFABRIC_ENABLED=$tungstenfabric_enabled
+SINGLE_NODE=$single_node
 #
 # End of block
 #
@@ -82,6 +83,7 @@
         TUNNEL_INTERFACE_NETPLAN_MANAGE=false
     fi
 fi
+SINGLE_NODE=${SINGLE_NODE:-true}
 
 function retry {
     local retries=$1
@@ -639,6 +641,12 @@
     fi
 }
 
+function disable_master_taint {
+
+    kubectl taint nodes --all com.docker.ucp.manager:NoSchedule-
+
+}
+
 case "$NODE_TYPE" in
     # Please keep the "prepare_metadata_files", "disable-rp-filter", "network_config" and "prepare_network" functions
     # at the very beginning in the same order.
@@ -665,6 +673,9 @@
         collect_ceph_metadata
         configure_contrack
         disable_iptables_for_bridges
+        if [[ "${SINGLE_NODE}" == true ]]; then
+            disable_master_taint
+        fi
         ;;
     master)
         nested_virt_config
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index 4f555c8..ff3478d 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -264,6 +264,10 @@
       If number is equal to 0 alloacation of huge pages won't be configured.
     default: '0,0'
     type: string
+  single_node:
+    description: If set true then AIO is going to be deployed.
+    type: string
+    default: 'false'
 
 resources:
   keypair_name:
@@ -341,6 +345,7 @@
       control_network_cidr: { get_param: control_network_cidr }
       functions_override: { get_param: functions_override }
       hardware_metadata: { get_param: hardware_metadata}
+      single_node: { get_param: single_node}
 
   masters:
     type: OS::Heat::ResourceGroup