ITOM Package Creator Quick Guide

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

Introduction

Hornbill ITOM provides you with the ability to create your own user-defined packages, of which you can use to create IT Automations and enhance Runbooks processes. This guide will take you through the basics of creating the different types of packages that are available, publishing and executing them. Packages can be as simple operation such as executing an OS command or executable thru to the creation of a complex script.

Packages contain a number of operations that provide some functionality to be used within an IT Automation. In general, the operations contained within a package would relate in some form, i.e User Account Management (Create, Delete, Disable, Enable, etc.). However, it is completely up to yourself what operations are contained within a package. You could, for example, have a package called toolbox, which contains operations for User Management, TCP/IP Utilities, File Management etc. This would no doubt become a little confusing and difficult to manage in the long term.

Package operation command types:

Related Articles

  • Run an OS Command
  • Run a Windows Installer
  • Run a Windows Executable
  • Batch Script
  • Windows Powershell
  • Powershell Core
  • Linux Shell Script
Information
Although no technical skills will be required to follow this guide, further knowledge in the relevant areas will be required in order to get the best out of these features successfully.

Run a Command

  1. From the ITOM page select Package Creator

  2. Click the New Pacakge button NewPackageButton.png

  3. Enter a Package name: TCP Utilities

  4. Set Target OS to Windows Universal

  5. Click Add Operation button

  6. Enter the following details:

    1. Operation: Ping

    2. Description: Ping a device using the parameters -n, host

    3. Command Type: Run Command

    4. Command: cmd /c ping.exe

    5. Timeout(secs): 60

    6. Options/Args: -n {param.count} {param.host}

  7. Click Add Parameter button

  8. Set the following attributes:

    1. Required

    2. Number

    3. Parameter Name: count

    4. Default value: 3

    5. Hint: Number of echo requests to send.

  9. Click Add Parameter button

  10. Set the following attributes:

    1. Required

    2. string

    3. Parameter Name: host

    4. Hint: Target device hostname.

  11. Click Apply

  12. Click Baseline button

  13. Select Version 1 via the Drop Down Adjacent to the Baseline button

  14. Click Package and Install drop down, and select Package and Install

Executing the Package Operation

  1. Navigate to (Home > ITOM > Job Queue)

  2. Click Create New button, and select IT Automation Job

  3. Select Run Package: private:{instance-name} > General Purpose > TCP Utilities (Version 1)

  4. Click Apply

  5. Enter the following details:

    1. Name: Ping Computer

    2. Run Operation: ping

    3. Site Target: Server | <SIS Server>

    4. Target Machine: Inventory |<target computer>

    5. Admin Credentials: Network Admin

  6. Click Create

</div

Windows Installer Package

  1. From the ITOM page select Package Creator
  2. Click the New Package NewPackageButton.png button
  3. Enter a Package name: Software Installer
  4. Set Target OS to Windows Universal
  5. Click Upload File PacakgeUploadButton.png button
  6. Select the following file:

C:\ Documents\ITOM\Packages\Demo.msi

  1. Click on Package Info

  2. Click Add Operation button

  3. Enter the following details:

    1. Operation: Install

    2. Description: Install Windows application

    3. Command Type: Windows Installer

    4. Package: Demo.msi

    5. Action: Install Software

  4. Click Add

  5. Click Add Operation button

  6. Enter the following details:

    1. Operation: Uninstall

    2. Description: Uninstall Windows application

    3. Command Type: Windows Installer

    4. Package: Demo.msi

    5. Action: Uninstall Software

  7. Click Add

  8. Click Baseline button

  9. Select Version 1 via the Drop Down Adjacent to the Baseline button

  10. Click Package and Install drop down, and select Package and Install

Execute Installation Job

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
  3. Select Package:

private:{instance-name} > General Purpose > Software Installer (Version 1)

  1. Click Apply

  2. Enter the following details:

    1. Name: Software Installation

    2. Run Operation: Install

    3. Site Target: Server | <SIS Server>

    4. Target Machine: Inventory |<target computer>

    5. Admin Credentials: 'Network Admin

  3. Click Create

  4. Verify that the following software exists on the target:

Name: Generic Business Application

Publisher: Acme Software Ltd

Execute Uninstallation Job

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
  3. Select Package:

private:{instance-name} > General Purpose > Software Installer (Version 1)

  1. Click Apply

  2. Enter the following details:

    1. Name: Software Uninstallation

    2. Run Operation: UniInstall

    3. Site Target: Server | <SIS Server>

    4. Target Machine: Inventory |<target computer>

    5. Admin Credentials: Network Admin

  3. Click Create

  4. Verify that the following the software no longer exists on the target:

Name: Generic Business Application

Publisher: Acme Software Ltd

Windows Executable Package

From the ITOM page select Package Creator
  1. Click the New Package NewPackageButton.png button
  2. Enter a Package name: Windows Executable
  3. Set Target OS to Windows Universal
  4. Click Upload File button
  5. Select the following file:

C:\ Documents\ITOM\Packages\ShowHarry.exe

  1. Click on Package Info

  2. Click Add Operation button

  3. Enter the following details:

    1. Operation: Show Harry

    2. Description: Windows Executable - Show Harry.exe

    3. Command Type: Windows Executable

    4. Run File: ShowHarry.exe

  4. Click Add

  5. Click Baseline button

  6. Select Version 1 via the Drop Down Adjacent to the Baseline button

  7. Click Package and Install drop down, and select Package and Install

Execute Job

  1. Navigate to (Home > ITOM > Job Queue)

  2. Click Create New (+) button, and select IT Automation Job

  3. Select Run Package: private:{instance-name} > General Purpose > Windows Executable (Version 1)

  4. Click Apply

  5. Enter the following details:

    1. Name: Windows Executable

    2. Run Operation: Show Harry

    3. Site Target: Server | <SIS Server>

    4. Target Machine: Inventory |<target computer>

    5. Admin Credentials: Network Admin

  6. Click Create

Batch Script Package

TBC

PowerShell Script Package

  1. From the ITOM page select Package Creator

  2. Click the New Package button NewPackageButton.png

  3. Enter a Package name: Disk Information

  4. Set Target OS to Windows Universal

  5. Click the Add new File Button

  6. Enter filename as: diskinfo.ps1 and click Apply

  7. Click Add Operation button

  8. Enter the following details:

    1. Operation: Get Details

    2. Description: Information for a Selected Disk Drive

    3. Command Type: Windows PowerShell

    4. Set the Script to: diskinfo.ps1

    5. Timeout(secs): 60

Input Parameters

  1. Click Add Parameter button

  2. Set the following attributes:

    1. Required

    2. Number

    3. Parameter Name: Dirve

    4. Default value: C

    5. Hint: Enter the Drive Letter.

Output Parameters

  1. Click Add Parameter button

  2. Set the following attributes:

    1. Required

    2. string

    3. Parameter Name: outcome

    4. Click Add

  3. Add the following optional string output parameters:

    1. Label
    2. Size
    3. FreeSpace
    4. errors
  4. Click Apply

Add Script Content

  1. Click on the script driveinfo.ps1
  2. Enter the following code:
  3. # Example PS ITOM Package Script
    # Input Parameters
    Param (
        [String]$Drive = "C"
    )
    
    # Operation Logic
    try {
    $volinfo = Get-Volume -DriveLetter $Drive -ErrorAction STOP
    } catch {
        # Command failed exit with error mesage
        Write-Output "{{SISJobOutputParameterStart:outcome}}Fail{{SISJobOutputParameterEnd}}"
        Write-Output "{{SISJobOutputParameterStart:errors}}$_.Exception.message{{SISJobOutputParameterEnd}}"
        Exit 0
    }
    
    # Package Output Parameters
    Write-Output "{{SISJobOutputParameterStart:Label}}$($volinfo.FileSystemLabel){{SISJobOutputParameterEnd}}"
    Write-Output "{{SISJobOutputParameterStart:Size}}$($volinfo.Size){{SISJobOutputParameterEnd}}"
    Write-Output "{{SISJobOutputParameterStart:FreeSpace}}$($volinfo.SizeRemaining){{SISJobOutputParameterEnd}}"
    Write-Output "{{SISJobOutputParameterStart:outcome}}OK{{SISJobOutputParameterEnd}}"
    Exit 0
    
    
  4. Click the Save Button

  5. Click on th Package Info Entry

  6. Click Baseline button

  7. Select Version 1 via the Drop Down Adjacent to the Baseline button

  8. Click Package and Install drop down, and select Package and Install

Executing the Package Operation

  1. Navigate to (Home > ITOM > Job Queue)

  2. Click Create New button, and select IT Automation Job

  3. Name: Get Drive C Information

  4. Select Package: <instance-name> > General Purpose > Disk Information

  5. Click Apply

  6. Enter the following details:

    1. Operation: Get Details

    2. Site Target: Server | <SIS Server>

    3. Target Machine: Inventory |<target computer>

    4. Admin Credentials: Network Admin

    5. Drive: C

  7. Click Create

Linux Shell Script Package