Difference between revisions of "Package Creator"

From Hornbill
Jump to navigation Jump to search
m
Line 169: Line 169:
 
'''The following will affect the entire instance so care should be taken!'''<br>
 
'''The following will affect the entire instance so care should be taken!'''<br>
 
<br>
 
<br>
Some of the above files are restricted by default from being uploaded in order to resolve this the disable the System Setting: '''security.fileUploadRestriction.entity.fileAttachments.enable'''
+
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'''
 
<br>Preferably remove the relevant extensions from the System Setting list: '''security.fileUploadRestriction.entity.fileAttachments.types'''.
 
<br>Preferably remove the relevant extensions from the System Setting list: '''security.fileUploadRestriction.entity.fileAttachments.types'''.
 
}}
 
}}

Revision as of 10:37, 27 November 2020

Home > Administration > ITOM > Package Creator Index

Introduction

The Package Creator allows a user, with the necessary programming background and ability, to create Operations within Packages. 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 manually create a Package, a form-based editor is provided to simplify the process. An interface is also provided to facilitate the uploading and organisation of resources that may be required to facilitate operations. These resources may be scripts, executables or other required files. In addition to uploading scripts, an interface is also provided to allow for various file types to be created via the browser interface.

Related Articles

Toolbar

  • Refresh
  • Target OS
  • All
  • Unknown
  • Windows 32-bit
  • Windows 64-bit
  • Windows Universal
  • Purpose
Dynamic list populated from the Purpose field of entriies in the list
  • Filter
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

Select the [+] button from 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

PackageOperationsFormFade.png

Operations various actions to be configured, which execute a single command, executable, script or installer package. An Operation is created by clicking on the Add Operation button within the Form View.

  • 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
  • Timeout
Numeber of seconds before the SIS execution 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 input parameters that can be required or optional, to be specified
  • Output Parameters
Allows for one or more output parameters that can be required or optional, to be specified
Input Parameters

PackageOperationsFormInputParams.png

Input Parameters can be used to provide input values to the selected command or used to specify the output values expected from the command.

  • Requirement
Specifies whether the parameter is to be Required or Optional
  • Type
The type of value that should be entered, String, Number or Boolean, required for validation purpses.
  • Parameter name
Sepcify the name of the parameter
  • Default value
A default value
  • Hint
A description of the parameter that is used when the value of parameter is requested
  • Actions
Action buttons
  • Sensitivety
Toggle that marks the paramater as being sensitive (struck out eye) and thus will not show its value. i.e passwords
  • Delete
Removes the parameter configuration
Output Parameters

PackageOperationsFormOutputParams.png

Output parameters can be configured to provide access to the output of operation 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 there is clear user documentation as to what Extra Credentials need setting (their exact names as well as 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 the current state of a package, 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.

In order to be able 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. In order 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 Install, when 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

At this point, the package details will be read-only in order 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.