Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 5.22 KB

File metadata and controls

80 lines (49 loc) · 5.22 KB

OpenShift AeroGear Push Server Cartridge

Provides the AeroGear UnifiedPush Server running on top of JBoss Application Server on OpenShift and embeds the AeroGear SimplePush Server within JBoss Application Server on OpenShift.

The AeroGear UnifiedPush Server is a server that allows sending push notifications to different (mobile) platforms. The initial version of the server supports Apple’s APNs, Google Cloud Messaging and Mozilla’s SimplePush.

The AeroGear SimplePush Server is a Java server side implementation of Mozilla's SimplePush Protocol that describes a JavaScript API and a protocol which allows backend/application developers to send notification messages to their web applications.

Installation

The AeroGear Push Server cartridge defaults to using MySQL. When creating your application, you'll also want to add the MySQL cartridge:

rhc app create --no-git <APP> https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push mysql-5.1

Getting started with the AeroGear UnifiedPush Server

Administration Console

Once the server is running access it via http://{APP}-{NAMESPACE}.rhcloud.com. Check the Administration console user guide for more information on using the console.

NOTE: Besides the _Administration console, the server can be accessed over RESTful APIs, as explained in the AeroGear UnifiedPush Server README. When executing the curl commands specified, you'll need to replace all instances of http://localhost:8080/ag-push with your OpenShift application URL http://{APP}-{NAMESPACE}.rhcloud.com.

Login

Temporarily, there is an "admin:123" user. On first login, you will need to change the password.

Getting started with the AeroGear SimplePush Server

Client connections

For secured connections, client applications should connect to the AeroGear SimplePush Server via https://{APP}-{NAMESPACE}.rhcloud.com:8443/simplepush.

For unsecured connections, client applications can connect to the AeroGear SimplePush Server via http://{APP}-{NAMESPACE}.rhcloud.com:8000/simplepush.

NOTE: It is recommended that you always use secured connections.

Known issue with an idled OpenShift application and WebSocket requests

Currently, if your AeroGear Push Server application is idled by OpenShift, attempts to establish a WebSocket connection to the AeroGear SimplePush Server will not wake up your idled application. This is a known issue (see AEROGEAR-1296) and will be fixed in a future release of OpenShift Online. Note that requests to your application on port 80 (i.e., http://{APP}-{NAMESPACE}.rhcloud.com) will wake up your idled application.

Template Repository Layout

.openshift/        Location for OpenShift specific files
  action_hooks/    See the Action Hooks documentation [1]
  markers/         See the Markers section [2]

[1] Action Hooks documentation [2] Markers

Environment Variables

The aerogear-push cartridge provides several environment variables to reference for ease of use:

OPENSHIFT_AEROGEAR_PUSH_IP                         The IP address used to bind JBossAS
OPENSHIFT_AEROGEAR_PUSH_HTTP_PORT                  The JBossAS listening port
OPENSHIFT_AEROGEAR_PUSH_TOKEN_KEY                  The token key for the SimplePush Server
OPENSHIFT_AEROGEAR_PUSH_CLUSTER_PORT               
OPENSHIFT_AEROGEAR_PUSH_MESSAGING_PORT             
OPENSHIFT_AEROGEAR_PUSH_MESSAGING_THROUGHPUT_PORT  
OPENSHIFT_AEROGEAR_PUSH_REMOTING_PORT              
JAVA_OPTS_EXT                                      Appended to JAVA_OPTS prior to invoking the Java VM

For more information about environment variables, consult the OpenShift Application Author Guide.

Markers

Adding marker files to .openshift/markers will have the following effects:

enable_jpda          Will enable the JPDA socket based transport on the java virtual
                     machine running the JBoss AS 7 application server. This enables
                     you to remotely debug code running inside the JBoss AS 7
                     application server.

java7                Will run JBossAS with Java7 if present. If no marker is present
                     then the baseline Java version will be used (currently Java6)