Package Creator

From Hornbill
Jump to navigation Jump to search
Home > Administration > ITOM > Package Creator Index

Introduction

The Package Creator allows a user to create Operations within Packages with the necessary programming background and ability. A Package consists of a single Package Info file and with additional resource files where required. The info file contains all the details regarding operations and all parameters that may be necessary. Although it is possible to create a Package manually, a form-based editor is provided to simplify the process to upload and organise resources. These files are used to provide or support a package's operations a can be a combination of; for example; one or more scripts and other filetypes. In addition to uploading files, an interface is also provided to allow various file types to be created via a browser-based editor.

Related Articles

Toolbar

ITOMPackageCreatorToolbar.png

  • Refresh
  • Target OS
Operating System that the package was designed for execution
  • Windows 32/64-bit
  • Apple macOS
  • Generic Linux
  • Purpose
Dynamic list populated from the Purpose field of entriies in the list
  • Filter by package
Free text filter on Package
Create an IT Automation Package
  • Delete
Delete selected Package(s)

Package Creator List

PackageCreatorListFade.png
  • Package
Unique name given to the Package
  • Purpose
Summary of the intended use of the package
  • Target OS
Operating System that the package was designed for execution
  • Published
Late Published version of the packacge
  • Created On
Date that the package was created
  • Created By
The account used to create the package
  • Last Updated On
Date the package was last updated
  • Last Updated By
The account last used to update the package


Create a Package

A new package is created by clicking the NewPackageButton.png button on the toolbar and when requested, enter a unique Package name. This will display Package Details where the package can be Configured and Updated via the Package Content Frame and Properties Form.

Package Content Toolbar

PackageContentEmptyFrame.png
  • Upload
Uploads files to the current folder
  • New Folder
Creates a new Folder
  • New File
Creates a new file in the current folder
Creates a new baseline of the current package
  • Save
Saves amended package details

Selecting Package Info file enables the file to be modified via a form or in its native XML format, which is selectable via the toggle buttons.

PackagePropertiesFormFade.png
  • Package ID
A GUID which uniquely identifies the package) will be generated on creation
  • Package
  • Description
Description of the packages content
  • Purpose
Summary of the intended use of the package
  • Vendor ID
Defined by the creator of the package (Hornbill packages will set to "private:hornbill")
  • Target OS
Defines Target OS platform that the package is designed
  • Windows 32-bit
  • Windows 64-bit
  • Windows Universal
Package can be invoked on either Windows 32 or 64-bit

PackagePropertiesXml.png




Package Operations

Each package will contain one or more operations each will perform an action that can be one of a number of the command types depending on the target OS:

An Operation is created by clicking on the Add Operation button within the Form View.

PackageOperationsFormFade.png
  • Operation
Mandatory Name used to select the package when creating a Job
  • Description
Describes the functionality provided by the operation
  • Command Type
Provides a list of supported command types
  • Run Command
Executes a standalone command
  • Windows Installer
Executes an uploaded Windows Installer(.msi) package, with one of four actions are available
  • Install Software
Installs the .msi package
  • Run Program
Executes the Installed program
  • Uninstall Software
Uninstall an .msi package
  • Update Software
Update an Installed .msi package
  • Windows Executable
Executes a windows executable, selected from the Run File list
  • Batch Script
Excutes a Windows batch script (.cmd or .bat), selected from the Run File list
  • Windows PowerShell
Execute a Windows PowerShell script, selected from the Script list
  • PowerShell Core
Execute a Windows PowerShell Core script, selected from the Script list
  • Linux Shell Script
Executes a Linux / Unix shell script
  • Timeout
Number of seconds before the operation will timeout
  • Options / Args
Specifies arguments that can be sent to the pecified command. Input parameters can be used to provide dynamic values
  • Input Parameters
Allows for one or more mandatory or optional input parameters to be specified
  • Output Parameters
Allows for one or more mandatory or optional output parameters to be specified
Input Parameters

Input parameters are provided to enable data to be supplied to the operation, the data will be captured when the package operation is used within an IT Automation. Each parameter can be set as mandatory or optional and can be provided with a default value.

PackageOperationsFormInputParams.png

To create a new parameter click the Add Parameter button on the Add Package Operation form.

  • Requirement
Each parameter can be specified as Required or Optional
  • Type
Specifys one of the following data types that can be entered: String, Number or Boolean. This will be used for basic validation when parameter values are entered
  • Parameter name
Used to identify the parameter when adding it to the arguments/options list
  • Default value
Each parameter can be provided with default value
  • Hint
Describes the parameter and is visible during data entry
  • Actions
Action buttons
  • Sensitivety
A Toggle that marks a parameter as sensitive (struck out eye) and thus will not show its value during data entry
  • Delete
Removes the parameter configuration
Output Parameters

PackageOperationsFormOutputParams.png

Output parameters can be configured to provide access to the operation output and can be used as input to a process node within a Runbook or BPM. The parameter definition as the Input parameters with some fields and options removed.

Using Parameters

After the creation of the input parameters, the following format enables them to be accessed:

{param.<parameter_name>}

<parameter_name> should substituted for the relevant parameter name such as {param.host}

PackageOperationsFormOptions.png

The use of a parameter can supply the value for an argument used by the selected Command Type. The example in the diagram shows how a parameter provides the value to the -n argument and hostname used by the ping command. Intellisense is used to aid with the entry of parameters, start entering the prefix of the parameter. A list of params will be displayed, and the relevant parameter can be selected.

Information
  • the parameters are substituted, the character escaping needs to be handled by the developer.
  • It might be the substitution of n/m-dash with hyphens.
  • Fancy quotes might also get added to the substitution list

It is also possible to pass user credentials to the command line. The credentials should be added to the "Extra Credentials" section of the Job definition. To use the credentials use:

{creds:credential_name.credential_property_name}

eg:

{creds:credential1.apikey}

It would be well advised to ensure clear user documentation as to what Extra Credentials need setting (their exact names and their types) when creating these Packages.

Output Parameters can also be configured, the resulting Console Output is then expected to contain text in the following format:

{{SISJobOutputParameterStart:output_variable_name}}output_data{{SISJobOutputParameterEnd}}

The output data can then be used as input for a subsequent Automation call within the Runbook or Business Process (if passed on via the Runbook's Output Parameters).

Script Creation

Supported File Types

  • .bat
Command Prompt Batch process files
  • .ps1
Powershell and Powershell Core scripts
  • .js
Javascript
  • .txt
Text format file
  • .json
JavaScript Object Notation file
  • .csv
Comma Seperated Value file
Information

The following will affect the entire instance so care should be taken!

Some of the above files are restricted by default from being uploaded; in order to resolve this, disable the System Setting: security.fileUploadRestriction.entity.fileAttachments.enable
Preferably remove the relevant extensions from the System Setting list: security.fileUploadRestriction.entity.fileAttachments.types.

Baseline

PackageContentBaselineVersions.png

A Baseline is a snapshot of a package's current state, only available once the package is in a state where it is ready to be published (at least one Package Operation exist).

The draft version of a package is the only version that can be updated. Once the Package is ready for release, the draft copy can be Baselined, creating a new version. This latest version is then available for packaging and installation, on the Installed Packages list.

When a new version is published, all subsequent Jobs including previously scheduled jobs will now use the Published version.

To enable the Baseline once the initial package has been created, the Package Info file needs to be highlighted in the file list. Once clicked a confirmation pop appears, and the dropdown next to the Baseline Button will display a list of Baselined versions. To publish and install or download a baseline version, select the relevant version from the list. The Baseline button will change to the Package and Installwhen clicked two options are provided:

PackageContentDraftInstall.png
  • Package and Install
Build the package and add to the Install Packages list, Overwriting any existing version
  • Package and Download
Build the package and Download to the local computer

The package details will be read-only to change any details the draft version will need to be selected, by clicking the View Draft button.


Baseline and Install the latest version of a package

  1. Select the ITOM Package Creator
  2. From the list select a package
  3. Click the Baseline button
  4. Select the Baseline button drop-down
  5. Select the last version
  6. Click Package and Install, and select Package and Install
  7. Use the Breadcrums to go back to the Package Creator list

The Package should now appear in the list with the latest version shown.