Skip to content

Commit 0cb92bd

Browse files
Merge pull request #1231 from beagles/desigante-nad-and-metallb
Initial add of designate adoption test role
2 parents 622d8ec + a0a83cd commit 0cb92bd

13 files changed

Lines changed: 367 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
@@ -46,6 +46,8 @@ include::../modules/proc_adopting-the-loadbalancer-service.adoc[leveloffset=+1]
4646

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

49+
include::../modules/proc_adopting-the-dns-service.adoc[leveloffset=+1]
50+
4951
include::../modules/proc_adopting-autoscaling.adoc[leveloffset=+1]
5052

5153
include::../modules/proc_pulling-configuration-from-a-tripleo-deployment.adoc[leveloffset=+1]
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
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+
----
108+
. Apply the configuration:
109+
+
110+
----
111+
$ oc apply -f designate-nad.yaml
112+
----
113+
. Configure the {dns_service} external network attachment definition:
114+
+
115+
----
116+
$ cat >> designateext-nad.yaml << EOF_CAT
117+
apiVersion: k8s.cni.cncf.io/v1
118+
kind: NetworkAttachmentDefinition
119+
metadata:
120+
labels:
121+
osp/net: designateext
122+
name: designateext
123+
spec:
124+
config: |
125+
{
126+
"cniVersion": "0.3.1",
127+
"name": "designateext",
128+
"type": "macvlan",
129+
"master": "enp6s0.26",
130+
"ipam": {
131+
"type": "whereabouts",
132+
"range": "172.50.0.0/24",
133+
"range_start": "172.50.0.30",
134+
"range_end": "172.50.0.70"
135+
}
136+
}
137+
EOF_CAT
138+
----
139+
140+
. Apply the configuration:
141+
+
142+
----
143+
$ oc apply -f designateext-nad.yaml
144+
----
145+
146+
. Create a MetalLB IPAddressPool for the {dns_service} external network:
147+
+
148+
----
149+
$ oc apply -f - <<EOF
150+
apiVersion: metallb.io/v1beta1
151+
kind: IPAddressPool
152+
metadata:
153+
name: designateext
154+
namespace: metallb-system
155+
spec:
156+
autoAssign: false
157+
addresses:
158+
- 172.50.0.80-172.50.0.90
159+
EOF
160+
----
161+
162+
. Create an L2Advertisement for the {dns_service} external network:
163+
+
164+
----
165+
$ oc apply -f - <<EOF
166+
apiVersion: metallb.io/v1beta1
167+
kind: L2Advertisement
168+
metadata:
169+
name: designateext
170+
namespace: metallb-system
171+
spec:
172+
ipAddressPools:
173+
- designateext
174+
interfaces:
175+
- enp6s0.26
176+
EOF
177+
----

tests/playbooks/test_minimal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
- role: octavia_adoption
6262
tags:
6363
- octavia_adoption
64+
- role: designate_adoption
65+
tags:
66+
- designate_adoption
6467
- role: horizon_adoption
6568
tags:
6669
- horizon_adoption

tests/playbooks/test_rollback_minimal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
- role: octavia_adoption
6060
tags:
6161
- octavia_adoption
62+
- role: designate_adoption
63+
tags:
64+
- designate_adoption
6265
- role: horizon_adoption
6366
tags:
6467
- horizon_adoption

tests/playbooks/test_rollback_with_ceph.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
- role: octavia_adoption
6565
tags:
6666
- octavia_adoption
67+
- role: designate_adoption
68+
tags:
69+
- designate_adoption
6770
- role: horizon_adoption
6871
tags:
6972
- horizon_adoption

tests/playbooks/test_with_ceph.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
- role: octavia_adoption
6565
tags:
6666
- octavia_adoption
67+
- role: designate_adoption
68+
tags:
69+
- designate_adoption
6770
- role: horizon_adoption
6871
tags:
6972
- horizon_adoption

tests/playbooks/test_with_ceph_and_ironic.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
- role: octavia_adoption
9595
tags:
9696
- octavia_adoption
97+
- role: designate_adoption
98+
tags:
99+
- designate_adoption
97100
- role: horizon_adoption
98101
tags:
99102
- horizon_adoption

tests/playbooks/test_with_ironic.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
- role: octavia_adoption
8383
tags:
8484
- octavia_adoption
85+
- role: designate_adoption
86+
tags:
87+
- designate_adoption
8588
- role: horizon_adoption
8689
tags:
8790
- 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)