support gen DHA/NETWORK yaml by pdf 07/50207/8
author00184532 <lu.yao135@zte.com.cn>
Mon, 8 Jan 2018 09:04:08 +0000 (17:04 +0800)
committerYao Lu <lu.yao135@zte.com.cn>
Wed, 10 Jan 2018 06:13:24 +0000 (06:13 +0000)
Change-Id: I8e0d88da016801e7997b4cdf870e2d11b4fca80a
Signed-off-by: 00184532 <lu.yao135@zte.com.cn>
config/installers/daisy/network-dpdk.yaml.j2 [deleted file]
config/installers/daisy/pod_config.yaml.j2
labs/zte/idf-pod9.yaml [new file with mode: 0644]
labs/zte/pod9.yaml [new file with mode: 0644]

diff --git a/config/installers/daisy/network-dpdk.yaml.j2 b/config/installers/daisy/network-dpdk.yaml.j2
deleted file mode 100644 (file)
index ccd7c8c..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 ZTE Corporation 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
-##############################################################################
-
-##############################################################################
-# Description
-# MANAGEMENT: used for management
-# STORAGE: used for storage access
-# EXTERNAL: tenant public/floating IP associated network
-# PUBLICAPI: used for horizon access, openstack API access
-# TENANT: used for tenant access, vlan and VxLan supported, default VxLan
-# HEARTBEAT: used for heartbeat, requires a dedicated interface
-##############################################################################
-
----
-
-network-config-metadata:
-  title: 'Deployment Adapter for baremetal POD'
-  version: '0.1'
-  created: 'Nov 22 2017'
-  comment: 'For Daisy initial'
-
-{%- set mapping = {'HEARTBEAT': 'admin',
-                   'MANAGEMENT': 'mgmt',
-                   'PUBLICAPI': 'mgmt',
-                   'STORAGE': 'storage',
-                   'TENANT': 'public',
-                   'EXTERNAL': 'public'} -%}
-
-{%- if "idf" in conf and ("daisy" in conf["idf"] or "fuel" in conf["idf"]) -%}
-  {%- if "daisy" in conf["idf"] -%}
-    {%- set installer = "daisy" -%}
-  {%- else -%}
-    {%- set installer = "fuel" -%}
-  {%- endif %}
-
-networks:
-
-  {%- set nodes_num = conf['nodes'] | length -%}
-  {%- set networks = {} -%}
-  {%- for key in mapping -%}
-    {%- set net_data = conf['net_config'][mapping[key]] -%}
-    {%- set interface = net_data['interface'] -%}
-    {%- set interface_name = conf.idf[installer].network.node[0].interfaces[interface] -%}
-    {%- set bus_addr = conf.idf[installer].network.node[0].busaddr[interface] -%}
-    {%- set vlan = net_data['vlan'] -%}
-    {%- if vlan == "native" or vlan == None -%}
-      {%- set vlan = "null" -%}
-    {%- endif -%}
-    {%- set network = net_data['network'] -%}
-    {%- set ips = network.split(".") -%}
-    {%- set mask = net_data['mask'] -%}
-    {%- if 'ip-range' in net_data -%}
-      {%- set ip_range = net_data['ip-range'] -%}
-      {%- set (start, end) = ip_range.split("-") -%}
-    {%- else -%}
-      {%- set start = ".".join([ips[0], ips[1], ips[2], "10"]) -%}
-      {%- set end = ".".join([ips[0], ips[1], ips[2], "200"]) -%}
-    {%- endif -%}
-    {%- set vip = start.split(".")[3] | int -%}
-    {%- set vip = vip + nodes_num + 10 - (vip + nodes_num) % 10 -%}
-    {%- set vip = ".".join([ips[0], ips[1], ips[2], vip | string]) -%}
-
-    {%- if 'gateway' in net_data -%}
-      {%- set gateway = net_data.gateway -%}
-    {%- else -%}
-      {%- set gateway = ".".join([ips[0], ips[1], ips[2], "1"]) -%}
-    {%- endif -%}
-
-    {%- set networks = networks.update({key: {'interface_name': interface_name,
-                                              'bus_addr': bus_addr,
-                                              'vlan': vlan,
-                                              'network': network,
-                                              'mask': mask,
-                                              'start': start,
-                                              'end': end,
-                                              'vip': vip,
-                                              'gateway': gateway
-                                             }
-                                       }) %}
-
-  - cidr: '{{ network }}/{{ mask }}'
-    gateway: '{{ gateway }}'
-    ip_ranges:
-      - 'start': '{{ start }}'
-        'end': '{{ end }}'
-    vlan_id: {{ vlan }}
-    name: '{{ key }}'
-    {%- if key == 'EXTERNAL' %}
-    network_name: 'admin_external'
-    mapping: 'physnet1'
-    {%- endif -%}
-  {%- endfor %}
-
-interfaces:
-  {%- for key in mapping %}
-  - name: '{{ key }}'
-    interface: '{{ networks[key].interface_name }}'
-  {%- endfor %}
-
-internal_vip: '{{ networks['MANAGEMENT'].vip }}'
-public_vip: '{{ networks['PUBLICAPI'].vip }}'
-
-{%- endif %}
index 776d2ec..3e4ab10 100644 (file)
@@ -11,6 +11,8 @@
 
 adapter: {{ conf['jumphost']['remote_params']['type'] }}
 hosts:
+  {%- set nodes_num = conf['nodes'] | length -%}
+  {%- if nodes_num == 5 %}
   - name: 'controller01'
     roles:
       - 'CONTROLLER_LB'
@@ -51,6 +53,33 @@ hosts:
     ipmi_pass: {{ conf['nodes'][4]['remote_management']['pass'] }}
     mac_addresses:{% for nic in conf['nodes'][4]['interfaces'] %}
       - {{ nic['mac_address'] }}{% endfor %}
+  {%- endif %}
+  {%- if nodes_num == 3 %}
+  - name: 'controller01'
+    roles:
+      - 'CONTROLLER_LB'
+    ipmi_ip: {{ conf['nodes'][0]['remote_management']['address'] }}
+    ipmi_user: {{ conf['nodes'][0]['remote_management']['user'] }}
+    ipmi_pass: {{ conf['nodes'][0]['remote_management']['pass'] }}
+    mac_addresses:{% for nic in conf['nodes'][0]['interfaces'] %}
+      - {{ nic['mac_address'] }}{% endfor %}
+  - name: 'computer01'
+    roles:
+      - 'COMPUTER'
+    ipmi_ip: {{ conf['nodes'][1]['remote_management']['address'] }}
+    ipmi_user: {{ conf['nodes'][1]['remote_management']['user'] }}
+    ipmi_pass: {{ conf['nodes'][1]['remote_management']['pass'] }}
+    mac_addresses:{% for nic in conf['nodes'][1]['interfaces'] %}
+      - {{ nic['mac_address'] }}{% endfor %}
+  - name: 'computer02'
+    roles:
+      - 'COMPUTER'
+    ipmi_ip: {{ conf['nodes'][2]['remote_management']['address'] }}
+    ipmi_user: {{ conf['nodes'][2]['remote_management']['user'] }}
+    ipmi_pass: {{ conf['nodes'][2]['remote_management']['pass'] }}
+    mac_addresses:{% for nic in conf['nodes'][2]['interfaces'] %}
+      - {{ nic['mac_address'] }}{% endfor %}
+  {%- endif %}
 disks:
   daisy: 50
 daisy_passwd: 'r00tme'
diff --git a/labs/zte/idf-pod9.yaml b/labs/zte/idf-pod9.yaml
new file mode 100644 (file)
index 0000000..61a225d
--- /dev/null
@@ -0,0 +1,69 @@
+##############################################################################
+# Copyright (c) 2018 ZTE, Mirantis Inc., 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
+##############################################################################
+---
+### ZTE POD 9 installer descriptor file ###
+
+idf:
+  version: 0.1
+  net_config:
+    # NOTE: Network names are likely to change after the PDF spec is updated
+    oob:
+      interface: 0
+      ip-range: 192.168.176.166-192.168.176.168
+      vlan: null
+    admin:
+      interface: 0
+      vlan: null
+      network: 10.20.7.0
+      mask: 24
+    mgmt:
+      interface: 0
+      vlan: null
+      network: 10.20.7.0
+      mask: 24
+    storage:
+      interface: 0
+      vlan: null
+      network: 10.20.7.0
+      mask: 24
+    private:
+      interface: 1
+      vlan: null
+      network: 172.70.0.0
+      mask: 24
+    public:
+      interface: 1
+      vlan: null
+      network: 172.71.0.0
+      mask: 24
+      gateway: 172.71.0.1
+      dns:
+        - 172.71.0.1
+  daisy:
+    jumphost:
+      bridges:
+        admin: 'br0'
+    network:
+      node:
+        # Ordered-list, index should be in sync with node index in PDF
+        - interfaces: &interfaces
+            # Ordered-list, index should be in sync with interface index in PDF
+            - 'ens4f0'
+            - 'ens44f0'
+          busaddr: &busaddr
+            # Bus-info reported by `ethtool -i ethX`
+            - '0000:01:00.0'
+            - '0000:81:00.0'
+        - interfaces: *interfaces
+          busaddr: *busaddr
+        - interfaces: *interfaces
+          busaddr: *busaddr
+        - interfaces: *interfaces
+          busaddr: *busaddr
+        - interfaces: *interfaces
+          busaddr: *busaddr
diff --git a/labs/zte/pod9.yaml b/labs/zte/pod9.yaml
new file mode 100644 (file)
index 0000000..7ffd20a
--- /dev/null
@@ -0,0 +1,136 @@
+##############################################################################
+# Copyright (c) 2018 ZTE, Mirantis Inc., 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
+##############################################################################
+---
+### ZTE POD 9 descriptor file ###
+
+details:
+  pod_owner: Zhiijang Hu
+  contact: huzhijiang@zte.com.cn
+  lab: ZTE Pharos Lab
+  location: Nanjing, China
+  type: production
+  link: https://wiki.opnfv.org/display/pharos/ZTE+SH+Testlab
+##############################################################################
+jumphost:
+  name: pod9-jump
+  node:
+    type: baremetal
+    vendor: ZTE
+    model: R5300
+    arch: x86_64
+    cpus: 2
+    cpu_cflags: haswell
+    cores: 12
+    memory: 35G
+  disks:
+    - name: 'disk1'
+      disk_capacity: 107G
+      disk_type: hdd
+      disk_interface: sas
+      disk_rotation: 10500
+  os: CentOS-7
+  remote_params: &remote_params
+    type: ipmi
+    versions:
+      - 2.0
+    user: >
+      ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEw
+      DQYJKoZIhvcNAQEBBQAEggEAIX8TfBkmSFZEE/44AXRKK8ATlkqmfMBcDHM5
+      IrDbb8KXzyuKXK82u4KPaCxS1dmQehyba6WHih9euMrDFVTobZ/EIW4cKEvx
+      oS7DoFRDh3j9+lAE35ggHPWQnkGhgERUuMUtyia4xk+EURG/wO0iQhxrNoUg
+      fKe1jbuKq4Tr1ldunYJqmxtZn/SwVWiJfoGRIdFGJ0iO6ApVnqDIC+5IeBVv
+      gm9BLT39o7M37rY/5AQt0SoTRtnQo2kKhjUsp+46LL3/tQBlzZBLCsGwskru
+      qcZmWlg9SsLePSkqrLBiNeL1EJVu7VRdikKWu43qRLZSMhEQsu6rqkeCviYu
+      QOkh+TA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCRBGGIXFDcQnOO1MjU
+      36+DgBB7IJHcJciyO0PTGqIs58OH]
+    pass: >
+      ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEw
+      DQYJKoZIhvcNAQEBBQAEggEAOnq6dIeck0YPh1OiXSU+gsUKG5cmIlqCB7ks
+      Jj0F524a8mojWB3GGSi0tdy+ZcBotTgMFm5yV4JaSmUi7f+w+3T5y7e7meKB
+      MmnuGq8AOKOfSxnI8+sUOcY8zLgNaztZk0dv/PzLydoSc5k+1uqHkakcPBHy
+      dJW9rWLSKcbFUHSOWI+tcKxx5UYY26BdqNy77YRu5ZnbW1z+xHmpcXuU4XHY
+      +Dt1qb1EkkOQ9p0wuBRNsn+xCLFNHv5tKod3nsQk0fkPsMSRGY57rSkPs8HI
+      bmkmoII5biA02bTjtb3jATPoH5mMa7hU8aaZM1qkXCejP2QIDikAgyWeiMp8
+      /kt2bjA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBDehpNTtsY3HlqAGCLe
+      WSgUgBDYj5D5l/12XoUNXxGDebYT]
+  remote_management:
+    <<: *remote_params
+    address:
+    mac_address:
+  interfaces:
+    - mac_address: "00:1b:21:89:30:87"
+      speed: 10gb
+  fixed_ips:
+    admin: 10.20.7.1
+    public: 192.168.21.195
+nodes:
+  - name: pod9-node1
+    node: &nodeparas
+      type: baremetal
+      vendor: ZTE
+      model: E9000
+      arch: x86_64
+      cpus: 2
+      cpu_cflags: hasewell
+      cores: 14
+      memory: 128G
+    disks:
+      - name: 'disk1'
+        disk_capacity: 1198G
+        disk_type: hdd
+        disk_interface: sas
+        disk_rotation: 10000
+    remote_management:
+      <<: *remote_params
+      address: 192.168.176.166
+      mac_address: "74:4a:a4:03:bf:93"
+    interfaces:
+      - mac_address: "74:4a:a4:03:bf:96"
+        speed: 1gb
+        features: null
+      - mac_address: "74:4a:a4:05:ee:86"
+        speed: 10gb
+        features: dpdk|sriov
+  - name: pod9-node2
+    node: *nodeparas
+    disks: &disks
+      - name: 'disk1'
+        disk_capacity: 600G
+        disk_type: hdd
+        disk_interface: sas
+        disk_rotation: 10000
+      - name: 'disk2'
+        disk_capacity: 600G
+        disk_type: hdd
+        disk_interface: sas
+        disk_rotation: 10000
+    remote_management:
+      <<: *remote_params
+      address: 192.168.176.167
+      mac_address: "74:4a:a4:03:bf:c3"
+    interfaces:
+      - mac_address: "74:4a:a4:03:bf:c6"
+        speed: 1gb
+        features: null
+      - mac_address: "74:4a:a4:05:ee:9a"
+        speed: 10gb
+        features: dpdk|sriov
+  - name: pod9-node3
+    node: *nodeparas
+    disks: *disks
+    remote_management:
+      <<: *remote_params
+      address: 192.168.176.168
+      mac_address: "74:4a:a4:03:bf:fb"
+    interfaces:
+      - mac_address: "74:4a:a4:03:bf:fe"
+        speed: 1gb
+        features: null
+      - mac_address: "74:4a:a4:05:ee:7e"
+        speed: 10gb
+        features: dpdk|sriov