-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from slawqo/neutron-sriov-agent
Add edpm role to deploy Neutron SRIOV agent
- Loading branch information
Showing
23 changed files
with
623 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Deploy EDPM Neutron SR-IOV agent | ||
hosts: all | ||
strategy: linear | ||
become: true | ||
tasks: | ||
- name: Neutron SR-IOV agent | ||
import_role: | ||
name: osp.edpm.edpm_neutron_sriov | ||
tags: | ||
- edpm_neutron_sriov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# See the OWNERS docs at https://go.k8s.io/owners | ||
approvers: | ||
- slawqo | ||
- network-approvers | ||
|
||
reviewers: | ||
- slawqo | ||
- network-approvers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
# All variables intended for modification should be placed in this file. | ||
|
||
# All variables within this role should have a prefix of "edpm_neutron_sriov_agent" | ||
edpm_neutron_sriov_agent_config_dir: "/var/lib/config-data/ansible-generated/neutron-sriov-agent" | ||
edpm_neutron_sriov_image: "quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified" | ||
|
||
edpm_neutron_sriov_common_volumes: | ||
- /lib/modules:/lib/modules:ro | ||
- /dev:/dev | ||
- "{{ edpm_neutron_sriov_agent_config_dir }}:/etc/neutron:z" | ||
- /var/lib/neutron:/var/lib/neutron:shared,z | ||
- /var/lib/kolla/config_files/neutron_sriov_agent.json:/var/lib/kolla/config_files/config.json:ro | ||
- /var/log/containers/neutron:/var/log/neutron:z | ||
|
||
# neutron.conf | ||
# DEFAULT | ||
edpm_neutron_sriov_DEFAULT_debug: false | ||
edpm_neutron_sriov_DEFAULT_rpc_response_timeout: 60 | ||
edpm_neutron_sriov_DEFAULT_transport_url: '' | ||
edpm_neutron_sriov_DEFAULT_host: '{{ ansible_facts["nodename"] }}' | ||
# oslo_concurrency | ||
edpm_neutron_sriov_oslo_concurrency_lock_patch: '$state_path/lock' | ||
# oslo_messaging_rabbit | ||
edpm_neutron_sriov_oslo_messaging_rabbit_heartbeat_timeout_threshold: 60 | ||
# oslo_middleware | ||
edpm_neutron_sriov_oslo_middleware_enable_proxy_headers_parsing: 60 | ||
|
||
# rootwrap.conf | ||
# DEFAULT | ||
edpm_neutron_sriov_rootwrap_DEFAULT_filters_path: '/etc/neutron/rootwrap.d,/usr/share/neutron/rootwrap' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_exec_dirs: '/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin,/etc/neutron/kill_scripts' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_use_syslog: 'False' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_syslog_log_facility: 'syslog' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_syslog_log_level: 'ERROR' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_daemon_timeout: 600 | ||
edpm_neutron_sriov_rootwrap_DEFAULT_rlimit_nofile: 1024 | ||
|
||
# neutron-sriov-agent.ini | ||
# DEFAULT | ||
edpm_neutron_sriov_agent_DEFAULT_state_path: '/var/lib/neutron' | ||
# AGENT | ||
edpm_neutron_sriov_agent_AGENT_root_helper: 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf' | ||
edpm_neutron_sriov_agent_AGENT_report_interval: 300 | ||
edpm_neutron_sriov_agent_AGENT_extensions: 'qos' | ||
edpm_neutron_sriov_agent_AGENT_polling_interval: 2 | ||
# SRIOV_NIC | ||
edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: '' | ||
edpm_neutron_sriov_agent_SRIOV_NIC_exclude_devices: '' | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_bandwidths: '' | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_hypervisors: '' | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_default_hypervisor: '' | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_inventory_defaults: 'allocation_ratio:1.0,min_unit:1,step_size:1,reserved:0' | ||
# SRIOV_DRIVER | ||
edpm_neutron_sriov_agent_SRIOV_DRIVER_vnic_type_prohibit_list: '' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
- name: restart neutron-sriov-agent container | ||
become: true | ||
ansible.builtin.systemd: | ||
state: restarted | ||
name: "edpm_neutron_sriov_agent.service" | ||
listen: "restart neutron-sriov-agent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
argument_specs: | ||
# ./roles/edpm_neutron_sriov/tasks/main.yml entry point | ||
main: | ||
short_description: The main entry point for the edpm_neutron_sriov role. | ||
options: | ||
edpm_neutron_sriov_agent_config_dir: | ||
default: "/var/lib/config-data/ansible-generated/neutron-sriov-agent" | ||
description: | | ||
The path to the directory containing Neutron SRIOV NIC agent config | ||
files. | ||
type: str | ||
edpm_neutron_sriov_image: | ||
default: "quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified" | ||
description: Neutron SRIOV NIC agent container image. | ||
type: str | ||
edpm_neutron_sriov_common_volumes: | ||
default: | ||
- /lib/modules:/lib/modules:ro | ||
- /dev:/dev | ||
- "{{ edpm_neutron_sriov_agent_config_dir }}:/etc/neutron:z" | ||
- /var/lib/neutron:/var/lib/neutron:shared,z | ||
- /var/lib/kolla/config_files/neutron_sriov_agent.json:/var/lib/kolla/config_files/config.json:ro | ||
- /var/log/containers/neutron:/var/log/neutron:z | ||
description: List of volumes in a mount point form. | ||
type: list | ||
edpm_neutron_sriov_DEFAULT_debug: | ||
default: false | ||
description: "Enable or disable DEBUG mode in the Neutron agent" | ||
type: bool | ||
edpm_neutron_sriov_DEFAULT_rpc_response_timeout: | ||
default: 60 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_DEFAULT_transport_url: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_DEFAULT_host: | ||
default: '{{ ansible_facts["nodename"] }}' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_oslo_concurrency_lock_patch: | ||
default: '$state_path/lock' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_oslo_messaging_rabbit_heartbeat_timeout_threshold: | ||
default: 60 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_oslo_middleware_enable_proxy_headers_parsing: | ||
default: 60 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_rootwrap_DEFAULT_filters_path: | ||
default: '/etc/neutron/rootwrap.d,/usr/share/neutron/rootwrap' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_exec_dirs: | ||
default: '/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin,/etc/neutron/kill_scripts' | ||
edpm_neutron_sriov_rootwrap_DEFAULT_use_syslog: | ||
default: false | ||
description: '' | ||
type: bool | ||
edpm_neutron_sriov_rootwrap_DEFAULT_syslog_log_facility: | ||
default: 'syslog' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_rootwrap_DEFAULT_syslog_log_level: | ||
default: 'ERROR' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_rootwrap_DEFAULT_daemon_timeout: | ||
default: 600 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_rootwrap_DEFAULT_rlimit_nofile: | ||
default: 1024 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_agent_DEFAULT_state_path: | ||
default: '/var/lib/neutron' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_AGENT_root_helper: | ||
default: 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_AGENT_report_interval: | ||
default: 300 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_agent_AGENT_extensions: | ||
default: 'qos' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_AGENT_polling_interval: | ||
default: 2 | ||
description: '' | ||
type: int | ||
edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_NIC_exclude_devices: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_bandwidths: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_hypervisors: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_default_hypervisor: | ||
default: '' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_NIC_resource_provider_inventory_defaults: | ||
default: 'allocation_ratio:1.0,min_unit:1,step_size:1,reserved:0' | ||
description: '' | ||
type: str | ||
edpm_neutron_sriov_agent_SRIOV_DRIVER_vnic_type_prohibit_list: | ||
default: '' | ||
description: '' | ||
type: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
galaxy_info: | ||
author: OpenStack | ||
description: EDPM OpenStack Role -- edpm_neutron_sriov | ||
company: Red Hat | ||
license: Apache-2.0 | ||
min_ansible_version: '2.14' | ||
namespace: openstack | ||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
platforms: | ||
- name: 'EL' | ||
versions: | ||
- '8' | ||
- '9' | ||
|
||
galaxy_tags: | ||
- edpm | ||
|
||
|
||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
collections: | ||
- name: community.general |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
- name: Converge | ||
hosts: all | ||
roles: | ||
- role: "edpm_neutron_sriov" | ||
vars: | ||
edpm_neutron_sriov_DEFAULT_transport_url: "fake:/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: collections.yml | ||
driver: | ||
name: podman | ||
platforms: | ||
- command: /sbin/init | ||
dockerfile: ../../../../molecule/common/Containerfile.j2 | ||
image: ${EDPM_ANSIBLE_MOLECULE_IMAGE:-"ubi9/ubi-init"} | ||
name: fake-sriov-compute-1 | ||
privileged: true | ||
registry: | ||
url: ${EDPM_ANSIBLE_MOLECULE_REGISTRY:-"registry.access.redhat.com"} | ||
ulimits: | ||
- host | ||
provisioner: | ||
log: true | ||
name: ansible | ||
scenario: | ||
test_sequence: | ||
- dependency | ||
- destroy | ||
- create | ||
- prepare | ||
- converge | ||
- verify | ||
- destroy | ||
verifier: | ||
name: ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
- name: Prepare test_deps | ||
hosts: all | ||
roles: | ||
- role: ../../../../molecule/common/test_deps | ||
test_deps_extra_packages: | ||
- iproute | ||
- podman |
Oops, something went wrong.