Tuesday, 25 August 2015

IBM VERSE Hybrid Deployment via Pass-thru only environment – without Internet Connection at each Machine

For a BFSI Customer, I recently implemented IBM Verse Hybrid deployment as a PoC. The major requirements were as follows:

  • No Internet connection to be provided at each individual machine.
  • Internet Proxy license not available for majority of users. If needed for Mailing, the cost of Proxy license to be added to TCO.
  • No direct connection from any Domino Server in MZ to Internet

IBM Verse Hybrid deployment System requirement clearly states that Internet connectivity is required from each machine for Notes Client configuration. Also, each Domino Server should be able to reach to Cloud Servers for Mail routing.

We addressed the challenge in two parts:

1. Configured On-premise Domino Servers to reach Cloud Servers via Pass-thru.

  • To achieve the same, create Connection document to Cloud Server OU via Pass-thru server.
  • In Pass-thru server, allow “*/CLOUD/<CUSTOMER_ORG>” as Allowed Destination via Pass-thru server. Also, allow all users to access the Pass-thru server by adding “*” to the “Who can access the Server” field.
  • Once done, trace the Cloud Servers from On-premise server. The connection should get established via Pass-thru server.

2.  Configure Notes Client to connect to Cloud servers via Pass-thru:

  • In this scenario, default method of downloading config.nsf and running won’t work, as config.nsf require internet connectivity over port 1352 NRPC to connect to Cloud servers.
  • To overcome this challenge, I created below script, which creates one Connection document to Pass-thru Server, one connection document to Cloud Servers using Pass-thru server.
  • Also, it modifies current location to ensure that Cloud Server is now configured as Home Mail Server in Notes Client. This information is available in On-premise directory (replicated via Directory Sync).
  • Additional Location doc can be created as well to allow users to connect directly to Cloud servers from Home using Internet connectivity from their Laptops.

Sub Click(Source As Button)
    Dim Workspace As New NotesUIWorkspace
    Dim UIDdoc As NotesUIDocument
    'Create Connection Doc to Pass-thru Server
    Set uidoc = workspace.composedocument("","names.nsf","Connection")
    Call uidoc.fieldsettext("ConnectionType","Local Area Network")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("PortName","TCPIP")
    Call uidoc.fieldsettext("LanPortName","TCPIP")
    Call uidoc.fieldsettext("ConnectionLocation","*")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("Destination","<PASS_THRU_SERVER>/<OU>/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("OptionalNetworkAddress","<IP_ADDRESS_OF_PASS_THRU>")
    Call uidoc.fieldsettext("Source","*")
    Call uidoc.refresh
    Call uidoc.save
    Call uidoc.close
    Set uidoc = workspace.composedocument("","names.nsf","Connection")
    Call uidoc.fieldsettext("ConnectionType","Passthru Server")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("PassthruServer","<PASS_THRU_SERVER>/<OU>/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("ConnectionLocation","*")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("Destination","*/CLOUD/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("Source","*")
    Call uidoc.refresh
    Call uidoc.save
    Call uidoc.close
    'Modify Current Location Document
    Dim session As New NotesSession
    Dim pnab As New NotesDatabase("", "names.nsf")
    Dim dbNab As NotesDatabase
    Dim currlocdoc As NotesDocument
    Dim vw As NotesView
    Dim doc As NotesDocument
    ' Pick out the second argument in Location INI variable (i.e. the Note IDof current location)
    'Following string extraction cannot be done with R5 StrLeft() StrRight() fcns b/c it won't work in R4 client, hence good old @formula Evaluate() to the rescue...
    CurrLocation$=session.GetEnvironmentString("Location", True)
    CurrLocationNoteID=Evaluate( { @Left(@Right("} & CurrLocation$ & {"; ",");",") } )
    Set currlocdoc=pnab.GetDocumentbyID( CurrLocationNoteID(0) )
    'Get the new Home Mail Server information from the Directory. Since directory is synchronized with Cloud, therefore On-premise directory will also contain the new Server information in updated person document of user.
    Set dbNab = session.GetDatabase("<IP_ADDRESS_ANY_ON_PREMISE_DIRECTORY_SERVER>", "names.nsf")
    Set vw = dbNab.GetView("People")
    Set doc = vw.GetDocumentByKey(session.UserName, True)
    If Not doc Is Nothing Then
        Call currlocdoc.replaceitemvalue ("MailServer", doc.MailServer(0))
        Call currlocdoc.save (True,True)
        Messagebox "Person Document not found. Please configure Location Document Manually.", 48, "Error Occured"
        Exit Sub
    End If
    Messagebox "Notes Client Configuration has completed successfully.", 64, "Configuration Complete"   
End Sub


Please feel free to reach me if any clarification required for the above description.