Using eZDeploy import from the command line
The eZDeploy import feature allows you to import the BMC Cloud Lifecycle Management business service, service offering, service blueprint, and software package as an eZDeploy package in both non-interactive (using an answer file) and interactive (using command line) mode. The following sections detail the procedures for importing eZDeploy packages from the command line.
Before you begin
Ensure that you meet the following prerequisites before importing an eZDeploy package:
- Profiles must be created in the target environment prior to importing a service blueprint or a service catalog. See Managing-eZDeploy-profiles for details.
- BMC Cloud Lifecycle Management is installed and configured.
If you are specifying an entitlement package during import, you must have created one Global entitlement package on the BMC Cloud Lifecycle Management environment where you are importing the service catalog.
- You have the Virtual Center (VC) server name, Virtual Center templates and the datastore name.
You have the location details (single or multiple storage) of the softwares to be installed.
- BMC Server Automation console is installed on the same computer on which you would be running the eZDeploy utility.
- BMC Server Automation is configured:
- The VC server is added and registered in BMC Server Automation.
- You have run the Distribute Configuration Object (also known as DCO) job.
To view help for the import command
Run the following command to view the help for the import command:
Command: import = Import Service/Service Offering/Blueprint/Software
Packages as eZDeploy Package/s.
Usage: import [options]
[options] [example]
-softwarepackages import -softwarepackages <softwarepackages-name>
-file import -file <file-name>
-blueprint import -blueprint <blueprint-name>
-prefix import -prefix <prefix-name>
-serviceoffering import -serviceoffering <serviceoffering-name>
-prompt import -prompt <prompt-name>
-profile import -profile <profile-name>
-service import -service <service-name>
-path import -path <path-name>
[options] [description]
-softwarepackages Name of Software Package/s to be imported.
[Mandatory : if it is the only one which needs to
be imported]
-file Absolute path or directory to silent answer file.
[Mandatory]
-blueprint Name of Service Blueprint to be imported.
[Mandatory : if it is the only one which needs to
be imported]
-prefix Name of the prefix to be settled or arranged in
advance of other parameter name.
[Mandatory]
-serviceoffering Name of Service Offering to be imported.
[Mandatory : if it is the only one which needs to
be imported]
-prompt If Set to 'Y' then for every duplicate option set ,
User will be prompted else duplicate option set will
be ignored.
Defaults to 'N'. [Mandatory : if prompt on duplication
set must be used]
-profile Name of the eZDeploy Profile which is going to be used.
[Mandatory]
-service Name of the service to be imported.
[Mandatory : if it is the only one which needs to
be imported]
-path Absolute import Path/Directory to which .eZ Package/s
will import.
[Mandatory : if it is the only import path that needs to
be used]
[example : importing blueprint from default directory with
profile parameter]
import -blueprint <blueprint-name> -profile <profile-name>
[example : importing service from different directory]
import -service <service-name> -path <path-name>
To import using a custom prefix
The eZDeploy utility lets you distinguish the service blueprint and service catalog components by applying your own custom prefixes during import. You can apply a custom prefix to the following artifacts of a service blueprint during import:
- Blueprint name
- Referenced blueprint name in inclusive blueprint
- Virtual Guest Package (VGP) name
- Service name in the service catalog
- Service offering name
- Option name
- Option choice name
The prefix can consist of an alphabet, number, or a combination of alphabets and numbers and must not exceed 6 characters.
To import by using a prefix, run the following command:
<path-name> -profile <profile-name> -prefix
<prefix-name>
The following table describes the input parameters:
Parameter | Description |
---|---|
{{code language="none"}} blueprint {{/code}} | Name of the BMC Cloud Lifecycle Management service blueprint Note: If you have multiple versions of the blueprint, you are prompted to select a specific version that you want to import. |
path | Absolute path to which the .eZ package is imported |
profile | (Optional) Name of the eZDeploy target profile that is created Note: If you have set a global profile you can choose to skip this parameter. |
prefix | (Optional) Prefix that is added to the beginning of the names of the blueprint artifacts |
This command imports the service blueprint with the custom prefix applied to all the artifacts. The following figure displays the custom prefix JeZ applied to the service name eZ-eZDeploy Service:
To allow duplicate option choices
You can create duplicate options while importing in a target environment if the options are already present in the target system. New options are then created with a numbered suffix when another service catalog with the same options is imported.
You can enable the duplicate option choice facility by using the prompt parameter at the command prompt when importing the .eZ file. You must set the value of this parameter to Y (to enable the duplicate option creation) or N (to disable the duplicate option creation).
If the value of the parameter is set to Y during import, the system prompts you if you want to create a duplicate option for every existing option.
To allow duplicate option choices, run the following command:
<path-name> -profile <profile-name> -prefix
<prefix-name> -prompt <prompt-name> Y
The following table describes the input parameters:
Parameter | Description |
---|---|
{{code language="none"}} service {{/code}} | Name of the service from the service catalog to be imported |
path | Absolute path to which the .eZ package is imported |
profile | (Optional) Name of the eZDeploy target profile that is created Note: If you have set a global profile you can choose to skip this parameter. |
prefix | (Optional) Prefix that is added to the beginning of the names of the blueprint artifacts |
prompt | (Optional) Parameter that allows you to choose if you want to create duplicate options |
To import a business service
To import a business service, which includes one or more service blueprints and one or more service offerings to a custom directory, run the following command:
-path <path-name>
The following table describes the input parameters:
Parameter | Description |
---|---|
profile | (Optional) Name of the eZDeploy source profile that is created Note: If you have set a global profile you can choose to skip this parameter. |
service | Name of the service from the service catalog to be imported |
path | (Optional) Directory from which the .eZ package is imported |
To import a service blueprint
To import a service blueprint, run the following command:
The following table describes the parameters:
Parameter | Description |
---|---|
blueprint | Name of the BMC Cloud Lifecycle Management service blueprint Note: If you have multiple versions of the blueprint, you are prompted to select a specific version that you want to import. |
profile | (Optional) Name of the eZDeploy source profile that is created Note: If you have set a global profile, you can skip specifying this parameter. |
To import a service offering
To import an individual service offering, run the following command:
The following table describes the parameters:
Parameter | Description |
---|---|
profile | (Optional) Name of the eZDeploy source profile that is created Note: If you have set a global profile, you can skip specifying this parameter. For more information, see the "To set a global eZDeploy profile" topic in Managing-eZDeploy-profiles. |
serviceoffering | Name of the service offering from the service catalog to be imported |
To import a software package
Perform the following steps to import a software package:
Run the following command:
import -softwarepackages <softwarepackages-name>
-path <path-name> -profile <profile-name>The following table describes the input parameters:
Parameter
Description
{{code language="none"}}
softwarepackages
{{/code}}Name of the eZDeploy package file
pathAbsolute path from which the .eZ package is imported
profile
(Optional) Name of the eZDeploy target profile that is created
Note: If you have set a global profile, you can skip this parameter. For more information, see the "To set a global eZDeploy profile" section in Managing-eZDeploy-profiles.
The BMC Server Automation artifacts (system packages, software packages, and NSH scripts, if any) are imported as shown in the figure below:
- Specify the path based on your OS when you are prompted with the following message: Enter path for unbundled softwares separated by (;)
(Microsoft Windows) Enter the path or URL on eZDeploy as a network path: //host/pathIncludingInstallerFile. For example: \\BLUEPRINT-REPO\Blueprint Software as shown in the following figure:
- (Linux) Provide the mounted path if using eZDeploy Linux version: //eZdeploy/Sample Path
- The eZDeploy utility checks for an existing installable resource (a Virtual Guest Package, or VGP) available on the BMC Server Automation Server.
- Make selection when you are prompted with the following message: Do You Want to Select Existing Virtual Guest Package ? [y/n].
- If you select y, all VGPs available on the BMC Server Automation Server are listed and you can select an ID assigned to that displayed VGP. In this scenario, you can skip step c.
- If you select n, you must create a VGP (see step c).
Create an installable resource (Virtual Guest Packages) by using the following guidelines:
- If eZDeploy detects VC Servers registered on the BMC Server Automation server and lists them on the console, enter the ID assigned to the VC Server and press Enter.
- If eZDeploy detects VMWare templates available on the VC Server and lists them on the console, enter the ID assigned to the template name that you will use for creating a Virtual Guest Package and press Enter.
- If eZDeploy detects datastores available on the VC Server and lists them on the console, enter the ID assigned to the datastore name and press Enter.
- (Optional) If your .eZ file is a Windows based service blueprint, enter the Windows license key for creating VGPs and press Enter.
- If your .eZ file is a Windows based service blueprint, enter the Administrator password (or, for blueprints on UNIX platforms, enter the root password) and press Enter.
The VGP is created and saved on the BMC Server Automation Server with the custom prefix (if specified) followed by the VGP name. eZDeploy creates the service and service offering with the custom prefix specified by you or the default prefix eZ.
eZDeploy detects and displays the existing entitlement packages on your BMC Server Automation System and prompts you to enter the assigned ID:
Select Entitlement Package from the list# :
The request definition is created and the import summary listing the successful import of the service blueprint and service catalog components is displayed in the command prompt as shown in the following figure:
Where to go from here