
Add authorized_keys field to Site object Add sshkey to maasdriver models Add ConfigureUserCredentials task Add orchestrator step for ConfigureUserCredentials Add driver logic to implement ConfigureUserCredentials
349 lines
14 KiB
YAML
349 lines
14 KiB
YAML
# Copyright 2017 AT&T Intellectual Property. All other 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.
|
|
---
|
|
# Site/Region wide definitions. Each design part will be a constituent
|
|
# of the design for exactly one Region
|
|
apiVersion: 'v1.0'
|
|
kind: Region
|
|
metadata:
|
|
name: sitename
|
|
date: 17-FEB-2017
|
|
description: Sample site design
|
|
author: sh8121@att.com
|
|
spec:
|
|
# List of query-based definitions for applying tags to deployed nodes
|
|
tag_definitions:
|
|
- tag: 'high_memory'
|
|
# Tag to apply to nodes that qualify for the query
|
|
definition_type: 'lshw_xpath'
|
|
# Only support on type for now - 'lshw_xpath' used by MaaS
|
|
definition: //node[@id="memory"]/'size units="bytes"' > 137438953472
|
|
# an xpath query that is run against the output of 'lshw -xml' from the node
|
|
# Image and package repositories needed by Drydock drivers. Needs to be defined
|
|
repositories:
|
|
- name: 'ubuntu-main'
|
|
authorized_keys:
|
|
- |
|
|
valid ssh key string
|
|
- |
|
|
valid ssh key string
|
|
---
|
|
apiVersion: 'v1.0'
|
|
kind: NetworkLink
|
|
metadata:
|
|
name: oob
|
|
region: sitename
|
|
date: 17-FEB-2017
|
|
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 can be 'disabled', '802.3ad', 'balanced-rr', 'active-backup'. Defaults to disabled
|
|
mode: '802.3ad'
|
|
# The below apply to 802.3ad (LACP
|
|
# Link selection hash. Supports 'layer3+4', 'layer2', 'layer2+3'. Defaults to 'layer3+4'
|
|
hash: 'layer3+4'
|
|
# LACP peering rate. Supports 'slow', 'fast'. Defaults to 'fast'
|
|
peer_rate: 'fast'
|
|
# LACP link monitor rate in milliseconds. Defaults to 100ms
|
|
mon_rate: 100
|
|
# LACP delay for marking link up in milliseconds. Must be greater than mon_rate. Defaults to 200ms
|
|
up_delay: 200
|
|
# LACP dleay for marking link down in milliseconds. Must be greater than mon_rate. Defaults to 200ms
|
|
down_delay: 200
|
|
# Physical link default MTU size. No default
|
|
mtu: 1500
|
|
# Physical link speed. Supports 'auto', '100full'. Gigabit+ speeds require auto. No default
|
|
linkspeed: 'auto'
|
|
# Settings for using a link for multiple L2 networks
|
|
trunking:
|
|
# Trunking mode. Supports 'disabled', '802.1q'. Defaults to disabled
|
|
mode: disabled
|
|
# If disabled, what network is this port on. If '802.1q' what is the default network for the port. No default.
|
|
default_network: oob
|
|
# List of Network names that are supported on this link. A Network can be listed on only one NetworkLink
|
|
allowed_networks:
|
|
- 'oob'
|
|
---
|
|
apiVersion: 'v1.0'
|
|
kind: Network
|
|
metadata:
|
|
name: oob
|
|
region: sitename
|
|
date: 17-FEB-2017
|
|
author: sh8121@att.com
|
|
description: Describe layer 2 and 3 attributes. Primary key is 'name'.
|
|
spec:
|
|
# CIDR representation of network number and netmask
|
|
cidr: '172.16.1.0/24'
|
|
# How addresses are allocated on the network. Supports 'static', 'dhcp'. Defaults to 'static'
|
|
allocation: 'static'
|
|
# VLAN of this network. Defaults to None
|
|
vlan: 100
|
|
# MTU of this network. Defaults to the MTU specified for the NetworkLink used for this network
|
|
dns:
|
|
# Domain name used to register addresses assigned from this network. Defaults to 'local'
|
|
domain: 'aic.att.com'
|
|
# Comma-separated list of DNS server IP addresses. These will be configured on the node if
|
|
# this network is identified as the node's primary network
|
|
servers: '8.8.8.8, 4.4.4.4'
|
|
# Defined IP address ranges. All node IP address assignments must fall into a defined range
|
|
# of the correct type
|
|
ranges:
|
|
# Type of range. Supports 'reserved', 'static' or 'dhcp'. No default
|
|
- type: 'dhcp'
|
|
# Start of the address range, inclusive. No default
|
|
start: '172.16.1.100'
|
|
# End of the address range, inclusive. No default
|
|
end: '172.16.1.254'
|
|
# Routes defined for this network, including the default route (i.e. default gateway)
|
|
routes:
|
|
# The network being routed to in CIDR notation. Default gateway is 0.0.0.0/0.
|
|
- subnet: '0.0.0.0/0'
|
|
# Next hop for traffic using this route
|
|
gateway: '172.16.1.3'
|
|
# Selection metric for the host selecting this route. No default
|
|
metric: 10
|
|
---
|
|
apiVersion: 'v1.0'
|
|
kind: HardwareProfile
|
|
metadata:
|
|
name: DellR720v2
|
|
region: sitename
|
|
date: 17-FEB-2017
|
|
author: sh8121@att.com
|
|
description: Describe server hardware attributes. Not a specific server, but profile adopted by a server defintion.
|
|
spec:
|
|
# Chassis vendor
|
|
vendor: 'Dell'
|
|
# Chassis model generation
|
|
generation: '1'
|
|
# Chassis model version
|
|
hw_version: '2'
|
|
# Certified BIOS version for this chassis
|
|
bios_version: '2.2.3'
|
|
# Boot mode. Supports 'bios' or 'uefi'
|
|
boot_mode: 'bios'
|
|
# How the node should be initially bootstrapped. Supports 'pxe'
|
|
bootstrap_protocol: 'pxe'
|
|
# What network interface to use for PXE booting
|
|
# for chassis that support selection
|
|
pxe_interface: '0'
|
|
# Mapping of hardware alias/role to physical address
|
|
device_aliases:
|
|
# the device alias that will be referenced in HostProfile or BaremetalNode design parts
|
|
- alias: 'pnic01'
|
|
# The hardware bus the device resides on. Supports 'pci' and 'scsi'. No default
|
|
bus_type: 'pci'
|
|
# The type of device as reported by lshw. Can be used to validate hardware manifest. No default
|
|
dev_type: 'Intel 10Gbps NIC'
|
|
# Physical address on the bus
|
|
address: '0000:00:03.0'
|
|
---
|
|
apiVersion: 'v1.0'
|
|
kind: HostProfile
|
|
metadata:
|
|
name: lcp_node
|
|
region: sitename
|
|
date: 17-FEB-2017
|
|
author: sh8121@att.com
|
|
description: Describe server configuration attributes. Not a specific server, but profile adopted by a server definition
|
|
spec:
|
|
# The HostProfile this profile adopts initial state from. No default.
|
|
# See drydock_provisioner/objects/readme.md for information on how HostProfile and BaremetalNode inheritance works
|
|
host_profile: 'defaults'
|
|
# The HardwareProfile describing the node hardware. No default.
|
|
hardware_profile: 'DellR720v1'
|
|
# OOB access to node
|
|
oob:
|
|
# Type of OOB access. Supports 'ipmi'
|
|
type: 'ipmi'
|
|
# Which network - as defined in a Network design part - to access the OOB interface on
|
|
network: 'oob'
|
|
# Account name for authenticating on the OOB interface
|
|
account: 'admin'
|
|
# Credential for authentication on the OOB interface. The OOB driver will interpret this.
|
|
credential: 'admin'
|
|
# How local node storage is configured
|
|
storage:
|
|
# How storage is laid out. Supports 'lvm' and 'flat'. Defaults to 'lvm'
|
|
layout: 'lvm'
|
|
# Configuration for the boot disk
|
|
bootdisk:
|
|
# Hardware disk (or hardware RAID device) used for booting. Can refer to a
|
|
# HardwareProfile device alias or a explicit device name
|
|
device: 'bootdisk'
|
|
# Size of the root volume. Can be specified by percentage or explicit size in
|
|
# megabytes or gigabytes. Defaults to 100% of boot device.
|
|
root_size: '100g'
|
|
# If a separate boot volume is needed, specify size. Defaults to 0 where /boot goes on root.
|
|
boot_size: '0'
|
|
# Non-boot volumes that should be carved out of local storage
|
|
partitions:
|
|
# Name of the volume. Doesn't translate to any operating system config
|
|
name: 'logs'
|
|
# Hardware device the volume should go on
|
|
device: 'bootdisk'
|
|
# Partition UUID. Defaults to None. A value of 'generate' means Drydock will generate a UUID
|
|
part_uuid:
|
|
# Size of the volume in megabytes or gigabytes
|
|
size: '10g'
|
|
# Filesystem mountpoint if volume should be a filesystem
|
|
mountpoint: '/var/logs'
|
|
# The below are ignored if mountpoint is None
|
|
# Format of filesystem. Defaults to ext4
|
|
fstype: 'ext4'
|
|
# Mount options of the file system as used in /etc/fstab. Defaults to 'defaults'
|
|
mount_options: 'defaults'
|
|
# Filesystem UUID. Defaults to None. A value of 'generate' means Drydock will generate a UUID
|
|
fs_uuid:
|
|
# A filesystem label. Defaults to None
|
|
fs_label:
|
|
# Network name of the primary network (default gateway, DNS, etc...)
|
|
primary_network: 'mgmt'
|
|
# Physical and logical network interfaces
|
|
interfaces:
|
|
# What the interface should be named in the operating system. May not match a hardware device name
|
|
device_name: bond0
|
|
# The NetworkLink connected to this interface. Must be the name of a NetworkLink design part
|
|
device_link: 'gp'
|
|
# Hardware devices that support this interface. For configurating a physical device, this would be a list of one
|
|
# For bonds, this would be a list of all the physical devices in the bond. These can refer to HardwareProfile device aliases
|
|
# or explicit device names
|
|
slaves:
|
|
- 'pnic01'
|
|
- 'pnic02'
|
|
# Network that will be accessed on this interface. These should each be to the name of a Network design part
|
|
# Multiple networks listed here assume that this interface is attached to a NetworkLink supporting trunking
|
|
networks:
|
|
- 'mgmt'
|
|
- 'admin'
|
|
# Settings for the platform (operating system)
|
|
platform:
|
|
# Which image to deploy on the node, must be available in the provisioner. Defaults to 'ubuntu/xenial'
|
|
image:
|
|
# Which kernel to enable. Defaults to generic, can also be hwe (hardware enablement)
|
|
kernel: generic
|
|
# K/V list of kernel parameters to configure on boot. No default. Use value of true for params that are just flags
|
|
kernel_params:
|
|
console: tty1
|
|
quiet: true
|
|
# Metadata about the node
|
|
metadata:
|
|
# Explicit tags to propagate to Kubernetes. Simple strings of any value
|
|
tags:
|
|
- 'lcp_node'
|
|
# Key/value mapping that will propagate to the node for next-step bootstrapping
|
|
owner_data:
|
|
nic_access: 'sriov'
|
|
# The rack a node sits in. Simple string
|
|
rack: r1
|
|
---
|
|
apiVersion: 'v1.0'
|
|
kind: BaremetalNode
|
|
metadata:
|
|
name: lcp_controller01
|
|
region: sitename
|
|
date: 17-FEB-2017
|
|
author: sh8121@att.com
|
|
description: Specify a physical server.
|
|
spec:
|
|
# The HostProfile this server adopts initial state from. No default.
|
|
# See drydock_provisioner/objects/readme.md for information on how HostProfile and BaremetalNode inheritance works
|
|
host_profile: 'defaults'
|
|
# The HardwareProfile describing the node hardware. No default.
|
|
hardware_profile: 'DellR720v1'
|
|
# OOB access to node
|
|
oob:
|
|
# Type of OOB access. Supports 'ipmi'
|
|
type: 'ipmi'
|
|
# Which network - as defined in a Network design part - to access the OOB interface on
|
|
network: 'oob'
|
|
# Account name for authenticating on the OOB interface
|
|
account: 'admin'
|
|
# Credential for authentication on the OOB interface. The OOB driver will interpret this.
|
|
credential: 'admin'
|
|
# How local node storage is configured
|
|
storage:
|
|
# How storage is laid out. Supports 'lvm' and 'flat'. Defaults to 'lvm'
|
|
layout: 'lvm'
|
|
# Configuration for the boot disk
|
|
bootdisk:
|
|
# Hardware disk (or hardware RAID device) used for booting. Can refer to a
|
|
# HardwareProfile device alias or a explicit device name
|
|
device: 'bootdisk'
|
|
# Size of the root volume. Can be specified by percentage or explicit size in
|
|
# megabytes or gigabytes. Defaults to 100% of boot device.
|
|
root_size: '100g'
|
|
# If a separate boot volume is needed, specify size. Defaults to 0 where /boot goes on root.
|
|
boot_size: '0'
|
|
# Non-boot volumes that should be carved out of local storage
|
|
partitions:
|
|
# Name of the volume. Doesn't translate to any operating system config
|
|
name: 'logs'
|
|
# Hardware device the volume should go on
|
|
device: 'bootdisk'
|
|
# Partition UUID. Defaults to None. A value of 'generate' means Drydock will generate a UUID
|
|
part_uuid:
|
|
# Size of the volume in megabytes or gigabytes
|
|
size: '10g'
|
|
# Filesystem mountpoint if volume should be a filesystem
|
|
mountpoint: '/var/logs'
|
|
# The below are ignored if mountpoint is None
|
|
# Format of filesystem. Defaults to ext4
|
|
fstype: 'ext4'
|
|
# Mount options of the file system as used in /etc/fstab. Defaults to 'defaults'
|
|
mount_options: 'defaults'
|
|
# Filesystem UUID. Defaults to None. A value of 'generate' means Drydock will generate a UUID
|
|
fs_uuid:
|
|
# A filesystem label. Defaults to None
|
|
fs_label:
|
|
# Physical and logical network interfaces
|
|
interfaces:
|
|
# What the interface should be named in the operating system. May not match a hardware device name
|
|
- device_name: bond0
|
|
# The NetworkLink connected to this interface. Must be the name of a NetworkLink design part
|
|
device_link: 'gp'
|
|
# Whether this interface is considered the primary interface on the server. Supports true and false. Defaults to false
|
|
primary: true
|
|
# Hardware devices that support this interface. For configurating a physical device, this would be a list of one
|
|
# For bonds, this would be a list of all the physical devices in the bond. These can refer to HardwareProfile device aliases
|
|
# or explicit device names
|
|
slaves:
|
|
- 'pnic01'
|
|
- 'pnic02'
|
|
# Network that will be accessed on this interface. These should each be to the name of a Network design part
|
|
# Multiple networks listed here assume that this interface is attached to a NetworkLink supporting trunking
|
|
networks:
|
|
- 'mgmt'
|
|
- 'admin'
|
|
# Metadata about the node
|
|
metadata:
|
|
# Explicit tags to propagate to Kubernetes. Simple strings of any value
|
|
tags:
|
|
- 'lcp_node'
|
|
# Key/value mapping that will propagate to the node for next-step bootstrapping
|
|
owner_data:
|
|
nic_access: 'sriov'
|
|
# The rack a node sits in. Simple string
|
|
rack: r1
|
|
# How each attached network is accessed by this node
|
|
addressing:
|
|
# The name of a defined Network design part also listed in the 'networks' section of a interface definition
|
|
- network: 'pxe'
|
|
# Address should be an explicit IP address assignment or 'dhcp'
|
|
address: 'dhcp'
|
|
- network: 'mgmt'
|
|
address: '172.16.1.83'
|
|
--- |