HPGen10 Redfish Integration 89/289/7
authorNaga Sugguna <ns156u@att.com>
Wed, 3 Oct 2018 14:22:50 +0000 (10:22 -0400)
committerNaga Sugguna <ns156u@att.com>
Mon, 8 Oct 2018 16:39:58 +0000 (12:39 -0400)
Change-Id: I2f78e2cef4543c9eccc3e6ce327d7d6679982045

14 files changed:
dellgen10.yaml
hpgen10.yaml
scripts/update_bios_settings.py
site/common/profiles/genesis.yaml
site/dellgen10/profiles/genesis.yaml
site/hpgen10/networks/common-addresses.yaml
site/hpgen10/profiles/genesis.yaml
site/hpgen10/profiles/host/cp-r01.yaml
site/hpgen10/site-definition.yaml
site/hpgen10/software/charts/ucp/ceph/ceph-update.yaml [deleted file]
site/hpgen10/software/charts/ucp/ceph/ceph.yaml [deleted file]
tools/aknode30rc [new file with mode: 0644]
tools/aknode40rc [new file with mode: 0644]
tools/j2/serverrc.j2

index 5e74284..0bdf528 100644 (file)
@@ -222,8 +222,11 @@ genesis:
   pxe: 172.30.2.40
   ksn: 172.29.1.40
   neutron: 10.0.102.40
-  root_password: smil3yfc 
+  root_password: akraino,d
   oem: Dell
+  bios_template: dell_r740_g14_uefi_base.xml.template
+  boot_template: dell_r740_g14_uefi_httpboot.xml.template
+  http_boot_device: NIC.Slot.2-1-1
 masters:
   - name : aknode41
     oob: 192.168.41.41
index 4a784b9..bde76bf 100644 (file)
@@ -42,6 +42,8 @@ networks:
     vlan: 41
     interface: bond0.41
     cidr: 192.168.2.0/24
+    subnet: 192.168.2.0
+    netmask: 255.255.255.0
     routes:
        gateway: 192.168.2.200
     ranges:
@@ -218,6 +220,12 @@ genesis:
   pxe: 172.30.1.30
   ksn: 172.29.1.30
   neutron: 10.0.101.30
+  root_password: akraino,d
+  oem: HPE
+  mac_address: 3c:fd:fe:aa:90:b0
+  bios_template: hpe_dl380_g10_uefi_base.json.template
+  boot_template: hpe_dl380_g10_uefi_httpboot.json.template
+  http_boot_device: NIC.Slot.3-1-1
 masters:
   - name : aknode31
     oob: 192.168.41.131
@@ -226,6 +234,8 @@ masters:
     pxe: 172.30.1.31
     ksn: 172.29.1.31
     neutron: 10.0.101.31
+    oob_user: Administrator
+    oob_password: Admin123
   - name : aknode32
     oob: 192.168.41.132
     host: 192.168.2.32
@@ -233,6 +243,8 @@ masters:
     pxe: 172.30.1.32
     ksn: 172.29.1.32
     neutron: 10.0.101.32
+    oob_user: Administrator
+    oob_password: Admin123
 workers:
   - name : aknode33
     oob: 192.168.41.133
@@ -241,6 +253,8 @@ workers:
     pxe: 172.30.1.33
     ksn: 172.29.1.33
     neutron: 10.0.101.33
+    oob_user: Administrator
+    oob_password: Admin123
 #  - name : aknode34
 #    oob: 192.168.41.134
 #    host: 192.168.2.34
index cd1736b..146717e 100644 (file)
@@ -42,7 +42,7 @@ def create_rc_masters(source, target_suffix):
   env = jinja2.Environment()
   env.trim_blocks = True
   env.lstrip_blocks = True
-  
+
   for master in yaml['masters']:
     with open(source) as fd:
       template = env.from_string(fd.read())
@@ -60,10 +60,34 @@ def create_rc_masters(source, target_suffix):
     print 'command: {0}'.format(command)
     os.system(command)
 
+def create_rc_workers(source, target_suffix):
+  env = jinja2.Environment()
+  env.trim_blocks = True
+  env.lstrip_blocks = True
+
+  if 'workers' in yaml:
+    for master in yaml['workers']:
+      with open(source) as fd:
+        template = env.from_string(fd.read())
+      data = template.render(yaml=master)
+      target_file = "server-config/"+master['name']+target_suffix
+      print target_file
+      if not os.path.exists(os.path.dirname(target_file)):
+       os.makedirs(os.path.dirname(target_file))
+      fd2 = open(target_file,'w')
+      fd2.write(data)
+      fd2.write("\n")
+      fd2.close()
+      print '{0} -> {1}'.format(source, target_file)
+      command = '/opt/akraino/tools/apply_dellxml.sh --rc {0} --template dell_r740_g14_uefi_base.xml.template --no-confirm'.format(target_file)
+      print 'command: {0}'.format(command)
+      os.system(command)
+
 if len(sys.argv) != 2:
   print 'usage: update_bios_settings.py <yaml>'
   sys.exit(1)
 
 #create_rc_genesis("tools/j2/serverrc.j2", "rc")
 create_rc_masters("tools/j2/serverrc_raid.j2", "rc.raid")
+create_rc_workers("tools/j2/serverrc_raid.j2", "rc.raid")
 
index 62b4d5a..408374e 100644 (file)
@@ -54,4 +54,5 @@ data:
       - openvswitch=enabled
       - openstack-control-plane=enabled
       - openstack-nova-compute=enabled
+      - sriov=enabled
 ...
index 62b4d5a..408374e 100644 (file)
@@ -54,4 +54,5 @@ data:
       - openvswitch=enabled
       - openstack-control-plane=enabled
       - openstack-nova-compute=enabled
+      - sriov=enabled
 ...
index d8df072..0d6ca3d 100644 (file)
@@ -62,6 +62,11 @@ data:
     - hostname: aknode31
     - hostname: aknode32
 
+  proxy:
+    http: ""
+    https: ""
+    no_proxy: []
+
   node_ports:
     drydock_api: 30000
     maas_api: 30001
index 62b4d5a..408374e 100644 (file)
@@ -54,4 +54,5 @@ data:
       - openvswitch=enabled
       - openstack-control-plane=enabled
       - openstack-nova-compute=enabled
+      - sriov=enabled
 ...
index 7caff3c..605aa3b 100644 (file)
@@ -135,7 +135,6 @@ data:
       openstack-libvirt: kernel
       openvswitch: enabled
       openstack-nova-compute: enabled
-      sriov: enabled
       ucp-barbican: enabled
       ceph-bootstrap: enabled
       ceph-mon: enabled
index 1af14ca..df500a2 100644 (file)
@@ -25,5 +25,5 @@ metadata:
   storagePolicy: cleartext
 data:
   revision: v4.0
-  site_type: edge
+  site_type: foundry
 ...
diff --git a/site/hpgen10/software/charts/ucp/ceph/ceph-update.yaml b/site/hpgen10/software/charts/ucp/ceph/ceph-update.yaml
deleted file mode 100644 (file)
index 7b46698..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
----
-##############################################################################
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
-#                                                                            #
-# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
-# not use this file except in compliance with the License.                   #
-#                                                                            #
-# You may obtain a copy of the License at                                    #
-#       http://www.apache.org/licenses/LICENSE-2.0                           #
-#                                                                            #
-# Unless required by applicable law or agreed to in writing, software        #
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
-# See the License for the specific language governing permissions and        #
-# limitations under the License.                                             #
-##############################################################################
-
-schema: armada/Chart/v1
-metadata:
-  schema: metadata/Document/v1
-  name: ucp-ceph-update
-  layeringDefinition:
-    abstract: false
-    layer: site
-    parentSelector:
-      name: ucp-ceph-global
-    actions:
-      - method: replace
-        path: .values.conf.storage.osd
-      - method: merge
-        path: .
-  storagePolicy: cleartext
-data:
-  values:
-    conf:
-      storage:
-        osd:
-          - data:
-              type: block-logical
-              location: /dev/sdb
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdb
-          - data:
-              type: block-logical
-              location: /dev/sdc
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdc
-          - data:
-              type: block-logical
-              location: /dev/sdd
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdd
-          - data:
-              type: block-logical
-              location: /dev/sde
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sde
-          - data:
-              type: block-logical
-              location: /dev/sdf
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdf
-          - data:
-              type: block-logical
-              location: /dev/sdg
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdg
-          - data:
-              type: block-logical
-              location: /dev/sdh
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdh
-          - data:
-              type: block-logical
-              location: /dev/sdi
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdi
-      pool:
-        target:
-          osd: 24
-        default:
-          crush_rule: replicated_rule
-...
----
-schema: armada/ChartGroup/v1
-metadata:
-  schema: metadata/Document/v1
-  name: ucp-ceph-update
-  layeringDefinition:
-    abstract: false
-    layer: site
-  storagePolicy: cleartext
-data:
-  description: Ceph post intall update
-  chart_group:
-    - ucp-ceph-update
-...
diff --git a/site/hpgen10/software/charts/ucp/ceph/ceph.yaml b/site/hpgen10/software/charts/ucp/ceph/ceph.yaml
deleted file mode 100644 (file)
index 3817837..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
----
-##############################################################################
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
-#                                                                            #
-# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
-# not use this file except in compliance with the License.                   #
-#                                                                            #
-# You may obtain a copy of the License at                                    #
-#       http://www.apache.org/licenses/LICENSE-2.0                           #
-#                                                                            #
-# Unless required by applicable law or agreed to in writing, software        #
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
-# See the License for the specific language governing permissions and        #
-# limitations under the License.                                             #
-##############################################################################
-
-schema: armada/Chart/v1
-metadata:
-  schema: metadata/Document/v1
-  name: ucp-ceph
-  layeringDefinition:
-    abstract: false
-    layer: site
-    parentSelector:
-      name: ucp-ceph-global
-    actions:
-      - method: replace
-        path: .values.conf.storage.osd
-      - method: merge
-        path: .
-  storagePolicy: cleartext
-data:
-  values:
-    conf:
-      storage:
-        osd:
-          - data:
-              type: block-logical
-              location: /dev/sdb
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdb
-          - data:
-              type: block-logical
-              location: /dev/sdc
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdc
-          - data:
-              type: block-logical
-              location: /dev/sdd
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdd
-          - data:
-              type: block-logical
-              location: /dev/sde
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sde
-          - data:
-              type: block-logical
-              location: /dev/sdf
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdf
-          - data:
-              type: block-logical
-              location: /dev/sdg
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdg
-          - data:
-              type: block-logical
-              location: /dev/sdh
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdh
-          - data:
-              type: block-logical
-              location: /dev/sdi
-            journal:
-              type: directory
-              location: /var/lib/ceph/journal/journal-sdi
-      pool:
-        target:
-          osd: 8
-...
-
diff --git a/tools/aknode30rc b/tools/aknode30rc
new file mode 100644 (file)
index 0000000..fb74afa
--- /dev/null
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
+#                                                                            #
+# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
+# not use this file except in compliance with the License.                   #
+#                                                                            #
+# You may obtain a copy of the License at                                    #
+#       http://www.apache.org/licenses/LICENSE-2.0                           #
+#                                                                            #
+# Unless required by applicable law or agreed to in writing, software        #
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
+# See the License for the specific language governing permissions and        #
+# limitations under the License.                                             #
+##############################################################################
+
+# Add proxy settings if required for your environment
+# export http_proxy=http://your.proxy.com:8080/
+# export https_proxy=http://your.proxy.com:8080/
+#
+
+# host name for server
+SRV_NAME=aknode30
+
+# server oem - Dell or HPE (case sensitive)
+SRV_OEM=HPE
+
+# out of band interface information for server (idrac/ilo/etc)
+SRV_OOB_IP=192.168.41.130
+SRV_OOB_USR=Administrator
+SRV_OOB_PWD=Admin123
+
+# mac address of server to be used during the build - not required for Dell servers
+SRV_MAC=3c:fd:fe:aa:90:b0
+
+# name of network interface used during build when ipxe.efi is booted and when os is booted
+# ipxe numbers ports from 0-n in pci bus order.
+# the netx value will depend on how many nics are in the server
+# and which pci device number is assigned to the slot
+SRV_IPXE_INF=net4
+
+# the build interface is the nic used by the Ubuntu installed to load the OS
+SRV_BLD_INF=ens3f0
+
+# the boot device is the device name on which the OS will be loaded
+SRV_BOOT_DEVICE=sdj
+SRV_CEPH_DEVICE=sdk
+
+# ipxe script to use - based on the os version and kernel to install
+# valid options are script-hwe-16.04.4-amd64.ipxe or script-16.04.4-amd64.ipxe
+SRV_BLD_SCRIPT=script-hwe-16.04.5-amd64.ipxe
+
+# template xml file to set bios and raid configuration settings
+SRV_BIOS_TEMPLATE=hpe_dl380_g10_uefi_base.json.template
+SRV_BOOT_TEMPLATE=hpe_dl380_g10_uefi_httpboot.json.template
+SRV_HTTP_BOOT_DEV=NIC.Slot.3-1-1
+
+# tempalte to run to configure OS after first boot
+# current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
+SRV_FIRSTBOOT_TEMPLATE=firstboot-genesis.sh.template
+
+# VLAN to use during build and for final network configuration
+SRV_VLAN=41
+SRV_STORAGE_VLAN=42
+SRV_CALICO_VLAN=44
+SRV_NEUTRON_VLAN=45
+SRV_PXE_INF=eno1
+
+# basic network information for dhcp config and final server network settings
+SRV_MTU=9000
+SRV_IP=192.168.2.30
+SRV_STORAGE_IP=172.31.1.30
+SRV_CALICO_IP=172.29.1.30
+SRV_NEUTRON_IP=10.0.101.30
+SRV_PXE_IP=172.30.1.30
+SRV_SUBNET=192.168.2.0
+SRV_NETMASK=255.255.255.0
+SRV_GATEWAY=192.168.2.200
+#SRV_DNS=1
+SRV_DNS=192.168.2.85
+SRV_DOMAIN=lab.akraino.org
+SRV_DNSSEARCH=lab.akraino.org
+SRV_NTP=ntp.ubuntu.org
+
+# root password for server being built
+SRV_PWD=smil3yfc
+
+# network bond information
+SRV_BOND=bond0
+SRV_SLAVE1=ens3f0
+SRV_SLAVE2=ens3f1
+
diff --git a/tools/aknode40rc b/tools/aknode40rc
new file mode 100644 (file)
index 0000000..ae40071
--- /dev/null
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
+#                                                                            #
+# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
+# not use this file except in compliance with the License.                   #
+#                                                                            #
+# You may obtain a copy of the License at                                    #
+#       http://www.apache.org/licenses/LICENSE-2.0                           #
+#                                                                            #
+# Unless required by applicable law or agreed to in writing, software        #
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
+# See the License for the specific language governing permissions and        #
+# limitations under the License.                                             #
+##############################################################################
+
+# Add proxy settings if required for your environment
+# export http_proxy=http://your.proxy.com:8080/
+# export https_proxy=http://your.proxy.com:8080/
+#
+
+# host name for server
+SRV_NAME=aknode40
+
+# server oem - Dell or HPE (case sensitive)
+SRV_OEM=Dell
+
+# out of band interface information for server (idrac/ilo/etc)
+SRV_OOB_IP=192.168.41.40
+SRV_OOB_USR=root
+SRV_OOB_PWD=calvin
+
+# mac address of server to be used during the build - not required for Dell servers
+SRV_MAC=
+
+# name of network interface used during build when ipxe.efi is booted and when os is booted
+# ipxe numbers ports from 0-n in pci bus order.
+# the netx value will depend on how many nics are in the server
+# and which pci device number is assigned to the slot
+SRV_IPXE_INF=net4
+
+# the build interface is the nic used by the Ubuntu installed to load the OS
+SRV_BLD_INF=enp94s0f0
+
+# the boot device is the device name on which the OS will be loaded
+SRV_BOOT_DEVICE=sdg
+SRV_CEPH_DEVICE=sdh
+
+# ipxe script to use - based on the os version and kernel to install
+# valid options are script-hwe-16.04.4-amd64.ipxe or script-16.04.4-amd64.ipxe
+SRV_BLD_SCRIPT=script-hwe-16.04.5-amd64.ipxe
+
+# template xml file to set bios and raid configuration settings
+SRV_BIOS_TEMPLATE=dell_r740_g14_uefi_base.xml.template
+SRV_BOOT_TEMPLATE=dell_r740_g14_uefi_httpboot.xml.template
+SRV_HTTP_BOOT_DEV=NIC.Slot.2-1-1
+
+# tempalte to run to configure OS after first boot
+# current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
+SRV_FIRSTBOOT_TEMPLATE=firstboot-genesis.sh.template
+
+# VLAN to use during build and for final network configuration
+SRV_VLAN=41
+SRV_STORAGE_VLAN=42
+SRV_CALICO_VLAN=44
+SRV_NEUTRON_VLAN=45
+SRV_PXE_INF=eno3
+
+# basic network information for dhcp config and final server network settings
+SRV_MTU=9000
+SRV_IP=192.168.2.40
+SRV_STORAGE_IP=172.31.2.40
+SRV_CALICO_IP=172.29.1.40
+SRV_NEUTRON_IP=10.0.102.40
+SRV_PXE_IP=172.30.2.40
+SRV_SUBNET=192.168.2.0
+SRV_NETMASK=255.255.255.0
+SRV_GATEWAY=192.168.2.200
+#SRV_DNS=1
+SRV_DNS=192.168.2.85
+SRV_DOMAIN=lab.akraino.org
+SRV_DNSSEARCH=lab.akraino.org
+SRV_NTP=ntp.ubuntu.org
+
+# root password for server being built
+SRV_PWD=smil3yfc
+
+# network bond information
+SRV_BOND=bond0
+SRV_SLAVE1=enp94s0f0
+SRV_SLAVE2=enp94s0f1
+
index dd5c91d..9a0b9cf 100644 (file)
@@ -31,11 +31,11 @@ SRV_OOB_USR={{yaml.ipmi_admin.username}}
 SRV_OOB_PWD={{yaml.ipmi_admin.password}}
 
 # mac address of server to be used during the build - not required for Dell servers
-# SRV_MAC=3c:fd:fe:b8:10:60
+SRV_MAC={{yaml.genesis.mac_address}}
 
 # name of network interface used during build when ipxe.efi is booted and when os is booted
-# ipxe numbers ports from 0-n in pci bus order. 
-# the netx value will depend on how many nics are in the server 
+# ipxe numbers ports from 0-n in pci bus order.
+# the netx value will depend on how many nics are in the server
 # and which pci device number is assigned to the slot
 SRV_IPXE_INF={{yaml.networks.pxe.inf}}
 
@@ -44,15 +44,16 @@ SRV_BLD_INF={{yaml.networks.slaves[0].name}}
 
 # the boot device is the device name on which the OS will be loaded
 SRV_BOOT_DEVICE={{yaml.disks[0].name}}
+SRV_CEPH_DEVICE={{yaml.disks[1].name}}
 
 # ipxe script to use - based on the os version and kernel to install
 # valid options are script-hwe-16.04.4-amd64.ipxe or script-16.04.4-amd64.ipxe
 SRV_BLD_SCRIPT=script-hwe-16.04.5-amd64.ipxe
 
 # template xml file to set bios and raid configuration settings
-SRV_BIOS_TEMPLATE=dell_r740_g14_uefi_base.xml.template
-SRV_BOOT_TEMPLATE=dell_r740_g14_uefi_httpboot.xml.template
-SRV_HTTP_BOOT_DEV=NIC.Slot.2-1-1
+SRV_BIOS_TEMPLATE={{yaml.genesis.bios_template}}
+SRV_BOOT_TEMPLATE={{yaml.genesis.boot_template}}
+SRV_HTTP_BOOT_DEV={{yaml.genesis.http_boot_device}}
 
 # tempalte to run to configure OS after first boot
 # current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template