Package Creator

From Hornbill
(Difference between revisions)
Jump to: navigation, search
(Package Properties Form View)
(Package Operations)
(12 intermediate revisions by one user not shown)
Line 42: Line 42:
 
{{Bullet1|Purpose|Dynamic list populated from the Purpose field of entriies in the list}}
 
{{Bullet1|Purpose|Dynamic list populated from the Purpose field of entriies in the list}}
 
{{Bullet1|Filter|Free text filter on Package}}
 
{{Bullet1|Filter|Free text filter on Package}}
{{Bullet1|Create Pacakge|Create an IT Automation Package}}
+
{{Bullet1|[[#Create a Package|Cereate a Package]]|Create an IT Automation Package}}
 
{{Bullet1|Delete|Delete selected Package(s)}}
 
{{Bullet1|Delete|Delete selected Package(s)}}
 
|}
 
|}
When creating custom packages, the following should be kept in mind:
 
  
* Packages are versioned/baselined.
+
==Create a Package==
* Each Package '''must''' define at least one Operation.
+
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.  An interface is also provided to allow for various file types to be created via the browser.
* Each Package '''can''' define more than one Operations.
+
* All necesary collateral (in the form of files) '''can''' be included and structured within folders within the Package.
+
  
It would be ill-advised to include (extremely) large files - instead, consider hosting those files on a network share and program the script to use that file/executable.
+
===Supported File Types===
 
+
:{|
Within the Package Creator interface there is the ablity to:
+
|- valign="top"
* Upload a file (Hornbill platform might block certain filetypes - this can be set in system settings - ultimately any file(type) can be uploaded (*))
+
|style="width:500px"|
* Add new folder
+
{{Bullet1|.bat|Command Prompt Batch process files}}
* Add new file (currently .bat, .sh, .js, .txt, .json and .csv file can be added (*))
+
{{Bullet1|.sh|Powershell and Powershell Core scripts}}
* Modify certain text files (currently only certain file types are recognised as editable)
+
{{Bullet1|.js|Javascript}}
 +
|style="width:500px"|
 +
{{Bullet1|.txt|Text format file}}
 +
{{Bullet1|.json|JavaScript Object Notation file}}
 +
{{Bullet1|.csv|Comma Seperated Value file}}
 +
|}
  
 
{{infobox|
 
{{infobox|
(*) you will either needs to disable '''security.fileUploadRestriction.entity.fileAttachments.enable''' or change the extensions in '''security.fileUploadRestriction.entity.fileAttachments.types'''
+
Some of the supported file types require disabling '''security.fileUploadRestriction.entity.fileAttachments.enable''' or remove the extensions from the '''security.fileUploadRestriction.entity.fileAttachments.types''' list.
 
}}
 
}}
  
 
==Package Properties Form View==
 
==Package Properties Form View==
[[File:PackagePropertiesFormFade.png|right|350px]]
+
[[File:PackagePropertiesFormFade.png|right|350px|link=https://wiki.hornbill.com/images/5/5d/PackagePropertiesForm.png]]
 
{{Bullet1|Package ID|a GUID which uniquely identifies the package) will be generated on creation}}
 
{{Bullet1|Package ID|a GUID which uniquely identifies the package) will be generated on creation}}
 
{{Bullet1|Package|}}
 
{{Bullet1|Package|}}
Line 75: Line 77:
 
{{Bullet2|Windows 64-bit|}}
 
{{Bullet2|Windows 64-bit|}}
 
{{Bullet2|Windows Universal|Package can be invoked on either Windows 32 or 64-bit}}
 
{{Bullet2|Windows Universal|Package can be invoked on either Windows 32 or 64-bit}}
 +
===Package Operations===
 +
A package can contain more than one Operation, each operation can be defined using one of the following methods:
  
The configured Operations can be of various Command Types:
+
{{Bullet1|Run Command|Executes a standalone command}}
 
+
{{Bullet1|Windows Installer|Executes an uploaded Windows Installer(.msi) package, The following actions are available}}
* Run Command
+
{{Bullet2|Install Software|Installs the .msi package}}
* Windows Installer - an (uploaded) .msi package can be selected with the further action of:
+
{{Bullet2|Run Program|Executes the Installed program}}
** Install Software
+
{{Bullet2|Uninstall Software|Uninstall an .msi package}}
** Run Program
+
{{Bullet2|Update Software|Update an Installed .msi package}}
** Uninstall Software
+
{{Bullet1|Windows Executable|Executes a windows executable}}
** Update Software
+
{{Bullet1|Batch Script|Excutes a Windows batch (.cmd or .bat) script}}
* Windows Executable
+
{{Bullet1|Windows PowerShell|Execute a Windows Powershell script}}
* Batch Script
+
{{Bullet1|PowerShell Core|Execute a Windows Powershell Core script}}
* Windows PowerShell
+
* PowerShell Core
+
* ...more to be added (SSH/shell etc)
+
  
 
[[File:ITOMPackageOperation.png|800px|ITOM Package Operation]]
 
[[File:ITOMPackageOperation.png|800px|ITOM Package Operation]]

Revision as of 00:36, 27 March 2020

Home > Administration > ITOM > Package Creator Index

Introduction

The Package Creator allows you, with the necessary programming background and ability, to create your own Operations within Packages. The Package Creator provides the tools to create a package that can be made up of various scripts or an executable. These include:

  • Command Line
  • Batch Script
  • Powershell
  • Windows Installer / Executable

Each package can be configured to have one or more operations, of which can execute any any one of the above items.

Related Articles

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

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)

Create a Package

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. An interface is also provided to allow for various file types to be created via the browser.

Supported File Types

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

Some of the supported file types require disabling security.fileUploadRestriction.entity.fileAttachments.enable or remove the extensions from the security.fileUploadRestriction.entity.fileAttachments.types list. .

Package Properties Form View

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

Package Operations

A package can contain more than one Operation, each operation can be defined using one of the following methods:

  • Run Command
Executes a standalone command
  • Windows Installer
Executes an uploaded Windows Installer(.msi) package, The following 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
  • Batch Script
Excutes a Windows batch (.cmd or .bat) script
  • Windows PowerShell
Execute a Windows Powershell script
  • PowerShell Core
Execute a Windows Powershell Core script

ITOM Package Operation

Depending on the selection you will, invariably, be able to select or type the name of the file to run and give the command line Options/Arguments. Input Parameters (similar to BP) can be set for a particular Operation (given a default value as well) which can be passed to the command line arguments in the following format:

{param.input_parameter_name}
For ping someone might use:
-n 2 "{param.host}"

A default value and a hint can be set for the Input Parameter. If the Input Parameter is set as sensitive (struck out eye), then the parameters will be encrypted in transmission as the Credentials are.

Information
  • the parameters are substituted, the character escaping needs to be handled by the developer.
  • It might be that n/m-dash are substituted 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).

Baselining

In order to keep track of your package developments, you will invariably be working on a Draft. Once you are happy with your draft, baseline the draft. A new version will become the new published version of the package and ALL existing scheduled jobs using operations from the package will be using this new package.

Information
when the Baseline action is clicked, the resulting context will be left in Draft mode. Select a specific version before releasing a home-baked creation to the world (by packaging it).

To recognise in what developing context is, look for View Draft button and the sub-header on the page which states the version number before (Readonly Baseline) .

ITOM Package Baseline

Use the down-arrow next to the Baseline button to select the between the different versions of your package - this can be used to compare those versions.

ITOM Package Baseline Version Selection

There are various actions you can select from on a particular baseline:

  • Package and Install
this will set the current baseline up as the active baseline for existing items on the Job Scheduling
  • Package and Download
this will result in a .pkg being downloaded which can be shared and uploaded in the Installed Packages section

ITOM Package Baseline Options

Personal tools
Namespaces

Variants
Views
Actions
Navigation
Tools