Browse code

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

Tony Breeds authored on 2014/12/04 14:52:58
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+=================
1
+Nova and devstack
2
+=================
3
+
4
+This is a rough guide to various configuration parameters for nova
5
+running with devstack.
6
+
7
+
8
+nova-serialproxy
9
+================
10
+
11
+In Juno nova implemented a `spec
12
+<http://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
13
+to allow read/write access to the serial console of an instance via
14
+`nova-serialproxy
15
+<http://docs.openstack.org/developer/nova/man/nova-serialproxy.html>`_.
16
+
17
+The service can be enabled by adding ``n-sproxy`` to
18
+``ENABLED_SERVICES``.  Further options can be enabled via
19
+``local.conf``, e.g.
20
+
21
+::
22
+
23
+    [[post-config|$NOVA_CONF]]
24
+    [serial_console]
25
+    #
26
+    # Options defined in nova.cmd.serialproxy
27
+    #
28
+
29
+    # Host on which to listen for incoming requests (string value)
30
+    #serialproxy_host=0.0.0.0
31
+
32
+    # Port on which to listen for incoming requests (integer
33
+    # value)
34
+    #serialproxy_port=6083
35
+
36
+
37
+    #
38
+    # Options defined in nova.console.serial
39
+    #
40
+
41
+    # Enable serial console related features (boolean value)
42
+    #enabled=false
43
+    # Do not set this manually.  Instead enable the service as
44
+    # outlined above.
45
+
46
+    # Range of TCP ports to use for serial ports on compute hosts
47
+    # (string value)
48
+    #port_range=10000:20000
49
+
50
+    # Location of serial console proxy. (string value)
51
+    #base_url=ws://127.0.0.1:6083/
52
+
53
+    # IP address on which instance serial console should listen
54
+    # (string value)
55
+    #listen=127.0.0.1
56
+
57
+    # The address to which proxy clients (like nova-serialproxy)
58
+    # should connect (string value)
59
+    #proxyclient_address=127.0.0.1
60
+
61
+
62
+Enabling the service is enough to be functional for a single machine devstack.
63
+
64
+These config options are defined in `nova.console.serial
65
+<https://github.com/openstack/nova/blob/master/nova/console/serial.py#L33-L52>`_
66
+and `nova.cmd.serialproxy
67
+<https://github.com/openstack/nova/blob/master/nova/cmd/serialproxy.py#L26-L33>`_.
68
+
69
+For more information on OpenStack configuration see the `OpenStack
70
+Configuration Reference
71
+<http://docs.openstack.org/trunk/config-reference/content/list-of-compute-config-options.html>`_
... ...
@@ -67,6 +67,7 @@ Walk through various setups used by stackers
67 67
    guides/multinode-lab
68 68
    guides/neutron
69 69
    guides/devstack-with-nested-kvm
70
+   guides/nova
70 71
 
71 72
 All-In-One Single VM
72 73
 --------------------
... ...
@@ -102,6 +103,11 @@ Procedure to setup :doc:`DevStack with KVM-based Nested Virtualization
102 102
 <guides/devstack-with-nested-kvm>`. With this setup, Nova instances
103 103
 will be more performant than with plain QEMU emulation.
104 104
 
105
+Nova and devstack
106
+--------------------------------
107
+
108
+Guide to working with nova features :doc:`Nova and devstack <guides/nova>`.
109
+
105 110
 DevStack Documentation
106 111
 ======================
107 112
 
... ...
@@ -566,6 +566,10 @@ function create_nova_conf {
566 566
     if is_service_enabled tls-proxy; then
567 567
         iniset $NOVA_CONF DEFAULT ec2_listen_port $EC2_SERVICE_PORT_INT
568 568
     fi
569
+
570
+    if is_service_enabled n-sproxy; then
571
+        iniset $NOVA_CONF serial_console enabled True
572
+    fi
569 573
 }
570 574
 
571 575
 function init_nova_cells {
... ...
@@ -764,6 +768,7 @@ function start_nova_rest {
764 764
     run_process n-xvnc "$NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf"
765 765
     run_process n-spice "$NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_WEB_DIR"
766 766
     run_process n-cauth "$NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
767
+    run_process n-sproxy "$NOVA_BIN_DIR/nova-serialproxy --config-file $api_cell_conf"
767 768
 
768 769
     # Starting the nova-objectstore only if swift3 service is not enabled.
769 770
     # Swift will act as s3 objectstore.
... ...
@@ -794,7 +799,7 @@ function stop_nova_rest {
794 794
     # Kill the nova screen windows
795 795
     # Some services are listed here twice since more than one instance
796 796
     # of a service may be running in certain configs.
797
-    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
797
+    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
798 798
         stop_process $serv
799 799
     done
800 800
 }