Change default VXLAN port for swarm in bgpvpn deployment

Related-Prod: PRODX-11679
Change-Id: I156f8134615cc2f474d51fac39249ccaa95f5b24
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-vsrx1.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-vsrx1.yaml
index 6c271cb..321ef8a 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-vsrx1.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-vsrx1.yaml
@@ -36,6 +36,9 @@
   cmps_flavor: 'system.compact.openstack.control.ephemeral'
   storage_frontend_network_cidr: '10.12.1.0/24'
   storage_backend_network_cidr: '10.12.0.0/24'
+  # Simulate changed default port for docker overlay vxlan
+  # https://mirantis.jira.com/browse/PRODX-11679
+  docker_ucp_swarm_data_port: 4791
   hardware_metadata: |
     '00:00:00:00:00:00':
       write_files:
diff --git a/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml b/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
index 7bf6781..7522b83 100644
--- a/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
+++ b/de/heat-templates/fragments/NetworkPrvFlVSRX.yaml
@@ -28,6 +28,8 @@
 
   network:
     type: OS::Neutron::Net
+    properties:
+      port_security_enabled: false
   subnet:
     type: OS::Neutron::Subnet
     properties:
diff --git a/de/heat-templates/fragments/SrvInstancesVM.yaml b/de/heat-templates/fragments/SrvInstancesVM.yaml
index 563f76f..902d516 100644
--- a/de/heat-templates/fragments/SrvInstancesVM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVM.yaml
@@ -48,6 +48,9 @@
   docker_ucp_image:
     type: string
     default: 'docker/ucp:3.2.4'
+  docker_ucp_swarm_data_port:
+    type: string
+    default: 4789
   docker_default_address_pool:
     type: string
   hardware_metadata:
@@ -81,7 +84,6 @@
             $docker_ee_url: { get_param: docker_ee_url }
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
-            $docker_ucp_image: { get_param: docker_ucp_image }
             $node_metadata: { get_param: metadata }
             $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
@@ -89,6 +91,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 }
+            $docker_ucp_swarm_data_port: { get_param: docker_ucp_swarm_data_port }
             $docker_default_address_pool: { get_param: docker_default_address_pool }
             $single_node: { get_param: single_node }
 
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index aa9a595..14d90fd 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -33,6 +33,7 @@
 DOCKER_EE_URL='$docker_ee_url'
 DOCKER_EE_RELEASE='$docker_ee_release'
 DOCKER_UCP_IMAGE='$docker_ucp_image'
+UCP_DOCKER_SWARM_DATA_PORT='$docker_ucp_swarm_data_port'
 FLOATING_NETWORK_PREFIXES=$private_floating_network_cidr
 IRONIC_MT_ENABLED=$ironic_mt_enabled
 IRONIC_BAREMETAL_NETWORK_PREFIX=$(sed 's/[0-9]*\/[0-9]*$//' <<< $IRONIC_BAREMETAL_NETWORK)
@@ -70,6 +71,8 @@
 PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-ens4}
 UCP_MASTER_HOST=${UCP_MASTER_HOST:-${CONTROL_IP_ADDRESS}}
 UCP_IP_ADDRESS=${UCP_IP_ADDRESS:-$CONTROL_IP_ADDRESS}
+# Change default VXLAN port, need for https://mirantis.jira.com/browse/PRODX-11679
+UCP_DOCKER_SWARM_DATA_PORT=${UCP_DOCKER_SWARM_DATA_PORT:-4789}
 NTP_SERVERS=${NTP_SERVERS:-"ldap.scc.mirantis.net ldap.bud.mirantis.net"}
 DEFAULT_INTERFACE=$(ip route show default | awk '{print $5}')
 IRONIC_BAREMETAL_VXLAN_INTERFACE='vxlan10'
@@ -292,7 +295,7 @@
 }
 
 function swarm_init {
-    docker swarm init --advertise-addr ${UCP_IP_ADDRESS}
+    docker swarm init --advertise-addr ${UCP_IP_ADDRESS} --data-path-port ${UCP_DOCKER_SWARM_DATA_PORT}
 }
 
 function rm_ucp_config {
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index 6295833..51e82aa 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -259,6 +259,9 @@
   docker_ucp_image:
     type: string
     default: 'docker/ucp:3.2.4'
+  docker_ucp_swarm_data_port:
+    type: string
+    default: 4789
   tunnel_interface:
     type: string
     default: ''
@@ -359,6 +362,7 @@
       docker_ee_url: { get_param: docker_ee_url }
       docker_ee_release: { get_param: docker_ee_release }
       docker_ucp_image: { get_param: docker_ucp_image}
+      docker_ucp_swarm_data_port: { get_param: docker_ucp_swarm_data_port }
       docker_default_address_pool: { get_param: docker_default_address_pool }
       node_type: "ucp"
       key_name: { get_attr: [keypair_name, value] }