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 <[email protected]>
  • Loading branch information
psathyan committed May 14, 2024
1 parent ce4b3d0 commit 053914a
Show file tree
Hide file tree
Showing 39 changed files with 1,954 additions and 0 deletions.
100 changes: 100 additions & 0 deletions automation/vars/shiftonstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
# Stores the different automation workflow steps required by various
# shiftonstack deployed topologies.
vas:
shiftonstack03:
stages:
- path: examples/dt/shiftonstack03/control-plane/pre-ceph/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=60s
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/shiftonstack03/control-plane/pre-ceph
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/shiftonstack03/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/shiftonstack03/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/shiftonstack03/control-plane
wait_conditions:
- >-
oc -n openstack wait openstackcontrolplane
controlplane
--for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: pre-ceph/nncp/values.yaml
- name: service-values
src_file: pre-ceph/service-values.yaml
- name: service-values-post-ceph
src_file: service-values.yaml
build_output: control-plane-post-ceph.yaml

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

- path: examples/dt/shiftonstack03/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/shiftonstack03/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/shiftonstack03/README.md) if you
are looking for information on how to deploy the type 3 deployment topology
of OpenShift on OpenStack.

This directory `dt/shiftonstack03/`, exists so that the
[kustomization.yaml](../../examples/dt/shiftonstack03/kustomization.yaml) in
the examples directory of shiftonstack03, 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/shiftonstack03/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/shiftonstack03/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
10 changes: 10 additions & 0 deletions dt/shiftonstack03/compute/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/shiftonstack03/compute/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/shiftonstack03/compute/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
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
29 changes: 29 additions & 0 deletions dt/shiftonstack03/compute/nova_ceph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ceph-nova
data:
03-ceph-nova.conf: _replaced_

---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: nova-custom-ceph
spec:
label: dataplane-deployment-nova-custom-ceph
configMaps:
- ceph-nova
secrets:
- nova-cell1-compute-config
- nova-migration-ssh-key
playbook: osp.edpm.nova
tlsCert:
contents:
- dnsnames
- ips
networks:
- ctlplane
issuer: osp-rootca-issuer-internal
caCerts: combined-ca-bundle
10 changes: 10 additions & 0 deletions dt/shiftonstack03/control-plane/ceph_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: Secret
metadata:
name: ceph-conf-files
namespace: openstack
type: Opaque
data:
ceph.client.openstack.keyring: _replaced_
ceph.conf: _replaced_
Loading

0 comments on commit 053914a

Please sign in to comment.