// removed jquery ui css and js

Deployment Export/Import

Overview

An application file that was exported by the CloudCenter platform can be imported into the same or different CloudCenter platform if the cloud environment is one of the clouds identified in the Restrictions section below:

  • The export deployment feature allows you to export applications from a deployed CloudCenter environment to a storage system.

  • The import deployment feature allows you to import applications from a storage system to another CloudCenter environment.

The deployment export/import feature includes the following details:

  • Deployment details:
    • The running deployment details.
    • Underlying OS (ability to select specific instances supporting this application).
    • Configuration profile details (network architecture, specific host and instance configuration, application configuration, information to support the application migration to another supported cloud).
  • Storage system details:
    • Refers to a networked cloud or a separate storage device specified by the user.
    • The exported application is stored as a single archive.
  • Export details:
    • Exported as a set of files to the target folder or repository specified in the CCM UI or API.
    • Once exported, you can manually copy the files to the target environment and import the application deployment within that environment.
    • The CloudCenter platform handles each image based on the associated cloud provider:

Availability

The Deployment Export/Import feature is available in CloudCenter 4.5.7 and 4.8.2.

Restrictions

  • Only available for AWS, VMware, and OpenStack clouds.
  • Transient CPU and memory states are not preserved.
  • VM Snapshot migration is only supported within the same cloud family.
    • The base image or VM snapshot can only be imported to the SAME cloud family. For example, an Amazon image might be exported to and imported from an Amazon Gov Cloud, but not a VMware cloud.
    • The VM snapshot should only be applied to non-clustered tiers or clustered tiers with VMs having homogeneous configurations.
    • The license handling is different for each OS. You may need to reapply licenses on the target cloud, and this task must be done manually.
    • The Windows image requires the same AD and user SSID to exist in the target environment.
    • The data on attached volumes is not exported.
    • Even a minor difference on the base OS can result in an image boot failure.

Requirements

  • Configuration Properties: Verify that the following properties are set in the /usr/local/cliqr/.config-repo/cloudcenter-cis.properties file:

    rabbit.cis.exchange=cliqr.cis.exchange
    rabbit.cis.binding.queue=cliqr.cis.queue
    rabbit.cis.routing.key=cliqr.cis.ke
  • Amazon:
    • You must manually grant image permissions to the target account when importing Amazon images.
    • Granting image permission requires ownership of the Amazon Machine Image (AMI).

Export Approaches

You can use one of two approaches when you export applications:

  • Component-Based Export – The implications of using this approach are:
    • Uses the base image with the OS.
    • The underlying OS on which the service runs can sometimes vary between the source and target environment.
    • Suitable for multi-tier applications and cross-cloud environments (requires knowledge of the CloudCenter application configuration procedures and processes).
    • If the same service is available on the target cloud, the application package and data can be exported from the source environment and imported to the target environment.
  • VM Snapshot Export – The implications of using this approach are:
    • Uses the endpoint service (pre-existing service that does not require provisioning).
    • Only possible if the application is tightly coupled with the underlying OS.
    • The application image of VM snapshot is exported from the source cloud and imported into the target cloud.

Application Tier Options

The application may have multiple application tiers. Each tier may be one of the following types:

  • Component-Based Tiers or VM Snapshot Tiers (one or the other, not both): In this case, the exported file can include:
    • The service definition.
    • (Optional) The pre-migration script to backup data from the source and restore to the target environment.

  • Component-Based Tiers and VM Snapshot Tiers (mixed tiers): A multi-tier application can have application tiers with mixed tier types. Depending on each application tier type, you must use different export options.

Permissions

You can only use the export and import functionality if your user role was assigned the required permissions by your tenant admin for the following resources

  • Permission Control > Deployment Permissions for the application to be exported/imported.
  • User Role Export/Import Permissions – As an admin, you can configure permissions for any user to export/import applications by navigating to CCM UI > Admin > Roles and clicking Edit for the required user. Be sure to select the check box to Import Deployment and/or Export Deployment depending on the permission required for this user. See Permission Control > Tenant Owner Permission Nuances for additional context.

Export Process

To export an application deployment from one CloudCenter environment to another, follow this process.

  1. Ensure that you have the permission required to export this application deployment as identified in the Permissions section above.
  2. Log into the CCM UI and navigate to the Deployments > Applications Deployments tab.
  3. Select Export to Repository from the Actions dropdown for this application deployment. The Export Deployment Name popup displays.
  4. In the Export Deployment Name popup, provide the following information:
    1. From the Export Data Location dropdown, select the FTP or S3 repo location (a writable repo with a relative path to which the exported file (archive) must be downloaded.
    2. For the selected repo location:
      1. Provide a path and/or folder or the username for the selected repo location.
      2. (Optional) The exported application file can be encrypted and password protected. If so, provide and confirm the password in the Encryption Password field.
    3. Select Component Based (default) or VM Snapshot.
    4. (If you select Component Based) Identify the information to be included in the Application Export:
      1. Identify the metadata attributes for each tier attribute.
        • Base Image — If checked, the images that the services depend on are also exported.
        • Service Definition — If checked, CloudCenter service definition is exported. If you additionally select the Base Image option, the corresponding image is also exported.
        • Application data backup — If checked, the data backup script is run and the backup data is persisted in the repository for future restoration.
  5. Click Export.

    Be aware that the application VM may be suspended when the VM snapshot is being retrieved and resumes running as soon as this task is completed.

    If the communication between the CCM and CCO has a problem, the job/deployment status may be stuck at the Exporting level. In this case, navigate to the Deployments > Applications Deployments tab and select Refresh Status from the Actions dropdown for this application deployment. This action restores the status to Deployed if the export task is in the Finished/Canceled/Error state.

View Status

Once you export the image, you can view the status as follows:

  • Click the View Status button that appears with the success message to view the status for all export tasks.
  • Click the info icon to view the progress of all Export requests.

    Either way the Export (or Import) information is displayed as follows:

Application Export Package Format and Contents

The application export package is a collection of files that are compressed, and optionally encrypted by a user specified password. A sample format for this compressed file is displayed in the following example.

/manifest.json
/jobs.json
/cloud_images.json
/logical_images.json
/services.json
/instance_types.json
/profile.zip
/artifacts
    /<tierName1>/                      
		/someapp1.war                          
		/someapp1a.war                        
		/...
	/<tierName2>/                          
		/someapp2.war
		/someapp2a.war                        
		/...
    /...
/backups   
	/<tierName1>/                         
		/file1                          
		/file2                           
		/... 
	/<tierName2>/                          
		/file3
		/file4                       
		/...
    /...
/svcbundles
    /<svcName1>/                       
		/svcfile1                      
		/svcfile2                       
		/...
    /<svcName2>/                     
  		/svcfile1                       
		/svcfile2                        
		/...
    /...
/svclogos  
	/<svcname1>.jpg 
	/<svcname2>.png
    /...
/images  
	/<imagename1>.img  
	/<imagename2>.img
    /...
File/FolderDescription
manifest.json

This file contains the metadata information for the application deployment:

  • Application deployment name
  • Cloud Family name
  • Tier information
  • Image information
  • Service information
  • Reference to jobs – jobs.json file
  • Reference to cloud images – cloud_images.json file
  • Reference to logical images – logical_images.json file
  • Reference to service definitions – services.json file
  • Reference to instance type definitions – instance_types.json file
  • Reference to application profile – profile.zip file
jobs.json

The JSON file containing the original deployment parameters.

cloud_images.json

The JSON file containing entries of image file names.

logical_images.json

The JSON file containing logical images and their image mapping information.

services.json

The JSON file containing service definition information.

instance_types.jsonThe JSON file containing cloud instance type definition information.
profile.zip

The ZIP file containing the application profile details. It captures the application stack, topology, settings, and reference to application specific artifacts such as package, setup and configuration scripts, and so forth.

svclogos

The folder containing the service logo files.

svcbundles

The folder containing the service bundle files.

artifacts/...

The folder containing the application artifacts such as application packages.

backups/...

The folder containing the application backup data files.

images/...

The folder containing the exported physical cloud image files.

JSON Schema

The JSON_Schema for the manifest.json file is displayed in the following example:

 Click here to expand...
JSON Schema for the manifest.json File
 {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Manifest schema.",
  "description": "An explanation of Manifest schema",
  "properties": {
    "cloudFamily": {
      "type": "string",
      "description": "Cloud Family Identifier"
    },
    "appName": {
      "type": "string",
      "description": "Application Name"
    },
    "deploymentName": {
      "type": "string",
      "description": "Deployment Name (a.k.a. Job Name)"
    },
    "appVersion": {
      "type": "string",
      "description": "Application Version"
    },
    "tierInfos": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Application Tier Metadata"
        "properties": {
          "tierName": {
            "type": "string",
            "description": "Tier Name (in application profile)"
          },
          "instanceType": {
            "type": "string",
            "description": "Tier instance type of the original deployment"
          },
          "serviceId": {
            "type": "string",
            "description": "Service Identifier"
          },
          "ipAddresses": {
            "type": "array",
            "description": "Internal IP addresses of the VMs in the tier",
            "items": {
              "type": "string",
            }
          },
          "secondaryIpAddresses": {
            "type": "array",
            "description": "External IP addresses of the VMs in the tier",
            "items": {
              "type": "string",
            }
          },
          "imageName": {
            "type": "string",
            "description": "Logical Image Name"
          },
          "imageId": {
            "type": "string",
            "description": "Physical Image ID"
          },
          "launchUserName": {
            "type": "string",
            "description": "Launch User Name of the VM"
          },
          "backupFiles": {
            "type": "array",
            "description": "Application Data Backup File Names",
            "items": {
              "type": "string",
            }
          },
          "repositoryItems": {
            "type": "array",
            "description": "Repository Item mappings",
            "items": {
              "type": "object",
              "description": "Repository item mapping entry"
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Original repository item path"
                },
                "path": {
                  "type": "string",
                  "description": "Exported repository item path"
                }
              },
              "required": [
                "key",
                "path"
              ]
            }
          },
          "takingSnapshot": {
            "type": "boolean",
            "description": "Export option -- is taking snapshot for this tier?"
          },
          "takingBaseImage": {
            "type": "boolean",
            "description": "Export option -- is exporting images for this tier?"
          },
          "takingServiceDef": {
            "type": "boolean",
            "description": "Export option -- is exporting service definition for this tier?"
          },
          "takingAppDef": {
            "type": "boolean",
            "description": "Export option -- is exporting application artifacts for this tier?"
          },
          "takingBackup": {
            "type": "boolean",
            "description": "Export option -- is doing data backup for this tier?"
          }
        },
        "required": [
          "tierName",
          "instanceType",
          "serviceId",
          "ipAddresses",
          "imageName",
          "imageId",
          "launchUserName",
          "repositoryItems",
          "takingSnapshot",
          "takingBaseImage",
          "takingServiceDef",
          "takingBackup"
        ]
      }
    },
    "imageInfos": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Physical Image Information"
        "properties": {
          "imageId": {
            "type": "string",
            "description": "Physical Image ID"
          },
          "imageType": {
            "type": "string",
            "description": "Original image or snapshot"
          }
        },
        "required": [
          "imageId",
          "imageType"
        ]
      }
    },
    "serviceInfos": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Service Metadata",
        "properties": {
          "serviceId": {
            "type": "string",
            "description": "Service ID"
          },
          "serviceLogo": {
            "type": "string",
            "description": "Service logo file name"
          },
          "serviceBundle": {
            "type": "string",
            "description": "Service bundle relative path"
          },
          "externalBundle": {
            "type": "null",
            "description": "External service bundle relative path"
          },
          "repositoryItems": {
            "type": "array",
            "description": "Repository Item mappings",
            "items": {
              "type": "object",
              "description": "Repository item mapping entry"
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Original repository item path"
                },
                "path": {
                  "type": "string",
                  "description": "Exported repository item path"
                } 
              },
              "required": [
                "key",
                "path"
              ]
            }
          },
          "images": {
            "type": "array",
            "description": "Supported logical image names"
            "items": {
              "type": "string",
            }
          },
          "defaultImage": {
            "type": "string",
            "description": "Default logical image name"
          }
        },
        "required": [
          "serviceId",
          "serviceLogo",
          "images",
          "defaultImage"
        ]
      }
    },
    "repositoryItems": {
      "type": "array",
      "description": "Repository Item mappings",
      "items": {
        "type": "object",
        "description": "Repository item mapping entry"
        "properties": {
          "key": {
            "type": "string",
            "description": "Original repository item path"
          },
          "path": {
            "type": "string",
            "description": "Exported repository item path"
          }
        },
        "required": [
          "key",
          "path"
        ]
      }
    },
    "jobsFile": {
      "type": "string",
      "description": "Deployment definition json file"
    },
    "cloudImagesFile": {
      "type": "string",
      "description": "Cloud image registry json file"
    },
    "logicalImagesFile": {
      "type": "string",
      "description": "Logical image definitions json file"
    },
    "servicesFile": {
      "type": "string",
      "description": "Service definitions json file"
    },
    "instanceTypesFile": {
      "type": "string",
      "description": "Instance type definitions json file"
    },
    "profileFile": {
      "type": "string",
      "description": "Application profile zip file"
    },
    "artifactsFolder": {
      "type": "string",
      "description": "Folder to store application artifacts"
    },
    "serviceBundlesFolder": {
      "type": "string",
      "description": "Folder to store service bundle files"
    },
    "serviceLogosFolder": {
      "type": "string",
      "description": "Folder to store service logo files"
    },
    "imagesFolder": {
      "type": "string",
      "description": "Folder to store cloud image files"
    },
    "backupsFolder": {
      "type": "string",
      "description": "Folder to store application backup files"
    }
  },
  "required": [
    "cloudFamily",
    "appName",
    "deploymentName",
    "appVersion",
    "tierInfos",
    "imageInfos",
    "serviceInfos",
    "repositoryItems",
    "jobsFile",
    "cloudImagesFile",
    "logicalImagesFile",
    "servicesFile",
    "instanceTypesFile",
    "profileFile",
    "artifactsFolder",
    "serviceBundlesFolder",
    "serviceLogosFolder",
    "imagesFolder",
    "backupsFolder"
  ]
}

Log Activity

The following events are logged for the export/import activities:

Resource

Event

Severity

Description

Application



AppImported

Info

An application profile is imported successfully

AppImportError

Error

An application profile import failed: <reason>

AppExported

Info

An application profile is exported successfully

AppExportError

Error

Application profile export error: <reason>

Image




ImageMapImported

Info

Image mapping information is imported

ImageMapImportError

Error

Image mapping import failed: <reason>

ImageMapExported

Info

Image mapping information is exported

ImageMapExportError

Error

Image mapping export failed: <reason>

Service








ServiceImported

Info

Service definition is imported

ServiceImportError

Error

Service definition import error: <reason>

ServiceExported

Info

Service definition is exported

ServiceExportError

Error

Service definition export error: <reason>

ServiceBundleImported

Info

Service bundle is imported to repository <repo_name>

ServiceBundleImportError

Error

Service bundle import error: <reason>

ServiceBundleExported

Info

Service bundle is exported to repository <repo_name>

ServiceBundleExportError

Error

Service bundle export error: <reason>

Repo




PackageImported

Info

Package is imported to repository <repo_name>

PackageImportError

Error

Package import to repository <repo_name> error: <reason>

PackageExported

Info

Package is exported from repository <repo_name>

PackageExportError

Error

Package export from repository <repo_name> error: <reason>

Deployment




DeploymentExported

Info

Deployment information is exported

DeploymentExportError

Error

Deployment export error: <reason>

DeploymentMigrated

Info

Deployment is migrated to cloud <target_cloud>

DeploymentMigrateError

Error

Deployment migrate error: <reason>

See Locate Log Files for additional context on log files. 

Import Process

To import an application deployment from one CloudCenter environment to another, follow this process.

  1. Ensure that you have the permission required to import this application deployment as identified in the Permissions section above.
  2. Log into the CCM UI and navigate to Applications > Applications Profiles.
  3. Click the down arrow icon and select the Repository (Migrated Bundle) option. The Import Application popup displays.
  4. Enter the repository location from which to import the file and provide the user credentials for this repository.

    Be aware that you must provide the corresponding exportId in the path/folder. For example, if your exported ID is 39, and your folder location is NOV/30/CC1, then you must provide the path/folder as NOV/30/CC1/39 as displayed in the following image:

  5. Click Next. The Import Application Name popup displays.
  6. Update the information for the file to be imported and add specify the path for the scripts or the jar files in the Artifact Repository folder field.
  7. Click Import. The Applications Profiles page refreshes to display the status of the import.

Import Nuances

You can only import an application if it meets the following requirements:

  • The application is deployed successfully
  • The application has been exported successfully

Be aware of the following nuances when you import applications:

  • An imported application can be deployed with or without the parameters that were configured when this application was exported.
  • To deploy this application using the imported parameters, access the CCM UI > Applications tab and select Deploy with Import Parameters from the dropdown list. The Deploy Application Name page displays.

  • If you deploy and application, using the imported parameters, the Terminate Protection checkbox in the Deploy page is enabled by default. See Termination for additional context.

  • When you import applications, you have multiple options:
    • Import Service: By checking this box, you instruct the CloudCenter platform to import the application along with the service(s) defined when the application was exported.
    • Remap Service: By checking this box, you instruct the CloudCenter platform to import the application along with the service(s) defined when the application was exported – however, you choose to remap the tier using your own OS and not the OS with which this application was exported.
    • Import Service with the exported base image: If you are importing the base image(s) and the service(s) when the application was exported, then you see the additional Import Application - Image Options popup where you can select Remap Image or the Import Image for each tier in this application.  
      If you select the Import Image checkbox, you must provide the Image Name as displayed in the example above.
  • Application Data Backup: Check this box if you want to use the running data (for example, the database records, configuration backup, and so forth) to export the deployment with the intention to restore it at some point.

Abort and Delete Export/Import Operations

After you export/import an application, you have the opportunity to abort the operation.

To abort an export/import that is in progress, follow this procedure.

  1. Click the View Status button in the green status bar at the top of the CloudCenter page.
  2. In the Exports (or Imports) pop up, click the black X next to the required task.
  3. In the Cancel Export (or Import) popup, click OK.
  4. The Exports (or Imports) popup refreshes to display the aborted export (or import) operation.
  5. Click the Delete icon to delete this export (or import) operation.


  • No labels
© 2017-2018 Cisco Systems, Inc. All rights reserved