Thursday, August 29, 2013

CloudChoir - Part 6: ServiceNow vs. Facebook


YouTube DEMO video:
http://youtu.be/NPKEEnuwSKY

Sample data used in DEMO:

Runbook:
RestFB

Input:
your Facebook session ID
CloudChoir - Part 5: ServiceNow vs. Amazon EC2 Linux VM

YouTube DEMO video:
 http://youtu.be/47vkgzcLMnk

Included in this DEMO:
1. how to use SSH cert to login to Amazon host, instead of using user name and password
2. query Linux VM hosted on Amazon EC2

Sample data used in DEMO:
Runbook:
SSH

Input:

//this sample shows how to run two Linux shell command (or shell script)
<SSHBridge>
    <host>ec2-54-213-54-199.us-west-2.compute.amazonaws.com</host>
    <port>22</port>
    <certfilename >CloudChoirEC2.pem</certfilename >
    <user>ubuntu</user>
    <password>-password-not-used</password>
    <timeout>20000</timeout>
    <commandline>ps -ef | grep daemon ; ps -ef | grep tty</commandline>
</SSHBridge> 



//this sample shows how to run two Linux shell command (or shell script)
<SSHBridge>
    <host>ec2-54-213-54-199.us-west-2.compute.amazonaws.com</host>
    <port>22</port>
    <certfilename >CloudChoirEC2.pem</certfilename >
    <user>ubuntu</user>
    <password>-password-not-used</password>
    <timeout>20000</timeout>
    <commandline>ls -l</commandline>
</SSHBridge> 



(Note: my Amazon demo VM's SSH cert already removed after recording of above video. If you want to repro the DEMO, you will need an Amazon VM, and I need to upload your ".pem" to CloudChoir's server.)
CloudChoir - Part 4: ServiceNow vs. Windows PowerShell


YouTube DEMO video:
http://youtu.be/-mXS8w2xV74

Sample data used in DEMO:
1. Command:
POWERSHELL


2. Input:
<root>
<host>74.61.134.120</host>
<port>2222</port>
<user>DemoUser</user>
<password>TempPa$$w0rd</password>
<timeout>20000</timeout>
<powershell>Get-Service</powershell>
</root>


(Note: above "DemoUser" already removed from my notebook after DEMO. You'll have to have your own SSH Server in order to repro this demo.)
CloudChoir - Part 3: ServiceNow vs. Windows batch

YouTube DEMO video:
http://youtu.be/hX6kxcvn5YM

Sample data used in DEMO:

1. Command:
SSH

2. Input:
<root>
<host>74.61.134.120</host>
<port>2222</port>
<user>DemoUser</user>
<password>TempPa$$w0rd</password>
<timeout>20000</timeout>
<commandline>cmd /c dir c:\temp</
commandline>
</root>


(Note: above "DemoUser" already removed from my notebook after DEMO. You'll have to have your own SSH Server in order to repro this demo.)
CloudChoir - Part 2: how to use

"ServiceNow 'integration-as-a-service'"

YouTube DEMO video:
http://youtu.be/ll-2pdSBhdI

The SOAP endpoint of our CloudChoir:
https://www.cloudchoir.com:8443/CloudChoirAxis2/services/CloudChoirAxis2?wsdl

Basic auth used:
    Name: testuser
    Password: konafornia@

Any ServcieNow  instance can use CloudChoir's out-of-box Runbooks for FREE. CloudChoir will count how many calls made from each instance, nothing else. (after each SOAP call, caller will be informed about Call Counter, inside the SOAP's respond.)

Sample data used in DEMO (before encoded into base64):

command:
HelloWorld

input:
<root><title>Mr</title><fullname>Stanley He</fullname></root>


Fro your reference, Java source code "HelloWorld" Runbook:

import groovy.util.XmlSlurper
//Integration Pack - parent class
class HelloWorld {
    static String IntegrationCall(String jInput) throws Exception{
        def gInput = new XmlSlurper().parseText(jInput)
        def title = gInput."title".text()
        def fullname = gInput."fullname".text()
        return myJavaClass.sGreet(title, fullname)
    }
}
class myJavaClass
{
    public static String sGreet(String sTitle, String sName)
    {
        return "Hello(v3): " + sTitle + " " + sName;
    }
}
CloudChoir - Part 1: how to install 

"ServiceNow 'integration-as-a-service'"

YouTube DEMO video:
http://youtu.be/QygR9GEZTPY

Name of "Scripted Web Service":
UpdateBack

"Function Name":
Callback

Source code of "Scripted Web Service":
    var rec = new GlideRecord(request.tablename);
    rec.initialize();
    rec.addQuery('sys_id', request.callbackrecordid);
    rec.query();
    if (rec.next()) {
        rec[request.columnname] = request.inputvalue;
        rec.update();
    }


 The 4 "Input Parameters":
    callbackrecordid
    tablename
    columnname
    inputvalue

Here is the screenshot of end result:
ITIL Integration: CloudChoir - ServiceNow Runbook in Java/Groovy

(ported from "CloudChoir - Salesforce Integration Foundation".)

Demo: ServiceNow query Facebook
YouTube demo video:
http://youtu.be/NPKEEnuwSKY

 Key differences, ServiceNow' out-of-box MID Server vs. CloudChoir Integration:
1. Out-of-box MID is pooling based thus not real-time, in theory. CloudChoir has no pooling nor busy-loop.
2. CloudChoir interface is SOAP based, can be called by any app/services (ServiceNow, Salesforce, ERP, Windows...), then return integration results into ServiceNow. Auth is done using "basic auth" passed in from ServiceNow. (We will add a REST based interface, if there is customer need.)
3. CloudChoir Runbook(s) are developed in Java/Groovy, can use the full power of any Java framework/library. (For example, this demo utilized the Java jar from "RestFB".)
4. CloudChoir Runbooks, developers can use Eclipse/Netbeans as IDE, since it is standard Java/Groovy anyway; or directly debug the Java/Groovy code inside your ServiceNow instance. (See Salesforce demo "Part 1" - that same "Debug and Deployment UI" will be ported and iframe-ed into your ServiceNow instance. CloudChoir (Salesforce version))
5. Same "ServiceNow Runbook(s)", can be used as "Salesforce Integration Pack(s)". One stone, two birds, ready for use for both:

(The Salesforce.com side of App already passed review and get listed in their Salesforce.com's App Store: https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000B3ucWEAR )
  • ServiceNow vs. Linux shell
  • ServcieNow vs. Windows Batch
  • ServiceNow vs. Windows PowerShell
  • ServcieNow vs. Amazon EC2 VM
  • ServiceNow vs. Oracle VirtualBox
  • ServiceNow vs, TFS or Perforce
Email: admin@konafornia.com
Blog: http://cloudchoir.blogspot.com
(A certified ServiceNow Admin, I am also an experienced Salesforce/Java/.NET developer, in case you need my help.)