Expose novas serial console API for instances

Registered by Markus Zoeller (markus_z)

Summary
=======
Nova provides multiple APIs to interact with the console of a launched
instance. These APIs provide connection information for the protocols VNC,
SPICE and RDP. The nova blueprint "serial-ports" [1]_ provides another form of
connection to launched instances. This blueprint wants to implement a console
view in horizon to this serial port.

Motivation
==========
Not every hypervisor platform supports VNC. E.g. the system z (S390) which will
be introduced as a new platform [2]_. To give a user the same look and feel
independent from the underlying hypervisor, a visual representation of the
serial console [1]_ is needed in horizon.

Description
===========
Same usage scenarios as the VNC console tab in instance detail view.

UX
===
The UX should be the same as when a user interacts with the VNC console in
horizons "console" tab of a selected launched instance.

Wireframes, Mocks, Videos and UI Markup
---------------------------------------
It seems that Richard Jones (r1chardj0n3s) used the serial console in his
angboard [3]_ (angularjs OpenStack Dashboard) demo of the kilo summit. His
work is absorbed by this blueprint.

Testing
=======
* Basic workflow:
    * Ensure to have a compute node in your setup which does not support VNC but
       supports serial console.
    * Launch instance on this node
    * Open console tab in horizon of this instance
* Launch in full-screen console
* Validate failover from VNC, etc. to SERIAL. as well as ``CONSOLE_TYPE=SERIAL``

Outside Dependencies
====================
* Term.js
* The nova client implements this with "nova get-serial-console" [4]_.
* The nova v2.1 (formerly v3) api implements this with the server action
``os-getSerialConsole`` [5]_.

Requirements Update Required
============================
N/A

Doc Impact
==========
N/A

References
===========
.. [1] https://blueprints.launchpad.net/nova/+spec/serial-ports
.. [2] https://blueprints.launchpad.net/nova/+spec/libvirt-kvm-systemz
.. [3] https://github.com/r1chardj0n3s/angboard/search?utf8=%E2%9C%93&q=console
.. [4] http://docs.openstack.org/cli-reference/content/novaclient_commands.html#novaclient_subcommand_get-serial-console
.. [5] https://github.com/openstack/nova/blob/master/doc/v3/api_samples/os-remote-consoles/get-serial-console-post-req.json

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Markus Zoeller (markus_z)
Direction:
Approved
Assignee:
Randy Bertram
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
David Lyle
Completed by
David Lyle

Related branches

Sprints

Whiteboard

As stated in the description, it is currently unknown how to query the protocol(s) a hypervisor supports for its instances.

Gerrit topic: https://review.openstack.org/#q,topic:serialConsole,n,z

Addressed by: https://review.openstack.org/144659 -- merged
    Serial Console

12/31/14 rbertram: In my first-pass implementation, I have used the Richard Jones' angular directive for the console. If you agree, remove the statement about "should not depend on AngularJS". In the Outside Dependencies section, note that term.js is required, and we will have to provide it in xstatic before we can merge the patch.
|
Also, I propose that the serial console can be defaulted by setting CONSOLE_TYPE = "SERIAL" in local_settings.py. Furthermore, if CONSOLE_TYPE = "AUTO" (the default) then the serial console will be chosen automatically when the other options (VNC, SPICE, RDP in that order) are not available. Is this the right order, with SERIAL tried last?

Gerrit topic: https://review.openstack.org/#q,topic:bp/serial-console,n,z

Addressed by: https://review.openstack.org/143615 -- merged
    Make auto console type in network topology work

Gerrit topic: https://review.openstack.org/#q,topic:serial-console,n,z

Addressed by: https://review.openstack.org/437419
    Add support for starting/stopping/accessing the serial console

Addressed by: https://review.openstack.org/513671
    Make serial console resizable

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.