Skip to content

Commit

Permalink
Add NFS network for Manila to uni04delta
Browse files Browse the repository at this point in the history
Manila Tempest tests need to connect to the share
for Ganesha via a special (openstack) network [1].

This patch adds the NFS storage network with VLAN
24 and range 172.21.0.0/24 in uni04delta. The NFS
network is connected to Ceph and Compute EDPM nodes.
A NNCP, NAD, L2Advertisement and IPAddressPool are
defined for the NFS network so that a pod in k8s can
connect to it; such as the tempest pod which will
perform the storage tests and the manilaShares pod(s).

[1] https://opendev.org/openstack/manila-tempest-plugin/src/branch/master/manila_tempest_tests/config.py#L99

Jira: https://issues.redhat.com/browse/OSPRH-7417
Depends-On: openstack-k8s-operators/ci-framework#2273

Signed-off-by: John Fulton <[email protected]>
  • Loading branch information
fultonj committed Sep 23, 2024
1 parent 21ece11 commit 369d564
Show file tree
Hide file tree
Showing 16 changed files with 450 additions and 1 deletion.
126 changes: 126 additions & 0 deletions automation/net-env/uni04delta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 123
nfs:
interface_name: eth1.124
ip_v4: 172.21.0.111
mac_addr: "52:54:00:0e:e9:95"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: eth1
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
ceph-1:
hostname: ceph-1
name: ceph-1
Expand Down Expand Up @@ -110,6 +121,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 123
nfs:
interface_name: eth1.124
ip_v4: 172.21.0.112
mac_addr: "52:54:00:0e:e9:76"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: eth1
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
ceph-2:
hostname: ceph-2
name: ceph-2
Expand Down Expand Up @@ -165,6 +187,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 123
nfs:
interface_name: eth1.124
ip_v4: 172.21.0.113
mac_addr: "52:54:00:0e:e9:dc"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: eth1
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
controller-0:
hostname: controller-0
name: controller-0
Expand Down Expand Up @@ -235,6 +268,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 122
nfs:
interface_name: enp6s0.124
ip_v4: 172.21.0.10
mac_addr: "52:54:00:0e:be:0e"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
ocp-1:
hostname: osasinfra-master-1
name: ocp-1
Expand Down Expand Up @@ -292,6 +336,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 122
nfs:
interface_name: enp6s0.124
ip_v4: 172.21.0.11
mac_addr: "52:54:00:0e:be:25"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
ocp-2:
hostname: osasinfra-master-2
name: ocp-2
Expand Down Expand Up @@ -349,6 +404,17 @@ instances:
prefix_length_v4: 24
skip_nm: false
vlan_id: 122
nfs:
interface_name: enp6s0.124
ip_v4: 172.21.0.12
mac_addr: "52:54:00:0e:be:10"
mtu: 1500
netmask_v4: 255.255.255.0
network_name: nfs
parent_interface: enp6s0
prefix_length_v4: 24
skip_nm: false
vlan_id: 124
networker-0:
hostname: networker-0
name: networker-0
Expand Down Expand Up @@ -447,6 +513,15 @@ instances:
parent_interface: eth1
skip_nm: false
vlan_id: 22
nfs:
interface_name: eth1.24
ip_v4: 172.21.0.100
mac_addr: "52:54:00:0e:1c:d7"
mtu: 1500
network_name: nfs
parent_interface: eth1
skip_nm: false
vlan_id: 24
compute-1:
hostname: compute-1
name: compute-1
Expand Down Expand Up @@ -485,6 +560,15 @@ instances:
parent_interface: eth1
skip_nm: false
vlan_id: 22
nfs:
interface_name: eth1.24
ip_v4: 172.21.0.101
mac_addr: "52:54:00:0e:1c:d5"
mtu: 1500
network_name: nfs
parent_interface: eth1
skip_nm: false
vlan_id: 24
compute-2:
hostname: compute-2
name: compute-2
Expand Down Expand Up @@ -523,6 +607,15 @@ instances:
parent_interface: eth1
skip_nm: false
vlan_id: 22
nfs:
interface_name: eth1.24
ip_v4: 172.21.0.102
mac_addr: "52:54:00:0e:1c:d6"
mtu: 1500
network_name: nfs
parent_interface: eth1
skip_nm: false
vlan_id: 24
networks:
ctlplane:
dns_v4:
Expand Down Expand Up @@ -666,6 +759,39 @@ networks:
start_host: 100
ipv6_ranges: []
vlan_id: 121
nfs:
dns_v4: []
dns_v6: []
mtu: 1500
network_name: nfs
network_v4: 172.21.0.0/24
search_domain: nfs.example.com
tools:
metallb:
ipv4_ranges:
- end: 172.21.0.90
end_host: 90
length: 11
start: 172.21.0.80
start_host: 80
ipv6_ranges: []
multus:
ipv4_ranges:
- end: 172.21.0.70
end_host: 70
length: 41
start: 172.21.0.30
start_host: 30
ipv6_ranges: []
netconfig:
ipv4_ranges:
- end: 172.21.0.250
end_host: 250
length: 151
start: 172.21.0.100
start_host: 100
ipv6_ranges: []
vlan_id: 124
storagemgmt:
dns_v4: []
dns_v6: []
Expand Down
1 change: 1 addition & 0 deletions dt/uni04delta/edpm-pre-ceph/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ transformers:
components:
- ../../../../lib/dataplane/nodeset
- ../../../../dt/uni04delta/nodeset/ceph

patches:
- target:
Expand Down
1 change: 1 addition & 0 deletions dt/uni04delta/edpm/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ transformers:
components:
- ../../../../lib/control-plane
- ../../../../lib/dataplane/nodeset
- ../../../../dt/uni04delta/nodeset/compute

resources:
- ceph_secret.yaml
Expand Down
3 changes: 3 additions & 0 deletions dt/uni04delta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ transformers:
components:
- ../../lib/networking/metallb
- networking/metallb
- ../../lib/networking/netconfig
- networking/netconfig
- ../../lib/networking/nad
- networking/nad
- ../../lib/control-plane

patches:
Expand Down
36 changes: 36 additions & 0 deletions dt/uni04delta/networking/metallb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- metallb_l2advertisement.yaml
- ocp_ip_pools.yaml

replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.lb_addresses
targets:
- select:
group: metallb.io
kind: IPAddressPool
name: nfs
fieldPaths:
- spec.addresses
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.iface
targets:
- select:
group: metallb.io
kind: L2Advertisement
name: nfs
fieldPaths:
- spec.interfaces.0
options:
create: true
11 changes: 11 additions & 0 deletions dt/uni04delta/networking/metallb/metallb_l2advertisement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: nfs
namespace: metallb-system
spec:
ipAddressPools:
- nfs
interfaces:
- _replaced_
8 changes: 8 additions & 0 deletions dt/uni04delta/networking/metallb/ocp_ip_pools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: nfs
labels:
osp/lb-addresses-type: standard
35 changes: 35 additions & 0 deletions dt/uni04delta/networking/nad/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

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
resources:
- ocp_networks_netattach.yaml

replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: nfs
fieldPaths:
- spec.config
options:
create: true
8 changes: 8 additions & 0 deletions dt/uni04delta/networking/nad/ocp_networks_netattach.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: nfs
labels:
osp/net: nfs
osp/net-attach-def-type: standard
36 changes: 36 additions & 0 deletions dt/uni04delta/networking/netconfig/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- target:
kind: NetConfig
patch: |-
- op: add
path: /spec/networks/-
value:
name: nfs
mtu: 1500
dnsDomain: _replaced_
subnets:
- _replaced_
replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=nfs].dnsDomain
- source:
kind: ConfigMap
name: network-values
fieldPath: data.nfs.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=nfs].subnets
Loading

0 comments on commit 369d564

Please sign in to comment.