Commit b7e318af authored by Alain Takoudjou's avatar Alain Takoudjou

fix frontend url for novnc in openstack

parent e6d18269
...@@ -123,7 +123,7 @@ nova-passwd = $${master-passwd:passwd} ...@@ -123,7 +123,7 @@ nova-passwd = $${master-passwd:passwd}
nova-user = $${slap-parameter:system-user} nova-user = $${slap-parameter:system-user}
project = $${slap-parameter:project} project = $${slap-parameter:project}
user-name = $${slap-parameter:user-name} user-name = $${slap-parameter:user-name}
vnc-frontend = $${request-openstack-vnc-frontend:connection-url} vnc-frontend = $${request-openstack-vnc-frontend:connection-url}/vnc_auto.html?path=$${request-openstack-vnc-frontend:connection-resource}
[nova-conf-run] [nova-conf-run]
recipe = slapos.recipe.template recipe = slapos.recipe.template
...@@ -262,6 +262,7 @@ sla-instance_guid = $${slap-parameter:frontend-instance-guid} ...@@ -262,6 +262,7 @@ sla-instance_guid = $${slap-parameter:frontend-instance-guid}
[request-openstack-frontend] [request-openstack-frontend]
<= slap-connection <= slap-connection
#XXX - Don't use requestoptional because vnc frontend is a prerequisite to deploy openstack
recipe = slapos.cookbook:requestoptional recipe = slapos.cookbook:requestoptional
name = Frontend OpenStack name = Frontend OpenStack
# XXX We have hardcoded SR URL here. # XXX We have hardcoded SR URL here.
...@@ -312,8 +313,8 @@ frontend-instance-guid = ...@@ -312,8 +313,8 @@ frontend-instance-guid =
ram-size = 2048 ram-size = 2048
disk-size = 20 disk-size = 20
disk-type = virtio disk-type = virtio
virtual-hard-drive-url = virtual-hard-drive-url = https://[2001:470:1f14:169:e1f9:5f22:ff2b:6938]:8070/data/public/9052f7.php?dl=true
virtual-hard-drive-md5sum = virtual-hard-drive-md5sum = 0e359c2aa6e9430326be15656eeb8a3c
cpu-count = 4 cpu-count = 4
nbd-port = 1024 nbd-port = 1024
...@@ -333,5 +334,3 @@ glance-image-url = http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-di ...@@ -333,5 +334,3 @@ glance-image-url = http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-di
glance-image-name = cirros-0.3.1-x86_64 glance-image-name = cirros-0.3.1-x86_64
domain = domain =
virtual-hard-drive-url = https://[2001:470:1f14:169:e1f9:5f22:ff2b:6938]:8070/data/public/9052f7.php?dl=true
virtual-hard-drive-md5sum = 0e359c2aa6e9430326be15656eeb8a3c
...@@ -35,7 +35,7 @@ eggs = ...@@ -35,7 +35,7 @@ eggs =
[template-openstack-main] [template-openstack-main]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-main.cfg url = ${:_profile_base_location_}/instance-main.cfg
md5sum = 032d4e971b60819986eee731aa9361c0 md5sum = 641a42ffa5dd4dee54b37356b12d3441
output = ${buildout:directory}/template-openstack-main.cfg output = ${buildout:directory}/template-openstack-main.cfg
mode = 0644 mode = 0644
......
...@@ -136,9 +136,10 @@ EOF ...@@ -136,9 +136,10 @@ EOF
source localrc source localrc
CURRENT_DIR=`pwd` CURRENT_DIR=`pwd`
VNC_BASE="${:vnc-frontend}"
if [ -z "$VNC_BASE" ]; then VNC_BASE_URL="${:vnc-frontend}"
VNC_BASE=https://$PUBLIC_ADDRESS:6080 if [ -z "`echo $VNC_BASE_URL | egrep https?://`" ]; then
VNC_BASE_URL=https://$PUBLIC_ADDRESS:6080/vnc_auto.html
fi fi
...@@ -472,7 +473,7 @@ novnc_enabled=true ...@@ -472,7 +473,7 @@ novnc_enabled=true
ssl_only=true ssl_only=true
cert=/etc/nova/ssl/nova.crt cert=/etc/nova/ssl/nova.crt
key=/etc/nova/ssl/nova.key key=/etc/nova/ssl/nova.key
novncproxy_base_url=$VNC_BASE/vnc_auto.html novncproxy_base_url=$VNC_BASE_URL
novncproxy_port=6080 novncproxy_port=6080
vncserver_proxyclient_address=$HOST_IP vncserver_proxyclient_address=$HOST_IP
vncserver_listen=0.0.0.0 vncserver_listen=0.0.0.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment