Skip to content

Commit 5a2ecd9

Browse files
committed
Add compute-starter-kit dt
This change adds a readme describing the compute starter kit DT and job variants. This DT may be graducated to a VA in the future and will be used as the basis of the compute content promotion jobs prior to integration of promoted content. This initial patch also include a defintion of the compute-kit controlplane containing only keyston, placement, glance, neutron and nova. it does not contain a dataplane definition. that will be added in later patches.
1 parent 7354503 commit 5a2ecd9

File tree

13 files changed

+898
-4
lines changed

13 files changed

+898
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ The following VAs are available.
3232

3333
- [Hyperconverged OpenStack and Ceph](examples/va/hci/)
3434
- [Network Functions Virtualization with SRIOV](examples/va/nfv/sriov/)
35+
36+
The following DTs are available.
37+
38+
- [compute-starter-kit](examples/dt/compute/compute-starter-kit)

examples/dt/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
All validated architectures (VAs) are deployed topologies
44
(DTs), but not all DTs are VAs.
55

6-
DTs represent CI optimizations. We design them to test lots of things
7-
together so we can have as few of them as possible. Before proposing a
8-
new DT to test something, consider if an update to an existing DT will
9-
achieve the same result.
6+
Most DTs represent CI optimizations. We typically design them to test
7+
lots of things together so we can have as few of them as possible. Before
8+
proposing a new DT to test something, consider if an update to an existing DT will
9+
achieve the same result. Other DTs define specific toplogies where a subset of
10+
compoents are deployed explictly without others. Where a DT is not intended
11+
To be extendable such as the compute-starter-kit it should be documeted as such.
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Compute Starter Kit
2+
3+
**Based on OpenStack K8S operators from the "main" branch of the [OpenStack Operator repo](https://github.com/openstack-k8s-operators/openstack-operator/)**
4+
5+
This is a collection of CR templates that represent a openstack deployment
6+
topology that has the following characteristics:
7+
8+
- Single noe OpenShift cluster (CRC)
9+
- 1-replica of all deployed services
10+
- OVN networking
11+
- Network isolation over a single NIC
12+
- 2 compute nodes
13+
- deploy openstack services: keystone, glace, placement, neutron, nova
14+
15+
## Purpose
16+
17+
When new users first approach OpenStack as a project, they are presented with a vast and wonderful array of choices of components they could choose to begin with. This array is so vast and wonderful that it becomes really hard for people to understand where to start, be confident that the decisions they make will not prevent them from deploying something usable, and ensure they are able to expand the scope of their OpenStack over time. This deployment topology intends to define the smallest subset of projects that allow the user to provide a cloud capable of booting a VM. This is ideal for CI workloads, development clusters, small edge or business clusters with limited resources, or as a building block for more complex topologies. This deployment topology will be used as the minimal smoke test for promoting compute components.
18+
19+
## Node topology
20+
| Node role | bm/vm | amount |
21+
| ------------------------------------------------| ----- | ------ |
22+
| Openshift master/worker combo-node cluster (CRC)| vm | 1 |
23+
| Compute nodes | vm | 2 |
24+
25+
26+
27+
## Services, enabled features and configurations
28+
29+
| Service | configuration | Lock-in coverage? |
30+
| ------------------------------------------- | ------------------------------- | ------------------ |
31+
| RabbitMQ | default | Must have |
32+
| OVN | default | Must have |
33+
| galara | default | Must have |
34+
| Glance | filestore | Must have |
35+
| Keystone | default | Must have |
36+
| placement | default | Must have |
37+
| nova | default | Must have |
38+
| neutron | default | Must have |
39+
40+
No other services should be added to this deployment topology as it's important that this model the minimum set of services that are required to provide the ability to boot a VM.
41+
42+
### Support services
43+
44+
Additional services required for integration testing that may not be the subject of this DT
45+
46+
| Service | Reason |
47+
| -------- | ------------------------------------------------- |
48+
| tempest | validation fo basic functionality |
49+
| whitebox | validation of non hardware specific functionally |
50+
| FIPS | Enabled by default |
51+
52+
### Additional configuration
53+
54+
The DT crs will use the defaults for most services.
55+
As a result, we shall likely create two job variants:
56+
one using the defaults
57+
anonymous memory
58+
images-type=qcow
59+
FIPS enabled
60+
TLS-E enabled
61+
hugepages and file-backed memory are mutually exclusive so we will
62+
use this DT to test file-backed memory in a variant job.
63+
Nova may use images-type=flat with force_raw_images=true.
64+
65+
As a result, we shall likely create two job variants:
66+
one using the defaults:
67+
anonymous memory
68+
images-type=qcow
69+
FIPS enabled
70+
TLS-E enabled
71+
neither cpu_shared_set nor cpu_dedicated_set defined (CPU pinning unsupported)
72+
hugepages
73+
and the other with the overrides described below:
74+
file-backed memory
75+
images-type=flat
76+
force_raw_images=true
77+
FIPS disabled
78+
TLS-E disabled
79+
cpu_shared_set and cpu_dedicated_set defined (CPU pinning supported)
80+
81+
## Constraints
82+
83+
No additional OpenStack services can be added to this DT and it cannot be combined with others.
84+
This job will be capable of testing block-based live migration with local non-shared storage.
85+
As such, other DTs will not need to duplicate that testing and can cover block-based shared storage
86+
migration and nova-provisioned Ceph storage. Ceph and Cinder are intentionally not part of this DT
87+
as it is not required to meet the definition of the minimal set of services required to boot
88+
a usable VM. As such, this DT will not test interaction with the Cinder service.
89+
Similarly, Barbican integration, which is required for vTPM, is not tested in this DT as it
90+
is also out of scope. Barbican and Cinder integration should be tested in other compute
91+
or common DTs.
92+
93+
94+
## Testing tree
95+
96+
| Test framework | Stage to run | Special configuration | Test case to report |
97+
| ---------------- | ------------ | --------------------- | :-----------------: |
98+
| Tempest/compute | stage5 | Use cirros image | N/A |
99+
| Tempest/scenairo | stage5 | Use cirros image | N/A |
100+
| Tempest/whitebox | stage5 | applicable subset | N/A |
101+
102+
103+
## Considerations
104+
105+
1. These CRs are generic, 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.
106+
107+
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.
108+
109+
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.
110+
111+
4. In stage 3 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.
112+
113+
## Stages
114+
115+
All stages must be executed in the order listed below. Everything is required unless otherwise indicated.
116+
117+
1. [Install the OpenStack K8S operators and their dependencies]../(../../common/)
118+
2. [Configuring networking and deploy the OpenStack control plane](control-plane.md)
119+
3. [Configure and deploy the external data plane to provide compute nodes](edpm)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Configuring networking and deploy the OpenStack control plane
2+
3+
## Assumptions
4+
5+
- A storage class called `crc-csi-hostpath-provisioner` should already exist.
6+
7+
## Initialize
8+
9+
Switch to the "openstack" namespace
10+
```
11+
oc project openstack
12+
```
13+
Change to the hci directory
14+
```
15+
cd architecture/examples/compute/compute-starter-kit
16+
```
17+
Edit the [values.yaml](values.yaml) file to suit your environment.
18+
```
19+
vi values.yaml
20+
```
21+
Alternatively use your own copy of `values.yaml` and edit
22+
[kustomization.yaml](kustomization.yaml) to use that copy.
23+
```
24+
resources:
25+
- values-ci-framework.yaml
26+
```
27+
28+
Generate the control-plane and networking CRs.
29+
```
30+
kustomize build > control-plane.yaml
31+
```
32+
33+
## Create CRs
34+
```
35+
oc apply -f control-plane.yaml
36+
```
37+
38+
Wait for NNCPs to be available
39+
```
40+
oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s
41+
```
42+
43+
Wait for control plane to be available
44+
```
45+
oc wait osctlplane controlplane --for condition=Ready --timeout=600s
46+
```
47+
48+
## Workaround
49+
50+
The `control-plane.yaml` file contains CRs for both `NMState` and
51+
`NodeNetworkConfigurationPolicy` (NNCP). When `oc apply -f` is
52+
passed this file, OpenShift might try to create the NNCPs while
53+
`NMState` CRDs are still installing and produce the following message.
54+
55+
```
56+
nmstate.nmstate.io/nmstate created
57+
[resource mapping not found for name:
58+
"ostest-master-0" namespace: "openstack" from "control-plane.yaml":
59+
no matches for kind "NodeNetworkConfigurationPolicy" in version "nmstate.io/v1"
60+
ensure CRDs are installed first,
61+
resource mapping not found for name: "ostest-master-1" namespace: "openstack"
62+
from "control-plane.yaml": no matches for kind "NodeNetworkConfigurationPolicy"
63+
in version "nmstate.io/v1"
64+
```
65+
Retrying `oc apply -f contol-plane.yaml` a few seconds later should
66+
resolve the problem however.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
apiVersion: core.openstack.org/v1beta1
3+
kind: OpenStackControlPlane
4+
metadata:
5+
name: controlplane
6+
spec:
7+
ironic:
8+
enabled: false
9+
template:
10+
ironicConductors: []
11+
manila:
12+
enabled: false
13+
template:
14+
manilaShares: {}
15+
horizon:
16+
enabled: false
17+
heat:
18+
enabled: false
19+
cinder:
20+
enabled: false
21+
dns:
22+
enabled: false
23+
octavia:
24+
enabled: false
25+
swift:
26+
enabled: false
27+
barbican:
28+
enabled: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
apiVersion: core.openstack.org/v1beta1
3+
kind: OpenStackControlPlane
4+
metadata:
5+
name: controlplane
6+
spec:
7+
galera:
8+
enabled: true
9+
templates:
10+
openstack:
11+
replicas: 1
12+
storageRequest: 500M
13+
openstack-cell1:
14+
replicas: 1
15+
storageRequest: 500M
16+
rabbitmq:
17+
templates:
18+
rabbitmq:
19+
replicas: 1
20+
requests:
21+
cpu: 1
22+
memory: 512M
23+
limits:
24+
cpu: 1
25+
memory: 512M
26+
rabbitmq-cell1:
27+
replicas: 1
28+
requests:
29+
cpu: 1
30+
memory: 512M
31+
limits:
32+
cpu: 1
33+
memory: 512M
34+
memcached:
35+
enabled: true
36+
templates:
37+
memcached:
38+
replicas: 1
39+
ovn:
40+
template:
41+
ovnController:
42+
replicas: 1
43+
external-ids:
44+
ovn-encap-type: geneve
45+
ovnDBCluster:
46+
ovndbcluster-nb:
47+
replicas: 1
48+
dbType: NB
49+
storageRequest: 10G
50+
ovndbcluster-sb:
51+
replicas: 1
52+
dbType: SB
53+
storageRequest: 10G
54+
ovnNorthd:
55+
replicas: 1
56+
ovs:
57+
template:
58+
external-ids:
59+
system-id: "random"
60+
ovn-bridge: "br-int"
61+
ovn-encap-type: "geneve"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
apiVersion: core.openstack.org/v1beta1
3+
kind: OpenStackControlPlane
4+
metadata:
5+
name: controlplane
6+
spec:
7+
nova:
8+
template:
9+
secret: osp-secret
10+
cellTemplates:
11+
cell0:
12+
cellDatabaseInstance: openstack
13+
cellMessageBusInstance: rabbitmq
14+
cellDatabaseUser: nova_cell0
15+
conductorServiceTemplate:
16+
replicas: 1
17+
hasAPIAccess: true
18+
metadataServiceTemplate:
19+
enabled: false
20+
noVNCProxyServiceTemplate:
21+
enabled: false
22+
cell1:
23+
cellDatabaseInstance: openstack-cell1
24+
cellDatabaseUser: nova_cell1
25+
cellMessageBusInstance: rabbitmq-cell1
26+
conductorServiceTemplate:
27+
replicas: 1
28+
hasAPIAccess: true
29+
metadataServiceTemplate:
30+
enabled: false
31+
noVNCProxyServiceTemplate:
32+
enabled: true
33+
replicas: 1

examples/dt/compute/compute-starter-kit/edpm/.keep

Whitespace-only changes.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
# currently the lib versions is hard coded to assume 3 node openshift
5+
# this dt example is for a single node openshift so we need to vendor
6+
# the nncp lib and override the nodes, this is a temporary workaround
7+
# until the lib is updated to support single node openshift.
8+
# - ../../../../lib/nncp
9+
components:
10+
- vendor/nncp
11+
- ../../../../lib/networking
12+
- ../../../../lib/control-plane
13+
14+
resources:
15+
- values.yaml
16+
17+
# remove all the openstack components except for keystone, glance, nova
18+
# neutron, placement, and deploy only the inra services needed to support
19+
# the deployed openstack services.
20+
21+
patches:
22+
- patch: |-
23+
- op: remove
24+
path: /spec/ironic
25+
- op: remove
26+
path: /spec/ceilometer
27+
- op: remove
28+
path: /spec/cinder
29+
- op: remove
30+
path: /spec/horizon
31+
- op: remove
32+
path: /spec/heat
33+
- op: remove
34+
path: /spec/dns
35+
- op: remove
36+
path: /spec/manila
37+
- op: remove
38+
path: /spec/mariadb
39+
- op: remove
40+
path: /spec/octavia
41+
- op: remove
42+
path: /spec/redis
43+
- op: remove
44+
path: /spec/swift
45+
# - op: remove
46+
# path: /spec/barbican
47+
target:
48+
kind: OpenStackControlPlane
49+
name: controlplane
50+
version: v1beta1
51+
- path: control-plane/disable.yaml
52+
- path: control-plane/infra.yaml
53+
- path: control-plane/nova.yaml

0 commit comments

Comments
 (0)