Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

Domino on Linux application installation script

Daniel Nashed  19 April 2020 16:25:09

This weekend I looked into an easy way to install one of my new applications.
For Windows I could end up writing an agent which self deploys the binaries, because usually an unrestricted agent with the right signer should be able to write to a Domino binary directory also from remote.
But I am not sure every customer would like the idea? Any thoughts?


On Linux we always need root permissions. So I wrote a shell script, which can install my application but is also customizable.


1. Directory for server-tasks
2. Directory for extension-managers

3. Directory copied into data directory (including sub-directories)

4. Notes.ini file with parameters to update, add and remove from lists like exmgr_addins and servertasks.

So you can see the target audience is mostly the C-API developer deploying extensions which need native code.

This could be also extended for Java / OSGI applications and others.

Plain NSF/NTF based applications should be deployed via client/admin client.

The syntax for the notes.ini variables:

nshback_configdb=nshbackup.nsf
extmgr_addins+=libnshextlog.so


The += adds to a list and the -= removes from a list.


There is also a configuration file which currently only holds the name of the application. But it is the place to add more parameters in future.
It could be another extra in my start script and could help others to install their applications.

It's not a full installer, but should fit for many applications. I could add custom logic as an option.


Here is the structure of the installer:


.

├── install.sh

├── notes.ini

├── config.txt

├── extmgr

│   └── libnshextlo.so

├── notesdata

│   └── nshbackup.ntf

└── servertasks

   ├── nshbackup

   └── nshrestore



It automatically detects your Domino binary directory and data directory. And it also finds out about the owned of your data directory (checking the notes.ini) at start-up.

Once identified you are prompted to confirm the settings.  In most cases you can install pressing 3 x "enter" :-)


I also added a silent mode ( -s ) which will not ask for parameters and just installs if binary and data directory can be identified automatically.


./install.sh


---------------------------------------------

Domino!Backup Installer

---------------------------------------------


Domino Binary Directory : /opt/hcl/domino

Domino  Data  Directory : /local/notesdata



Your configuration


Domino Binaries :  /opt/hcl/domino       [OK]

Domino Data     :  /local/notesdata      [OK]

Domino User     :  notes                 [OK]

Domino Group    :  notes                 [OK]


[I]nstall [D]ata Dir [B]inary Dir [Q]uit :


Installing '/opt/hcl/domino/notes/latest/linux/nshbackup'

Installing '/opt/hcl/domino/notes/latest/linux/nshrestore'

[/local/notesdata/nshbackup.ntf] copied

notes.ini [extmgr_addins=libnshxban.so,libextlo.so] updated


Installation done



A typical config.txt could look like this. Those are the first parameters I added.


INSTALLER_NAME="Domino!Backup Installer"


#SILENT_INSTALL=yes


# Overwrite Domino data directory

#DOMINO_DATA_PATH=/local/notesdata


# Overwrite Domino binary directory

#LOTUS=/opt/hcl/domino


# Editor used for configuration

#EDIT_COMMAND=mcedit


# Specific locale used by the installer

#INSTALL_LOCALE=C


Would this be useful for Domino on Linux environments?
I think I will also update my start script installed, leveraging this logic and make it available for free thru my start script.

-- Daniel



Comments

1Ulrich Krause  20.04.2020 7:50:47  Domino on Linux application installation script

No matter if Linux or Windows, I would prefer an adminp process that is given the binaries to distribute, and the process installs the files on the server.

2Daniel Nashed  20.04.2020 12:52:10  Domino on Linux application installation script

@Ulrich, that's not possible on Linux if you have to write into the binary directory and the binary directory is owned by root.

You could use helper binaries like we have already for very specific operations like bindsock (to bind to specifc ports) and tunekrnl (to set specific kernel parameters).

It could be done if the admin would allow an application with the sticky bit set. But I don't see that this would match with Adminp directly.

This would be more an auto update service for servers which could than also work for external applications. This could be fine if the files are put into a database and are signed.

As always with great power comes great responsibility.. This whould need to be implemented in a very secure way.

-- Daniel

3Martin Kölsch  14.05.2020 10:43:54  Domino on Linux application installation script

Hi Daniel, i will find it very helpfull.

I have seen, that you have implemented this in your newer version of your startscript and i used it.

Btw. do you have a bundle of usefull tools (like your libnshextlo) for Domino in Linux environments ?

Maybe you can make a bundle with an installscript ? That would be nice :-)

Archives


  • [IBM Lotus Domino]
  • [Domino on Linux]
  • [Nash!Com]
  • [Daniel Nashed]