Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT - BMO deploy with preprovisioningNetworkData #413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/automation-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ _hook:
inventory: str(required=False)
extra_vars: map(required=False)
definition: map(required=False)
api_version: str(required=False)
namespace: str(required=False)
resource_name: str(required=False)
state: str(required=False)
kind: str(required=False)
Expand Down
105 changes: 105 additions & 0 deletions automation/vars/bmo01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
vas:
bmo01:
stages:
- path: examples/dt/bmo01/control-plane/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=5m
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- pre_stage_run:
- name: Apply cinder-lvm label on master-0
type: cr
definition:
metadata:
labels:
openstack.org/cinder-lvm: ""
kind: Node
resource_name: master-0
state: patched
path: examples/dt/bmo01/control-plane
wait_conditions:
- >-
oc -n openstack wait openstackcontrolplane
controlplane
--for condition=Ready
--timeout=60m
values:
- name: network-values
src_file: nncp/values.yaml
- name: service-values
src_file: service-values.yaml
build_output: control-plane.yaml

- pre_stage_run:
- name: Patch Provisioning CR
type: cr
definition:
spec:
watchAllNamespaces: true
virtualMediaViaExternalNetwork: true
namespace: openshift-machine-api
api_version: metal3.io/v1alpha1
kind: Provisioning
resource_name: provisioning-configuration
state: patched
path: examples/dt/bmo01/dataplane/baremetalhosts
wait_conditions:
- >-
oc -n openstack wait baremetalhosts.metal3.io
-l app=openstack
--for jsonpath=status.provisioning.state=available
--timeout=10m
values:
- name: baremetalhost-values
src_file: values.yaml
build_output: baremetalhosts.yaml

- path: examples/dt/bmo01/dataplane/secrets
wait_conditions:
- >-
oc -n openstack wait secrets dataplane-ansible-ssh-private-key-secret
--for jsonpath=metadata.uid
- >-
oc -n openstack wait secrets nova-migration-ssh-key
--for jsonpath=metadata.uid
values:
- name: secret-values
src_file: values.yaml
build_output: dataplane-secrets.yaml

- path: examples/dt/bmo01/dataplane/nodesets
wait_conditions:
- >-
oc -n openstack wait openstackdataplanenodesets
nodeset-0
--for condition=NodeSetBaremetalProvisionReady
--timeout=40m
- >-
oc -n openstack wait openstackdataplanenodesets
nodeset-1
--for condition=NodeSetBaremetalProvisionReady
--timeout=40m
values:
- name: nodeset-values
src_file: values.yaml
build_output: dataplane-nodesets.yaml

- path: examples/dt/bmo01/dataplane
wait_conditions:
- >-
oc -n openstack wait openstackdataplanedeployment
edpm-deployment
--for condition=Ready
--timeout=40m
values:
- name: deployment-values
src_file: values.yaml
build_output: edpm.yaml
8 changes: 8 additions & 0 deletions create-zuul-jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
'lib',
]

_JOBS_EXTRA_VARS = {
'bmo01': {
'cifmw_ci_gen_kustomize_values_remove_keys_expressions': ['^node(_[0-9]+)?$']
}
}


def create_job(name, data):
j_name = 'rhoso-architecture-validate-{}'.format(name)
_paths = [p['path'] for p in data['stages']] + _BASE_TRIGGER_FILES
Expand All @@ -27,6 +34,7 @@ def create_job(name, data):
},
}
}
job['job']['vars'].update(_JOBS_EXTRA_VARS.get(name, {}))

if os.path.exists(_mock):
_paths.append(_mock)
Expand Down
18 changes: 18 additions & 0 deletions dt/bmo01/dataplane/baremetalhosts/baremetalhost_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
labels: {}
name: _ignored_
namespace: openstack
spec:
architecture: x86_64
automatedCleaningMode: metadata
bmc:
address: _replaced_
credentialsName: _replaced_
bootMACAddress: _replaced_
bootMode: UEFI
rootDeviceHints: {}
online: false
preprovisioningNetworkDataName: _replaced_
60 changes: 60 additions & 0 deletions dt/bmo01/dataplane/baremetalhosts/baremetalhosts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
apiVersion: v1
kind: Secret
metadata:
name: leaf0-0-preprovision-network-data
namespace: openstack
type: Opaque
stringData: {}
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
labels: {}
name: leaf0-0
namespace: openstack
---
apiVersion: v1
kind: Secret
metadata:
name: leaf0-1-preprovision-network-data
namespace: openstack
type: Opaque
stringData: {}
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
labels: {}
name: leaf0-1
namespace: openstack
---
apiVersion: v1
kind: Secret
metadata:
name: leaf1-0-preprovision-network-data
namespace: openstack
type: Opaque
stringData: {}
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
labels: {}
name: leaf1-0
namespace: openstack
---
apiVersion: v1
kind: Secret
metadata:
name: leaf1-1-preprovision-network-data
namespace: openstack
type: Opaque
stringData: {}
---
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
labels: {}
name: leaf1-1
namespace: openstack
Loading