Openshift Online Release for February 2014


While the world’s been “going for the gold,” we’ve been busy pushing new code. With this latest release come the usual amount of new features and a better Openshift Online experience.

We’ve Shifted our forums over to Stackoverflow

Our community of users and developers is always growing. We want to make sure it’s easy to ask questions and get answers from others developing and deploying Openshift.

For this reason, we’re migrating our forums to Stackoverflow. Our current forums have switched to a read-only state. If you’ve posted recently there’s no need to post again at Stackoverflow. We’re keeping comments open for a while longer to make sure all unanswered questions get resolved.

If you’re not getting a good answer to your question you’re still welcome to email openshift@redhat.com.

Now, lets take a look at some of the new improvements…

Search Early, Search Often

Before asking a new question, do a search to see if someone else has already provided a solution. If you can’t find one, ask away.

Search for existing OpenShift questions searchbar screenshot

Which brings me to our next new feature!

New Search Utility

We’ve re-designed our search utility from the ground up! With these new improvements, search results not only return faster, but are even more accurate than before. Plus, with the new Stackoverflow integration, queries will also return questions tagged “openshift”.

New search utility on OpenShift image

Give the new search engine a try and let us know what you think.

Updated Quickstarts

We’ve updated some of our most popular quickstarts:

New RHC Command!

Get ready to update your rhc gem because we’ve added scp functionality!

rch command help page picture

Now you can easily upload and download files directly to and from your gear:

Upload: rhc scp <yourappname> upload /path/to/file app-root/data

Download: rhc scp <yourappname> download ~/Downloads app-root/data/database_copy.tar.gz

Websockets on non-root mappings

This one is for all our cartridge developers out there. We’ve added a way to use websockets to listen on non-root mappings. Therefore, if you want something to run on myapp-mydomin.rhcloud.com/newpath; You can! Providing that you have the right settings in your manifest.yml (More detailed blog post coming soon). For now I’ve included a quick example:

For instance, we can create one instance here at myapp-mydomain.rhcloud.com/

/* Simple server to ping/pong messages using wscat */
 
var host = process.env.OPENSHIFT_NODEJS_IP;
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
 
var WebSocketServer = require('ws').Server,
    wss = new WebSocketServer({host: host, port: port});
    wss.on('connection', function(ws) {
      ws.on('message', function(message) {
        console.log('received: %s', message);
        ws.send(message);
      });
      ws.send('something');
    });

Then we can create another instance and either start manually or add it with an action hook

/* Simple server to ping/pong messages using wscat */
 
var host = process.env.OPENSHIFT_NODEJS_IP2;
var port = process.env.OPENSHIFT_NODEJS_PORT2 || 8080;
 
var WebSocketServer = require('ws').Server,
    wss = new WebSocketServer({host: host, port: port});
    wss.on('connection', function(ws) {
      ws.on('message', function(message) {
        console.log('received: %s', message);
        ws.send(message);
      });
      ws.send('something');
    });

Create new applications and domains in a single request

If you’re using the openshift rest api you can create the domain and application in a single transactional call.

Scenario 1:

Site performs a POST /broker/rest/domains/ with an application body. Broker creates domain if it does not exist. Broker attempts domain creation first and returns error messages with a uniquely distinguishable attribute name (like domain[namespace] or something rails equivalent). If domain exists or has already been created, broker then creates the application. If the application creation fails, the domain creation is NOT rolled back.

Scenario 2:
Site performs a POST /broker/rest/domains with a domain body and a nested application object. Broker creates domain if it does not exist. Broker attempts domain creation first and returns error messages on the application with a uniquely distinguishable attribute name (like application[name] or something rails equivalent). If domain exists or has already been created, broker then creates the application. If the application creation fails, the domain creation is NOT rolled back.

Jenkins builds now supports downloadable cartridges!

That’s right! Now you can integrate jenkins into your domain without having to worry whether or not it will work with the downloadable cartridge you’re using.

Choose your own web server for Ruby using the Advanced Ruby Cartridge

With the latest updates to tis recently added cartridge, you can select any of the following web servers for your Ruby application:

  • puma
  • unicorn
  • thin
  • rainbows
  • passenger

Option to use npm to deploy instead of supervisor with nodejs

If you prefer to use npm over supervisor you can now do so by using the use_npm marker file in your .openshift/markers/directory. Keep in mind though that when the use_npm marker is present, the hot_deploy marker is not supported and if its added later on your deployment will not work.

Miscellaneous

  • Mongo correctly reports version now as 2.4 (was showing 2.2)
  • zend-5.6 is now obsolete
  • Skipping assets:precompile when rails isn’t present. This will make pushing your code significantly faster.
Categories
Jenkins, News, OpenShift Online, Ruby, Zend Server
Tags
,
Comments are closed.