Configuring HCL Traveler on Docker examples

Example 1: Standalone Domino with Traveler and iNotes configuration

The following example contains the commands to start a standalone Domino mail server with iNotes for web mail access and Traveler for mobile mail access. In this example, the server configuration is performed using one-touch Domino setup passing system environment variables.

iNotes requires HTTP, so the HTTP task is added to the ServerTasks list, in addition to Traveler. Furthermore, HTTP must remain active even if Traveler is brought down, so NTS_AUTOSTART_HTTP is set to false. In this example, the external URL is set by passing the NTS_EXTERNAL_URL into the notes.ini file.

The following list contains the system environment variables to be passed in to the docker run command:

SetupAutoConfigure=1
SERVERSETUP_SERVER_TYPE=first
SERVERSETUP_ADMIN_FIRSTNAME=Joe
SERVERSETUP_ADMIN_LASTNAME=administrator
SERVERSETUP_ADMIN_PASSWORD=password
SERVERSETUP_ADMIN_IDFILEPATH=admin.id
SERVERSETUP_ORG_ORGNAME=Example
SERVERSETUP_ORG_CERTIFIERPASSWORD=password
SERVERSETUP_NETWORK_HOSTNAME=dommail.example.com
SERVERSETUP_SERVER_DOMAINNAME=Example
SERVERSETUP_SERVER_NAME=DomMail
SERVERSETUP_SERVER_ADDITIONALSERVERTASKS=TRAVELER
The following sample docker run command creates an interactive container that deletes itself upon termination:
docker container run --rm --name dockerExample -it -v dockerSample:/local/notesdata --env-file 
environment.txt --hostname docker.example.com --stop-timeout=120 -p 1352:1352 -p 443:443 -p 80:80 -p 8080:8080  
traveler-container:V12020_202211031815
The following messages show the initialization of Traveler. Check the console.log and autoconfig.log for status:

--------------------------------------------------------------------------------
Copying new data files for traveler V12020_202211031815
--------------------------------------------------------------------------------

Extracting add-on install data directory from [/domino-container/install_data_addon_traveler.taz]
Updating Traveler notes.ini parameters
[NTS_TEMPLATE_INSTALL] -> [1]
[NTS_CLIENT_UPDATE] -> [FULL]
[NTS_AUTO_CONFIG] -> [true]
[NTS_AUTOSTART_HTTP] -> [true]
[NTS_DBCONNECTIONURL] -> [jdbc:derby:ntsdb;create=true]
[NTS_SERVLET_ALLOW_CLIENT_INSTALL] -> [true]
[NTS_64_BIT] -> [true]
[NTS_NEW_INSTALL] -> [true]
[NTS_INSTALLATION_TYPE] -> [ON_PREMISE]
[NTS_SERVER_LANG] -> [en]
[NTS_BUILD] -> [12.0.2.0 Build 202211031815]
[NTS_INSTALL_INSTANCE] -> [1] 

Example 2: Non-HA Traveler server extending existing Domino domain using JSON

In the following example, a Traveler server is added to an existing Domino domain to add mobile mail services. It is the only Traveler server, so it uses the default Derby database.

The Traveler server is configured using one-touch Domino setup with parameters in the JSON file detailed below. This file demonstrates how to set the Traveler external URL into the server document.
{
	"serverSetup": {
		"server": {
			"type": "additional",
			"name": "domTrav",
			"domainName": "existingDomain",
			"IDFilePath": "/local/notesdata/server.id",
			"additionalServerTasks": "TRAVELER"
		},
		"network": {
			"hostName": " domtrav.example.com"
		},
		"org": {
			"orgName": "existingDomain"
		},
		"admin": {
			"CN": "admin"
		},
		"existingServer": {
			"CN": "existingServer"
		}
	},
	"appConfiguration": {
		"databases": [{
			"filePath": "names.nsf",
			"action": "update",
			"documents": [{
				"action": "update",
				"findDocument": {
					"Type": "Server",
					"ServerName": "CN=domTrav/O=existingDomain"
				},
				"items": {
					"tsExternalURL": "http://domtrav.example.com/traveler"
				}
			}]
		}]
	}
}

The server.id file of the new Traveler server, and the JSON file containing the configuration values are specified on the run command as -v mount and --env parameters and the files will be correctly copied into the the Domino volume before the setup is run.

The following sample docker run command creates an interactive container that deletes itself upon termination:
docker container run --rm --name sampleContainer -it -v sampleVolume:/local/notesdata 
-v /install/sample.json:/etc/sample.json --env SetupAutoConfigure=1 
--env SetupAutoConfigureParams=/etc/sample.json -v /local/notesdata/server.id:/etc/server.id 
--env SERVERSETUP_SERVER_IDFILEPATH=/etc/server.id --hostname domtrav.example.com --stop-timeout=120 -p 1352:1352 
-p 443:443 -p 80:80 -p 8080:8080 traveler-container:V12020_202211031815
 

Example 3: HA Traveler Server extending existing domain using one touch a JSON setup.

In the following example, a Traveler server is added to an existing Domino domain to add capacity to one or more existing Traveler servers pre-configured for high availability (HA). This Traveler server connects to an existing MySQL enterprise database server.
Note: This section is similar to the previous example.
The Traveler server is configured using one-touch Domino setup with parameters in a JSON file:
{
    "serverSetup": {
        "server": {
            "type": "additional",
            "name": "domTrav",
            "domainName": "existingDomain",
            "IDFilePath": "/local/notesdata/server.id",
            "additionalServerTasks": "Traveler"
        },
        "network": {
            "hostName": "domtrav.example.com"
        },
        "org": {
            "orgName": "existingDomain"
        },
        "admin": {
            "CN": "admin"
        },
        "existingServer": {
            "CN": "domMail"
        },
        "notesINI": {
            "NTS_DBUSER": "sqladmin",
            "NTS_DBPASSWORD": "password",
            "NTS_DBCONNECTIONURL": "jdbc:mysql://MySQLServer.sample.com:3306/dockerdb?serverTimezone=EST5EDT",
            "NTS_DBPATH": "/local/notesdata/mysql-connector-java-8.0.27.jar"                
        }
     },
    
    "appConfiguration": {
        "databases": [
            {
                "filePath": "names.nsf",
                "action": "update",
                "documents": [
                    {
                        "action": "update",
                        "findDocument": {
                            "Type": "Server",
                            "ServerName": "CN=domTrav/O=existingDomain"
                        },
                        "items": {
                            "tsExternalURL": "https://domtrav.example.com/traveler"
                        }
                    }
                ]
            }
        ]
    }
    
}

The parameters required for connecting to the MySQL database server can be specified using JSON as note.ini NTS_* parameters, but this can only be done on initial setup. . The recommended method for configuring the database parameters after setup is to run the travelerUtil program while the Domino server is not running.

As in the previous example, run the docker server.id file and the JSON file into the image using -v and -env paramters. Traveler needs to connect to the enterprise database, so you must use a docker cp to copy the appropriate JDBC driver for the enterprise database into the volume before starting Domino.

The following sample docker run command creates an interactive container that deletes itself upon termination:
docker container run --rm --name sampleContainer -it -v sampleVolume:/local/notesdata 
-v /install/sample.json:/etc/sample.json --env SetupAutoConfigure=1 
--env SetupAutoConfigureParams=/etc/sample.json -v /local/notesdata/server.id:/etc/server.id 
--env SERVERSETUP_SERVER_IDFILEPATH=/etc/server.id --hostname domtrav.example.com --stop-timeout=120 -p 1352:1352 
-p 443:443 -p 80:80 -p 8080:8080 traveler-container:V12020_202211031815
Once the Domino server configuration has run once, you can restart Domino in a new container using the volume that holds the configuration information without performing the server configuration. The following sample docker run command restarts Domino using a volume that has already been configured:
docker container run --rm --name sampleContainer -it -v sampleVolume:/local/notesdata –hostname 
domtrav02.example.com --stop-timeout=120 -p 1352:1352 -p 443:443 -p 80:80 -p 8080:8080 -p 50125:50125 -p 50126:50126 traveler-container:V12020_202211031815

Example 4: Sample JSON for Traveler Server with Session Authentication enabled

The following example uses the one-touch configuration process to automatically create an internet site document with Single Server Session Authentication enabled. The override rules required for Traveler to properly handle session authentication should be automatically generated on startup. For more information, see HTTP authentication.
{
    "serverSetup": {
        "server": {
            "type": "first",
            "name": "domTrav",
            "domainName": "dominoDomain",
            "additionalServerTasks": "TRAVELER"
        },
        "network": {
            "hostName": "domtrav.example.com"
        },
        "org": {
            "orgName": "dominoDomain",
            "certifierPassword": "password"
        },
        "admin": {
            "lastName": "administrator",
            "password": "password",
            "IDFilePath": "/local/notesdata/admin.id"
        }
    },
    "appConfiguration": {
        "databases": [{
            "filePath": "names.nsf",
            "action": "update",
            "documents": [{
                "action": "update",
                "findDocument": {
                    "Type": "Server",
                    "ServerName": "CN=domTrav/O=dominoDomain"
                },
                "items": {
                    "tsExternalURL": "http://domtrav.example.com",
                    "LdISite": "1",
                    "FullAdmin": [
                        "administrator/dominoDomain",
                        "LocalDomainAdmins"]
                }
            },
            {
                "action": "create",
                "computeWithForm": true,
                "items": {
                    "Form": "WebSite",
                    "FullName": "CN=WebSite/O=dominoDomain",
                    "Type": "WebSite",
                    "HTTP_EnableSessionAuth" : "1",
                    "ISiteAdrs": "domtrav.example.com",
                    "ISiteName": "Web site for traveler",
                    "ISiteOrg": "dominoDomain",
                    "WSHomeURL": "/traveler",
                    "WSHostingSrvrs": "*",
                    "Owner": "administrator/dominoDomain",
                    "LocalAdmin": "administrator/dominoDomain"
                }
            }]
        }]
    }
}
Note: Podman can be used as a replacement for docker. For more information on podman, see their documentation.