Contact Us

support@onapp.com

U.S: (+1) 888-876-8666

UK: +44 (0) 203-318-5364

Comments

14 comments

  • Avatar
    Trent Lloyd

    We'd love to see support for this as well.

     

    Having to use Java is a little annoying, it's a good potential solution for a built-in console on the iOS app.

    0
    Comment actions Permalink
  • Avatar
    David Majchrzak

    The java one is SO annoying, can't ever get copy/paste working and if we have a root password with weird characters we can never type them.

    0
    Comment actions Permalink
  • Avatar
    Brian Jankovich

    Agreed. To many java updates that are hit and miss.

    0
    Comment actions Permalink
  • Avatar
    Michael Potter

    Yes please, pretty much given up using MacOS browsers to try to do any quick maintenance due to the issues with Java.

    0
    Comment actions Permalink
  • Avatar
    Gerben Meijer

    Can this be done by users in the theme?

    0
    Comment actions Permalink
  • Avatar
    Gerben Meijer

    Answer: yes, by modifications in /onapp/interface/app/views/virtual_machines/console_popup.html.haml and adding novnc in /onapp/interface/public/novnc this is not that hard to accomplish. You have to run a bunch of websockify proxies that map, say, ports 40000-40099 to localhost:30000-30099 and edit the port that novnc connects to (port + 10000 in the source). I've implemented this in a few hours, working fine in all browsers and tablets. 

    0
    Comment actions Permalink
  • Avatar
    James Withall

    I'm glad to say this is now in place under OnApp 3.1.

    You can enable this in Settings > Configuration, please note however that it is required to be running your Control Panel server of CentOS 6 to enable this option.

     

    0
    Comment actions Permalink
  • Avatar
    ryan

    Why wont this work in CENTOS 5?

    0
    Comment actions Permalink
  • Avatar
    ryan

    Why wont this work in CENTOS 5?

    0
    Comment actions Permalink
  • Avatar
    James Withall

    Hi Ryan,

    I've checked with our engineering team who have confirmed this is only available on CentOS 6 because CentOS 5 has older Apache and APR libs - thus the websockets modules for Apache does not work which is required for the HTML5 console..

    0
    Comment actions Permalink
  • Avatar
    Cloud Provider USA Support

    You can make this work with CentOS 5, even with OnApp 2.x. Some scripting knowledge is needed, but the basics are:

    • Install python26, python26-numpy, python26-devel (use EPEL repo)
    • Build python-ssl module (python26 setup.py install)
    • Install attached novnc in /onapp/interface/public/novnc so that you have the 'include' and 'images' folders available under http://your-cp-server/novnc/
    • Generate a 'target.cfg' for wsproxy.py with as many lines as you have vnc ports, e.g. start with '30000: localhost:30000' and end with '30099: localhost:30099' if you use the default set of ports
    • run wsproxy.py as a websocks proxy between vnc_proxy and the user: 

      wsproxy.py --target-config=target.cfg 31000 -D (recommended: add an official ssl cert with '--cert=ssl.pem')

    • Find console_popup.html.haml under /onapp/interfaces/public, make a backup of it and replace with: http://bpaste.net/show/9oGqOLrBhlR7RJwXHWzn/
    • Restart onapp

    Client connections will come in on port 31000 on your control panel server so you'll have to open that on your firewall. If you put this in production you'll have to make some init scripts that correctly stop/start wsproxy.py but other than that it's relatively straightforward. Highly recommend to use the SSL cert with which your apache server is already configured; added bonus: all console traffic between client and control panel is now encrypted.

    Only sharing this because java sucks, if this breaks your system and/or kills your cat you're on your own :)

    0
    Comment actions Permalink
  • Avatar
    Andy Fletcher

    James,

    Surely your guys are clever enough to make this work for your (presumably very large) CentOS5 install base of customers? Especially given how problematic Java has become with the recent Oracle updates.

    0
    Comment actions Permalink
  • Avatar
    Trent Lloyd

    And how painful it is to upgrade from CentOS5 to 6 (hint, you have to reinstall)

    0
    Comment actions Permalink
  • Avatar
    Hamza Aboulfeth

    Hello,

    This is quite quite an old post, I'm still running CentOs 5 and Java.. is a mess. there is no console_popup.html.haml  anymore but popup.html.haml that looks like:

    !!! 1.1

    %html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }

      %head

        %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-type" }

        = csrf_meta_tag

        %title

          - @page_title = @virtual_machine.label

          = render_page_title("#{application_title} > ").gsub(/<.*&#8250;/, "").html_safe

        = stylesheet_link_tag    "themes/session/#{system_theme}", media: 'all'

        = javascript_include_tag 'application'

      %body.bp

        - options = {virtual_machine: @virtual_machine, remote_session: @remote_session}

        - if OnApp.configuration.use_html5_vnc_console?

          = render 'html5', options

        - else

          = render 'java', options

     

        :javascript

          window.onbeforeunload = function() {

            $.post('#{close_vnc_console_path(@remote_session)}');

          };

     

          var consolePing = setInterval(function() {

            $.post('#{ping_vnc_console_path(@remote_session)}');

          }, #{RemoteAccessSession::TIMEOUT_MILLISECONDS});

    I have fun the web socket proxy:

    [root@ControlServer utils]# python26 wsproxy.py --target-config=target.cfg 31000 -D

    WebSocket server settings:

      - Listen on :31000

      - Flash security policy server

      - No SSL/TLS support (no cert file)

      - Backgrounding (daemon)

    [root@ControlServer utils]#

    Any clue?

    Thanks

    0
    Comment actions Permalink

Please sign in to leave a comment.