User Tools

Site Tools


nova-rdp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
nova-rdp [2013/12/23 03:13]
admin
nova-rdp [2014/06/12 19:37] (current)
Line 1: Line 1:
-====== Nova RDP Support======+====== Nova RDP Support Configuration======
  
 Nova currently provides support for [[http://en.wikipedia.org/wiki/Virtual_Network_Computing|VNC]] and [[http://en.wikipedia.org/wiki/SPICE_(protocol)|SPICE]] graphical consoles. VNC in particular is the protocol employed natively by most popular hypervisors supported by Nova. [[http://en.wikipedia.org/wiki/Hyper-V|Microsoft Hyper-V]] in this context is a remarkable exception, as it employs the [[http://en.wikipedia.org/wiki/Remote_Desktop_Protocol|Remote Desktop Protocol (RDP)]] for graphical console access, based on [[http://msdn.microsoft.com/en-us/library/jj712081.aspx|Open Specifications]] and implemented by various open source projects. Nova currently provides support for [[http://en.wikipedia.org/wiki/Virtual_Network_Computing|VNC]] and [[http://en.wikipedia.org/wiki/SPICE_(protocol)|SPICE]] graphical consoles. VNC in particular is the protocol employed natively by most popular hypervisors supported by Nova. [[http://en.wikipedia.org/wiki/Hyper-V|Microsoft Hyper-V]] in this context is a remarkable exception, as it employs the [[http://en.wikipedia.org/wiki/Remote_Desktop_Protocol|Remote Desktop Protocol (RDP)]] for graphical console access, based on [[http://msdn.microsoft.com/en-us/library/jj712081.aspx|Open Specifications]] and implemented by various open source projects.
  
 +[[http://www.youtube.com/watch?v=DhBa-IuTQAs|Here]]'s an example video showing an HTML5 RDP console based on [[https://github.com/FreeRDP/FreeRDP|FreeRDP]].
  
----- 
- 
- 
-===== Getting an RDP console URL ===== 
- 
-This requires a public API which is symmetric with the VNC and SPICE ones. 
  
 ---- ----
 +===== Configuring Nova for RDP support =====
  
-==== Get an RDP console URL: V2 API ==== +RDP console configuration is quite straightforwardAll you need to do is to add the following configuration settings in your Hyper-V compute node'**nova.conf**:
- +
-^Verb ^URI ^Description ^ +
-|GET |/servers/{id}/action |Gets the URL for accessing the RDP console. +
- +
-Normal Response Code(s): 200 +
- +
-Error Response Code(s): badRequest (400), itemNotFound (404), buildInProgress (409) +
- +
- +
-=== Example. Get RDP console URL request: XML === +
- +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<os-getRDPConsole type="rdp-html5" /> +
-</code> +
- +
-=== Example. Get RDP console URL request: JSON === +
- +
-<code javascript> +
-+
-    "os-getRDPConsole":+
-        "type": "rdp-html5" +
-    } +
-+
-</code> +
- +
-=== Example. Get RDP console URL response: XML === +
- +
-<code xml> +
-<?xml version='1.0' encoding='UTF-8'?> +
-    <console> +
-        <type>rdp-html5</type> +
-        <url>http://example.com:6083/?token=f9906a48-b71e-4f18-baca-c987da3ebdb3</url> +
-    </console> +
-</code> +
- +
-=== Example. Get RDP console URL response: JSON === +
- +
-<code javascript> +
-+
-    "console":+
-        "type": "rdp-html5", +
-        "url": "http://example.com:6083/?token=f9906a48-b71e-4f18-baca-c987da3ebdb3&title=dafa(75ecef58-3b8e-4659-ab3b-5501454188e9)" +
-    } +
-+
-</code> +
- +
----- +
- +
-==== Get an RDP console URL: V3 API ==== +
- +
-^Verb ^URI ^Description ^ +
-|GET |/v3/servers/{id}/action |Gets the URL for accessing the RDP console. | +
- +
-Normal Response Code(s): 200 +
- +
-Error Response Code(s): badRequest (400), itemNotFound (404), buildInProgress (409) +
- +
-=== Example. Get RDP console URL request: XML === +
- +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<get_rdp_console type="rdp-html5" /> +
-</code> +
- +
-=== Example. Get RDP console URL request: JSON === +
- +
-<code javascript> +
-+
-    "get_rdp_console":+
-        "type": "rdp-html5" +
-    } +
-+
-</code> +
- +
-=== Example. Get RDP console URL response: XML === +
- +
-Same output as in the [[nova-rdp#Example. Get RDP console URL response: XML|V2 API example]] +
- +
-=== Example. Get RDP console URL response: JSON === +
- +
-Same output as in the [[nova-rdp#Example. Get RDP console URL response: JSON|V2 API example]] +
- +
- +
- +
-===== Getting console connection details ===== +
- +
-Nova includes internally the required proxy solutions for VNC (novnc, xvpvnc) and SPICE, but this is not the case for RDP. Beside that, it'also desirable to leave to third party the ability to choose a custom graphical console UI solution not necessarily included with NovaA public API has been provided to retrieve the relevant information by providing a valid console authentication token. +
- +
-==== Get console connection info: V2 API ==== +
- +
-^Verb ^URI ^Description ^ +
-|GET |/console-auth-tokens/{token_id}/action |Gets the connection info for the specified console authentication token. | +
- +
-Normal Response Code(s)200+
  
-Error Response Code(s)badRequest (400), itemNotFound (404)+    [rdp] 
 +    enabled=True 
 +    html5_proxy_base_url=http://10.0.0.1:8000/ 
 +   
 +Where the url specified in the **html5_proxy_base_url** setting is provided by the FreeRDP HTML5 proxy as detailed in the next section.
  
 +===== Installing and configuring the FreeRDP HTML5 proxy =====
  
-=== ExampleGet console connection request: XML ===+The FreeRDP HTML5 proxy can be installed on various Linux distributions (currently Ubuntu >12.04, RHEL 6.x / CentOS 6.x and Fedora >16) or on Microsoft Windows, including Hyper-V Server.
  
-<code xml> +==== Ubuntu 12.04 and above ====
-<?xml version="1.0" encoding="UTF-8"?> +
-<os-getConsoleConnectInfo/> +
-</code>+
  
-=== ExampleGet console connection request: JSON ===+A shell script is provided to simplify the installation of the application and the dependencies, mostly available in source form only.
  
-<code javascript> +    sudo apt-get install -y git 
-{ +    git clone https://github.com/FreeRDP/FreeRDP-WebConnect.git 
-    "os-getConsoleConnectInfo": null +    cd FreeRDP-WebConnect     
-+    sudo ./setup_all.sh -f -i 
-</code>+     
 +At this point the proxy, called **wsgate** can be installed by running:
  
-=== Example. Get console connection response: XML ===+    sudo make install    
  
-<code xml> +==== wsgate configuration ====
-<?xml version='1.0' encoding='UTF-8'?> +
-<console> +
-    <instance_uuid>b48316c5-71e8-45e4-9884-6c78055b9b13</instance_uuid> +
-    <host>localhost</host> +
-    <port>3389</port> +
-    <internal_access_path>51af38c3-555e-4884-a314-6c8cdde37444</internal_access_path> +
-</console> +
-</code>+
  
-=== Example. Get console connection responseJSON ===+The default configuration file is located here:
  
-<code javascript> +    /usr/local/etc/wsgate.ini 
- { +     
-    "console": { +Change the following options to match your environment configuration:
-        "instance_uuid""b48316c5-71e8-45e4-9884-6c78055b9b13", +
-        "host": "localhost", +
-        "port": 3389, +
-        "internal_access_path": "51af38c3-555e-4884-a314-6c8cdde37444" +
-    } +
-}  +
-</code>+
  
-==== Get console connection info: V3 API ====+    [global] 
 +    port 8000
  
-^Verb ^URI ^Description ^ +Note: make sure to open the port in your operating system firewall.
-|GET |/v3/console-auth-tokens/{token_id}/action |Gets the connection info for the specified console authentication token. |+
  
-Normal Response Code(s)200+    [openstack] 
 +    authurl = http://10.0.0.1:5000/v2.0 
 +    username = admin 
 +    password = secret 
 +    tenantname = admin
  
-Error Response Code(s): badRequest (400), itemNotFound (404)+    [hyperv] 
 +    # Credentials used to connect to the Hyper-V hosts when accessing 
 +    # OpenStack instances consoles  
  
-=== Example. Get console connection request: XML ===+    hostusername Administrator 
 +    hostpassword secret
  
-<code xml> +It is also strongly recommended to encrypt the traffic using HTTPS. Here are the relevant parameters, including a PEM file containing both the certificate and the private key.
-<?xml version="1.0" encoding="UTF-8"?> +
-<get_console_connect_info/> +
-</code>+
  
-=== ExampleGet console connection request: JSON ===+    [ssl] 
 +    port 4430 
 +    certfile /usr/local/etc/wsgate/test.pem 
 +    certpass verysecret
  
-<code javascript> +HTML, CSS and Javascript files are available at the following location for further customization:
-+
-    "get_console_connect_info"null +
-+
-</code>+
  
-=== Example. Get console connection response: XML ===+    /usr/local/share/wsgate
  
-Same output as in the [[nova-rdp#Example. Get console connection responseXML|V2 API example]]+==== Running wsgate ==== 
 +     
 +wsgate can be executed as a demon with the following instruction:
  
-=== ExampleGet console connection response: JSON ===+    wsgate -c /usr/local/etc/wsgate.ini
  
-Same output as in the [[nova-rdp#Example. Get console connection responseJSON|V2 API example]]+In case you should prefer to execute wsgate in a shell for debugging purposes, just set:
  
 +    [global]
 +    daemon = false
  
nova-rdp.1387761197.txt.gz · Last modified: 2013/12/23 03:13 (external edit)