66e4b7d8ae7f39615b875646752a498fa9963f86
[armband.git] / patches / opnfv-fuel / 0003-network-public-Use-arm-virtual2-POD-config.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Tue, 18 Jul 2017 19:17:24 +0200
11 Subject: [PATCH] network: public: Use arm-virtual2 POD config
12
13 grep -e "10\.16\.0\." -R . -l | \
14   xargs sed -i \
15     -e 's/10\.16\.0\./10.0.9./g' \
16     -e 's/10\.0\.9\.254/10.0.9.200/g' \
17     -e 's/10\.0\.9\.1/10.0.9.254/g'
18
19 NOTE: This should be converted into a dynamic configuration read from
20 the universal POD descriptor in securedlab, once that is ready.
21
22 Until then, just align the public network configuration used by the
23 virtual POD with the Enea lab configuration specific to arm-virtual2
24 (i.e. public network on 10.0.9.0/24).
25
26 NOTE: Replace the gateway at 10.16.0.1 (now 10.0.9.1) with the same
27 IP address as our lab's gateway (10.0.9.254), to keep both possible
28 network layouts in sync (using all virtual networks created via
29 virsh, respectively our lab's static config).
30 This will ensure deploys continue to work in both enviroments.
31
32 Also, since our new gateway resides at 10.0.9.254, trim the DHCP pool
33 range for the public network to not include that address.
34
35 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
36 ---
37  mcp/config/states/networks                                          | 6 +++---
38  .../classes/cluster/virtual-mcp-pike-common-noha/infra/config.yml   | 4 ++--
39  .../classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml | 2 +-
40  .../classes/cluster/virtual-mcp-pike-odl-noha/infra/config.yml      | 2 +-
41  .../classes/cluster/virtual-mcp-pike-ovs-dpdk-noha/infra/config.yml | 2 +-
42  .../classes/cluster/virtual-mcp-pike-ovs-noha/infra/config.yml      | 2 +-
43  mcp/scripts/net_public.xml                                          | 2 +-
44  7 files changed, 10 insertions(+), 10 deletions(-)
45
46 diff --git a/mcp/config/states/networks b/mcp/config/states/networks
47 index 5beabdb..ca59ee3 100755
48 --- a/mcp/config/states/networks
49 +++ b/mcp/config/states/networks
50 @@ -18,7 +18,7 @@ PUBLIC_NET=$(salt --out yaml -C 'I@nova:compute and *01*' pillar.get _param:exte
51    pillar.get _param:openstack_compute_node01_external_address | \
52    awk --re-interval '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/{print $2; exit}')
53
54 -[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.16.0.0/24"
55 +[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.0.9.0/24"
56
57  salt -C 'I@nova:controller and *01*' cmd.run ". /root/keystonercv3; \
58    openstack compute service list; \
59 @@ -29,6 +29,6 @@ salt -C 'I@nova:controller and *01*' cmd.run ". /root/keystonercv3; \
60    openstack network create --external --default --provider-network-type flat \
61      --provider-physical-network physnet1 floating_net"
62  salt -C 'I@nova:controller and *01*' cmd.run ". /root/keystonercv3; \
63 -  openstack subnet create --gateway ${PUBLIC_NET%.*}.1 --no-dhcp \
64 -    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.254 \
65 +  openstack subnet create --gateway ${PUBLIC_NET%.*}.254 --no-dhcp \
66 +    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.200 \
67      --network floating_net --subnet-range ${PUBLIC_NET} floating_subnet"
68 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra/config.yml
69 index 7e3a494..3a240b0 100644
70 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra/config.yml
71 +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra/config.yml
72 @@ -61,9 +61,9 @@ parameters:
73            params:
74              single_address: 172.16.10.105
75              tenant_address: 10.1.0.105
76 -            external_address: 10.16.0.105
77 +            external_address: 10.0.9.105
78          openstack_compute_node02:
79            params:
80              single_address: 172.16.10.106
81              tenant_address: 10.1.0.106
82 -            external_address: 10.16.0.106
83 +            external_address: 10.0.9.106
84 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml
85 index 89b06fb..0086470 100644
86 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml
87 +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml
88 @@ -14,7 +14,7 @@ parameters:
89      openstack_region: RegionOne
90      admin_email: root@localhost
91      cluster_public_protocol: http
92 -    cluster_public_host: 10.16.0.101
93 +    cluster_public_host: 10.0.9.101
94      neutron_public_protocol: http
95      neutron_control_dvr: 'False'
96      neutron_l3_ha: 'False'
97 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-odl-noha/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-odl-noha/infra/config.yml
98 index 8e38ff8..d7bf017 100644
99 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-odl-noha/infra/config.yml
100 +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-odl-noha/infra/config.yml
101 @@ -24,4 +24,4 @@ parameters:
102          openstack_gateway_node01:
103            params:
104              tenant_address: 10.1.0.110
105 -            external_address: 10.16.0.110
106 +            external_address: 10.0.9.110
107 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-dpdk-noha/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-dpdk-noha/infra/config.yml
108 index e80c442..1df99b4 100644
109 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-dpdk-noha/infra/config.yml
110 +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-dpdk-noha/infra/config.yml
111 @@ -25,4 +25,4 @@ parameters:
112          openstack_gateway_node01:
113            params:
114              tenant_address: 10.1.0.110
115 -            external_address: 10.16.0.110
116 +            external_address: 10.0.9.110
117 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-noha/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-noha/infra/config.yml
118 index 66c2468..7326295 100644
119 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-noha/infra/config.yml
120 +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-ovs-noha/infra/config.yml
121 @@ -17,4 +17,4 @@ parameters:
122          openstack_gateway_node01:
123            params:
124              tenant_address: 10.1.0.110
125 -            external_address: 10.16.0.110
126 +            external_address: 10.0.9.110
127 diff --git a/mcp/scripts/net_public.xml b/mcp/scripts/net_public.xml
128 index d6df4aa..87f3146 100644
129 --- a/mcp/scripts/net_public.xml
130 +++ b/mcp/scripts/net_public.xml
131 @@ -10,5 +10,5 @@
132    <name>public</name>
133    <bridge name="public"/>
134    <forward mode="nat"/>
135 -  <ip address="10.16.0.1" netmask="255.255.255.0" />
136 +  <ip address="10.0.9.254" netmask="255.255.255.0" />
137  </network>