~ntt-pf-lab/nova/openstack-qa-nova-876120

« back to all changes in this revision

Viewing changes to tools/ajaxterm/configure.makefile

  • Committer: Tarmac
  • Author(s): root, Anthony Young, Jesse Andrews
  • Date: 2011-01-12 09:24:57 UTC
  • mfrom: (205.2.47 nova)
  • Revision ID: tarmac-20110112092457-wf4n4pbf0s932qqu
This branch adds web based serial console access.  Here is an overview of how it works (for libvirt):

1. User requests an ajax console for an instance_id (either through OS api, or tools/euca-get-ajax-console)
  a. api server calls compute worker to complete request
  b. compute worker parses an instance's xml to locate its pseudo terminal (/dev/pts/x)
  c. compute worker spawns an ajaxterm daemon, bound to a random port in a specified range.  socat is used to connect to /dev/pts/x.  Note that ajaxterm was modified in the following ways:
    i. dies after 5 minutes of inactivity
    ii. now requires token authentication.  Previously it was trivial to hijack an ajaxterm
  d. compute worker returns ajaxterm connect information to the api server: port, host, token
  e. api server casts connect information to the nova-ajax-console-proxy (a new service)
  f. api server returns a url for the ajaxterm (eg. http://nova-ajax-console-proxy/?token=123)
2. User now has a url, and can paste it in a browser
  a. Browser sends request to https://nova-ajax-console-proxy/?token=123
  b. nova-ajax-console-proxy maps token to connect information
  c. nova-ajax-console-proxy constructs a proxy to the ajaxterm that is running on the host machine.  This is now done with eventlet, though previously it was done using twisted
3. User interacts with console through web browser


NOTE: For this to work as expected, serial console login must be enabled in the instance.  Instructions for how to do this on ubuntu can be found here: https://help.ubuntu.com/community/SerialConsoleHowto.  Note that you must actively log out of the serial console when you are finished, otherwise the console will remain open even after the ajaxterm term session has ended.

Also note that nova.sh has been modified in this branch to launch nova-ajax-console-proxy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
build:
 
2
        true
 
3
 
 
4
install:
 
5
        install -d "%(bin)s"
 
6
        install -d "%(lib)s"
 
7
        install ajaxterm.bin "%(bin)s/ajaxterm"
 
8
        install ajaxterm.initd "%(etc)s/init.d/ajaxterm"
 
9
        install -m 644 ajaxterm.css ajaxterm.html ajaxterm.js qweb.py sarissa.js sarissa_dhtml.js "%(lib)s"
 
10
        install -m 755 ajaxterm.py "%(lib)s"
 
11
        gzip --best -c ajaxterm.1 > ajaxterm.1.gz
 
12
        install -d "%(man)s"
 
13
        install ajaxterm.1.gz "%(man)s"
 
14
 
 
15
clean:
 
16
        rm ajaxterm.bin
 
17
        rm ajaxterm.initd
 
18
        rm ajaxterm.1.gz
 
19
        rm Makefile
 
20