Ceylon Application Hosting

With OpenShift you can easily deploy and run Ceylon applications using your favorite application servers or frameworks. You can run them bare-bones with the Ceylon cartridge (and any framework of your choice) or with the Vert.x cartridge.

Ceylon is a new programming language that’s deeply influenced by Java, designed by people who are unapologetic fans of Java. It’s a language designed specifically for writing large programs in teams.

Visit the official Ceylon documentation to learn more.

Ceylon logo

Supported Technologies

OpenShift provides several ways to deploy Ceylon applications, including the following environments:

Using the Ceylon cartridge

Getting your Ceylon application deployed onto OpenShift is as easy as executing the following command:

$ rhc create-app ceylonapp https://raw.github.com/ceylon/openshift-cartridge/master/metadata/manifest.yml

This will create your OpenShift application using the Ceylon cartridge, which will include a template application running barebones, which you can replace or customise.

For important information on setting up your Ceylon cartridge, check out our documentation page.

Even simpler application creation with the Ceylon cartridge and ceylon.openshift module

It’s trivial to make your application run on OpenShift. Just take your existing application and add the following import:

import ceylon.openshift "1.1.1";

This will let you access OpenShift information:

import ceylon.openshift { openshift }

void start(String host, int port){
  // ...
}

shared void run(){
  if(openshift.running){
    start(openshift.ceylon.ip, openshift.ceylon.port);
  }else{
    start("localhost", 80);
  }
}

Similarly you can get information about your database. Read the API docs for more information.

Now you just have to add the required OpenShift setup to your application, for which you can install the ceylon openshift command (only need to do this once):

$ ceylon plugin install ceylon.openshift/1.1.1

And now you just turn your Ceylon application into a Ceylon OpenShift application:

$ ceylon openshift init your.main.module/1.0

Then you’re ready to start, so just push your code somewhere over git and create your OpenShift application with the Ceylon cartridge:

$ rhc create-app --from-code <your-git-url> ceylonapp https://raw.github.com/ceylon/openshift-cartridge/master/metadata/manifest.yml

Using the Vert.x cartridge

Vert.x is a lightweight, high performance polyglot application platform for the JVM that’s designed for modern mobile, web, and enterprise applications. OpenShift Online currently supports Vert.x 2.1. + → Learn More

You can also use the Vert.x cartridge and write your verticles in Ceylon, as described in the Vert.x manual.

You can deploy your Ceylon verticles as described in the Vert.x cartridge manual, with the following addentums:

You will need to specify an alternate cache folder for Ceylon to use with this option in configuration/vertx.env:

export VERTX_OPTS="-Dceylon.cache.repo=${OPENSHIFT_VERTX_DIR}/cache"

If you deploy your Ceylon verticles already compiled, it’s best to publish them in the default modules folder and point Vert.x to it with this setup in configuration/vertx.env (as well as the cache setup above):

export vertx_app="ceylon:your.module.name/yourModuleVersion"

Then you can use ceylon.openshift to get the Vert.x IP and port to bind to:

import ceylon.openshift { openshift }

void start(String host, int port){
  // ...
}

shared void run(){
  if(openshift.running){
    start(openshift.vertx.ip, openshift.vertx.port);
  }else{
    start("localhost", 80);
  }
}