diff --git a/examples/bootstrap_hwdefinition.yaml b/examples/bootstrap_hwdefinition.yaml index 54c69ac1..19078bf1 100644 --- a/examples/bootstrap_hwdefinition.yaml +++ b/examples/bootstrap_hwdefinition.yaml @@ -1,4 +1,3 @@ ---- # Copyright 2017 AT&T Intellectual Property. All other rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,15 +17,15 @@ # ############################################################################# # version the schema in this file so consumers can rationally parse it +--- apiVersion: v1 -kind: hardware_profile +kind: HardwareProfile metadata: + name: HPGen8v3 date: 17-FEB-2017 name: Sample hardware definition author: Scott Hussey -hardware_definition: - # Name of the hardware type. This name will be used in bootstrap.yaml to refer back -- name: HPGen8v3 +spec: # Vendor of the server chassis vendor: HP # Generation of the chassis model diff --git a/examples/bootstrap_seed.yaml b/examples/bootstrap_seed.yaml index 23f6a1f8..bc2a26c3 100644 --- a/examples/bootstrap_seed.yaml +++ b/examples/bootstrap_seed.yaml @@ -1,4 +1,3 @@ ---- # Copyright 2017 AT&T Intellectual Property. All other rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,158 +17,239 @@ # #################### # version the schema in this file so consumers can rationally parse it +--- apiVersion: v1 -kind: site_design +kind: Site metadata: + name: sitename date: 17-FEB-2017 name: Sample site design - author: Scott Hussey -site_name: sitename -network: - # Describe layer 1 attributes. Primary key is 'name'. These settings will - # generally be things the switch and server have to agree on - links: - - name: oob - bonding: - mode: none - mtu: 1500 - linkspeed: 100full - trunking: - mode: none - default_network: oob + author: sh8121@att.com +spec: + # Not sure if we have site wide data that doesn't fall into another 'Kind' +--- +apiVersion: v1 +kind: NetworkLink +metadata: + name: oob + date: 17-FEB-2017 + name: Sample network link + author: sh8121@att.com + description: Describe layer 1 attributes. Primary key is 'name'. These settings will generally be things the switch and server have to agree on +spec: + name: oob + bonding: + mode: none + mtu: 1500 + linkspeed: 100full + trunking: + mode: none + default_network: oob +--- +# pxe is a bit of 'magic' indicating the link config used when PXE booting +# a node. All other links indicate network configs applied when the node +# is deployed. +apiVersion: v1 +kind: NetworkLink +metadata: + name: pxe + date: 17-FEB-2017 + name: Sample network link + author: sh8121@att.com + description: Describe layer 1 attributes. Primary key is 'name'. These settings will generally be things the switch and server have to agree on +spec: + bonding: + mode: none + mtu: 1500 + linkspeed: auto + # Is this link supporting multiple layer 2 networks? + # none is a port-based VLAN identified by default_network + # tagged is is using 802.1q VLAN tagging. Untagged packets will default to default_netwokr + trunking: + mode: none + # use name, will translate to VLAN ID + default_network: pxe +--- +apiVersion: v1 +kind: NetworkLink +metadata: + name: gp + date: 17-FEB-2017 + name: Sample network link + author: sh8121@att.com + description: Describe layer 1 attributes. These CIs will generally be things the switch and server have to agree on # pxe is a bit of 'magic' indicating the link config used when PXE booting # a node. All other links indicate network configs applied when the node # is deployed. - - name: pxe - bonding: - mode: none - mtu: 1500 - linkspeed: auto - # Is this link supporting multiple layer 2 networks? - # none is a port-based VLAN identified by default_network - # tagged is is using 802.1q VLAN tagging. Untagged packets will default to default_netwokr - trunking: - mode: none - # use name, will translate to VLAN ID - default_network: pxe - - name: gp - # If this link is a bond of physical links, how is it configured - # 802.3ad - # active-backup - # balance-rr - # Can add support for others down the road - bonding: - mode: 802.3ad - # For LACP (802.3ad) xmit hashing policy: layer2, layer2+3, layer3+4, encap3+4 - hash: layer3+4 - # 802.3ad specific options - peer_rate: slow - mon_rate: default - up_delay: default - down_delay: default - mtu: 9000 - linkspeed: auto - # Is this link supporting multiple layer 2 networks? - trunking: - mode: tagged - default_network: mgmt - # Describe layer 2/3 attributes. Primary key is 'name' - networks: - - name: oob - allocation: static - cidr: 172.16.100.0/24 - ranges: +spec: + # If this link is a bond of physical links, how is it configured + # 802.3ad + # active-backup + # balance-rr + # Can add support for others down the road + bonding: + mode: 802.3ad + # For LACP (802.3ad) xmit hashing policy: layer2, layer2+3, layer3+4, encap3+4 + hash: layer3+4 + # 802.3ad specific options + peer_rate: slow + mon_rate: default + up_delay: default + down_delay: default + mtu: 9000 + linkspeed: auto + # Is this link supporting multiple layer 2 networks? + trunking: + mode: tagged + default_network: mgmt +--- +apiVersion: v1 +kind: Network +metadata: + name: oob + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + allocation: static + cidr: 172.16.100.0/24 + ranges: - type: static start: 172.16.100.15 end: 172.16.100.254 dns: domain: ilo.sitename.att.com - servers: - - name: pxe + servers: 172.16.100.10 +--- +apiVersion: v1 +kind: Network +metadata: + name: pxe + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: # Layer 2 VLAN segment id, could support other segmentations. Optional - vlan_id: 99 + vlan_id: 99 # How are addresses assigned? - allocation: dhcp + allocation: dhcp # MTU for this VLAN interface, if not specified it will be inherited from the link - mtu: 1500 + mtu: 1500 # Network address - cidr: 172.16.0.0/24 + cidr: 172.16.0.0/24 # Desribe IP address ranges - ranges: - - type: dhcp - start: 172.16.0.5 - end: 172.16.0.254 + ranges: + - type: dhcp + start: 172.16.0.5 + end: 172.16.0.254 # DNS settings for this network - dns: + dns: # Domain addresses on this network will be registered under - domain: + domain: admin.sitename.att.com # DNS servers that a server using this network as its default gateway should use - servers: - - name: mgmt - vlan_id: 100 + servers: 172.16.0.10 +--- +apiVersion: v1 +kind: Network +metadata: + name: mgmt + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + vlan_id: 100 # How are addresses assigned? - allocation: static + allocation: static # Allow MTU to be inherited from link the network rides on - mtu: 1500 + mtu: 1500 # Network address - cidr: 172.16.1.0/24 + cidr: 172.16.1.0/24 # Desribe IP address ranges - ranges: - - type: static - start: 172.16.1.15 - end: 172.16.1.254 + ranges: + - type: static + start: 172.16.1.15 + end: 172.16.1.254 # Static routes to be added for this network - routes: - - subnet: 0.0.0.0/0 + routes: + - subnet: 0.0.0.0/0 # A blank gateway would leave to a static route specifying # only the interface as a source - gateway: 172.16.1.1 - weight: 10 + gateway: 172.16.1.1 + weight: 10 # DNS settings for this network - dns: + dns: # Domain addresses on this network will be registered under - domain: mgmt.sitename.example.com + domain: mgmt.sitename.example.com # DNS servers that a server using this network as its default gateway should use - servers: 172.16.1.9,172.16.1.10 - - name: private - vlan_id: 101 - allocation: static - mtu: 9000 - cidr: 172.16.2.0/24 + servers: 172.16.1.9,172.16.1.10 +--- +apiVersion: v1 +kind: Network +metadata: + name: private + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + vlan_id: 101 + allocation: static + mtu: 9000 + cidr: 172.16.2.0/24 # Desribe IP address ranges - ranges: + ranges: # Type can be reserved (not used for baremetal), static (all explicit # assignments should fall here), dhcp (will be used by a DHCP server on this network) - - type: static - start: 172.16.2.15 - end: 172.16.2.254 - dns: - domain: priv.sitename.example.com - servers: 172.16.2.9,172.16.2.10 - - name: public - vlan_id: 102 + - type: static + start: 172.16.2.15 + end: 172.16.2.254 + dns: + domain: priv.sitename.example.com + servers: 172.16.2.9,172.16.2.10 +--- +apiVersion: v1 +kind: Network +metadata: + name: public + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + vlan_id: 102 # How are addresses assigned? - allocation: static + allocation: static # MTU size for the VLAN interface - mtu: 1500 - cidr: 172.16.3.0/24 + mtu: 1500 + cidr: 172.16.3.0/24 # Desribe IP address ranges - ranges: - - type: static - start: 172.16.3.15 - end: 172.16.3.254 - routes: - - subnet: 0.0.0.0/0 - - gateway: 172.16.3.1 - - weight: 9 - dns: - domain: sitename.example.com - servers: 8.8.8.8 -host_profiles: + ranges: + - type: static + start: 172.16.3.15 + end: 172.16.3.254 + routes: + - subnet: 0.0.0.0/0 + gateway: 172.16.3.1 + weight: 9 + dns: + domain: sitename.example.com + servers: 8.8.8.8 +--- +apiVersion: v1 +kind: HostProfile +metadata: + name: default + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces # No magic to this host_profile, it just provides a way to specify # sitewide settings. If it is absent from a node's inheritance chain # then these values will NOT be applied -- name: defaults +spec: # OOB (iLO, iDRAC, etc...) settings. Should prefer open standards such # as IPMI over vender-specific when possible. oob: @@ -216,7 +296,16 @@ host_profiles: metadata: # Base URL of the introspection service - may go in curtin data introspection_url: http://172.16.1.10:9090 -- name: k8-node +--- +apiVersion: v1 +kind: HostProfile +metadata: + name: k8-node + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: # host_profile inheritance allows for deduplication of common CIs # Inheritance is additive for CIs that are lists of multiple items # To remove an inherited list member, prefix the primary key value @@ -261,7 +350,16 @@ host_profiles: # MaaS supports key/value pairs. Not sure of the use yet owner_data: foo: bar -- name: k8-node-public +--- +apiVersion: v1 +kind: HostProfile +metadata: + name: k8-node-public + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: host_profile: k8-node interfaces: - device_name: bond0 @@ -269,12 +367,19 @@ host_profiles: # This is additive, so adds a network to those defined in the host_profile # inheritance chain - name: public -# Nodes represent actual servers, not just config profiles -nodes: -- host_profile: k8-node-public +--- +apiVersion: v1 +kind: BaremetalNode +metadata: + name: controller01 + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + host_profile: k8-node-public # the hostname for a server, could be used in multiple DNS domains to # represent different interfaces - name: controller01 interfaces: - device_name: bond0 networks: @@ -295,8 +400,17 @@ nodes: metadata: roles: os_ctl rack: rack01 -- host_profile: k8-node +--- +apiVersion: v1 +kind: BaremetalNode +metadata: name: compute01 + date: 17-FEB-2017 + name: Sample network definition + author: sh8121@att.com + description: Describe layer 2/3 attributes. Primarily CIs used for configuring server interfaces +spec: + host_profile: k8-node addressing: - network: pxe address: dhcp