Skip to main content
Version: 7.2402.x.x RR

Administrative command-line interface

Overview

You can use the administrative nevisIDM command-line interface (CLI) to create and manage instances of nevisIDM. The command-line interface consists of the following commands:

Static commands

  • nevisidm pkg

    Prints out the current component version.

  • nevisidm inst

    Lists instances.

  • nevisidm inst create <instance>

    Creates a new instance, by creating a directory under /var/opt/nevisidm, copying template files from /opt/nevisidm, and replacing the variables in the template. Registers the component instance as a service in system.d.

    Uses key=value command line arguments for the variable replacement in the template files. Uses the INST_CUSTOM_TEMPLATE=<path> command line argument to provide custom configuration templates.

  • nevisidm inst exists <instance>

    Checks the existence of the instance directory.

  • nevisidm inst remove <instance>

    Stops the running instance.

    Creates a backup of the instance, by zipping the instance directory. Removes the instance directory /var/opt/nevisidm/<instance>. Removes the system.d service entries.

Instance commands

  • nevisidm <instance> start

    Starts instance via system.d.

  • nevisidm <instance> stop

    Stops instance via system.d.

  • nevisidm <instance> restart

    Calls stop and start.

  • nevisidm <instance> status

    Shows the aggregate status of the instance.

  • nevisidm <instance> config

    Edits the application configuration.

  • nevisidm <instance> config env

    Edits the environment configuration.

  • nevisidm <instance> config vmargs

    Edits the configuration file containing the JVM arguments. This is an alias of the config env command.

  • nevisidm <instance> config log

    Edits the log configuration.

  • nevisidm <instance> config server

    Edits the instance server configuration.

  • nevisidm <instance> log

    Lists the server log files.

    When you execute a command without specifying the instance name, the command is performed against the default nevisidm instance.

Setting up servers

The base command for creating an instance is:

nevisidm inst create <name>

This will create an instance using default settings for all configurations. Depending on your requirements or environment this might not result in a working setup out of the box.

The template files for configuration can be found at /opt/nevisidm/template/conf.

Overriding default variables from command line arguments

To use values specific to your requirements, you can provide key=value pairs in the command line after the instance name:

nevisidm inst create <instance> INST_CUSTOM_TEMPLATE="/tmp/my_templates" IDMDB_USERNAME="UIDM03"
note

The default teamplates do not contain such variables. Define custom templates to use this functionality.

Overriding default variables from files

A properties file can be used to store and override multiple variables. A properties file can be leveraged like this:

nevisidm inst create <instance> /tmp/setup.properties

Where the /tmp/setup.properties contains key value pairs like this:

INST_CUSTOM_TEMPLATE=/tmp/my_templates
IDMDB_USERNAME=UIDM03
note

The values specified in command line arguments will overwrite variables defined in a properties file.

All files ending with *.properties will be loaded.

Using custom templates

You can provide your own templates if the default configuration templates do not suit your needs.

This can be done via the INST_CUSTOM_TEMPLATE command line argument, where you define a directory containing your templates.

The inst create command will always:

  1. Copy the default template files from /opt/nevisidm/template to /var/opt/nevisidm/<instance>/
  2. Copy template files found under the INST_CUSTOM_TEMPLATE to /var/opt/nevisidm/<instance>/
  3. Replace @VARIABLE@ in all non binary files in the /var/opt/nevisidm/<instance>/ director.

Example for using all three features together:

nevisidm inst create <instance> INST_CUSTOM_TEMPLATE=/tmp/testtemplate/ OTHERCOMMANDLINEVARIABLE=myvalue /tmp/setup.properties

Note that templates are not restricted to the configuration files, but everything under the instance directory.

Controlling the server

You can use all, to execute commands on all instances.

  • nevisidm <instance> start

    Uses the system.d service to start the server process, if it is not already running. The command will wait up to 1 minute, for the ports to be bound for the process, then it shows the status.

  • nevisidm <instance> stop

    Stops the system.d service.

  • nevisidm <instance> restart

    Performs a stop command, followed by a start command.

  • nevisidm <instance> status

    Displays basic information on the current runtime state of the server.

    # nevisidm status
    --------------------------------------------------------------------------------
    Status : UP
    instance : nevisidm
    Process ID : 26618
    Ownership : nvauser / nvbgroup
    Network port(s) : localhost:8998
    : *:8989
    Filedescriptors : 1024
    Logfile(s) : /var/opt/nevisidm/nevisidm/log/batch.log
    /var/opt/nevisidm/nevisidm/log/application.log
    /var/opt/nevisidm/nevisidm/log/audit-json.log
    /var/opt/nevisidm/nevisidm/log/audit.log
    --------------------------------------------------------------------------------

Configuration editing

Configuration editing is usually not an every day administration task and is not required for operation. In production, manual changes of parameters should only be done in emergency cases and only by experienced staff who knows exactly about the effect of such changes.

These commands use either the editor defined in EDITOR environment variable or in case that is not set vim. If vim is not available then vi is used.

  • nevisidm <instance> config

    Opens the main configuration file /var/opt/nevisidm/<instance>/conf/nevisidm-prod.properties for editing. Changing the configuration requires a server restart.

  • nevisidm <instance> config env

    This command allows specifying arguments to be passed to the JVM initialization, the JAVA_OPTS. It opens the configuration file /var/opt/nevisidm/<instance>/conf/env.conf for editing. Changing the configuration requires a server restart.

  • nevisidm <instance> config vmargs

    The command behaves exactly the same as the config env command and exists only for legacy purposes.

  • nevisidm <instance> config log

    Log4j configuration.

  • nevisidm <instance> config rolesMap

    Edits /var/opt/nevisidm/<instance>/conf/rolesMapping.properties, wher the fine-grained permissions are defined.

  • nevisidm <instance> config rolesAssign

    Edits the configuration file /var/opt/nevisidm/<instance>/conf/rolesAssignment.properties, which defines which nevisIDM role is allowed to assign which other nevisIDM role.

  • nevisidm <instance> config rolesAuth

    Edits the configuration file /var/opt/nevisidm/<instance>/conf/authorizationConfig.properties, where the definition of privilege escalation can be found.