### Start Open vSwitch Service (Ubuntu/Debian) Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Start the Open vSwitch service on Ubuntu/Debian systems using systemd. ```bash # systemctl start openvswitch-switch ``` -------------------------------- ### Border Router Configuration - BFD Setup (Example 1) Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-active-active-l3gw.rst Configure a border router with a static route pointing to the project subnet via the first external gateway, enabling BFD. This example assumes a Cisco-like IOS configuration. ```text hostname border-router-1 ! ip route 203.0.113.0/24 192.0.2.100 bfd ! bfd profile default transmit-interval 1000 receive-interval 1000 exit ! peer 192.0.2.100 local-address 192.0.2.2 interface eth2 profile default exit ! exit ! end ``` -------------------------------- ### Start Open vSwitch Service (RHEL/Fedora) Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Start the Open vSwitch service on RHEL/Fedora systems using systemd. ```bash # systemctl start openvswitch ``` -------------------------------- ### Border Router Configuration - BFD Setup (Example 2) Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-active-active-l3gw.rst Configure a second border router similarly, but using the second external gateway's IP. This completes the active-active setup for the project subnet. ```text hostname border-router-2 ! ip route 203.0.113.0/24 198.51.100.100 bfd ! bfd profile default transmit-interval 1000 receive-interval 1000 exit ! peer 198.51.100.100 local-address 198.51.100.2 interface eth2 profile default exit ! exit ! end ``` -------------------------------- ### Install Networking Components on Ubuntu Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-option1-ubuntu.rst Installs the core Networking server, ML2 plug-in, and necessary agents for Open vSwitch, DHCP, and metadata. ```console # apt install neutron-server neutron-plugin-ml2 \ neutron-openvswitch-agent neutron-dhcp-agent \ neutron-metadata-agent ``` -------------------------------- ### Install Networking Packages Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-option1-rdo.rst Installs the core Neutron packages, the ML2 plug-in, and the Open vSwitch agent on the controller node. ```bash # dnf install openstack-neutron openstack-neutron-ml2 \ openstack-neutron-openvswitch ``` -------------------------------- ### Enable and start Neutron Open vSwitch agent Source: https://github.com/openstack/neutron/blob/master/doc/source/install/compute-install-rdo.rst Enables the neutron-openvswitch-agent to start on boot and then starts the service. ```console # systemctl enable neutron-openvswitch-agent.service # systemctl start neutron-openvswitch-agent.service ``` -------------------------------- ### Initialize and Upgrade Database Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/alembic_migrations.rst Start with an empty database and upgrade to the latest schema versions. ```bash mysql -e "drop database neutron; create database neutron;" n ``` ```bash neutron-db-manage upgrade heads ``` -------------------------------- ### Setup and Run DSVM Functional Tests Source: https://github.com/openstack/neutron/blob/master/TESTING.rst Prepare the environment for DSVM functional tests by cloning DevStack, running the configuration script, and then executing the tests. The '-i' option uses DevStack for dependency installation. ```bash git clone https://opendev.org/openstack/devstack ../devstack ./tools/configure_for_func_testing.sh ../devstack -i tox -e dsvm-functional ``` -------------------------------- ### Install Networking Components Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-option2-ubuntu.rst Installs the necessary Neutron server, ML2 plug-in, and agent packages on the controller node. ```console # apt install neutron-server neutron-plugin-ml2 \ neutron-openvswitch-agent neutron-l3-agent neutron-dhcp-agent \ neutron-metadata-agent ``` -------------------------------- ### Start OVN Controller and Metadata Agent Services Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Start the ovn-controller and neutron-ovn-metadata-agent services using systemd. ```bash # systemctl start ovn-controller neutron-ovn-metadata-agent ``` -------------------------------- ### Install openstack-neutron-openvswitch Source: https://github.com/openstack/neutron/blob/master/doc/source/install/compute-install-rdo.rst Installs the Neutron Open vSwitch package on the compute node. ```console # dnf install openstack-neutron-openvswitch ``` -------------------------------- ### Install Vagrant Plugins Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/ovn_vagrant/prerequisites.rst Installs essential plugins for Vagrant to enhance caching and guest environment management. ```bash vagrant plugin install vagrant-cachier vagrant plugin install vagrant-vbguest ``` -------------------------------- ### Install Neutron Packages Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-option2-rdo.rst Installs the OpenStack Neutron server, ML2 plug-in, and Open vSwitch agent along with ebtables. ```bash # dnf install openstack-neutron openstack-neutron-ml2 \ openstack-neutron-openvswitch ebtables ``` -------------------------------- ### Start Open vSwitch Service Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Starts the Open vSwitch service, which includes the ovsdb-server for managing OVN databases. Use the appropriate command for your distribution. ```console # systemctl start openvswitch (RHEL/Fedora) # systemctl start openvswitch-switch (Ubuntu/Debian) ``` -------------------------------- ### Start Neutron API with uWSGI Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-wsgi.rst Command to start the Neutron API service using a uWSGI configuration file. Adjust the procname-prefix and ini file path as needed. ```console # uwsgi --procname-prefix neutron-api --ini /etc/neutron/neutron-api-uwsgi.ini ``` -------------------------------- ### OVN Meter Configuration Example Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/internals/ovn/ovn_network_logging.rst Displays an example of a meter configuration in OVN, highlighting attributes like fair, unit, burst_size, and rate. These attributes control the throttling of network logging events. ```bash $ ovn-nbctl list meter _uuid : 70c76ba9-f303-471b-9d49-25dee299827f bands : [f114c205-a170-4425-8ca6-4e71099d1955] external_ids : {"neutron:device_owner"=logging-plugin} fair : true name : acl_log_meter unit : pktps $ ovn-nbctl list meter-band _uuid : f114c205-a170-4425-8ca6-4e71099d1955 action : drop burst_size : 25 external_ids : {} rate : 100 ``` -------------------------------- ### Logical Port Binding Example Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/ovn/refarch/routers.rst Provides an example of a logical port binding, detailing its UUID, chassis, datapath, logical port identifier, MAC address, and associated peer. ```console _uuid : 8d95ab8c-c2ea-4231-9729-7ecbfc2cd676 chassis : [] datapath : 4aef86e4-e54a-4c83-bb27-d65c670d4b51 logical_port : "5b72d278-5b16-44a6-9aa0-9e513a429506" mac : ["fa:16:3e:0c:55:62 192.168.1.1"] options : {peer="lrp-5b72d278-5b16-44a6-9aa0-9e513a429506"} parent_port : [] ``` -------------------------------- ### Create an Instance with a Specific Network Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-dns-int-ext-serv.rst Boot an instance, associating it with a network that has a DNS domain configured. The instance will inherit the network's DNS settings. ```bash $ openstack server create --image cirros --flavor 42 \ --nic net-id=38c5e950-b450-4c30-83d4-ee181c28aad3 my_vm +--------------------------------------+----------------------------------------------------------------+ | Field | Value | +--------------------------------------+----------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | oTLQLR3Kezmt | ``` -------------------------------- ### Network Delete Start Notification Payload Source: https://github.com/openstack/neutron/blob/master/doc/source/reference/notifications.rst This is an example payload for a 'network.delete.start' notification, containing only the ID of the network to be deleted. ```json { "network_id": "9eaa96ed-c2d2-45a7-a6d5-5f276a3a1b54" } ``` -------------------------------- ### Create Ports and Server with QoS Policy Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-qos-min-bw.rst As a regular user, apply the pre-created QoS policy when creating ports and booting servers. This example shows creating a normal soft-switched port and a server using it. ```bash # as an unprivileged user # an ordinary soft-switched port: ``--vnic-type normal`` is the default $ openstack port create port-normal-qos \ --network net0 \ --qos-policy policy0 # alternatively an SR-IOV port, unused in this example $ openstack port create port-direct-qos \ --network net0 \ --vnic-type direct \ --qos-policy policy0 $ openstack server create server0 \ --flavor cirros256 \ --image cirros-0.5.1-x86_64-disk \ --port port-normal-qos ``` -------------------------------- ### Boot Server with Port Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-qos-min-pps.rst Boot a server and attach it to a port that has a QoS policy applied. This ensures the server operates with the specified minimum packet rate. ```bash $ openstack server create server0 \ --os-compute-api-version 2.72 \ --flavor cirros256 \ --image cirros-0.5.2-x86_64-disk \ --port port-normal-qos ``` -------------------------------- ### Network Update Start Notification Payload Source: https://github.com/openstack/neutron/blob/master/doc/source/reference/notifications.rst This is an example payload for a 'network.update.start' notification. It includes the fields to be updated and the resource's ID. ```json { "network": { "name": "renamed-net" }, "id": "9eaa96ed-c2d2-45a7-a6d5-5f276a3a1b54" } ``` -------------------------------- ### ResourceWarning Example Source: https://github.com/openstack/neutron/blob/master/doc/source/eventlet_deprecation/index.rst This text output indicates a ResourceWarning related to unclosed files. Enable tracemalloc to get more details on object allocation. ```text ResourceWarning: unclosed file <_io.FileIO name=55 mode='rb' closefd=True> ResourceWarning: Enable tracemalloc to get the object allocation traceback ``` -------------------------------- ### Create a Server with Specific Network, Flavor, Image, and Key Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/testing/ml2_ovn_devstack.rst Use this command to create a new server instance, specifying the network ID, flavor ID, image ID, and key name. This is useful for setting up test environments. ```bash $ openstack server create --nic net-id=$PRIVATE_NET_ID --flavor $FLAVOR_ID --image $IMAGE_ID --key-name demo test2 ``` -------------------------------- ### Network Create Start Notification Payload Source: https://github.com/openstack/neutron/blob/master/doc/source/reference/notifications.rst This is an example payload for a 'network.create.start' notification, representing the request body sent to the API before a network creation operation. ```json { "network": { "name": "private-net", "admin_state_up": true } } ``` -------------------------------- ### Boot Virtual Machines Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/testing/ml2_ovn_devstack.rst Create two virtual machines, 'test1' and 'test2', specifying the network, flavor, image, and SSH keypair to use. ```bash $ openstack server create --nic net-id=$PRIVATE_NET_ID --flavor $FLAVOR_ID --image $IMAGE_ID --key-name demo test1 +-----------------------------+-----------------------------------------------------------------+ | Field | Value | +-----------------------------+-----------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-STS:power_state | NOSTATE | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | None | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | ``` -------------------------------- ### Create Network, Subnet, and QoS Policy Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-qos-min-bw.rst Use these commands as an administrator to set up the necessary network infrastructure and a QoS policy with minimum bandwidth rules. ```bash # as admin $ openstack network create net0 \ --provider-network-type vlan \ --provider-physical-network physnet0 \ --provider-segment 100 $ openstack subnet create subnet0 \ --network net0 \ --subnet-range 10.0.4.0/24 $ openstack network qos policy create policy0 $ openstack network qos rule create policy0 \ --type minimum-bandwidth \ --min-kbps 1000000 \ --egress $ openstack network qos rule create policy0 \ --type minimum-bandwidth \ --min-kbps 1000000 \ --ingress ``` -------------------------------- ### Launch Instance on Provider Network Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/deploy-provider-verifynetworkoperation.txt Create a new server instance and attach it to a specific provider network. Ensure to replace NETWORK_ID with the actual ID of your provider network. ```bash $ openstack server create --flavor 1 --image cirros \ --nic net-id=NETWORK_ID provider-instance1 ``` -------------------------------- ### Complete ml2_conf.ini Sample Configuration Source: https://github.com/openstack/neutron/blob/master/doc/source/configuration/samples/ml2-conf.rst This snippet provides a full example of the `ml2_conf.ini` file, illustrating the configuration of ML2 plugin core settings and various network type drivers. Use this as a starting point for deploying Neutron with ML2. ```ini [ml2] type_drivers = flat,vlan,gre,vxlan tenant_network_types = gre,vxlan mechanism_drivers = openvswitch,linuxbridge extension_drivers = port_security,qos path_mtu = 0 segment_range_alloc_strategy = round_robin [ml2_type_flat] flat_networks = * [ml2_type_vlan] network_vlan_ranges = physnet1:1000:2000,physnet2:3000:4000 [ml2_type_gre] tunnel_id_ranges = 1:1000 [ml2_type_vxlan] vni_ranges = 1:1000 vxlan_group = 239.1.1.1 ``` -------------------------------- ### Create Instance with vhost-user Network Interface Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-ovs-dpdk.rst Create a server instance and attach a network interface that can utilize vhost-user. ```bash $ openstack server create --nic net-id=$net_id ... testserver ``` -------------------------------- ### Start Dibbler Server Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-ipv6.rst Commands to start the Dibbler server. Use 'run' for interactive mode or 'start' for headless operation. Ensure it's started after stack.sh in DevStack. ```console # dibbler-server run ``` ```console # dibbler-server start ``` -------------------------------- ### Create Instance and Observe DNS Assignment Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-dns-int.rst This console command demonstrates creating a virtual machine instance and shows the resulting port details, including how the instance hostname populates the 'dns_name' attribute. ```console $ openstack server create --image cirros --flavor 42 \ --nic net-id=37aaff3a-6047-45ac-bf4f-a825e56fd2b3 my_vm +--------------------------------------+----------------------------------------------------------------+ | Field | Value | +--------------------------------------+----------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | dB45Zvo8Jpfe | | config_drive | | | created | 2016-02-05T21:35:04Z | | flavor | m1.nano (42) | | hostId | | | id | 66c13cb4-3002-4ab3-8400-7efc2659c363 | | image | cirros-0.3.5-x86_64-uec(b9d981eb-d21c-4ce2-9dbc-dd38f3d9015f) | +--------------------------------------+----------------------------------------------------------------+ ``` -------------------------------- ### Start neutron-server Service Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Start or restart the neutron-server service using the systemd unit. ```bash # systemctl start neutron-server ``` -------------------------------- ### Start ovn-northd Service Source: https://github.com/openstack/neutron/blob/master/doc/source/install/ovn/manual_install.rst Starts the ovn-northd service using systemd. This is a prerequisite for OVN functionality. ```console # systemctl start ovn-northd ``` -------------------------------- ### Create Server with Network Interface Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-dns-int-ext-serv.rst Boots an instance with a specified image and flavor, attaching it to a network via its port. This command is used in conjunction with floating IP creation for DNS configuration. ```bash $ openstack server create --image cirros --flavor 42 \ --nic net-id=38c5e950-b450-4c30-83d4-ee181c28aad3 my_vm +--------------------------------------+----------------------------------------------------------------+ | Field | Value | +--------------------------------------+----------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | ``` -------------------------------- ### Create an instance using a direct port Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-ovs-offload.rst Launch an instance using the previously created direct port. Ensure you specify the correct flavor, image, and port ID. This command is used for the first instance. ```bash # openstack server create --flavor m1.small --image cloud_image --nic port-id=direct_port1 vm1 ``` -------------------------------- ### Example Policy Entry for create_port_binding Source: https://github.com/openstack/neutron/blob/master/doc/source/configuration/policy.rst Illustrates a policy entry for creating a port binding, specifying the default rule and the required project scope. ```text create_port_binding Default: rule:service_api Scope Types: project ``` -------------------------------- ### Connect to MySQL Database Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-rdo.rst Connect to the database server as the root user to begin database setup. ```console $ mysql -u root -p ``` -------------------------------- ### Create DNS Zone and List Record Sets Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-dns-int-ext-serv.rst These commands demonstrate creating a DNS zone for example.org and then listing the NS and SOA record sets within that zone. This is a prerequisite for publishing DNS records. ```bash $ openstack zone create example.org. --email mail@example.org ... output omitted ... $ openstack recordset list example.org. +--------------------------------------+--------------+------+--------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------+------+--------------------------------------------------------------------+--------+--------+ | 404e9846-1482-433b-8bbc-67677e587d28 | example.org. | NS | ns1.devstack.org. | ACTIVE | NONE | | de73576a-f9c7-4892-934c-259b77ff02c0 | example.org. | SOA | ns1.devstack.org. mail.example.org. 1575897792 3559 600 86400 3600 | ACTIVE | NONE | +--------------------------------------+--------------+------+--------------------------------------------------------------------+--------+--------+ ``` -------------------------------- ### OVN Encapsulation Details Example Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/ovn/refarch/refarch.rst Example output detailing OVN encapsulation information, such as IP address and type. ```text _uuid : 2fcefdf4-a5e7-43ed-b7b2-62039cc7e32e ip : "10.0.0.32" options : {} type : geneve ``` -------------------------------- ### Launch Instance and List Ports Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-service-subnets.rst Launch a new instance and then list its associated network ports to retrieve the port ID. This is a prerequisite for associating a floating IP. ```console $ openstack server create demo-instance1 --flavor m1.tiny \ --image cirros --nic net-id=b5b729d8-31cc-4d2c-8284-72b3291fec02 $ openstack port list --server demo-instance1 +--------------------------------------+------+-------------------+--------------------------------------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+--------------------------------------------------+--------+ | a752bb24-9bf2-4d37-b9d6-07da69c86f19 | | fa:16:3e:99:54:32 | ip_address='203.0.113.130', | | | | subnet_id='6e38b23f-0b27-4e3c-8e69-fd23a3df1935' | | +--------------------------------------+------+-------------------+--------------------------------------------------+--------+ ``` -------------------------------- ### Create a VM using Auto-Allocated Network Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-auto-allocation.rst Boots a virtual machine using a specified network ID, which can be obtained from the auto-allocated topology. ```console $ openstack server create --flavor m1.small --image \ cirros-0.3.5-x86_64-uec --nic \ net-id=8b835bfb-cae2-4acc-b53f-c16bb5f9a7d0 vm1 ``` -------------------------------- ### Configure VPNaaS service provider Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/vpnaas-scenario.rst Create the /etc/neutron/neutron_vpnaas.conf file and specify the service_provider for VPNaaS. The example uses 'strongswan' for Ubuntu. For RHEL/CentOS, consider 'libreswan'. ```ini [service_providers] service_provider = VPN:strongswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default ``` -------------------------------- ### OVN Chassis Information Example Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/ovn/refarch/refarch.rst Example output showing OVN chassis details, including tunnel endpoint information. ```text _uuid : 9be8639d-1d0b-4e3d-9070-03a655073871 encaps : [2fcefdf4-a5e7-43ed-b7b2-62039cc7e32e] external_ids : {ovn-bridge-mappings=""} hostname : "compute1" name : "410ee302-850b-4277-8610-fa675d620cb7" vtep_logical_switches: [] ``` -------------------------------- ### Enable and Start Layer-3 Networking Service Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-rdo.rst Enables and starts the Neutron layer-3 agent service, which is specific to certain networking configurations. ```console # systemctl enable neutron-l3-agent.service # systemctl start neutron-l3-agent.service ``` -------------------------------- ### Launch Instance with Provider Network Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/ovn/refarch/launch-instance-provider-network.rst Use the 'openstack server create' command to launch an instance, specifying the provider network's UUID. ```console $ openstack server create --flavor m1.tiny --image cirros \ --nic net-id=0243277b-4aa8-46d8-9e10-5c9ad5e01521 \ --security-group default --key-name mykey provider-instance +--------------------------------------+-----------------------------------------------+ | Property | Value | +--------------------------------------+-----------------------------------------------+ | OS-DCF:diskConfig | MANUAL | OS-EXT-AZ:availability_zone | nova | OS-EXT-STS:power_state | 0 | OS-EXT-STS:task_state | scheduling | OS-EXT-STS:vm_state | building | OS-SRV-USG:launched_at | - | OS-SRV-USG:terminated_at | - | accessIPv4 | | accessIPv6 | | adminPass | hdF4LMQqC5PB | config_drive | | created | 2015-09-17T21:58:18Z | flavor | m1.tiny (1) | hostId | | id | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | image | cirros (38047887-61a7-41ea-9b49-27987d5e8bb9) | key_name | mykey | metadata | {} name | provider-instance | os-extended-volumes:volumes_attached | [] | progress | 0 | security_groups | default | status | BUILD | project_id | f5b2ccaa75ac413591f12fcaa096aa5c | updated | 2015-09-17T21:58:18Z | user_id | 684286a9079845359882afc3aa5011fb | +--------------------------------------+-----------------------------------------------+ ``` -------------------------------- ### Create Instance with SR-IOV Port Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-sriov.rst Launch an instance, specifying the previously created SR-IOV port for the NIC. This allows the instance to utilize SR-IOV capabilities. ```bash $ openstack server create --flavor m1.large --image ubuntu_18.04 \ --nic port-id=$port_id \ test-sriov ``` -------------------------------- ### Enable and Start Networking Services Source: https://github.com/openstack/neutron/blob/master/doc/source/install/controller-install-rdo.rst Enables and starts the core Neutron server and agent services. These services are essential for network functionality. ```console # systemctl enable neutron-server.service \ neutron-openvswitch-agent.service neutron-dhcp-agent.service \ neutron-metadata-agent.service # systemctl start neutron-server.service \ neutron-openvswitch-agent.service neutron-dhcp-agent.service \ neutron-metadata-agent.service ``` -------------------------------- ### Activate libvirt Network Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/misc-libvirt.rst Start a previously deactivated libvirt network. This will re-create the bridge, start dnsmasq, and apply iptables rules. ```console # virsh net-start default ``` -------------------------------- ### Example Policy Entry for create_network Source: https://github.com/openstack/neutron/blob/master/doc/source/configuration/policy.rst Shows a policy entry for creating a network, requiring either admin privileges or membership in the project. ```text create_network Default: rule:admin_or_project_member Scope Types: project ``` -------------------------------- ### Install remote_pdb for Debugging Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/testing/fullstack.rst Install the remote_pdb module into the tox virtual environment to enable remote debugging capabilities for fullstack tests. ```console $ .tox/dsvm-fullstack/bin/pip install remote_pdb ``` -------------------------------- ### Enable OVS Hardware Offloading and Bind VFs Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-ovs-offload.rst Enable Open vSwitch hardware offloading, set the PF to switchdev mode, and re-bind the VFs. ```bash # sudo devlink dev eswitch set pci/0000:03:00.0 mode switchdev # sudo ethtool -K enp3s0f0 hw-tc-offload on # echo 0000:03:00.2 > /sys/bus/pci/drivers/mlx5_core/bind ``` -------------------------------- ### List Available Flavors Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/testing/ml2_ovn_devstack.rst Display a list of available compute flavors to choose from for launching VMs. The output includes details like RAM, Disk, VCPUs, and more. ```bash $ openstack flavor list +----+-----------+-------+------+-----------+-------+-----------+ | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+-----------+-------+------+-----------+-------+-----------+ | 1 | m1.tiny | 512 | 1 | 0 | 1 | True | | 2 | m1.small | 2048 | 20 | 0 | 1 | True | | 3 | m1.medium | 4096 | 40 | 0 | 2 | True | | 4 | m1.large | 8192 | 80 | 0 | 4 | True | | 42 | m1.nano | 64 | 0 | 0 | 1 | True | | 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True | | 84 | m1.micro | 128 | 0 | 0 | 1 | True | | c1 | cirros256 | 256 | 0 | 0 | 1 | True | | d1 | ds512M | 512 | 5 | 0 | 1 | True | | d2 | ds1G | 1024 | 10 | 0 | 1 | True | | d3 | ds2G | 2048 | 10 | 0 | 2 | True | | d4 | ds4G | 4096 | 20 | 0 | 4 | True | +----+-----------+-------+------+-----------+-------+-----------+ ``` -------------------------------- ### Run DevStack Installation Source: https://github.com/openstack/neutron/blob/master/doc/source/contributor/testing/ml2_ovs_devstack.rst Executes the DevStack script to install and configure OpenStack services. This command initiates the full OpenStack deployment. ```bash ./stack.sh ``` -------------------------------- ### Create VM and Assign Floating IP Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-bgp-floating-ip-over-l2-segmented-network.rst Launch a virtual machine on the project network and subsequently assign a floating IP address to it. This demonstrates the end-to-end process of providing external access. ```bash $ openstack server create --image debian-10.5.0-openstack-amd64.qcow2 \ --flavor cpu2-ram6-disk20 \ --nic net-id=project-network \ --key-name yubikey-zigo \ test-server-1 ``` ```bash $ openstack floating ip create provider-network ``` ```bash $ openstack server add floating ip test-server-1 203.0.113.17 ``` -------------------------------- ### Install uWSGI Proxy Module Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-wsgi.rst Installs the necessary uWSGI proxy module and enables required Apache modules on deb-based systems. ```console # sudo apt-get install libapache2-mod-proxy-uwsgi # sudo a2enmod proxy # sudo a2enmod proxy_uwsgi ``` -------------------------------- ### Create Port with DNS Name and Domain Source: https://github.com/openstack/neutron/blob/master/doc/source/admin/config-dns-int-ext-serv.rst This command creates a port named 'port1' and associates it with the 'example.org.' DNS domain, assigning it the DNS name 'port1'. This action will publish the port's fixed IP in the external DNS service if the subnet's dns_publish_fixed_ips attribute is enabled. ```bash $ openstack port create port1 --dns-domain example.org. --dns-name port1 --network dualstack ```