From d6f5474e3c4809f4b31bee4c1fcef3124a9b13b2 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Mon, 23 Apr 2012 23:29:43 -0700 Subject: [PATCH] Update vnc support require git from vncproxy fix bug in service name move novncproxy_base_url to be a class param of vncproxy --- examples/all.pp | 10 ++++++++++ manifests/init.pp | 3 --- manifests/vncproxy.pp | 12 +++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/examples/all.pp b/examples/all.pp index d68975aec..a39021845 100644 --- a/examples/all.pp +++ b/examples/all.pp @@ -182,6 +182,16 @@ class { 'nova::cert': enabled => true } +class { 'nova::consoleauth': + enabled => true +} + +class { 'nova::vncproxy': + novncproxy_base_url => "http://${ipaddress_eth0}:6080/vnc_auto.htm", +} + + + class { 'nova::compute': enabled => true, vnc_enabled => true, diff --git a/manifests/init.pp b/manifests/init.pp index 7443500e2..1fdca2119 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,7 +27,6 @@ class nova( $periodic_interval = '60', $report_interval = '10', $root_helper = $::nova::params::root_helper, - $novncproxy_base_url = 'http://127.0.0.1:6080/vnc_auto.htm' ) inherits nova::params { # all nova_config resources should be applied @@ -156,8 +155,6 @@ class nova( 'network_manager': value => $network_manager; 'multi_host': value => $multi_host_networking; 'root_helper': value => $root_helper; - # vnc config - 'novncproxy_base_url': value => $novncproxy_base_url; } exec { 'post-nova_config': diff --git a/manifests/vncproxy.pp b/manifests/vncproxy.pp index 6b2baf102..b60c54a52 100644 --- a/manifests/vncproxy.pp +++ b/manifests/vncproxy.pp @@ -1,9 +1,15 @@ -class nova::vncproxy() { +class nova::vncproxy( + $novncproxy_base_url = 'http://127.0.0.1:6080/vnc_auto.htm' +) { # TODO make this work on Fedora # See http://nova.openstack.org/runnova/vncconsole.html for more details. + require git + + nova_config { 'novncproxy_base_url': value => $novncproxy_base_url } + package{ "noVNC": ensure => purged, } @@ -37,10 +43,10 @@ exec su -s /bin/bash -c "exec /var/lib/nova/noVNC/utils/nova-novncproxy --flagfi provider => git, source => 'https://github.com/cloudbuilders/noVNC.git', revision => 'HEAD', - require => Package['git','nova-api'], + require => Package['nova-api'], } - service { 'novncproxy': + service { 'nova-novncproxy': provider => upstart, require => Vcsrepo['/var/lib/nova/noVNC'] }