-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from fultonj/k1
Restructure for kustomize
- Loading branch information
Showing
85 changed files
with
2,090 additions
and
1,072 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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# OpenStack K8S Operators Architectures | ||
|
||
This repo stores validated OpenStack K8S Operators architectures [VAs](va), represented as CRs for the various operators. | ||
This repository may be used with to create validated | ||
architectures ([VAs](examples/va)), represented as CRs for | ||
[openstack-k8s-operators](https://github.com/openstack-k8s-operators). | ||
It may also be used to create deployed topologies | ||
([DTs](examples/dt)) which should only be used for testing. | ||
|
||
It also stores deployment topologies [DTs](dt) which should only be | ||
used for testing. | ||
The following VAs are available. | ||
|
||
- [Hyperconverged OpenStack and Ceph](examples/va/hci/) |
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
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 @@ | ||
../examples/dt/README.md |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# OpenStack K8S Operators Architectures | ||
|
||
The | ||
[Architectures](https://github.com/openstack-k8s-operators/architecture/) | ||
repository may be used with to create validated architectures (VAs), | ||
represented as custom resources (CRs) for | ||
[openstack-k8s-operators](https://github.com/openstack-k8s-operators). | ||
It may also be used to create deployed topologies | ||
([DTs](dt.md)) which should only be used for testing. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,3 @@ | ||
resources: | ||
- ../../../lib/olm-deps | ||
- ../../../lib/olm-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
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 @@ | ||
The EDPM directory of the first DT will go here |
Empty file.
Empty file.
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,39 @@ | ||
# Hyperconverged OpenStack and Ceph | ||
|
||
**Based on OpenStack K8S operators from the "main" branch of the [OpenStack Operator repo](https://github.com/openstack-k8s-operators/openstack-operator/commit/aa63bf3931f74722dd48af8a0914233b2b384330) on Dec 19th, 2023** | ||
|
||
This is a collection of CR templates that represent a validated Red Hat OpenStack Services on OpenShift deployment that has the following characteristics: | ||
|
||
- 3 master/worker combo-node OpenShift cluster | ||
- 3-replica Galera database | ||
- RabbitMQ | ||
- OVN networking | ||
- Network isolation over a single NIC | ||
- 3 compute nodes | ||
- CephHCI installed on compute nodes and used by various OSP services | ||
- Cinder Volume using RBD for backend | ||
- Cinder Backup using RBD for backend | ||
- Glance using RBD for backend | ||
- Nova using RBD for ephemeral storage | ||
- Manila using CephFS for backend | ||
|
||
## Considerations | ||
|
||
1. These CRs are validated for the overall functionality of the OSP cloud deployed, but they nonetheless require customization for the particular environment in which they are utilized. In this sense they are _templates_ meant to be consumed and tweaked to fit the specific constraints of the hardware available. | ||
|
||
2. The CRs are applied against an OpenShift cluster in _stages_. That is, there is an ordering in which each grouping of CRs is fed to the cluster. It is _not_ a case of simply taking all CRs from all stages and applying them all at once. | ||
|
||
3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to genereate the CRs dynamically. The `values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required. | ||
|
||
4. In stages 3 and 4 YAML comments are placed throughout the CRs to aid in the process of customizing the CRs. Fields that _must_ (or most likely need to be) changed are commented with "# CHANGEME" either on the field itself or somewhere nearby. Other comments are added to explain fields that can be changed and, sometimes, to explain additions that can be made. | ||
|
||
5. Between stages 3 and 4, _it is assumed that the user installs Ceph on the 3 OSP compute nodes._ OpenStack K8S CRDs do not provide a way to install Ceph via any sort of combination of CRs. | ||
|
||
## Stages | ||
|
||
All stages must be executed in the order listed below. Everything is required unless otherwise indicated. | ||
|
||
1. [Install the OpenStack K8S operators and their dependencies](../../common/) | ||
2. [Configuring networking and deploy the OpenStack control plane](control-plane.md) | ||
3. [Configure and deploy the initial data plane to prepare for Ceph installation](edpm-pre-ceph) | ||
4. [Update the control plane and finish deploying the data plane after Ceph has been installed](edpm-post-ceph) |
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,66 @@ | ||
# Configuring networking and deploy the OpenStack control plane | ||
|
||
## Assumptions | ||
|
||
- A storage class called `local-storage` should already exist. | ||
|
||
## Initialize | ||
|
||
Switch to the "openstack" namespace | ||
``` | ||
oc project openstack | ||
``` | ||
Change to the hci directory | ||
``` | ||
cd architecture/examples/va/hci | ||
``` | ||
Edit the [values.yaml](values.yaml) file to suit your environment. | ||
``` | ||
vi values.yaml | ||
``` | ||
Alternatively use your own copy of `values.yaml` and edit | ||
[kustomization.yaml](kustomization.yaml) to use that copy. | ||
``` | ||
resources: | ||
- values-ci-framework.yaml | ||
``` | ||
|
||
Generate the control-plane and networking CRs. | ||
``` | ||
kustomize build > control-plane.yaml | ||
``` | ||
|
||
## Create CRs | ||
``` | ||
oc apply -f control-plane.yaml | ||
``` | ||
|
||
Wait for NNCPs to be available | ||
``` | ||
oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s | ||
``` | ||
|
||
Wait for control plane to be available | ||
``` | ||
oc wait osctlplane controlplane --for condition=Ready --timeout=600s | ||
``` | ||
|
||
## Workaround | ||
|
||
The `control-plane.yaml` file contains CRs for both `NMState` and | ||
`NodeNetworkConfigurationPolicy` (NNCP). When `oc apply -f` is | ||
passed this file, OpenShift might try to create the NNCPs while | ||
`NMState` CRDs are still installing and produce the following message. | ||
|
||
``` | ||
nmstate.nmstate.io/nmstate created | ||
[resource mapping not found for name: | ||
"ostest-master-0" namespace: "openstack" from "control-plane.yaml": | ||
no matches for kind "NodeNetworkConfigurationPolicy" in version "nmstate.io/v1" | ||
ensure CRDs are installed first, | ||
resource mapping not found for name: "ostest-master-1" namespace: "openstack" | ||
from "control-plane.yaml": no matches for kind "NodeNetworkConfigurationPolicy" | ||
in version "nmstate.io/v1" | ||
``` | ||
Retrying `oc apply -f contol-plane.yaml` a few seconds later should | ||
resolve the problem however. |
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,54 @@ | ||
# EDPM Post Ceph | ||
|
||
Finish deploying the data plane after Ceph is available | ||
|
||
## Notes | ||
|
||
Assumes that a Ceph cluster is available. | ||
|
||
At this stage the CRs in this directory need to be edited to match the | ||
values in your environment. Look for `#CHANGEME` comments in each CR | ||
and update them accordingly. In the future this will not be necessary | ||
when this `edpm-pre-ceph` and `edpm-post-ceph` directories are updated | ||
to use `kustomize`. | ||
|
||
During this stage the OpenStackDataPlaneNodeSet | ||
(openstackdataplanenodeset.yaml) and OpenStackControlPlane | ||
(openstackcontrolplane.yaml) are updated. New instances of these | ||
services are not created. Thus, if you have modified these CRs beyond | ||
after [creating the OpenStackControlPlane](../control-plane.md) or after | ||
[creating the OpenStackDataPlaneNodeSet](../edpm-pre-ceph/README.md), | ||
then your personal changes could be lost when you run `oc apply` as | ||
described below. To avoid this, `diff` the files and apply the changes | ||
using `oc edit` or `oc patch` during steps 2 and 3 below. | ||
|
||
```bash | ||
cd architecture/examples/va/hci | ||
diff -u control-plane.yaml edpm-post-ceph/openstackcontrolplane.yaml | ||
diff -u edpm-pre-ceph/openstackdataplanenodeset.yaml edpm-post-ceph/openstackdataplanenodeset.yaml | ||
``` | ||
|
||
## Steps | ||
|
||
1. Create Secrets | ||
```bash | ||
oc apply -f ceph_secret.yaml -f nova_ceph.yaml -f nova_migration_ssh_key.yaml | ||
``` | ||
2. Update OpenStackControlPlane and wait for it to finish | ||
```bash | ||
oc apply -f openstackcontrolplane.yaml | ||
oc wait osctlplane controlplane --for condition=Ready --timeout=300s | ||
``` | ||
3. Update OpenStackDataPlaneNodeSet | ||
```bash | ||
oc apply -f openstackdataplanenodeset.yaml | ||
``` | ||
4. Create a post-Ceph OpenStackDataPlaneDeployment and wait for it to finish | ||
```bash | ||
oc apply -f openstackdataplanedeployment.yaml | ||
oc wait osdpd deployment-post-ceph --for condition=Ready --timeout=720s | ||
``` | ||
5. Ask Nova to discover all compute hosts | ||
```bash | ||
oc rsh nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verbose | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion
8
va/hci/stage5/README.md → examples/va/hci/edpm-pre-ceph/README.md
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
components: | ||
- ../../../va/hci/ | ||
# - https://github.com/openstack-k8s-operators/architecture/va/hci?ref=main | ||
## It's possible to replace ../../../va/hci/ with a git checkout URL as per: | ||
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md | ||
|
||
resources: | ||
- values.yaml |
Oops, something went wrong.