aboutsummaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0004-network-public-Use-arm-virtual2-POD-config.patch
blob: 0097a57409560eeefafe5e4959172fa1aece7253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Tue, 18 Jul 2017 19:17:24 +0200
Subject: [PATCH] network: public: Use arm-virtual2 POD config

grep -e "10\.16\.0\." -R . -l | \
  xargs sed -i \
    -e 's/10\.16\.0\./10.0.9./g' \
    -e 's/10\.0\.9\.254/10.0.9.200/g' \
    -e 's/10\.0\.9\.1/10.0.9.254/g'

NOTE: This should be converted into a dynamic configuration read from
the universal POD descriptor in securedlab, once that is ready.

Until then, just align the public network configuration used by the
virtual POD with the Enea lab configuration specific to arm-virtual2
(i.e. public network on 10.0.9.0/24).

NOTE: Replace the gateway at 10.16.0.1 (now 10.0.9.1) with the same
IP address as our lab's gateway (10.0.9.254), to keep both possible
network layouts in sync (using all virtual networks created via
virsh, respectively our lab's static config).
This will ensure deploys continue to work in both enviroments.

Also, since our new gateway resides at 10.0.9.254, trim the DHCP pool
range for the public network to not include that address.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 mcp/config/states/networks                                          | 6 +++---
 .../classes/cluster/virtual-mcp-ocata-common/openstack_init.yml     | 2 +-
 .../classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml   | 6 +++---
 .../classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml     | 6 +++---
 mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml  | 6 +++---
 mcp/scripts/net_public.xml                                          | 2 +-
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/mcp/config/states/networks b/mcp/config/states/networks
index 505153a..bd6e923 100755
--- a/mcp/config/states/networks
+++ b/mcp/config/states/networks
@@ -10,7 +10,7 @@ PUBLIC_NET=$(salt --out yaml 'cmp*' pillar.get _param:external_address | \
   pillar.get _param:openstack_compute_node01_external_address | \
   awk --re-interval '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/{print $2; exit}')

-[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.16.0.0/24"
+[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.0.9.0/24"

 salt 'ctl01*' cmd.run ". /root/keystonercv3; \
   openstack compute service list; \
@@ -21,6 +21,6 @@ salt 'ctl01*' cmd.run ". /root/keystonercv3; \
   openstack network create --external --default --provider-network-type flat \
     --provider-physical-network physnet1 floating_net"
 salt 'ctl01*' cmd.run ". /root/keystonercv3; \
-  openstack subnet create --gateway ${PUBLIC_NET%.*}.1 --no-dhcp \
-    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.254 \
+  openstack subnet create --gateway ${PUBLIC_NET%.*}.254 --no-dhcp \
+    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.200 \
     --network floating_net --subnet-range ${PUBLIC_NET} floating_subnet"
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml
index a14a711..055d98c 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml
@@ -6,7 +6,7 @@ parameters:
     openstack_region: RegionOne
     admin_email: root@localhost
     cluster_public_protocol: http
-    cluster_public_host: 10.16.0.101
+    cluster_public_host: 10.0.9.101
     neutron_public_protocol: http
     neutron_control_dvr: False
     neutron_l3_ha: False
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml
index 2f8e94a..bc95642 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/infra/config.yml
@@ -51,16 +51,16 @@ parameters:
           params:
             single_address: 172.16.10.105
             tenant_address: 10.1.0.105
-            external_address: 10.16.0.105
+            external_address: 10.0.9.105
         openstack_compute_node02:
           params:
             single_address: 172.16.10.106
             tenant_address: 10.1.0.106
-            external_address: 10.16.0.106
+            external_address: 10.0.9.106
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: 10.0.9.110
         opendaylight_control_node01:
           classes:
           - cluster.${_param:cluster_name}.opendaylight.control
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml
index aec6cde..b69258f 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs-dpdk/infra/config.yml
@@ -50,17 +50,17 @@ parameters:
           params:
             single_address: 172.16.10.105
             tenant_address: 10.1.0.105
-            external_address: 10.16.0.105
+            external_address: 10.0.9.105
             dpdk0_name: enp3s0
             dpdk0_pci: '"0000:00:05.0"'
         openstack_compute_node02:
           params:
             single_address: 172.16.10.106
             tenant_address: 10.1.0.106
-            external_address: 10.16.0.106
+            external_address: 10.0.9.106
             dpdk0_name: enp3s0
             dpdk0_pci: '"0000:00:05.0"'
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: 10.0.9.110
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml
index 8cb0992..c8f8477 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-ovs/infra/config.yml
@@ -50,13 +50,13 @@ parameters:
           params:
             single_address: 172.16.10.105
             tenant_address: 10.1.0.105
-            external_address: 10.16.0.105
+            external_address: 10.0.9.105
         openstack_compute_node02:
           params:
             single_address: 172.16.10.106
             tenant_address: 10.1.0.106
-            external_address: 10.16.0.106
+            external_address: 10.0.9.106
         openstack_gateway_node01:
           params:
             tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
+            external_address: 10.0.9.110
diff --git a/mcp/scripts/net_public.xml b/mcp/scripts/net_public.xml
index 61650d5..f455480 100644
--- a/mcp/scripts/net_public.xml
+++ b/mcp/scripts/net_public.xml
@@ -2,5 +2,5 @@
   <name>public</name>
   <bridge name="public"/>
   <forward mode="nat"/>
-  <ip address="10.16.0.1" netmask="255.255.255.0" />
+  <ip address="10.0.9.254" netmask="255.255.255.0" />
 </network>