Browse Source

Add virtual-network-cloud site

This change introduces a virtual site, virtual-network-cloud, that
validates the network-cloud type.

Change-Id: I5e667081dd112a954c91ee2589b9d0e6039fd6d8
changes/89/744789/16
Drew Walters 12 months ago
parent
commit
9510dd385e
  1. 2
      .gitignore
  2. 20
      manifests/site/virtual-network-cloud/ephemeral/bootstrap/baremetalhost.yaml
  3. 10
      manifests/site/virtual-network-cloud/ephemeral/bootstrap/hostgenerator/host-generation.yaml
  4. 9
      manifests/site/virtual-network-cloud/ephemeral/bootstrap/hostgenerator/kustomization.yaml
  5. 10
      manifests/site/virtual-network-cloud/ephemeral/bootstrap/kustomization.yaml
  6. 11
      manifests/site/virtual-network-cloud/ephemeral/controlplane/control-machine-template-patch.yaml
  7. 10
      manifests/site/virtual-network-cloud/ephemeral/controlplane/hostgenerator/host-generation.yaml
  8. 9
      manifests/site/virtual-network-cloud/ephemeral/controlplane/hostgenerator/kustomization.yaml
  9. 9
      manifests/site/virtual-network-cloud/ephemeral/controlplane/kustomization.yaml
  10. 12
      manifests/site/virtual-network-cloud/ephemeral/controlplane/nodes/kustomization.yaml
  11. 4
      manifests/site/virtual-network-cloud/ephemeral/initinfra/kustomization.yaml
  12. 9
      manifests/site/virtual-network-cloud/ephemeral/initinfra/patch_bmo_config.yaml
  13. 33
      manifests/site/virtual-network-cloud/shared/catalogues/hosts.yaml
  14. 5
      manifests/site/virtual-network-cloud/shared/catalogues/kustomization.yaml
  15. 7
      manifests/type/network-cloud/shared/catalogues/kustomization.yaml

2
.gitignore

@ -1,3 +1,5 @@
# Unit test / coverage reports
.tox/
build/
manifests/site/virtual-network-cloud/ephemeral/controlplane/before.yaml

20
manifests/site/virtual-network-cloud/ephemeral/bootstrap/baremetalhost.yaml

@ -0,0 +1,20 @@
# This patches the node02 BMH to be suitable for ephemeral purposes
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
annotations:
labels:
airshipit.org/ephemeral-node: "true"
airshipit.org/deploy-k8s: "false"
name: node02
spec:
online: true
bmc:
address: redfish+https://localhost:8443/redfish/v1/Systems/air-ephemeral
status:
provisioning:
# we need this status to make sure, that the host is not going to be
# reprovisioned by the ephemeral baremetal operator.
# when we have more flexible labeling system in place, we will not
# deliver this document to ephemeral cluster
state: externally provisioned

10
manifests/site/virtual-network-cloud/ephemeral/bootstrap/hostgenerator/host-generation.yaml

@ -0,0 +1,10 @@
# Site-level, phase-specific lists of hosts to generate
# This is used by the hostgenerator-m3 function to narrow down the site-level
# host-catalogue to just the hosts needed for a particular phase.
apiVersion: airshipit.org/v1alpha1
kind: VariableCatalogue
metadata:
name: host-generation-catalogue
hosts:
m3:
- node02

9
manifests/site/virtual-network-cloud/ephemeral/bootstrap/hostgenerator/kustomization.yaml

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../airshipctl/manifests/function/hostgenerator-m3
- ../../../shared/catalogues/
- host-generation.yaml
transformers:
- ../../../../../../../airshipctl/manifests/function/hostgenerator-m3/replacements

10
manifests/site/virtual-network-cloud/ephemeral/bootstrap/kustomization.yaml

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../type/network-cloud/ephemeral/bootstrap
generators:
- hostgenerator
patchesStrategicMerge:
- baremetalhost.yaml

11
manifests/site/virtual-network-cloud/ephemeral/controlplane/control-machine-template-patch.yaml

@ -0,0 +1,11 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: Metal3MachineTemplate
metadata:
name: cluster-controlplane
spec:
template:
spec:
image:
url: http://10.23.24.1:8099/target-image.qcow2
checksum: http://10.23.24.1:8099/target-image.qcow2.md5sum

10
manifests/site/virtual-network-cloud/ephemeral/controlplane/hostgenerator/host-generation.yaml

@ -0,0 +1,10 @@
# Site-level, phase-specific lists of hosts to generate
# This is used by the hostgenerator-m3 function to narrow down the site-level
# host-catalogue to just the hosts needed for a particular phase.
apiVersion: airshipit.org/v1alpha1
kind: VariableCatalogue
metadata:
name: host-generation-catalogue
hosts:
m3:
- node01

9
manifests/site/virtual-network-cloud/ephemeral/controlplane/hostgenerator/kustomization.yaml

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../airshipctl/manifests/function/hostgenerator-m3
- ../../../shared/catalogues/
- host-generation.yaml
transformers:
- ../../../../../../../airshipctl/manifests/function/hostgenerator-m3/replacements

9
manifests/site/virtual-network-cloud/ephemeral/controlplane/kustomization.yaml

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../type/network-cloud/ephemeral/controlplane
# TODO (dukov) It's recocommended to upload BareMetalHost objects separately
# otherwise nodes will hang in 'registering' state for quite a long time
- nodes
patchesStrategicMerge:
- control-machine-template-patch.yaml

12
manifests/site/virtual-network-cloud/ephemeral/controlplane/nodes/kustomization.yaml

@ -0,0 +1,12 @@
# Note: this weird extra layer between the .. and ../hostgenerator
# is purely to apply the label below to the generated hosts.
# When can come up with a better way to declare (e.g. via catalogue)
# that the host is a controlplane host, we should get rid of this.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
generators:
- ../hostgenerator
commonLabels:
airshipit.org/k8s-role: controlplane-host

4
manifests/site/virtual-network-cloud/ephemeral/initinfra/kustomization.yaml

@ -0,0 +1,4 @@
resources:
- ../../../../type/network-cloud/ephemeral/initinfra
patchesStrategicMerge:
- patch_bmo_config.yaml

9
manifests/site/virtual-network-cloud/ephemeral/initinfra/patch_bmo_config.yaml

@ -0,0 +1,9 @@
---
kind: ConfigMap
apiVersion: v1
metadata:
labels:
name: ironic-vars
data:
PROVISIONING_IP: "10.23.24.101"
DHCP_RANGE: "10.23.24.200,10.23.24.250"

33
manifests/site/virtual-network-cloud/shared/catalogues/hosts.yaml

@ -0,0 +1,33 @@
# Site-level host catalogue. This info feeds the Templater
# kustomize plugin config in the hostgenerator-m3 function.
apiVersion: airshipit.org/v1alpha1
kind: VariableCatalogue
metadata:
name: host-catalogue
hosts:
m3:
node01:
macAddress: 52:54:00:b6:ed:31
bmcAddress: redfish+http://10.23.25.1:8000/redfish/v1/Systems/air-target-1
bmcUsername: root
bmcPassword: r00tme
ipAddresses:
oam-ipv4: 10.23.25.102
pxe-ipv4: 10.23.24.102
macAddresses:
oam: 52:54:00:9b:27:4c
pxe: 52:54:00:b6:ed:31
bootMode: legacy
hardwareProfile: default # defined in the hostgenerator-m3 function
node02:
macAddress: 52:54:00:b6:ed:02
bmcAddress: redfish+http://10.23.25.2:8000/redfish/v1/Systems/air-target-2
bmcUsername: username
bmcPassword: password
ipAddresses:
oam-ipv4: 10.23.25.101
pxe-ipv4: 10.23.24.101
macAddresses:
oam: 52:54:00:9b:27:02
pxe: 52:54:00:b6:ed:02
hardwareProfile: default # defined in the hostgenerator-m3 function

5
manifests/site/virtual-network-cloud/shared/catalogues/kustomization.yaml

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../type/network-cloud/shared/catalogues
- hosts.yaml

7
manifests/type/network-cloud/shared/catalogues/kustomization.yaml

@ -1,7 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../airship-core/shared/catalogues
- ../../../airship-core/shared/catalogues
patchesStrategicMerge:
- common-networking.yaml
# NOTE(drewwalters96): Uncomment to patch common-networking catalogue.
# patchesStrategicMerge:
# - common-networking.yaml
Loading…
Cancel
Save