Skip to content

Commit e5d9624

Browse files
beaglesCursor AI
andcommitted
Initial add of designate adoption test role
Initially only handles the OpenShift networking related setup, including documentation module. Co-authored-by: Cursor AI <noreply@cursor.com>
1 parent b782bcc commit e5d9624

13 files changed

Lines changed: 364 additions & 0 deletions

docs_user/adoption-attributes.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ ifeval::["{build}" != "downstream"]
4343
:loadbalancer_first_ref: Load-balancing service (octavia)
4444
:loadbalancer_service: Load-balancing service
4545

46+
//Openstack DNS service (designate)
47+
:dns_first_ref: DNS service (designate)
48+
:dns_service: DNS service
49+
4650
//Object Storage service (swift)
4751
:object_storage_first_ref: Object Storage service (swift)
4852
:object_storage: Object Storage service
@@ -117,6 +121,10 @@ ifeval::["{build}" == "downstream"]
117121
:loadbalancer_first_ref: Load-balancing service (octavia)
118122
:loadbalancer_service: Load-balancing service
119123

124+
//Openstack DNS service (designate)
125+
:dns_first_ref: DNS service (designate)
126+
:dns_service: DNS service
127+
120128
//Object Storage service (swift)
121129
:object_storage_first_ref: Object Storage service (swift)
122130
:object_storage: Object Storage service

docs_user/assemblies/assembly_adopting-openstack-control-plane-services.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ include::../modules/proc_adopting-the-loadbalancer-service.adoc[leveloffset=+1]
4242

4343
include::../modules/proc_adopting-telemetry-services.adoc[leveloffset=+1]
4444

45+
include::../modules/proc_adopting-the-dns-service.adoc[leveloffset=+1]
46+
4547
include::../modules/proc_adopting-autoscaling.adoc[leveloffset=+1]
4648

4749
include::../modules/proc_pulling-configuration-from-a-tripleo-deployment.adoc[leveloffset=+1]
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="adopting-the-dns-service_{context}"]
3+
4+
= Adopting the {dns_service}
5+
6+
[role="_abstract"]
7+
To adopt the {dns_first_ref}, you patch an existing `OpenStackControlPlane` custom resource (CR) where the {dns_service} is disabled. The patch starts the service with the configuration parameters that are provided by the {rhos_prev_long} ({OpenStackShort}) environment.
8+
9+
.Procedure
10+
11+
. Create an alias for the `openstack` command:
12+
+
13+
----
14+
$ alias openstack="oc exec -t openstackclient -- openstack"
15+
----
16+
17+
. To isolate the {dns_service} networks, add the network interfaces for the VLAN base interfaces:
18+
+
19+
[subs="+quotes"]
20+
----
21+
$ oc get --no-headers nncp --output=custom-columns='NAME:.metadata.name' | while read; do
22+
23+
interfaces=$(oc get nncp $REPLY -o jsonpath="{.spec.desiredState.interfaces[*].name}")
24+
25+
(echo $interfaces | grep -w -q "enp6s0.25\|enp6s0.26") || \
26+
oc patch nncp $REPLY --type json --patch '
27+
[{
28+
"op": "add",
29+
"path": "/spec/desiredState/interfaces/-",
30+
"value": {
31+
"description": "Designate vlan interface",
32+
"name": "enp6s0.25",
33+
"state": "up",
34+
"type": "vlan",
35+
"vlan": {
36+
"base-iface": "<enp6s0>",
37+
"id": 25,
38+
"reorder-headers": true
39+
},
40+
"ipv4": {
41+
"address": [{"ip": "172.28.0.5", "prefix-length": 24}],
42+
"enabled": true,
43+
"dhcp": false
44+
},
45+
"ipv6": {
46+
"enabled": false
47+
}
48+
}
49+
},
50+
{
51+
"op": "add",
52+
"path": "/spec/desiredState/interfaces/-",
53+
"value": {
54+
"description": "Designate external vlan interface",
55+
"name": "enp6s0.26",
56+
"state": "up",
57+
"type": "vlan",
58+
"vlan": {
59+
"base-iface": "<enp6s0>",
60+
"id": 26,
61+
"reorder-headers": true
62+
},
63+
"ipv4": {
64+
"address": [{"ip": "172.50.0.5", "prefix-length": 24}],
65+
"enabled": true,
66+
"dhcp": false
67+
},
68+
"ipv6": {
69+
"enabled": false
70+
}
71+
}
72+
}]'
73+
74+
done
75+
----
76+
+
77+
where:
78+
79+
`<enp6s0>`::
80+
Specifies the name of the network interface in your {rhocp_long} setup.
81+
82+
. Configure the {dns_service} internal network attachment definition:
83+
+
84+
----
85+
$ cat >> designate-nad.yaml << EOF_CAT
86+
apiVersion: k8s.cni.cncf.io/v1
87+
kind: NetworkAttachmentDefinition
88+
metadata:
89+
labels:
90+
osp/net: designate
91+
name: designate
92+
spec:
93+
config: |
94+
{
95+
"cniVersion": "0.3.1",
96+
"name": "designate",
97+
"type": "macvlan",
98+
"master": "enp6s0.25",
99+
"ipam": {
100+
"type": "whereabouts",
101+
"range": "172.28.0.0/24",
102+
"range_start": "172.28.0.30",
103+
"range_end": "172.28.0.70"
104+
}
105+
}
106+
EOF_CAT
107+
$ oc apply -f designate-nad.yaml
108+
----
109+
110+
. Configure the {dns_service} external network attachment definition:
111+
+
112+
----
113+
$ cat >> designateext-nad.yaml << EOF_CAT
114+
apiVersion: k8s.cni.cncf.io/v1
115+
kind: NetworkAttachmentDefinition
116+
metadata:
117+
labels:
118+
osp/net: designateext
119+
name: designateext
120+
spec:
121+
config: |
122+
{
123+
"cniVersion": "0.3.1",
124+
"name": "designateext",
125+
"type": "macvlan",
126+
"master": "enp6s0.26",
127+
"ipam": {
128+
"type": "whereabouts",
129+
"range": "172.50.0.0/24",
130+
"range_start": "172.50.0.30",
131+
"range_end": "172.50.0.70"
132+
}
133+
}
134+
EOF_CAT
135+
----
136+
137+
. Apply the configuration:
138+
+
139+
----
140+
$ oc apply -f designateext-nad.yaml
141+
----
142+
143+
. Create a MetalLB IPAddressPool for the {dns_service} external network:
144+
+
145+
----
146+
$ oc apply -f - <<EOF
147+
apiVersion: metallb.io/v1beta1
148+
kind: IPAddressPool
149+
metadata:
150+
name: designateext
151+
namespace: metallb-system
152+
spec:
153+
autoAssign: false
154+
addresses:
155+
- 172.50.0.80-172.50.0.90
156+
EOF
157+
----
158+
159+
. Create an L2Advertisement for the {dns_service} external network:
160+
+
161+
----
162+
$ oc apply -f - <<EOF
163+
apiVersion: metallb.io/v1beta1
164+
kind: L2Advertisement
165+
metadata:
166+
name: designateext
167+
namespace: metallb-system
168+
spec:
169+
ipAddressPools:
170+
- designateext
171+
interfaces:
172+
- enp6s0.26
173+
EOF
174+
----

tests/playbooks/test_minimal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
- role: octavia_adoption
6161
tags:
6262
- octavia_adoption
63+
- role: designate_adoption
64+
tags:
65+
- designate_adoption
6366
- role: horizon_adoption
6467
tags:
6568
- horizon_adoption

tests/playbooks/test_rollback_minimal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
- role: octavia_adoption
5959
tags:
6060
- octavia_adoption
61+
- role: designate_adoption
62+
tags:
63+
- designate_adoption
6164
- role: horizon_adoption
6265
tags:
6366
- horizon_adoption

tests/playbooks/test_rollback_with_ceph.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
- role: octavia_adoption
6464
tags:
6565
- octavia_adoption
66+
- role: designate_adoption
67+
tags:
68+
- designate_adoption
6669
- role: horizon_adoption
6770
tags:
6871
- horizon_adoption

tests/playbooks/test_with_ceph.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
- role: octavia_adoption
6464
tags:
6565
- octavia_adoption
66+
- role: designate_adoption
67+
tags:
68+
- designate_adoption
6669
- role: horizon_adoption
6770
tags:
6871
- horizon_adoption

tests/playbooks/test_with_ceph_and_ironic.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
- role: octavia_adoption
9494
tags:
9595
- octavia_adoption
96+
- role: designate_adoption
97+
tags:
98+
- designate_adoption
9699
- role: horizon_adoption
97100
tags:
98101
- horizon_adoption

tests/playbooks/test_with_ironic.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
- role: octavia_adoption
8282
tags:
8383
- octavia_adoption
84+
- role: designate_adoption
85+
tags:
86+
- designate_adoption
8487
- role: horizon_adoption
8588
tags:
8689
- horizon_adoption
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
designate_adoption: false
2+
designate_retry_delay: 5

0 commit comments

Comments
 (0)