This section contains the information needed to create an installation manifest, broken into the following subjects:
Common Manifest Options
This section describes some of the common tasks an installation manifest is used to perform. The following options are described:
Define Namespaces
To define namespaces, add any number of <Namespace> tags within the <Manifest> tag.
If you want to define databases or mappings for a namespace, put a <Configuration> tag inside the <Namespace> tag. For each database the namespace contains, add a <Database> tag within the <Configuration> tag. To define mappings, add <GlobalMapping>, <RoutineMapping>, and <ClassMapping> tags beneath the appropriate <Database> tag. The </Configuration> tag activates the defined mappings.
Also within a <Namespace> tag, you can load globals, routines, and classes using the <Import> tag. You can also invoke class methods, which in turn can execute routines and access globals that have been imported, with the <Invoke> tag.
You can define variables with the <Var> tag. To reference a variable within the manifest, use the ${var_name} syntax. For more information, see Variables Within <Manifest> Tags below.
Add Users and Passwords
There are multiple ways to add users (including their roles and passwords) to the installed instance:
-
Include a <User> tag in an installation manifest, as described in the List of <Manifest> Tags.
The PasswordVar parameter of the <User> tag specifies the variable containing the password for the user; for example, by defining PasswordVar="Pwd", you are specifying that the value of the variable Pwd is the password for a user. There are a variety of ways to populate this variable, but it is ultimately up to you to do this. You might consider using a remote method invocation to another instance of InterSystems IRIS or a web service; the problem with these approaches is that the server that is installing InterSystems IRIS may need internet access. Other possibilities include importing the method you are using to the instance you are installing, or adding a client-side form to the install that prompts for users and passwords, which can be passed to your manifest.
-
Edit users in the Management Portal after installation is complete, as described in Users.
-
Using the Security.UsersOpens in a new tab class on a staging instance of InterSystems IRIS, as follows:
-
Export the user information by using the Security.Users.Export()Opens in a new tab method.
-
Import the user information by adding the following at the beginning of your manifest class (in the %SYS namespace):
<Invoke Class="Security.Users" Method="Import" CheckStatus="true">
<Arg Value="PathToExportedUserInformation"/>
</Invoke>
where PathToExportedUserInformation is the location of the output file specified in the Security.Users.Export()Opens in a new tab method.
Write to the Manifest Log
You can define messages to be added to the manifest log by incorporating <Log> tags in your class, in the following format:
<Log Level="<level>" Text="<text>"/>
The log level must be in the range of -1 to 3, where -1 is “none” and 3 is “verbose”; if the log level specified in the setup() method is equal to or greater than the Level property in the <Log> tag, the message is logged. The text is limited to 32,000 characters.
You set the log level via the second argument of the setup() method (for more information, see “Using the Manifest” later in this appendix). Since this cannot be passed to the manifest from the install, you must set it in the class as follows:
ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3,
pInstaller As %Installer.Installer,
pLogger As %Installer.AbstractLogger)
As %Status [ CodeMode = objectgenerator, Internal ]
You can direct where messages are displayed via the fourth argument (%Installer.AbstractLoggerOpens in a new tab) of the setup() method; for example, if you instantiate a %Installer.FileLoggerOpens in a new tab object referencing an operating system file, all %Installer and log messages are directed to that file. (Without this argument, all messages are written to the primary device if setup() is called directly, and are ignored if it is executed by the installer.)
Perform Post-Upgrade Tasks
When upgrading an instance of InterSystems IRIS, you can use an installation manifest to automatically perform any necessary post-upgrade tasks, such as recompiling code. You do this by using the <Invoke> tag to call the class methods described in the How to Compile Namespaces section of the “Upgrading InterSystems IRIS” chapter of this book.
See the Installation Manifest Examples section of this appendix for an example of a manifest that can be used during an upgrade.
Variables Within <Manifest> Tags
Some tags can contain expressions (strings) that are expanded when the manifest is executed. There are three types of expressions that can be expanded, as follows:
${<var_name>} — Variables
Expands to the value of the variable. In addition to the predefined variables described in this section, you can specify additional variables with the <Var> tag.
${#<param_name>} — Class Parameters
Expands to the value of the specified parameter for the manifest class.
#{<ObjectScript_expression>} — ObjectScript Expressions
Expands to the specified InterSystems IRIS Object Script expression (which must be properly quoted).
Note:
Parameter expressions are expanded at compile time, which means they can be nested within variable and ObjectScript expressions. Additionally, variable expressions are expanded before ObjectScript expressions and thus can be nested within the latter.
The following table lists the predefined variables that are available to use in the manifest:
Variable Name |
Description |
SourceDir |
(Available only when the installer is run) Directory from which the installation (setup_irisdb.exe or irisinstall) is running. |
ISCUpgrade |
(Available only when the installer is run) Indicates whether this is a new installation or an upgrade. This variable is either 0 (new installation) or 1 (upgrade). |
CFGDIR |
See INSTALLDIR. |
CFGNAME |
Instance name. |
CPUCOUNT |
Number of operating system CPUs. |
CSPDIR |
CSP directory. |
HOSTNAME |
Name of the host server. |
INSTALLDIR |
Directory into which InterSystems IRIS is installed. |
MGRDIR |
Manager (mgr) directory. |
PLATFORM |
Operating system. |
PORT |
InterSystems IRIS superserver port. |
PROCESSOR |
Processor chip. |
VERSION |
InterSystems IRIS version number. |