summaryrefslogtreecommitdiffstats
path: root/config/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'config/pdf')
-rw-r--r--config/pdf/idf-pod1.schema.yaml229
-rw-r--r--config/pdf/pod1.encrypted.yaml19
-rw-r--r--config/pdf/pod1.schema.yaml245
-rw-r--r--config/pdf/pod1.yaml21
4 files changed, 505 insertions, 9 deletions
diff --git a/config/pdf/idf-pod1.schema.yaml b/config/pdf/idf-pod1.schema.yaml
new file mode 100644
index 00000000..a1108a00
--- /dev/null
+++ b/config/pdf/idf-pod1.schema.yaml
@@ -0,0 +1,229 @@
+##############################################################################
+# Copyright (c) 2018 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
+##############################################################################
+---
+$schema: 'http://json-schema.org/schema#'
+$id: 'https://github.com/opnfv/pharos/blob/master/config/pdf/pod1.yaml'
+
+definitions:
+ net_config:
+ v0.1:
+ # NOTE: I hope this is going away soon, so I won't model it yet
+ type: 'object'
+ compass:
+ v0.1:
+ type: 'object'
+ # NOTE: To be properly modeled by Compass4NFV maintainers
+ daisy:
+ v0.1:
+ type: 'object'
+ # NOTE: To be properly modeled by Daisy maintainers
+ fuel:
+ v0.1:
+ type: 'object'
+ properties:
+ jumphost:
+ type: 'object'
+ properties:
+ bridges:
+ type: 'object'
+ properties:
+ admin:
+ type: ['string', 'null']
+ mgmt:
+ type: ['string', 'null']
+ private:
+ type: ['string', 'null']
+ public:
+ type: ['string', 'null']
+ required: ['admin', 'mgmt', 'private', 'public']
+ additionalProperties: false
+ trunks:
+ type: 'object'
+ properties:
+ mgmt:
+ type: 'boolean'
+ required: ['mgmt']
+ additionalProperties: false
+ required: ['bridges']
+ additionalProperties: false
+ maas:
+ type: 'object'
+ properties:
+ timeout_comissioning:
+ type: 'number'
+ timeout_deploying:
+ type: 'number'
+ required: ['timeout_comissioning', 'timeout_deploying']
+ additionalProperties: false
+ network:
+ type: 'object'
+ properties:
+ ntp_strata_host1:
+ type: 'string'
+ ntp_strata_host2:
+ type: 'string'
+ node:
+ type: 'array'
+ items:
+ type: 'object'
+ properties:
+ interfaces:
+ type: 'array'
+ items:
+ type: ['string', 'null']
+ busaddr:
+ type: 'array'
+ items:
+ type: ['string', 'null']
+ required: ['interfaces', 'busaddr']
+ additionalProperties: false
+ required: ['node']
+ additionalProperties: false
+ reclass: # Optional
+ type: 'object'
+ properties:
+ node:
+ type: 'array'
+ items:
+ type: 'object'
+ properties:
+ compute_params:
+ type: 'object'
+ properties:
+ common: # Optional
+ type: 'object'
+ properties: &compute_params_common_properties
+ nova_cpu_pinning: # Optional
+ type: 'string'
+ compute_hugepages_size:
+ type: 'string'
+ enum: ['2M', '1G']
+ compute_hugepages_count:
+ type: 'number'
+ compute_hugepages_mount:
+ type: 'string'
+ compute_kernel_isolcpu: # Optional
+ type: 'string'
+ compute_ovs_pmd_cpu_mask: # Optional
+ type: ['string', 'number']
+ compute_ovs_memory_channels: # Optional
+ type: ['string', 'number']
+ required: ['compute_hugepages_size', 'compute_hugepages_count',
+ 'compute_hugepages_mount']
+ additionalProperties: false
+ dpdk: # Optional
+ type: 'object'
+ properties:
+ <<: *compute_params_common_properties
+ compute_dpdk_driver:
+ type: 'string'
+ compute_ovs_dpdk_socket_mem:
+ type: ['string', 'number']
+ compute_ovs_dpdk_lcore_mask:
+ type: ['string', 'number']
+ dpdk0_driver:
+ type: 'string'
+ dpdk0_n_rxq:
+ type: 'number'
+ required: ['compute_dpdk_driver', 'dpdk0_driver', 'dpdk0_n_rxq',
+ 'compute_ovs_dpdk_socket_mem',
+ 'compute_ovs_dpdk_lcore_mask']
+ additionalProperties: false
+ additionalProperties: false
+ required: ['compute_params']
+ additionalProperties: false
+ required: ['node']
+ additionalProperties: false
+ required: ['jumphost', 'network']
+ additionalProperties: false
+ osa:
+ v0.1:
+ type: 'object'
+ properties:
+ nodes_roles:
+ type: 'object'
+ groups:
+ type: 'object'
+ hostnames:
+ type: 'object'
+ network:
+ type: 'object'
+ required: ['nodes_roles', 'groups', 'hostnames', 'network']
+ additionalProperties: false
+ kubespray:
+ v0.1:
+ type: ['object', 'null']
+ # NOTE: To be properly modeled by XCI maintainers
+
+##############################################################################
+# Top-level structure:
+# - define all possible top-level and second-level keys, without enforcing a
+# schema for second-level, just so we can disallow additional properties;
+# - require 'version' and allow dynamically generated 'version_x.y' key;
+properties:
+ idf:
+ properties:
+ # version_x.y keys are auto-added by `validate_schema.py` based on 'version'
+ version_0.1:
+ type: 'boolean'
+ version:
+ type: 'number'
+ enum: [0.1]
+ installer:
+ type: 'array'
+ items:
+ type: 'string'
+ enum: ['apex', 'compass4nfv', 'daisy', 'fuel', 'joid', 'osa', 'kubespray']
+ net_config:
+ type: 'object'
+ compass:
+ type: 'object'
+ daisy:
+ type: 'object'
+ fuel:
+ type: 'object'
+ osa:
+ type: ['object', 'null']
+ kubespray:
+ type: ['object', 'null']
+ required: ['version']
+ additionalProperties: false
+ ############################################################################
+ # Schema versioning
+ # - based on dynamically added 'version_x.y', require additional IDF blocks
+ # and validate them against the proper schema version;
+ dependencies:
+ version_0.1:
+ properties:
+ net_config:
+ $ref: '#/definitions/net_config/v0.1'
+ compass:
+ $ref: '#/definitions/compass/v0.1'
+ daisy:
+ $ref: '#/definitions/daisy/v0.1'
+ fuel:
+ $ref: '#/definitions/fuel/v0.1'
+ osa:
+ $ref: '#/definitions/osa/v0.1'
+ kubespray:
+ $ref: '#/definitions/kubespray/v0.1'
+ fuel:
+ required: ['net_config']
+ daisy:
+ required: ['net_config']
+ osa:
+ required: ['net_config']
+ kubespray:
+ required: ['net_config']
+ xci:
+ type: 'object'
+ # NOTE: To be properly modeled by XCI maintainers
+
+# Do not allow any properties not defined here. This lets us catch typos.
+additionalProperties: false
+required: ['idf']
diff --git a/config/pdf/pod1.encrypted.yaml b/config/pdf/pod1.encrypted.yaml
index 8693647d..c2512632 100644
--- a/config/pdf/pod1.encrypted.yaml
+++ b/config/pdf/pod1.encrypted.yaml
@@ -1,6 +1,15 @@
+##############################################################################
+# Copyright (c) 2018 Intel Corporation, 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
+##############################################################################
---
### POD descriptor file ###
+version: 1.0
+
details:
pod_owner: Lab Owner
contact: email@address.com
@@ -32,7 +41,7 @@ jumphost:
# several disk types possible
disk_type: {hdd|ssd|cdrom|tape}
# several interface types possible
- disk_interface: {sata|sas|ssd|nvme}
+ disk_interface: {sata|sas|ssd|nvme|scsi|iscsi}
# define rotation speed of disk
disk_rotation: {5400|7200|10000|15000}
# second disk
@@ -45,7 +54,8 @@ jumphost:
os: ubuntu-14.04
remote_params: &remote_params
# hardware management tool
- type: {ipmi|amt}
+ type: {ipmi|amt|libvirt}
+ # array of supported versions, mandatory for all but 'libvirt'
versions:
- 1.0
- 2.0
@@ -73,18 +83,19 @@ jumphost:
remote_management:
<<: *remote_params
address: 10.4.7.3/24
+ # MAC address is mandatory for all BMC types but 'libvirt'
mac_address: "10:23:45:67:89:AC"
# physical interface list
interfaces:
# first interface
- - nic: {nic#number}
+ - name: {nic#number}
# ip address of nic
address: 192.168.100.1
mac_address: "10:23:45:67:89:AC"
# vlan tag, may have multiple tags
vlan: {native|1-4095}
# second interface
- - nic: 'nic2'
+ - name: 'nic2'
address: 10.20.0.1/24
mac_address: "10:23:45:67:89:5B"
nodes:
diff --git a/config/pdf/pod1.schema.yaml b/config/pdf/pod1.schema.yaml
new file mode 100644
index 00000000..33b2d8c3
--- /dev/null
+++ b/config/pdf/pod1.schema.yaml
@@ -0,0 +1,245 @@
+##############################################################################
+# Copyright (c) 2018 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
+##############################################################################
+---
+$schema: 'http://json-schema.org/schema#'
+$id: 'https://github.com/opnfv/pharos/blob/master/config/pdf/pod1.yaml'
+
+definitions:
+ ############################################################################
+ # Low-level, general purpose definitions, unversioned
+ ip_address:
+ type: 'string' # NOTE: we don't validate this is a valid addr (yet)
+ mac_address:
+ type: 'string'
+ pattern: '^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
+ ############################################################################
+ # Mid-level definitions, common schema for jumpserver & cluster nodes
+ node:
+ v1.0:
+ type: 'object'
+ properties:
+ type:
+ type: 'string'
+ enum: ['baremetal', 'virtual']
+ vendor:
+ type: 'string'
+ model:
+ type: 'string'
+ arch:
+ type: 'string'
+ enum: ['aarch64', 'x86_64']
+ cpus:
+ type: 'number'
+ cpu_cflags:
+ type: 'string'
+ cores:
+ type: 'number'
+ memory:
+ type: 'string'
+ pattern: '^[1-9]\d*[MGT]B?$'
+ required: ['type', 'vendor', 'model', 'arch', 'cpus', 'cpu_cflags', 'cores', 'memory']
+ additionalProperties: false
+ disks:
+ v1.0:
+ type: 'array'
+ items:
+ type: 'object'
+ properties:
+ name:
+ type: 'string'
+ pattern: '^disk[0-9]+$'
+ disk_capacity:
+ type: 'string'
+ pattern: '^[1-9][\d\.]*[MGT]B?$'
+ disk_type:
+ type: 'string'
+ enum: ['hdd', 'ssd', 'cdrom', 'tape']
+ disk_interface:
+ type: 'string'
+ enum: ['sata', 'sas', 'ssd', 'nvme', 'scsi', 'iscsi']
+ disk_rotation:
+ type: 'number'
+ enum: [0, 5400, 7200, 10000, 15000]
+ required: ['name', 'disk_capacity', 'disk_type', 'disk_interface', 'disk_rotation']
+ additionalProperties: false
+ remote_management:
+ v1.0:
+ properties:
+ user:
+ type: 'string'
+ pass:
+ type: 'string'
+ type:
+ type: 'string'
+ versions:
+ type: 'array'
+ address:
+ type: 'string'
+ mac_address:
+ type: 'string'
+ # These subsections are best validated separately for baremetal/virtual
+ oneOf:
+ - type: 'object'
+ properties:
+ type:
+ type: 'string'
+ enum: ['ipmi', 'amt']
+ versions:
+ type: 'array'
+ items:
+ type: 'number'
+ enum: [1.0, 2.0]
+ address:
+ $ref: '#/definitions/ip_address'
+ mac_address:
+ $ref: '#/definitions/mac_address'
+ required: ['type', 'versions', 'address', 'mac_address']
+ - type: 'object'
+ properties:
+ type:
+ type: 'string'
+ enum: ['libvirt']
+ address:
+ type: 'string' # Loose validation of libvirt URI for now
+ required: ['type', 'address']
+ required: ['user', 'pass']
+ additionalProperties: false
+ interfaces:
+ v1.0:
+ type: 'array'
+ items:
+ type: 'object'
+ properties:
+ name:
+ type: 'string'
+ pattern: '^nic[0-9]+$'
+ mac_address:
+ $ref: '#/definitions/mac_address'
+ # Optional
+ address:
+ $ref: '#/definitions/ip_address'
+ # Optional
+ vlan:
+ oneOf:
+ - type: 'string'
+ pattern: '^(native|[1-9][0-9]{0,3})(\|(native|[1-9][0-9]{0,3}))*$'
+ - type: 'integer'
+ mininum: 1
+ maximum: 4095
+ # Optional
+ speed:
+ type: 'string'
+ enum: ['1gb', '10gb', '25gb', '40gb']
+ # FIXME: mandatory for nodes?
+ # Optional
+ features:
+ type: ['string', 'null']
+ pattern: '^((dpdk|sriov)\|?)*$'
+ # FIXME: mandatory for nodes?
+ required: ['name', 'mac_address']
+ additionalProperties: false
+ ############################################################################
+ # Top-level PDF blocks, versioned
+ details:
+ v1.0:
+ type: 'object'
+ properties:
+ type:
+ type: 'string'
+ enum: ['production', 'development']
+ pod_owner:
+ type: 'string'
+ contact:
+ type: 'string'
+ pattern: '^([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+[,; ]*)+$'
+ lab:
+ type: 'string'
+ location:
+ type: 'string'
+ link:
+ type: 'string'
+ required: ['type', 'pod_owner', 'contact', 'lab', 'location', 'link']
+ additionalProperties: false
+ jumphost:
+ v1.0:
+ type: 'object'
+ properties:
+ name:
+ type: 'string'
+ node:
+ $ref: '#/definitions/node/v1.0'
+ disks:
+ $ref: '#/definitions/disks/v1.0'
+ os:
+ type: 'string'
+ remote_params: # Optional YAML anchor, contents will be validated below
+ type: 'object'
+ remote_management:
+ $ref: '#/definitions/remote_management/v1.0'
+ interfaces:
+ $ref: '#/definitions/interfaces/v1.0'
+ required: ['name', 'node', 'disks', 'os', 'remote_management', 'interfaces']
+ additionalProperties: false
+ nodes:
+ v1.0:
+ type: 'array'
+ items:
+ type: 'object'
+ properties:
+ name:
+ type: 'string'
+ node:
+ $ref: '#/definitions/node/v1.0'
+ disks:
+ $ref: '#/definitions/disks/v1.0'
+ os:
+ type: 'string'
+ remote_params: # Optional YAML anchor, contents will be validated after inject
+ type: 'object'
+ remote_management:
+ $ref: '#/definitions/remote_management/v1.0'
+ interfaces:
+ $ref: '#/definitions/interfaces/v1.0'
+ required: ['name', 'node', 'disks', 'remote_management', 'interfaces']
+ additionalProperties: false
+
+##############################################################################
+# Top-level structure:
+# - define all possible top-level keys, without enforcing a schema for them,
+# just so we can disallow additional properties;
+# - require 'version' and allow dynamically generated 'version_x.y' key;
+properties:
+ # version_x.y keys are auto-added by `validate_schema.py` based on 'version'
+ version_1.0:
+ type: 'boolean'
+ version:
+ type: 'number'
+ enum: [1.0]
+ details:
+ type: 'object'
+ jumphost:
+ type: 'object'
+ nodes:
+ type: 'array'
+required: ['version']
+additionalProperties: false
+
+##############################################################################
+# Schema versioning
+# - based on dynamically added 'version_x.y', require additional PDF blocks
+# and validate them against the proper schema version;
+dependencies:
+ version_1.0:
+ properties:
+ details:
+ $ref: '#/definitions/details/v1.0'
+ jumphost:
+ $ref: '#/definitions/jumphost/v1.0'
+ nodes:
+ $ref: '#/definitions/nodes/v1.0'
+ required: ['details', 'jumphost', 'nodes']
diff --git a/config/pdf/pod1.yaml b/config/pdf/pod1.yaml
index d9028c23..4ea751ec 100644
--- a/config/pdf/pod1.yaml
+++ b/config/pdf/pod1.yaml
@@ -1,6 +1,15 @@
+##############################################################################
+# Copyright (c) 2018 Intel 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
+##############################################################################
---
### POD descriptor file ###
+version: 1.0
+
details:
pod_owner: Lab Owner
contact: email@address.com
@@ -32,9 +41,9 @@ jumphost:
# several disk types possible
disk_type: {hdd|ssd|cdrom|tape}
# several interface types possible
- disk_interface: {sata|sas|ssd|nvme}
+ disk_interface: {sata|sas|ssd|nvme|scsi|iscsi}
# define rotation speed of disk
- disk_rotation: {5400|7200|10000|15000}
+ disk_rotation: {0|5400|7200|10000|15000}
# second disk
- name: 'disk2'
disk_capacity: 2048G
@@ -45,7 +54,8 @@ jumphost:
os: ubuntu-14.04
remote_params: &remote_params
# hardware management tool
- type: {ipmi|amt}
+ type: {ipmi|amt|libvirt}
+ # array of supported versions, mandatory for all but 'libvirt'
versions:
- 1.0
- 2.0
@@ -54,18 +64,19 @@ jumphost:
remote_management:
<<: *remote_params
address: 10.4.7.3/24
+ # MAC address is mandatory for all BMC types but 'libvirt'
mac_address: "10:23:45:67:89:AC"
# physical interface list
interfaces:
# first interface
- - nic: {nic#number}
+ - name: {nic#number}
# ip address of nic
address: 192.168.100.1
mac_address: "10:23:45:67:89:AC"
# vlan tag, may have multiple tags
vlan: {native|1-4095}
# second interface
- - nic: 'nic2'
+ - name: 'nic2'
address: 10.20.0.1/24
mac_address: "10:23:45:67:89:5B"
nodes: