Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 1 | ================= |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 2 | Nova and DevStack |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 3 | ================= |
| 4 | |
| 5 | This is a rough guide to various configuration parameters for nova |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 6 | running with DevStack. |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | nova-serialproxy |
| 10 | ================ |
| 11 | |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 12 | In Juno, nova implemented a `spec |
Andreas Jaeger | 8dd89e5 | 2019-08-11 16:00:12 +0200 | [diff] [blame] | 13 | <https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_ |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 14 | to allow read/write access to the serial console of an instance via |
| 15 | `nova-serialproxy |
Takashi NATSUME | fa00777 | 2017-07-22 08:59:43 +0900 | [diff] [blame] | 16 | <https://docs.openstack.org/nova/latest/cli/nova-serialproxy.html>`_. |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 17 | |
| 18 | The service can be enabled by adding ``n-sproxy`` to |
| 19 | ``ENABLED_SERVICES``. Further options can be enabled via |
| 20 | ``local.conf``, e.g. |
| 21 | |
| 22 | :: |
| 23 | |
| 24 | [[post-config|$NOVA_CONF]] |
| 25 | [serial_console] |
| 26 | # |
| 27 | # Options defined in nova.cmd.serialproxy |
| 28 | # |
| 29 | |
| 30 | # Host on which to listen for incoming requests (string value) |
| 31 | #serialproxy_host=0.0.0.0 |
| 32 | |
| 33 | # Port on which to listen for incoming requests (integer |
| 34 | # value) |
| 35 | #serialproxy_port=6083 |
| 36 | |
| 37 | |
| 38 | # |
| 39 | # Options defined in nova.console.serial |
| 40 | # |
| 41 | |
| 42 | # Enable serial console related features (boolean value) |
| 43 | #enabled=false |
| 44 | # Do not set this manually. Instead enable the service as |
| 45 | # outlined above. |
| 46 | |
| 47 | # Range of TCP ports to use for serial ports on compute hosts |
| 48 | # (string value) |
| 49 | #port_range=10000:20000 |
| 50 | |
| 51 | # Location of serial console proxy. (string value) |
| 52 | #base_url=ws://127.0.0.1:6083/ |
| 53 | |
| 54 | # IP address on which instance serial console should listen |
| 55 | # (string value) |
| 56 | #listen=127.0.0.1 |
| 57 | |
| 58 | # The address to which proxy clients (like nova-serialproxy) |
| 59 | # should connect (string value) |
| 60 | #proxyclient_address=127.0.0.1 |
| 61 | |
| 62 | |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 63 | Enabling the service is enough to be functional for a single machine DevStack. |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 64 | |
Takashi NATSUME | fa00777 | 2017-07-22 08:59:43 +0900 | [diff] [blame] | 65 | These config options are defined in `nova.conf.serial_console |
Andreas Jaeger | 8dd89e5 | 2019-08-11 16:00:12 +0200 | [diff] [blame] | 66 | <https://opendev.org/openstack/nova/src/master/nova/conf/serial_console.py>`_. |
Tony Breeds | a339efc | 2014-12-04 16:52:58 +1100 | [diff] [blame] | 67 | |
| 68 | For more information on OpenStack configuration see the `OpenStack |
Jens Harbott | acb48a1 | 2017-09-06 10:55:39 +0000 | [diff] [blame] | 69 | Compute Service Configuration Reference |
| 70 | <https://docs.openstack.org/nova/latest/admin/configuration/index.html>`_ |
Matt Riedemann | 36773b2 | 2019-02-28 17:30:47 -0500 | [diff] [blame] | 71 | |
| 72 | |
| 73 | Fake virt driver |
| 74 | ================ |
| 75 | |
| 76 | Nova has a `fake virt driver`_ which can be used for scale testing the control |
| 77 | plane services or testing "move" operations between fake compute nodes, for |
| 78 | example cold/live migration, evacuate and unshelve. |
| 79 | |
| 80 | The fake virt driver does not communicate with any hypervisor, it just reports |
| 81 | some fake resource inventory values and keeps track of the state of the |
| 82 | "guests" created, moved and deleted. It is not feature-complete with the |
| 83 | compute API but is good enough for most API testing, and is also used within |
| 84 | the nova functional tests themselves so is fairly robust. |
| 85 | |
Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 86 | .. _fake virt driver: https://opendev.org/openstack/nova/src/branch/master/nova/virt/fake.py |
Matt Riedemann | 36773b2 | 2019-02-28 17:30:47 -0500 | [diff] [blame] | 87 | |
| 88 | Configuration |
| 89 | ------------- |
| 90 | |
| 91 | Set the following in your devstack ``local.conf``: |
| 92 | |
| 93 | .. code-block:: ini |
| 94 | |
| 95 | [[local|localrc]] |
| 96 | VIRT_DRIVER=fake |
| 97 | NUMBER_FAKE_NOVA_COMPUTE=<number> |
| 98 | |
| 99 | The ``NUMBER_FAKE_NOVA_COMPUTE`` variable controls the number of fake |
| 100 | ``nova-compute`` services to run and defaults to 1. |
| 101 | |
| 102 | When ``VIRT_DRIVER=fake`` is used, devstack will disable quota checking in |
| 103 | nova and neutron automatically. However, other services, like cinder, will |
| 104 | still enforce quota limits by default. |
| 105 | |
| 106 | Scaling |
| 107 | ------- |
| 108 | |
| 109 | The actual value to use for ``NUMBER_FAKE_NOVA_COMPUTE`` depends on factors |
| 110 | such as: |
| 111 | |
| 112 | * The size of the host (physical or virtualized) on which devstack is running. |
| 113 | * The number of API workers. By default, devstack will run ``max($nproc/2, 2)`` |
| 114 | workers per API service. If you are running several fake compute services on |
| 115 | a single host, then consider setting ``API_WORKERS=1`` in ``local.conf``. |
| 116 | |
| 117 | In addition, while quota will be disabled in neutron, there is no fake ML2 |
| 118 | backend for neutron so creating fake VMs will still result in real ports being |
| 119 | created. To create servers without networking, you can specify ``--nic=none`` |
| 120 | when creating the server, for example: |
| 121 | |
| 122 | .. code-block:: shell |
| 123 | |
| 124 | $ openstack --os-compute-api-version 2.37 server create --flavor cirros256 \ |
Dr. Jens Harbott | fec589a | 2024-09-26 21:23:17 +0200 | [diff] [blame^] | 125 | --image cirros-0.6.3-x86_64-disk --nic none --wait test-server |
Matt Riedemann | 36773b2 | 2019-02-28 17:30:47 -0500 | [diff] [blame] | 126 | |
| 127 | .. note:: ``--os-compute-api-version`` greater than or equal to 2.37 is |
| 128 | required to use ``--nic=none``. |
| 129 | |
| 130 | To avoid overhead from other services which you may not need, disable them in |
| 131 | your ``local.conf``, for example: |
| 132 | |
| 133 | .. code-block:: ini |
| 134 | |
| 135 | disable_service horizon |
| 136 | disable_service tempest |