Working with packages

As we saw in the last section, exporting a workflow will only export it and not the objects that we used in it. Therefore, we should have a look at packages. Packages export and import all the dependent objects that are needed to run the workflow and not just a single object.

Creating a package

Before we go ahead and export a package, we have to create one, as follows:

  1. In your Orchestrator Client, make sure that you are in the Design mode.
  2. Click on Packages, Creating a package.
  3. Select Add Package, Creating a package, from the side menu.
  4. As package name, select com.packtpub.Orchestrator-essentials.
  5. You will see that a new package has been added to the end of the package list.
Creating a package

Filling a package

Now that we have created the package, we need to fill it with objects, as follows:

  1. Starting from where we left off, right-click on the newly created package and select Edit.
  2. Select Workflows.
  3. Click on the green + button.
  4. Find the InstallFreshVM workflow, mark it, and click on Select.
  5. You will now see that the workflow has been added along with all the other workflows that we used in it.
    Filling a package
  6. When you click on Actions, you will find out that a lot of actions have also been added, along with the translateOS2GuestOS that we created in Chapter 6, Advanced vRO Scripting with JavaScript. These are all the actions that are used by the other workflows that have been added.
  7. Click on Save and close to exit the workflow package and save its contents.

We have now created an Orchestrator package that contains all the spoils of our work.

Tip

It is a good idea to check all the workflows and actions that have been added to your package.

Please note that VMware suggests deleting common plug-in library actions and workflows from packages before shipping them to a client. This will make sure that a version mismatch doesn't happen.

Exporting a package

Let's export this package so that we can share it with others:

  1. Go to the Package tab and select the com.packtpub.Orchestrator-essentials package.
  2. Right-click on the package and select Rebuild package. This option will refresh the package and make sure that all the essential components are in the package. Note that this will add all the common plug-in library actions and workflows to your workflow again.
  3. Right-click on the workflow and select Export package.
  4. Click on Save.

A file named com.packtpub.Orchestrator-essentials.package will be saved to your local disk.

Exporting a package

As you can see, there are quite a lot of options for exporting. The following table summarizes what each option does:

Option

Description

Add target certificate

You can specify a recipient's certificate to make sure that only the recipient can import it.

View Contents

This is not really as restrictive as one would expect.

When you deselect this option, you will still see all the normal tabs in the workflow. The only thing that won't work is that you can't go to an element by double-clicking on it. For example, if the workflow contains an action, double-clicking on it won't open the action element. However, the action can be accessed normally, and you can see the scripting content.

Add to package

Deselecting this option will make it impossible for users to export a package that contains elements from this package. You can still create packages with elements that don't have the Add to package flag. However, you will get an error message when you try to export the package.

Edit content

Without this flag, users who import this package will not be able to edit the workflow. This flag is mostly set for all the packages that are a part of a plug-in or to make sure that changes are not possible for support reasons.

Export version history

By deselecting this option, users will not be able to export the full version history of each element. Instead, the element will be displayed in the latest version with the imported content from package remark.

Export values of the configuration settings

Deselecting this section will export the configuration and its attributes. However, it will not export their values.

Export global tags

This will export the global tag of the objects in the package.

Importing a package

Last but not least, we will import a package into Orchestrator. This is something that we really cannot showcase that much without a second Orchestrator, but we will still show it so that you know how to do it:

  1. Go to the Package tab in another Orchestrator.
  2. Click on the Import package, Importing a package.
  3. Select the file of the package that you would like to import and click on Open.
  4. The Import package wizard will show the package certificate that we created in Chapter 2, Deploying and Configuring the Orchestrator Appliance, and ask whether you would like to import this certificate only once or import and trust it. Select one:
    Importing a package
  5. You will now see a bigger window that shows all the workflows and actions that this package contains. Orchestrator checks the version numbers of the workflows and actions against the one that you are trying to import. A green arrow means that Orchestrator will import the workflow. A red one means that it won't, because the versions are the same or the signatures don't match. Grey arrows indicate that the versions match and hence, the import won't take place. You can override this selection by checking off the checkbox, but you should be careful with this. Click on Import selected elements:
    Importing a package

The package is now added to Orchestrator, and you will find it in the Package section. You will also find out that the workflow folders that you created as well as the action modules are also imported. Have a look around.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset