In this post I am going to show you how to create a public cloud service, have it deployed on Heroku, and then have it pushing data into a Purposeful Place on a cloud Jiveon instance. This should be of interest for any one wanting to build middleware for cloud customers.

 

Install nodejs, npm, and git onto your system.

See Getting Started > Installing the Jive SDK for instructions on installing nodejs and npm onto your operating system.

See Set Up Git · GitHub Help on installing git for our operating system.

 

Sign up for a free Heroku account.

Heroku is where we'll host your cloud service. Its super easy to use, and free to try!

  1. Sign up for a free account: Heroku | Sign up
  2. Install the Heroku toolbelt: Heroku Toolbelt

 

Sign up for a free Mongo Labs account.

Mongo Labs hosts the database for your cloud service. It is also super easy to use, and free to try!

  1. Sign up for a free account: Create Account | MongoLab
  2. Create a development (single/node) instance, and take note of the database connection string.

 

Generate your cloud service.

In a local directory, generate your cloud service in preparation for deployment to Heroku.

 

Create a local service directory

mkdir myservice
cd myservice











 

Create a skeleton service from an example:

jive-sdk create list











 

Update the dependencies package.json file to include mongodb (add jive-persistence-mongo):

{
    "name": "myservice",
..
    "dependencies": {
..
        "jive-persistence-mongo": "*"
..

    }
}














Configure the service

Edit jiveclientconfiguration.json to configure your service.

Make sure to replace <<<DATABASE CONNECTION STRING>>> with the database url you got from mongolabs for your development database.

{
    "clientUrl": "http://localhost",
    "clientUrlExcludesPort" : "true",
    "port": "8090",
    "persistence" : "jive-persistence-mongo",
    "databaseUrl" : "<<<DATABASE CONNECTION STRING>>>",
    "extensionInfo" : {
        "name" : "My cloud service"
    }
}













 

Deploy your cloud service.

 

Login to heroku using the Heroku toolbelt

heroku login












Tell Heroku that you want to run the node app

Create a file called Procfile with these contents:

web: node app.js












Store your service in git so Heroku can read it

git init
git add . 
git commit -m "init"












Tell Heroku to create your service

heroku create












Heroku will create the app, and tell you what its public address is, for example:

http://sharp-rain-871.herokuapp.com


Edit jiveclientconfiguration.json again, and change the clientUrl parameter to be the public address of your app:

{
    "clientUrl": "http://sharp-rain-871.herokuapp.com",
    ...
}














Commit your change to jiveclientconfiguration.json:

git add jiveclientconfiguration.json
git commit -m'configured'












Tell Heroku to deploy your service

git push heroku master












Sanity test the service to see if its working

Navigate to http://<YOUR SERVICE ADDRESS>/samplelist/configure. If that comes up with a blue configuration screen, then its working!


Add your service to a Jive Cloud Instance.

Generate your addon extension.zip

Install the service dependencies:

npm install











 

Generate the addon extension.zip:

jive-sdk createExtension











 

This will produce an extension.zip file that will contain metadata about your addon, for upload into a jive cloud instance.


Upload your addon extension.zip to a cloud instance

  1. Log into your jiveon cloud instance as a community manager.
  2. Go to the addons page and upload your extension.zip


Create a social group and install the addon tile

  1. Create a social group
  2. Add the samplelist tile to your group, and configure it. You can type in any number in the counter field.
  3. Save the social group.

 

In a few seconds, the tile will start showing an incrementing counter. This means your service is up and running in the cloud on Heroku, and pushing data to Jive! I am super interested in knowing what hiccups you encounter when trying this, please drop me comments on your experience.