u/fuel: Bump & rebase for yamllint cleanup
[armband.git] / patches / opnfv-fuel / 0002-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-ocata-common/infra/config.yml       | 6 +++---
39  .../classes/cluster/virtual-mcp-ocata-common/openstack_init.yml     | 2 +-
40  mcp/scripts/net_public.xml                                          | 2 +-
41  4 files changed, 8 insertions(+), 8 deletions(-)
42
43 diff --git a/mcp/config/states/networks b/mcp/config/states/networks
44 index 505153a..bd6e923 100755
45 --- a/mcp/config/states/networks
46 +++ b/mcp/config/states/networks
47 @@ -10,7 +10,7 @@ PUBLIC_NET=$(salt --out yaml 'cmp*' pillar.get _param:external_address | \
48    pillar.get _param:openstack_compute_node01_external_address | \
49    awk --re-interval '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/{print $2; exit}')
50
51 -[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.16.0.0/24"
52 +[ -n "${PUBLIC_NET}" ] && PUBLIC_NET="${PUBLIC_NET%.*}.0/24" || PUBLIC_NET="10.0.9.0/24"
53
54  salt 'ctl01*' cmd.run ". /root/keystonercv3; \
55    openstack compute service list; \
56 @@ -21,6 +21,6 @@ salt 'ctl01*' cmd.run ". /root/keystonercv3; \
57    openstack network create --external --default --provider-network-type flat \
58      --provider-physical-network physnet1 floating_net"
59  salt 'ctl01*' cmd.run ". /root/keystonercv3; \
60 -  openstack subnet create --gateway ${PUBLIC_NET%.*}.1 --no-dhcp \
61 -    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.254 \
62 +  openstack subnet create --gateway ${PUBLIC_NET%.*}.254 --no-dhcp \
63 +    --allocation-pool start=${PUBLIC_NET%.*}.130,end=${PUBLIC_NET%.*}.200 \
64      --network floating_net --subnet-range ${PUBLIC_NET} floating_subnet"
65 diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
66 index 07fada6..fe0714d 100644
67 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
68 +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
69 @@ -54,13 +54,13 @@ parameters:
70            params:
71              single_address: 172.16.10.105
72              tenant_address: 10.1.0.105
73 -            external_address: 10.16.0.105
74 +            external_address: 10.0.9.105
75          openstack_compute_node02:
76            params:
77              single_address: 172.16.10.106
78              tenant_address: 10.1.0.106
79 -            external_address: 10.16.0.106
80 +            external_address: 10.0.9.106
81          openstack_gateway_node01:
82            params:
83              tenant_address: 10.1.0.110
84 -            external_address: 10.16.0.110
85 +            external_address: 10.0.9.110
86 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
87 index 8ac2391..bdedfcb 100644
88 --- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml
89 +++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_init.yml
90 @@ -7,7 +7,7 @@ parameters:
91      openstack_region: RegionOne
92      admin_email: root@localhost
93      cluster_public_protocol: http
94 -    cluster_public_host: 10.16.0.101
95 +    cluster_public_host: 10.0.9.101
96      neutron_public_protocol: http
97      neutron_control_dvr: 'False'
98      neutron_l3_ha: 'False'
99 diff --git a/mcp/scripts/net_public.xml b/mcp/scripts/net_public.xml
100 index 61650d5..f455480 100644
101 --- a/mcp/scripts/net_public.xml
102 +++ b/mcp/scripts/net_public.xml
103 @@ -2,5 +2,5 @@
104    <name>public</name>
105    <bridge name="public"/>
106    <forward mode="nat"/>
107 -  <ip address="10.16.0.1" netmask="255.255.255.0" />
108 +  <ip address="10.0.9.254" netmask="255.255.255.0" />
109  </network>