Skip to content

Commit

Permalink
Redefine uni05epsilon to deploy with 3 cells
Browse files Browse the repository at this point in the history
  • Loading branch information
jamepark4 committed Nov 15, 2024
1 parent 949bdcd commit a8baa0f
Show file tree
Hide file tree
Showing 19 changed files with 543 additions and 17 deletions.
38 changes: 38 additions & 0 deletions automation/vars/uni05epsilon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ vas:
src_file: values.yaml
build_output: nodeset-pre-ceph.yaml

- path: examples/dt/uni05epsilon/nodeset2/edpm-pre-ceph
wait_conditions:
- >-
oc -n openstack wait osdpns
openstack-edpm-2
--for condition=SetupReady
--timeout=10m
values:
- name: edpm-nodeset2-values
src_file: values.yaml
build_output: nodeset2-pre-ceph.yaml

- path: examples/dt/uni05epsilon/edpm-pre-ceph/deployment
wait_conditions:
- >-
Expand Down Expand Up @@ -71,6 +83,20 @@ vas:
src_file: values.yaml
build_output: nodeset-post-ceph.yaml

- path: examples/dt/uni05epsilon/nodeset2
wait_conditions:
- >-
oc -n openstack wait osdpns
openstack-edpm
--for condition=SetupReady
--timeout=10m
values:
- name: service-values
src_file: service-values.yaml
- name: edpm-nodeset-values-post-ceph
src_file: values.yaml
build_output: nodeset-post-ceph.yaml

- path: examples/dt/uni05epsilon/deployment
wait_conditions:
- >-
Expand All @@ -82,3 +108,15 @@ vas:
- name: edpm-deployment-values-post-ceph
src_file: values.yaml
build_output: deployment-post-ceph.yaml

- path: examples/dt/uni05epsilon/nodeset2/deployment
wait_conditions:
- >-
oc -n openstack wait osdpd
edpm-deployment-post-ceph-2
--for condition=Ready
--timeout=40m
values:
- name: edpm-deployment-values-post-ceph
src_file: values.yaml
build_output: deployment-post-ceph.yaml
48 changes: 48 additions & 0 deletions dt/uni05epsilon/edpm-post-ceph/nodeset2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
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: .*
path: resources/ceph-extra-mounts.yaml

resources:
- resources/nova-custom-config.yaml
- resources/nova-custom-service.yaml

replacements:
#
# Dataplane services override
#
# (overrides /lib/dataplane which is using edpm-nodeset-values ConfigMap)
#
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nodeset.services
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.services
options:
create: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
name: openstack-edpm
spec:
nodeTemplate:
extraMounts:
- extraVolType: Ceph
mounts:
- mountPath: /etc/ceph
name: ceph
readOnly: true
volumes:
- name: ceph
secret:
secretName: ceph-conf-files
10 changes: 10 additions & 0 deletions dt/uni05epsilon/edpm-post-ceph/nodeset2/resources/ceph-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: ceph-conf-files
namespace: openstack
data:
ceph.client.openstack.keyring: _replaced_
ceph.conf: _replaced_
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Define the "cinder-volume-nfs-secrets" Secret that contains sensitive
# information pertaining to the [nfs] backend.
apiVersion: v1
kind: Secret
metadata:
labels:
service: cinder
component: cinder-volume
name: cinder-volume-nfs-secrets
type: Opaque
stringData:
cinder-volume-nfs-secrets: _replaced_
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Define the "cinder-volume-ontap-secrets" Secret that contains sensitive
# information pertaining to the [ontap] backend.
apiVersion: v1
kind: Secret
metadata:
labels:
service: cinder
component: cinder-volume
name: cinder-volume-ontap-secrets
type: Opaque
stringData:
cinder-volume-ontap-secrets: _replaced_
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nova-custom-config
data:
25-nova-custom.conf: |
[DEFAULT]
# Override our defaults in this dt to get coverage for metadata-api based
# cloud-init scenarios
force_config_drive = False
55-nova-extra.conf: |
# Additional overrides that can be set in environment-specific cases
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: nova-custom
spec:
label: dataplane-deployment-nova-custom
dataSources:
- configMapRef:
name: nova-custom-config
- secretRef:
name: nova-cell1-compute-config
- secretRef:
name: nova-migration-ssh-key
playbook: osp.edpm.nova
caCerts: combined-ca-bundle
tlsCerts:
default:
contents:
- dnsnames
- ips
networks:
- ctlplane
issuer: osp-rootca-issuer-internal
edpmRoleServiceName: nova
edpmServiceType: nova
containerImageFields:
- NovaComputeImage
- EdpmIscsidImage
60 changes: 60 additions & 0 deletions dt/uni05epsilon/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,66 @@ replacements:
fieldPaths:
- spec.networks.[name=storagemgmt].dnsDomain

- source:
kind: ConfigMap
name: service-values
fieldPath: data.galera.templates.openstack-cell2
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.galera.templates.openstack-cell2
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.rabbitmq-cell2.endpoint_annotations
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.rabbitmq.templates.rabbitmq-cell2.override.service.metadata.annotations
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.rabbitmq.templates.rabbitmq-cell2.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.rabbitmq.templates.rabbitmq-cell2.replicas
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.lbServiceType
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.rabbitmq.templates.rabbitmq-cell2.override.service.spec.type
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.nova.template.cellTemplates.cell2
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.nova.template.cellTemplates.cell2
options:
create: true

- source:
kind: ConfigMap
name: network-values
Expand Down
4 changes: 4 additions & 0 deletions examples/dt/uni05epsilon/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ data:
endpoint_annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.86
rabbitmq-cell2:
endpoint_annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.87

lbServiceType: LoadBalancer
storageClass: local-storage
Expand Down
23 changes: 23 additions & 0 deletions examples/dt/uni05epsilon/control-plane/service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ metadata:

data:
preserveJobs: false

galera:
templates:
openstack-cell2:
storageRequest: 5G
secret: osp-secret
replicas: 3

nova:
template:
cellTemplates:
cell2:
cellDatabaseAccount: nova-cell2
cellDatabaseInstance: openstack-cell2
cellMessageBusInstance: rabbitmq-cell2
conductorServiceTemplate:
replicas: 1
hasAPIAccess: true

rabbitmq:
templates:

Check failure on line 32 in examples/dt/uni05epsilon/control-plane/service-values.yaml

View workflow job for this annotation

GitHub Actions / yaml-lint

32:6 [indentation] wrong indentation: expected 4 but found 5
rabbitmq-cell2:
replicas: 3
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ components:
resources:
- values.yaml

patches:
- target:
kind: OpenStackDataPlaneDeployment
name: edpm-deployment-pre-ceph
patch: |
- op: add
path: /spec/nodeSets/-
value: openstack-edpm-2
replacements:
- source:
kind: ConfigMap
Expand Down
17 changes: 0 additions & 17 deletions examples/dt/uni05epsilon/edpm-pre-ceph/nodeset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,6 @@ data:
- name: tenant
subnetName: subnet1

edpm-compute-2:
ansible:
ansibleHost: 192.168.122.102
hostName: edpm-compute-2
networks:
- defaultRoute: true
fixedIP: 192.168.122.102
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
- name: tenant
subnetName: subnet1
# The nova-custom service is omitted since it is not yet
# defined. It will be defined and set after Ceph is deployed.
# See deployment servicesOverride for effective services list.
Expand Down
33 changes: 33 additions & 0 deletions examples/dt/uni05epsilon/nodeset2/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../dt/uni05epsilon/edpm-post-ceph/deployment

resources:
- values.yaml

replacements:
- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.servicesOverride
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- spec.servicesOverride
options:
create: true
- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.deployment.spec.nodeSets
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- spec.nodeSets
options:
create: true
Loading

0 comments on commit a8baa0f

Please sign in to comment.