Merge "[baremetal] cleanup: Parameterize VCP hostnames"
[fuel.git] / mcp / patches / pharos / 0002-extend-public-gateway-support.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Mirantis Inc., 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: Guillermo Herrero <guillermo.herrero@enea.com>
10 Date: Mon, 20 Nov 2017 11:33:29 +0100
11 Subject: [PATCH] extend public gateway support
12
13 JIRA: FUEL-305
14
15 Change-Id: Ic5a2d499925aeec5b597394a059640ddae83fb2d
16 Signed-off-by: Guillermo Herrero <guillermo.herrero@enea.com>
17 ---
18  config/installers/fuel/pod_config.yml.j2 | 10 ++++++++++
19  1 file changed, 10 insertions(+)
20
21 diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2
22 index abded17..cda5fc0 100644
23 --- a/config/installers/fuel/pod_config.yml.j2
24 +++ b/config/installers/fuel/pod_config.yml.j2
25 @@ -8,6 +8,9 @@
26      {%- if conf.net_config.public.dns is defined -%}
27          {%- set dns_public = conf['net_config']['public']['dns'] -%}
28      {%- endif -%}
29 +    {%- if conf.net_config.public.gateway is defined -%}
30 +        {%- set net_public_gw = conf['net_config']['public']['gateway'] -%}
31 +    {%- endif -%}
32      {%- set pxe_interface = conf['net_config']['admin']['interface'] -%}
33  {%- else -%}
34      {%- set net_admin = '192.168.11.0' -%}
35 @@ -22,6 +25,10 @@
36  {%- if dns_public is not defined -%}
37      {%- set dns_public = [ '8.8.8.8', '8.8.4.4' ] -%}
38  {%- endif -%}
39 +{%- if net_public_gw is not defined -%}
40 +    {%- set net_public_gw =  net_public | ipaddr_index('1')  -%}
41 +{%- endif -%}
42 +
43  ---
44  parameters:
45    _param:
46 @@ -53,6 +60,8 @@ parameters:
47      opnfv_openstack_proxy_address: {{ net_public | ipaddr_index('103') }}
48      opnfv_openstack_proxy_node01_address: {{ net_public | ipaddr_index('104') }}
49      opnfv_openstack_proxy_node02_address: {{ net_public | ipaddr_index('105') }}
50 +    opnfv_openstack_proxy_node01_control_address: {{ net_mgmt | ipaddr_index('104') }}
51 +    opnfv_openstack_proxy_node02_control_address: {{ net_mgmt | ipaddr_index('105') }}
52      opnfv_openstack_control_address: {{ net_mgmt | ipaddr_index('10') }}
53      opnfv_openstack_control_node01_address: {{ net_mgmt | ipaddr_index('11') }}
54      opnfv_openstack_control_node02_address: {{ net_mgmt | ipaddr_index('12') }}
55 @@ -83,6 +92,7 @@ parameters:
56
57      opnfv_opendaylight_server_node01_single_address: {{ net_mgmt | ipaddr_index('111') }}
58
59 +    opnfv_net_public_gw: {{ net_public_gw }}
60      opnfv_name_servers: {{ dns_public }}
61      opnfv_dns_server01: '{{ dns_public[0] }}'
62