From a339efcd676b81804b2d5ab54d4bba8ecaba99b5 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Thu, 4 Dec 2014 16:52:58 +1100 Subject: [PATCH] Create service definition for nova-serialproxy Nova has the ability to do remote interactive consoles but there is no easy way to enable this in devstack. This change defines a service called n-serial to enable the service. Documentation is added to a new guide on nova, describing how to set further options in local.conf Change-Id: I401d94b2413c62bfae9b90d2214d77bd4cfc15d5 --- doc/source/guides/nova.rst | 72 ++++++++++++++++++++++++++++++++++++++ doc/source/index.rst | 6 ++++ lib/nova | 7 +++- 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 doc/source/guides/nova.rst diff --git a/doc/source/guides/nova.rst b/doc/source/guides/nova.rst new file mode 100644 index 0000000000..0d98f4abad --- /dev/null +++ b/doc/source/guides/nova.rst @@ -0,0 +1,72 @@ +================= +Nova and devstack +================= + +This is a rough guide to various configuration parameters for nova +running with devstack. + + +nova-serialproxy +================ + +In Juno nova implemented a `spec +`_ +to allow read/write access to the serial console of an instance via +`nova-serialproxy +`_. + +The service can be enabled by adding ``n-sproxy`` to +``ENABLED_SERVICES``. Further options can be enabled via +``local.conf``, e.g. + +:: + + [[post-config|$NOVA_CONF]] + [serial_console] + # + # Options defined in nova.cmd.serialproxy + # + + # Host on which to listen for incoming requests (string value) + #serialproxy_host=0.0.0.0 + + # Port on which to listen for incoming requests (integer + # value) + #serialproxy_port=6083 + + + # + # Options defined in nova.console.serial + # + + # Enable serial console related features (boolean value) + #enabled=false + # Do not set this manually. Instead enable the service as + # outlined above. + + # Range of TCP ports to use for serial ports on compute hosts + # (string value) + #port_range=10000:20000 + + # Location of serial console proxy. (string value) + #base_url=ws://127.0.0.1:6083/ + + # IP address on which instance serial console should listen + # (string value) + #listen=127.0.0.1 + + # The address to which proxy clients (like nova-serialproxy) + # should connect (string value) + #proxyclient_address=127.0.0.1 + + +Enabling the service is enough to be functional for a single machine devstack. + +These config options are defined in `nova.console.serial +`_ +and `nova.cmd.serialproxy +`_. + +For more information on OpenStack configuration see the `OpenStack +Configuration Reference +`_ diff --git a/doc/source/index.rst b/doc/source/index.rst index 855a2d6b2b..10f4355c07 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -67,6 +67,7 @@ Walk through various setups used by stackers guides/multinode-lab guides/neutron guides/devstack-with-nested-kvm + guides/nova All-In-One Single VM -------------------- @@ -102,6 +103,11 @@ Procedure to setup :doc:`DevStack with KVM-based Nested Virtualization `. With this setup, Nova instances will be more performant than with plain QEMU emulation. +Nova and devstack +-------------------------------- + +Guide to working with nova features :doc:`Nova and devstack `. + DevStack Documentation ====================== diff --git a/lib/nova b/lib/nova index 74a34117bc..e9e78c7bc4 100644 --- a/lib/nova +++ b/lib/nova @@ -566,6 +566,10 @@ function create_nova_conf { if is_service_enabled tls-proxy; then iniset $NOVA_CONF DEFAULT ec2_listen_port $EC2_SERVICE_PORT_INT fi + + if is_service_enabled n-sproxy; then + iniset $NOVA_CONF serial_console enabled True + fi } function init_nova_cells { @@ -764,6 +768,7 @@ function start_nova_rest { run_process n-xvnc "$NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf" run_process n-spice "$NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_WEB_DIR" run_process n-cauth "$NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf" + run_process n-sproxy "$NOVA_BIN_DIR/nova-serialproxy --config-file $api_cell_conf" # Starting the nova-objectstore only if swift3 service is not enabled. # Swift will act as s3 objectstore. @@ -794,7 +799,7 @@ function stop_nova_rest { # Kill the nova screen windows # Some services are listed here twice since more than one instance # of a service may be running in certain configs. - for serv in n-api n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-obj; do + for serv in n-api n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-obj n-sproxy; do stop_process $serv done }