blob: 5b427972c4e55e957c950e4d947176bd8e6001ae [file] [log] [blame]
Tony Breedsa339efc2014-12-04 16:52:58 +11001=================
Shilla Saebi2ed09d82015-04-21 15:02:13 -04002Nova and DevStack
Tony Breedsa339efc2014-12-04 16:52:58 +11003=================
4
5This is a rough guide to various configuration parameters for nova
Shilla Saebi2ed09d82015-04-21 15:02:13 -04006running with DevStack.
Tony Breedsa339efc2014-12-04 16:52:58 +11007
8
9nova-serialproxy
10================
11
Shilla Saebi2ed09d82015-04-21 15:02:13 -040012In Juno, nova implemented a `spec
Andreas Jaeger8dd89e52019-08-11 16:00:12 +020013<https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
Tony Breedsa339efc2014-12-04 16:52:58 +110014to allow read/write access to the serial console of an instance via
15`nova-serialproxy
Takashi NATSUMEfa007772017-07-22 08:59:43 +090016<https://docs.openstack.org/nova/latest/cli/nova-serialproxy.html>`_.
Tony Breedsa339efc2014-12-04 16:52:58 +110017
18The 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 Saebi2ed09d82015-04-21 15:02:13 -040063Enabling the service is enough to be functional for a single machine DevStack.
Tony Breedsa339efc2014-12-04 16:52:58 +110064
Takashi NATSUMEfa007772017-07-22 08:59:43 +090065These config options are defined in `nova.conf.serial_console
Andreas Jaeger8dd89e52019-08-11 16:00:12 +020066<https://opendev.org/openstack/nova/src/master/nova/conf/serial_console.py>`_.
Tony Breedsa339efc2014-12-04 16:52:58 +110067
68For more information on OpenStack configuration see the `OpenStack
Jens Harbottacb48a12017-09-06 10:55:39 +000069Compute Service Configuration Reference
70<https://docs.openstack.org/nova/latest/admin/configuration/index.html>`_
Matt Riedemann36773b22019-02-28 17:30:47 -050071
72
73Fake virt driver
74================
75
76Nova has a `fake virt driver`_ which can be used for scale testing the control
77plane services or testing "move" operations between fake compute nodes, for
78example cold/live migration, evacuate and unshelve.
79
80The fake virt driver does not communicate with any hypervisor, it just reports
81some 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
83compute API but is good enough for most API testing, and is also used within
84the nova functional tests themselves so is fairly robust.
85
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040086.. _fake virt driver: https://opendev.org/openstack/nova/src/branch/master/nova/virt/fake.py
Matt Riedemann36773b22019-02-28 17:30:47 -050087
88Configuration
89-------------
90
91Set 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
99The ``NUMBER_FAKE_NOVA_COMPUTE`` variable controls the number of fake
100``nova-compute`` services to run and defaults to 1.
101
102When ``VIRT_DRIVER=fake`` is used, devstack will disable quota checking in
103nova and neutron automatically. However, other services, like cinder, will
104still enforce quota limits by default.
105
106Scaling
107-------
108
109The actual value to use for ``NUMBER_FAKE_NOVA_COMPUTE`` depends on factors
110such 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
117In addition, while quota will be disabled in neutron, there is no fake ML2
118backend for neutron so creating fake VMs will still result in real ports being
119created. To create servers without networking, you can specify ``--nic=none``
120when creating the server, for example:
121
122.. code-block:: shell
123
124 $ openstack --os-compute-api-version 2.37 server create --flavor cirros256 \
125 --image cirros-0.3.5-x86_64-disk --nic none --wait test-server
126
127.. note:: ``--os-compute-api-version`` greater than or equal to 2.37 is
128 required to use ``--nic=none``.
129
130To avoid overhead from other services which you may not need, disable them in
131your ``local.conf``, for example:
132
133.. code-block:: ini
134
135 disable_service horizon
136 disable_service tempest