Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion playbooks/install_stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
block:
- name: Set fact for base_bridge_mappings when DPDK is disabled
ansible.builtin.set_fact:
base_bridge_mappings: "external:br-ex,hostonly:br-hostonly"
base_bridge_mappings: "external:br-ex,hostonly:br-hostonly,storage_nfs:br-storage_nfs"
when:
- dpdk_interface is not defined
- name: Set fact for base_bridge_mappings when DPDK is enabled
Expand Down Expand Up @@ -486,6 +486,16 @@
when:
- (tripleo_repos_branch is defined and tripleo_repos_branch not in ['train', 'ussuri', 'victoria']) or (tripleo_repos_branch is not defined)

- name: Add StorageNFS into Network Data Undercloud
ansible.builtin.blockinfile:
dest: /usr/share/openstack-tripleo-heat-templates/network_data_undercloud.yaml
block: |
- name: StorageNFS
vip: true
name_lower: storage_nfs
become: true
become_user: root

- name: Deploy Ceph
ansible.builtin.include_role:
name: ceph
Expand Down
7 changes: 7 additions & 0 deletions playbooks/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
enabled: false
ipv6:
enabled: false
- name: dummy2
type: dummy
state: up
ipv4:
enabled: false
ipv6:
enabled: false

- name: Define dummy interfaces to be created when using DPDK
when:
Expand Down
16 changes: 16 additions & 0 deletions playbooks/prepare_stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@
environment:
OS_CLOUD: standalone

- name: Create hostonly nfs network # noqa no-changed-when
when: manila_enabled
ansible.builtin.shell: |
if ! openstack network show StorageNFS; then
openstack network create --project openshift --share --external --provider-physical-network storage_nfs --provider-network-type flat StorageNFS
fi
if ! openstack subnet show StorageNFSSubnet; then
openstack subnet create --project openshift StorageNFSSubnet --subnet-range "{{ hostonly_nfs_cidr }}" \
--dhcp --gateway none \
--dns-nameserver "{{ network_info.dns | first }}" \
--allocation-pool "start={{ hostonly_nfs_fip_pool_start }},end={{ hostonly_nfs_fip_pool_end }}" \
--network StorageNFS
fi
environment:
OS_CLOUD: standalone

- name: Create hostonly-sriov network # noqa no-changed-when
when: sriov_interface is defined
ansible.builtin.shell: |
Expand Down
40 changes: 40 additions & 0 deletions playbooks/roles/ceph/tasks/storage-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
storage_subnet:
ip_subnet: '{{ ceph_network }}'
allocation_pools: [{'start': '{{ start }}', 'end': '{{ end }}'}]
- name: StorageNFS
mtu: 1350
vip: true
name_lower: storage_nfs
service_net_map_replace: storage_nfs
subnets:
storage_subnet:
ip_subnet: '{{ hostonly_nfs_cidr }}'
allocation_pools: [{'start': '{{ hostonly_nfs_fip_pool_start }}', 'end': '{{ hostonly_nfs_fip_pool_end }}'}]

- name: Create deployed_network environment file (with VIPs)
ansible.builtin.copy:
Expand All @@ -35,6 +44,10 @@
ip_address: {{ mon_ip }}
ip_subnet: {{ dummy_ip_cidr }}
ip_address_uri: {{ mon_ip }}
storage_nfs:
ip_address: {{ hostonly_nfs_cidr | nthhost(1) }}
ip_subnet: {{ hostonly_nfs_cidr }}
ip_address_uri: {{ hostonly_nfs_ganesha }}
ControlPlaneVipData:
fixed_ips:
- ip_address: {{ control_plane_ip }}
Expand All @@ -49,6 +62,12 @@
ip_address: {{ dummy_vip }}
ip_address_uri: {{ dummy_vip }}
ip_subnet: {{ dummy_vip ~ '/' ~ control_plane_prefix | string }}
storage_nfs:
ip_address: {{ hostonly_nfs_cidr | nthhost(1) }}
ip_subnet: {{ hostonly_nfs_cidr }}
ip_address_uri: {{ hostonly_nfs_ganesha }}
VipSubnetMap:
StorageNFS: storage_nfs_subnet
DeployedNetworkEnvironment:
net_attributes_map:
storage:
Expand All @@ -69,8 +88,29 @@
host_routes: []
ip_version: 4
name: storage_subnet
storage_nfs:
network:
dns_domain: storagenfs.mydomain.tld.
mtu: 1350
name: storage_nfs
tags:
- tripleo_network_name=StorageNFS
- tripleo_net_idx=1
- tripleo_service_net_map_replace=storage_nfs
- tripleo_vip=true
subnets:
storage_nfs_subnet:
cidr: {{ hostonly_nfs_cidr }}
dns_nameservers: []
gateway_ip: null
host_routes: []
ip_version: 4
name: storage_nfs_subnet
net_cidr_map:
storage:
- {{ ceph_network }}
storage_nfs:
- {{ hostonly_nfs_cidr }}
net_ip_version_map:
storage: 4
storage_nfs: 4
20 changes: 20 additions & 0 deletions playbooks/templates/dev-install_net_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ network_config:
name: dummy1
nm_controlled: true
mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }}
- type: ovs_bridge
name: br-storage_nfs
use_dhcp: false
ovs_extra:
- br-set-external-id br-storage_nfs bridge-id br-storage_nfs
addresses:
- ip_netmask: {{ hostonly_nfs_cidr | nthhost(1) }}/{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}
members:
{% for ip in tunnel_remote_ips %}
- type: ovs_tunnel
name: "tun-storage_nfs-{{ ip | to_uuid }}"
tunnel_type: vxlan
ovs_options:
- remote_ip={{ ip }}
- key=102
{% endfor %}
- type: interface
name: dummy2
nm_controlled: true
mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }}
{% if sriov_interface is defined %}
- type: sriov_pf
name: {{ sriov_interface }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
cluster_network: {{ control_plane_cidr }}
public_network: {{ control_plane_cidr }}
{% if manila_enabled %}
ceph_nfs_bind_addr: "{{ public_api }}"
ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}"
tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}"
{% endif %}
18 changes: 16 additions & 2 deletions playbooks/templates/standalone_parameters.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ resource_registry:
{% endif %}
parameter_defaults:
CloudName: {{ hostname }}.{{ clouddomain }}
# Enable ganesha
EnableGanesha: true
# Enable StorageNFS network
StorageNFS: true
ServiceNetMap:
GaneshaNetwork: storage_nfs
# Define StorageNFSIPs
StorageNfsIp: {{ hostonly_nfs_cidr | nthhost(1) }}
StorageNfsVip: {{ hostonly_nfs_ganesha }}
# Define network configuration for StorageNFS
StorageNFSNetCidr: {{ hostonly_nfs_cidr }}
StorageNFSAllocationPools:
- start: {{ hostonly_nfs_fip_pool_start }}
- end: {{ hostonly_nfs_fip_pool_end }}
ContainerCli: podman
Debug: true
DeploymentUser: {{ ansible_env.USER }}
Expand Down Expand Up @@ -183,9 +197,9 @@ parameter_defaults:
oslo_messaging_rpc_use_ssl: false
{% endif %}
{% if manila_enabled %}
ganesha_vip: "{{ public_api }}"
ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}"
# for cephadm support on OSP 17
tripleo_cephadm_ceph_nfs_bind_addr: "{{ public_api }}"
tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}"
{% endif %}
{% if standalone_extra_config|length > 0 %}
{% for key, value in standalone_extra_config.items() %}
Expand Down
15 changes: 14 additions & 1 deletion playbooks/vars/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ hostonly_sriov_prefix: "{{ hostonly_sriov_cidr | ansible.utils.ipaddr('prefix')
hostonly_sriov_fip_pool_start: "{{ hostonly_sriov_cidr | nthhost(2) }}"
hostonly_sriov_fip_pool_end: "{{ hostonly_sriov_cidr | nthhost(-2) }}"

# StorageNFSNetwork
hostonly_nfs_cidr: 172.17.5.0/24
hostonly_nfs_ganesha: "{{ hostonly_nfs_cidr | nthhost(129) }}"
hostonly_nfs_prefix: "{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}"
hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(150) }}"
hostonly_nfs_fip_pool_end: "{{ hostonly_nfs_cidr | nthhost(-2) }}"

storage_nfs: "{{ hostonly_nfs_cidr | nthhost(2) }}"
storage_nfs_subnet: "{{ hostonly_nfs_cidr }}"
storage_nfs_uri: "{{ hostonly_nfs_ganesha }}"
storage_nfs_ip: "{{ hostonly_nfs_cidr | nthhost(1) }}"
storage_nfs_vip: "{{ hostonly_nfs_ganesha }}"

# Configuration used only by prepare_stack_testconfig, which is not run by
# default.
testconfig_private_cidr: 192.168.100.0/24
Expand Down Expand Up @@ -121,7 +134,7 @@ low_memory_usage: false
# This param can be overriden, but only when overriding the network_config, otherwise the default
# should work as is:
# neutron_bridge_mappings:
neutron_flat_networks: "external,hostonly,hostonly-sriov"
neutron_flat_networks: "external,hostonly,hostonly-sriov,storage_nfs"

# If we have more than one SR-IOV device, it can be useful to override this one, but the default is safe
# if we only use `sriov_interface` for one device.
Expand Down