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
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:
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
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
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
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
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())
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")
- openvswitch=enabled
- openstack-control-plane=enabled
- openstack-nova-compute=enabled
+ - sriov=enabled
...
- openvswitch=enabled
- openstack-control-plane=enabled
- openstack-nova-compute=enabled
+ - sriov=enabled
...
- hostname: aknode31
- hostname: aknode32
+ proxy:
+ http: ""
+ https: ""
+ no_proxy: []
+
node_ports:
drydock_api: 30000
maas_api: 30001
- openvswitch=enabled
- openstack-control-plane=enabled
- openstack-nova-compute=enabled
+ - sriov=enabled
...
openstack-libvirt: kernel
openvswitch: enabled
openstack-nova-compute: enabled
- sriov: enabled
ucp-barbican: enabled
ceph-bootstrap: enabled
ceph-mon: enabled
storagePolicy: cleartext
data:
revision: v4.0
- site_type: edge
+ site_type: foundry
...
+++ /dev/null
----
-##############################################################################
-# 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
-...
+++ /dev/null
----
-##############################################################################
-# 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
-...
-
--- /dev/null
+##############################################################################
+# 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
+
--- /dev/null
+##############################################################################
+# 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
+
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}}
# 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