From 79bfff2b754e4d32f58e34b0fd444ab2331039b5 Mon Sep 17 00:00:00 2001 From: Thomas Steinhauer Date: Tue, 16 Jul 2013 04:25:28 +0200 Subject: [PATCH] - fix for new github url and vertx download path - fix for new openshift environment variables for diy cartridges --- .openshift/action_hooks/pre_build | 7 +++---- .openshift/action_hooks/start | 3 +-- js_example/app.js | 4 ++-- rb_example/http_server.rb | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.openshift/action_hooks/pre_build b/.openshift/action_hooks/pre_build index 41234de..2d300b5 100755 --- a/.openshift/action_hooks/pre_build +++ b/.openshift/action_hooks/pre_build @@ -15,10 +15,9 @@ else done echo "Installing Vert.x $VERTX_VERSION" - - echo " Downloading http://vertx.io/downloads/vert.x-${VERTX_VERSION}.tar.gz" - curl --insecure -o vert.x-${VERTX_VERSION}.tar.gz "http://vertx.io/downloads/vert.x-${VERTX_VERSION}.tar.gz" - tar -xf vert.x-${VERTX_VERSION}.tar.gz + echo " Downloading http://vert-x.github.io/vertx-downloads/downloads/-${VERTX_VERSION}.tar.gz" + curl --insecure -o vert.x-${VERTX_VERSION}.tar.gz "http://vert-x.github.io/vertx-downloads/downloads/vert.x-${VERTX_VERSION}.tar.gz" + tar -xzvf vert.x-${VERTX_VERSION}.tar.gz rm vert.x-${VERTX_VERSION}.tar.gz fi diff --git a/.openshift/action_hooks/start b/.openshift/action_hooks/start index f1d03a9..2cd833b 100755 --- a/.openshift/action_hooks/start +++ b/.openshift/action_hooks/start @@ -9,8 +9,7 @@ cd $EXAMPLE_DIR echo "Starting Vert.x application!" if [[ -e $SERVER_FILE ]]; then - nohup bash -c "exec 'vertx' 'run' '${SERVER_FILE}' &> ${OPENSHIFT_LOG_DIR}vert.x.log" &> /dev/null & - echo $! > .openshift/application.pid + nohup bash -c "exec 'vertx' 'run' '${SERVER_FILE}' '-repo' 'vert-x.github.io' &> ${OPENSHIFT_DIY_LOG_DIR}vert.x.log" &> /dev/null & else echo "Server file does not exists." fi diff --git a/js_example/app.js b/js_example/app.js index 8f4f88c..67f1ae5 100644 --- a/js_example/app.js +++ b/js_example/app.js @@ -14,8 +14,8 @@ var webServerConf = { // Normal web server stuff - port: parseInt(vertx.env['OPENSHIFT_INTERNAL_PORT']), - host: vertx.env['OPENSHIFT_INTERNAL_IP'], + port: parseInt(vertx.env['OPENSHIFT_DIY_PORT']), + host: vertx.env['OPENSHIFT_DIY_IP'], ssl: false, // OpenShift handles SSL for us // Configuration for the event bus client side bridge diff --git a/rb_example/http_server.rb b/rb_example/http_server.rb index 7936cf2..deeddea 100644 --- a/rb_example/http_server.rb +++ b/rb_example/http_server.rb @@ -17,4 +17,4 @@ HttpServer.new.request_handler do |req| req.response.end("

Hello from vert.x Ruby!

") -end.listen(Integer(ENV['OPENSHIFT_INTERNAL_PORT']), ENV['OPENSHIFT_INTERNAL_IP']) \ No newline at end of file +end.listen(Integer(ENV['OPENSHIFT_DIY_PORT']), ENV['OPENSHIFT_DIY_IP']) \ No newline at end of file