• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
FroMage / ceylon.openshift
Ceylon OpenShift Platform Module
Description

This module allows you to check if the process is executing OpenShift and, if so, to obtain information about the host IP and port you should bind on, your public DNS, and database connection information.

Usage

void connectToDb(String jdbcUrl, String user, String password){
    // ...
}

void startHttpServer(String ip, Integer port){
    // ...
}

shared void run(){
    if(openshift.running){
        if(openshift.ceylon.running){
            startHttpServer(openshift.ceylon.ip, openshift.ceylon.port);
    }else if(openshift.vertx.running){
        startHttpServer(openshift.vertx.ip, openshift.vertx.port);
    }else{
        // other cartridge?
    }
    if(openshift.postgres.running){
        connectToDb(openshift.postgres.jdbcUrl, openshift.postgres.user, openshift.postgres.password);
    }else if(openshift.mysql.running){
        connectToDb(openshift.mysql.jdbcUrl, openshift.mysql.user, openshift.mysql.password);
    }else{
        // other db?
    }
  }
}

CLI plugin usage

The CLI plugin will convert your application into an OpenShift application running on the Ceylon cartridge.

First, install the ceylon openshift command (you only need to do this once):

ceylon plugin install ceylon.openshift/1.3.3

Then to convert your Ceylon application into a Ceylon OpenShift application:

ceylon openshift init your.main.module/1.0

This will create the necessary setup files in the .openshift directory of your project, as described in the Ceylon cartridge help.

Now you're ready to start, so just publish your project to a Git repository, and create your OpenShift application with the Ceylon cartridge, using the rhc tool:

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

Modules which have command-line plugins available. You can install them with ceylon plugin install name/version.

Last Published Aug 21, 2017
Stats Downloads (JVM): 10050
Downloads (JS): 0
Source downloads: 3196
Module links Imported By
Browse
List of published versions
1.3.3 JVM JVM: 1.2.x, 1.3.x (latest) Published Aug 21, 2017 Browse
View docs
1.3.2 JVM JVM: 1.2.x, 1.3.x (latest) Published Mar 2, 2017 Browse
View docs
1.3.1 JVM JVM: 1.2.x, 1.3.x (latest) Published Nov 22, 2016 Browse
View docs
1.3.0 JVM JVM: 1.2.x, 1.3.x (latest) Published Sep 16, 2016 Browse
View docs
1.2.1 JVM JVM: 1.2.x, 1.3.x (latest) Published Feb 11, 2016 Browse
View docs
1.2.0 JVM JVM: 1.2.x, 1.3.x (latest) Published Oct 28, 2015 Browse
View docs
1.1.1 JVM JVM: 1.1.0 (outdated) Published Apr 4, 2015 Browse
View docs
1.1.0 JVM JVM: 1.1.0 (outdated) Published Apr 3, 2015 Browse
View docs
You must be logged in to comment.

Ceylon Herd v1.24 Copyright 2012-2022 Red Hat. About