-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POC] Add an adoption VA to setup networking
Create an adoption VA the will be used to install the operators, and setup nncp and netconfig. The idea is that this VA will be shared between all the different adoption uni-jobs.
- Loading branch information
Showing
19 changed files
with
878 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,27 @@ | ||
--- | ||
vas: | ||
adoption: | ||
stages: | ||
- path: examples/va/adoption/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 | ||
|
||
- path: examples/va/adoption/control-plane | ||
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: nncp/values.yaml | ||
build_output: ../networking.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,4 @@ | ||
nncp.yaml | ||
control-plane.yaml | ||
dataplane-pre-ceph.yaml | ||
dataplane-post-ceph.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,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 control plane CRs dynamically. The `control-plane/nncp/values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required. | ||
|
||
4. In stages 3 and 4 [kustomize](https://kustomize.io/) is used to generate the dataplane CRs dynamically. The `edpm-pre-ceph/values.yaml`, `values.yaml` and `service-values.yaml` files must be updated to fit your environment. kustomize version 5 or newer required. | ||
|
||
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](dataplane-pre-ceph.md) | ||
4. [Update the control plane and finish deploying the data plane after Ceph has been installed](dataplane-post-ceph.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
control-plane.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,12 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
components: | ||
- ../../../../va/adoption/ | ||
# - 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: | ||
- nncp/values.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 @@ | ||
nncp.yaml |
24 changes: 24 additions & 0 deletions
24
examples/va/adoption/control-plane/nncp/kustomization.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,24 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
transformers: | ||
# Set namespace to OpenStack on all namespaced objects without a namespace | ||
- |- | ||
apiVersion: builtin | ||
kind: NamespaceTransformer | ||
metadata: | ||
name: _ignored_ | ||
namespace: openstack | ||
setRoleBindingSubjects: none | ||
unsetOnly: true | ||
fieldSpecs: | ||
- path: metadata/name | ||
kind: Namespace | ||
create: true | ||
components: | ||
- ../../../../../va/adoption/nncp | ||
|
||
resources: | ||
- values.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,195 @@ | ||
apiVersion: v1 | ||
data: | ||
bridgeName: ospbr | ||
ctlplane: | ||
dnsDomain: ctlplane.example.com | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: ctlplane | ||
metallb.universe.tf/allow-shared-ip: ctlplane | ||
metallb.universe.tf/loadBalancerIPs: 192.168.122.80 | ||
iface: enp7s0 | ||
lb_addresses: | ||
- 192.168.122.80-192.168.122.90 | ||
mtu: 1500 | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"ctlplane\",\n | ||
\ \"type\": \"macvlan\",\n \"master\": \"ospbr\",\n \"ipam\": {\n \"type\": | ||
\"whereabouts\",\n \"range\": \"192.168.122.0/24\",\n \"range_start\": | ||
\"192.168.122.30\",\n \"range_end\": \"192.168.122.70\"\n }\n}\n" | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 192.168.122.120 | ||
start: 192.168.122.100 | ||
- end: 192.168.122.170 | ||
start: 192.168.122.150 | ||
cidr: 192.168.122.0/24 | ||
gateway: 192.168.122.1 | ||
name: subnet1 | ||
datacentre: | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"datacentre\",\n | ||
\ \"type\": \"bridge\",\n \"bridge\": \"ospbr\",\n \"ipam\": {}\n}\n" | ||
dns-resolver: | ||
config: | ||
search: [] | ||
server: | ||
- 192.168.122.1 | ||
options: | ||
- key: server | ||
values: | ||
- 192.168.122.1 | ||
external: | ||
dnsDomain: external.example.com | ||
mtu: 1496 | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.21.0.250 | ||
start: 172.21.0.100 | ||
cidr: 172.21.0.0/24 | ||
name: subnet1 | ||
vlan: 44 | ||
vlan: 44 | ||
internalapi: | ||
base_iface: enp7s0 | ||
dnsDomain: internalapi.example.com | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: internalapi | ||
metallb.universe.tf/allow-shared-ip: internalapi | ||
metallb.universe.tf/loadBalancerIPs: 172.17.0.80 | ||
iface: internalapi | ||
lb_addresses: | ||
- 172.17.0.80-172.17.0.90 | ||
mtu: 1496 | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"internalapi\",\n | ||
\ \"type\": \"macvlan\",\n \"master\": \"internalapi\",\n \"ipam\": | ||
{\n \"type\": \"whereabouts\",\n \"range\": \"172.17.0.0/24\",\n | ||
\ \"range_start\": \"172.17.0.30\",\n \"range_end\": \"172.17.0.70\"\n | ||
\ }\n}\n" | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.17.0.250 | ||
start: 172.17.0.100 | ||
cidr: 172.17.0.0/24 | ||
name: subnet1 | ||
vlan: 20 | ||
vlan: 20 | ||
lbServiceType: LoadBalancer | ||
node_0: | ||
ctlplane_ip: 192.168.122.10 | ||
internalapi_ip: 172.17.0.10 | ||
name: master-0 | ||
storage_ip: 172.18.0.10 | ||
tenant_ip: 172.19.0.10 | ||
node_1: | ||
ctlplane_ip: 192.168.122.11 | ||
internalapi_ip: 172.17.0.11 | ||
name: master-1 | ||
storage_ip: 172.18.0.11 | ||
tenant_ip: 172.19.0.11 | ||
node_2: | ||
ctlplane_ip: 192.168.122.12 | ||
internalapi_ip: 172.17.0.12 | ||
name: master-2 | ||
storage_ip: 172.18.0.12 | ||
tenant_ip: 172.19.0.12 | ||
ocpbm: | ||
dnsDomain: ocpbm.example.com | ||
mtu: 1500 | ||
prefix-length: 24 | ||
rabbitmq: | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: internalapi | ||
metallb.universe.tf/loadBalancerIPs: 172.17.0.85 | ||
rabbitmq-cell1: | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: internalapi | ||
metallb.universe.tf/loadBalancerIPs: 172.17.0.86 | ||
routes: | ||
config: [] | ||
storage: | ||
base_iface: enp7s0 | ||
dnsDomain: storage.example.com | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: storage | ||
metallb.universe.tf/allow-shared-ip: storage | ||
metallb.universe.tf/loadBalancerIPs: 172.18.0.80 | ||
iface: storage | ||
lb_addresses: | ||
- 172.18.0.80-172.18.0.90 | ||
mtu: 1496 | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"storage\",\n | ||
\ \"type\": \"macvlan\",\n \"master\": \"storage\",\n \"ipam\": {\n | ||
\ \"type\": \"whereabouts\",\n \"range\": \"172.18.0.0/24\",\n \"range_start\": | ||
\"172.18.0.30\",\n \"range_end\": \"172.18.0.70\"\n }\n}\n" | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.18.0.250 | ||
start: 172.18.0.100 | ||
cidr: 172.18.0.0/24 | ||
name: subnet1 | ||
vlan: 21 | ||
vlan: 21 | ||
storageClass: lvms-local-storage | ||
storagemgmt: | ||
dnsDomain: storagemgmt.example.com | ||
mtu: 1500 | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.20.0.250 | ||
start: 172.20.0.100 | ||
cidr: 172.20.0.0/24 | ||
name: subnet1 | ||
vlan: 23 | ||
vlan: 23 | ||
swift: | ||
base_iface: enp6s0 | ||
dnsDomain: swift.example.com | ||
iface: swift | ||
lb_addresses: | ||
- 172.22.0.80-172.22.0.90 | ||
mtu: 1500 | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"swift\",\n | ||
\ \"type\": \"macvlan\",\n \"master\": \"swift\",\n \"ipam\": {\n \"type\": | ||
\"whereabouts\",\n \"range\": \"172.22.0.0/24\",\n \"range_start\": | ||
\"172.22.0.30\",\n \"range_end\": \"172.22.0.70\"\n }\n}\n" | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.22.0.250 | ||
start: 172.22.0.100 | ||
cidr: 172.22.0.0/24 | ||
name: subnet1 | ||
vlan: 25 | ||
vlan: 25 | ||
tenant: | ||
base_iface: enp7s0 | ||
dnsDomain: tenant.example.com | ||
endpoint_annotations: | ||
metallb.universe.tf/address-pool: tenant | ||
metallb.universe.tf/allow-shared-ip: tenant | ||
metallb.universe.tf/loadBalancerIPs: 172.19.0.80 | ||
iface: tenant | ||
lb_addresses: | ||
- 172.19.0.80-172.19.0.90 | ||
mtu: 1496 | ||
net-attach-def: "{\n \"cniVersion\": \"0.3.1\",\n \"name\": \"tenant\",\n | ||
\ \"type\": \"macvlan\",\n \"master\": \"tenant\",\n \"ipam\": {\n \"type\": | ||
\"whereabouts\",\n \"range\": \"172.19.0.0/24\",\n \"range_start\": | ||
\"172.19.0.30\",\n \"range_end\": \"172.19.0.70\"\n }\n}\n" | ||
prefix-length: 24 | ||
subnets: | ||
- allocationRanges: | ||
- end: 172.19.0.250 | ||
start: 172.19.0.100 | ||
cidr: 172.19.0.0/24 | ||
name: subnet1 | ||
vlan: 22 | ||
vlan: 22 | ||
kind: ConfigMap | ||
metadata: | ||
annotations: | ||
config.kubernetes.io/local-config: 'true' | ||
name: network-values |
Oops, something went wrong.