Skip to content

Commit

Permalink
[shiftonstack] Type 3 - external ceph support
Browse files Browse the repository at this point in the history
Deployed Topology 03 type for OpenShift on OpenStack.

Signed-off-by: Pragadeeswaran Sathyanarayanan <psathyan@redhat.com>
  • Loading branch information
psathyan committed Jun 1, 2024
1 parent 71c3e69 commit 51c90c6
Show file tree
Hide file tree
Showing 38 changed files with 2,488 additions and 0 deletions.
13 changes: 13 additions & 0 deletions automation/mocks/shiftstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
cifmw_baremetal_hosts:
compute-0:
connection: ipmi://10.10.100.100
boot_mode: UEFI
nics:
- mac: "89:9a:b7:cb:4a:3f"
network: provision
- mac: "53:b0:4d:06:56:ea"
network: public
credentials_file: "/home/user/foo.yaml"
root_device_hint_field: "wwnWithExtension"
root_device_hint: "0x6509a4c0ac82ff002dbccf463196ca41"
98 changes: 98 additions & 0 deletions automation/vars/shiftstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
vas:
shiftstack:
stages:
- path: examples/dt/shiftstack/control-plane/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=120s
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/shiftstack/control-plane
wait_conditions:
- >-
oc -n openstack wait openstackcontrolplane
controlplane
--for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
- name: service-values
src_file: service-values.yaml
build_output: control-plane.yaml

- path: examples/dt/shiftstack/ceph/nodeset
wait_conditions:
- >-
oc -n openstack wait openstackdataplanenodeset
ceph-nodes
--for condition=SetupReady
--timeout=600s
values:
- name: edpm-nodeset-values
src_file: values.yaml
build_output: ceph-nodeset.yaml

- path: examples/dt/shiftstack/ceph
wait_conditions:
- >-
oc -n openstack wait openstackdataplanedeployment
ceph-deploy
--for condition=Ready
--timeout=1500s
values:
- name: edpm-deployment-values
src_file: values.yaml
build_output: ceph-deploy.yaml
post_stage_run:
- name: Deploy ceph
type: playbook
source: "../../playbooks/ceph.yml"
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"

- path: examples/dt/shiftstack
wait_conditions:
- >-
oc -n openstack wait openstackcontrolplane
controlplane
--for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: control-plane/nncp/values.yaml
- name: service-values
src_file: control-plane/service-values.yaml
- name: service-values-post-ceph
src_file: service-values.yaml
build_output: control-plane-post-ceph.yaml

- path: examples/dt/shiftstack/compute/nodeset
wait_conditions:
- >-
oc -n openstack wait openstackdataplanenodeset
compute-nodes
--for condition=SetupReady
--timeout=30m
values:
- name: edpm-nodeset-values
src_file: values.yaml
build_output: compute-nodes.yaml

- path: examples/dt/shiftstack/compute
wait_conditions:
- >-
oc -n openstack wait openstackdataplanedeployment
compute-deploy
--for condition=Ready
--timeout=1500s
values:
- name: edpm-deployment-values
src_file: values.yaml
build_output: compute-deploy.yaml
11 changes: 11 additions & 0 deletions dt/shiftstack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# OpenShift on OpenStack - Deployment topology type 3

Please refer the [README](../../examples/dt/shiftstack/README.md) if you
are looking for information on how to deploy the type 3 deployment topology
of OpenShift on OpenStack.

This directory `dt/shiftstack/`, exists so that the
[kustomization.yaml](../../examples/dt/shiftstack/kustomization.yaml) in
the examples directory of shiftstack, reference it by path as a
component. It's contents are likely uninteresting unless you want to understand
how kustomize was implemented in this repository.
34 changes: 34 additions & 0 deletions dt/shiftstack/ceph/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
components:
- ../../../lib/dataplane/deployment

patches:
- target:
kind: OpenStackDataPlaneDeployment
name: .*
patch: |-
- op: replace
path: /metadata/name
value: ceph-deploy
- op: replace
path: /spec/nodeSets
value:
- ceph-nodes
38 changes: 38 additions & 0 deletions dt/shiftstack/ceph/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
components:
- ../../../../lib/dataplane/nodeset

patches:
- target:
kind: OpenStackDataPlaneNodeSet
name: .*
patch: |-
- op: replace
path: /metadata/name
value: ceph-nodes
- target:
kind: Secret
name: nova-migration-ssh-key
patch: |-
- op: add
path: /metadata/annotations
value:
config.kubernetes.io/local-config: true
12 changes: 12 additions & 0 deletions dt/shiftstack/ceph_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Secret
type: Opaque

metadata:
name: ceph-conf-files
namespace: openstack

data:
ceph.client.openstack.keyring: _replaced_
ceph.conf: _replaced_
34 changes: 34 additions & 0 deletions dt/shiftstack/compute/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
components:
- ../../../lib/dataplane/deployment

patches:
- target:
kind: OpenStackDataPlaneDeployment
name: .*
patch: |-
- op: replace
path: /metadata/name
value: compute-deploy
- op: replace
path: /spec/nodeSets
value:
- compute-nodes
10 changes: 10 additions & 0 deletions dt/shiftstack/compute/nodeset/bm_password.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: Secret
type: Opaque

metadata:
name: baremetalset-password-secret

data:
NodeRootPassword: _replaced_
19 changes: 19 additions & 0 deletions dt/shiftstack/compute/nodeset/extra_mounts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet

metadata:
name: compute-nodes

spec:
nodeTemplate:
extraMounts:
- extraVolType: Ceph
mounts:
- mountPath: /etc/ceph
name: ceph
readOnly: true
volumes:
- name: ceph
secret:
secretName: ceph-conf-files
101 changes: 101 additions & 0 deletions dt/shiftstack/compute/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
components:
- ../../../../lib/dataplane/nodeset

resources:
- bm_password.yaml
- nova_ceph.yaml

patches:
- target:
kind: OpenStackDataPlaneNodeSet
name: .*
patch: |-
- op: replace
path: /metadata/name
value: compute-nodes
- target:
kind: OpenStackDataPlaneNodeSet
name: .*
path: extra_mounts.yaml

replacements:
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.ceph.conf
targets:
- select:
kind: ConfigMap
name: ceph-nova
fieldPaths:
- data.03-ceph-nova\.conf
options:
create: true

- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.nodeset.services
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.services
options:
create: true

- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.root_password
targets:
- select:
kind: Secret
name: baremetalset-password-secret
fieldPaths:
- data.NodeRootPassword
options:
create: true

- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.preProvisioned
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.preProvisioned
options:
create: true

- source:
kind: ConfigMap
name: edpm-nodeset-values
fieldPath: data.baremetalSetTemplate
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.baremetalSetTemplate
options:
create: true
Loading

0 comments on commit 51c90c6

Please sign in to comment.