-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DT using BMO / Metal3 provisioning
- Loading branch information
Showing
31 changed files
with
2,142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
vas: | ||
bmo: | ||
stages: | ||
- path: examples/dt/bmo/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/bmo/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/bmo/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/bmo/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/bmo/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/bmo/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 |
14 changes: 14 additions & 0 deletions
14
dt/bmo/dataplane/baremetalhosts/baremetalhost_template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: BareMetalHost | ||
metadata: | ||
labels: {} | ||
name: _ignored_ | ||
namespace: openstack | ||
spec: | ||
architecture: x86_64 | ||
automatedCleaningMode: metadata | ||
bmc: {} | ||
bootMACAddress: _replaced_ | ||
bootMode: UEFI | ||
rootDeviceHints: {} | ||
online: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: BareMetalHost | ||
metadata: | ||
labels: {} | ||
name: leaf0-0 | ||
namespace: openstack | ||
--- | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: BareMetalHost | ||
metadata: | ||
labels: {} | ||
name: leaf0-1 | ||
namespace: openstack | ||
--- | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: BareMetalHost | ||
metadata: | ||
labels: {} | ||
name: leaf1-0 | ||
namespace: openstack | ||
--- | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: BareMetalHost | ||
metadata: | ||
labels: {} | ||
name: leaf1-1 | ||
namespace: openstack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: bmc-secret | ||
namespace: openstack | ||
data: | ||
username: _raplaced_ | ||
password: _replaced_ | ||
type: Opaque | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
resources: | ||
- bmc_secret.yaml | ||
- baremetalhosts.yaml | ||
|
||
patches: | ||
- target: | ||
kind: BareMetalHost | ||
path: baremetalhost_template.yaml | ||
|
||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.bmc_credentials | ||
targets: | ||
- select: | ||
kind: Secret | ||
name: bmc-secret | ||
fieldPaths: | ||
- data | ||
options: | ||
create: true | ||
|
||
# Labels | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-0.labels | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-0 | ||
fieldPaths: | ||
- metadata.labels | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-1.labels | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-1 | ||
fieldPaths: | ||
- metadata.labels | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-0.labels | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-0 | ||
fieldPaths: | ||
- metadata.labels | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-1.labels | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-1 | ||
fieldPaths: | ||
- metadata.labels | ||
options: | ||
create: true | ||
|
||
# BMC | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-0.bmc | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-0 | ||
fieldPaths: | ||
- spec.bmc | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-1.bmc | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-1 | ||
fieldPaths: | ||
- spec.bmc | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-0.bmc | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-0 | ||
fieldPaths: | ||
- spec.bmc | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-1.bmc | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-1 | ||
fieldPaths: | ||
- spec.bmc | ||
options: | ||
create: true | ||
# bootMACAddress | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-0.bootMACAddress | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-0 | ||
fieldPaths: | ||
- spec.bootMACAddress | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-1.bootMACAddress | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-1 | ||
fieldPaths: | ||
- spec.bootMACAddress | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-0.bootMACAddress | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-0 | ||
fieldPaths: | ||
- spec.bootMACAddress | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-1.bootMACAddress | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-1 | ||
fieldPaths: | ||
- spec.bootMACAddress | ||
options: | ||
create: true | ||
|
||
# rootDeviceHints | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-0.rootDeviceHints | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-0 | ||
fieldPaths: | ||
- spec.rootDeviceHints | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf0-1.rootDeviceHints | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf0-1 | ||
fieldPaths: | ||
- spec.rootDeviceHints | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-0.rootDeviceHints | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-0 | ||
fieldPaths: | ||
- spec.rootDeviceHints | ||
options: | ||
create: true | ||
- source: | ||
kind: ConfigMap | ||
name: baremetalhost-values | ||
fieldPath: data.leaf1-1.rootDeviceHints | ||
targets: | ||
- select: | ||
kind: BareMetalHost | ||
name: leaf1-1 | ||
fieldPaths: | ||
- spec.rootDeviceHints | ||
options: | ||
create: true | ||
Oops, something went wrong.