posted

0 Comments

The more I’m working on customers upgrades and migrations, the more I’m realizing that many customers haven’t even heard about the vRealize Application Services Migration tool. In fact, shortly after the release of vRA 7.2 we released the vRealize Application Services Migration tool as well. Many of you know that the reason for developing the vRealize Automation migration tool was to “workaround” all the upgrade blocker issues like CCC, vCD or Application Services blueprints. After the vRA Migration tool was released all the physical endpoints and Application Services blueprints were just skipped without braking the migration process. But then you had to manually go into vRA and re-create all applications that you have created in the vRealize Automation Application Services (formerly known as vCloud Application Director or just AppD), using the new vRA components – Composite Blueprint and Software components.

That’s why I think that the Application Services Migration Tool need some more publicity, because it’s a great feature and can help the customers to migrate their multi-tier applications from vRealize Application Services 6.2.x to vRealize Automation 7.1 and later and easily convert them into Composite Blueprints with just few commands.  But what this Application services migration tool actually does? It converts Application services data into a format that is understandable by the vRealize Automation.  Applications and deployments profiles will be converted into Composite blueprints; services, external services and application components into software. The tool migrates also the properties and scripts to the corresponding software. All the dependencies between the VMs, software components and property expressions remain as they are in the Application Services Director.

This tool has some limitations that need to be known before starting using it.

  1. The target vRA environment where you import the Application Services blueprints should be migrated 7.1 or later version, not an upgraded or clean installed.
  2. It can export and import the blueprints only one by one, version by version. Grouping of blueprint versions into one package and exporting them is still not possible, but let’s remember that his is just the v1.1.0.
  3. You should keep in mind that the following objects are not migrated with this tool, some of them like e.g the Artifacts need to be migrated manually:
  • Artifacts
  • Artifact repository
  • Tags
  • Operating systems
  • Tasks
  • Policies
  • Logical templates
  • Templates with pre-installed services
  • Cloud provider
  • Deployment environment
  • Global Properties at deployment environment
  • Update, rollback, and teardown profiles
  • Deployment profiles with EC2 (Amazon) Cloud Provider Type
  • Deployment profiles with vCloud 5.1.2-5.5 Cloud Provider Type

In this blog post I want to show you the steps and some tricks for easily blueprint migration.  I’m currently using the following versions of the products:

  • vRealize Automation Application Services v6.2.4,
  • vRealize Automation (vCAC) v.6.2.4 migrated to vRealize Automation v7.3
  • vRealize Application Services Migration Tool 1.1.0
  • vRealize CloudClient 4.4.0

You can find the Application Services Migration tool and the CloudCloient tool on the vRealize Automation download page under the product “vRealize Automation” in the section “Drivers & Tools”.

 

Step1 # Exporting applications from Application Services Director

 

  • Download Darwin cli to your local machine from: http://<ApplicationServicesServerIP>/tools/darwin-cli.jar
  • Open a command prompt to where Darwin-cli.jar is located.
  • Java –jar darwin-cli.jar
  • Note: If your local machine is running Linux make the file executable using the following command: Chmod +x darwin-cli.jar
  • login to AppD appliance using following command:

login –serverUrl  https://<AppD-Server-URL>:8443/darwin –username mkoganti.admin@sqa.local –password Dynam1c0ps –tenantId sqa

where:

  • serverUrl is the IP address or FQDN of the Application Services Server, followed by the port (8443) and the default tenant
  • username is the service user name used for creating and administering the applications.
  • Password is the password for this service user (I know it’s in plain text, which is a bit annoying but it is what it is)
  • tenantId is the tenant from where you will export the application blueprints
  • export the application blueprint (in my case it is a DukesBank application) using the following command:

export-package –exportFilePath C:\AppD\export\DukesWithPassword.xml –fromGroup vCenter_bg –applicationVersion “Clustered Dukes Bank App:2.1.0” –serviceVersion “Apache:2.2.0,JBoss on Linux:5.1.0,MySQL:5.0.0” –uncompressed –substituteSecuredProperties true

where:

  • exportFilePath is the path to your local machine, where the package will be exported. The folders need to be pre-created.
  • fromGroup – the business group related to this blueprint
  • applicationVersion – this is the version of the Application Blueprint. Note: name and version should be separated by colon, without any space in between, otherwise the export will fail
  • serviceVersion – name and version of each software components. Note: name and version should be separated by colon, without any space in between, otherwise the export will fail
  • uncompressed – optional parameter
  • substituteSecuredProperties – must be set to true so that passwords are exported with a default value. If not set to true, the values of all secured properties are removed. If any passwords are a required property and exported without this option, the passwords will not have a value in the exported file and consequently the converted vRealize Automation ZIP file will not have a value for these passwords. This causes an error message to appear when you import the ZIP file with CloudClient

After the export has been completed successfully, you should the XML file DukesWithPassword.xml in your export folder (in my case it’s the C:\AppD\export\ – folder)

I will show you how to easily find the information you need:

  • Select the application you want to export and click on it
  • When you click on the blueprint, next to the arrow on the top left hand side you will find the exact name that you need to provide after the flag applicationVersion, the version should match exact to the Application Version which you would like to export
  • Type the business group name

 

Please note that your version of the application blueprint should have at least one deployment profile otherwise the export will fail.

  • Click on the schema on the right side to find the appropriate information that you need to provide after the serviceVersion flag:
  • Click on each Software Component and node the exact Library Service name and Version.

Please note: for the Version you need to provide a three digits number, so if you see a version, which is only two digits long, put a zero at the end

You are almost ready to migrate your blueprint to the migrated vRA 7.x. You now only need to download all artifacts from the current content server.

  • Select the blueprint you want to migrate, then the version of the blueprint, which you have exported. Click on the deployment profile.
  • On the first step in the section VM Templates, note all vRA corresponding blueprints and click Next
  • On the next page you will find you will find all Software Components files, which are stored on darwin.server or darwin.content.server (the local Application Services Server. These files will be needed by the vRA Software components, so you need to download them all manually from the Application Service content server to a location that is visible for the vRealize Automation Server (it could be any HTTP content server, accessible by the migrated vRA 7.x).

Please note that on this page there are several links for each software component, so make sure, that you have downloaded all of them.  You can resolve many import issues after migration by pointing the blueprints to the new content server.

 

Step#2 convert .xml file to .zip file:

 

  1. Download the Migration CLI called VMware_vRealize_Application_Services_Migration_Tool_1.1.0.jar to your local machine from https://my.vmware.com/group/vmware/details?downloadGroup=VASMT_110&productId=650
  2. Extract the file and open a new command prompt to where VMware_vRealize_Application_Services_Migration_Tool_1.1.0.jar is located.

Hint: you can rename the file to migration-cli.jar

  1. Run this command replacing the values …

 

java -jar migration-cli.jar migrate —url=url —username=user_name —password=password —tenant=tenant —appdfile=file_path [–uncompressed=value]*  —outputdir=output_directory [–usemachineifreqd=value]*  [-–debug=value]*

*optional

where:

  • url is the URL of the target vRealize Automation server.
  • username is a vRealize Automation user with Service Administrator and Catalog Administrator roles.
  • password is the vRealize Automation user password.
  • tenant is the vRealize Automation tenant where you will import the blueprints
  • appdfile is path to the vRealize Application Services ZIP or XML file, which you have exported in the previous step
  • uncompressed is an optional parameter. Set to true if the vRealize Application Services file is not a ZIP file.
  • outputdir is the output folder, where the ZIP file will be stored.
  • usemachineifreqd is an optional parameter. You can find more information in the Application Services Migration Tool User Guide
  • debug is an optional parameter. If set to true, the log includes debug information.

After running the command, you should see something like this:

Don’t worry about the warnings, they are just saying that the Darwin.content server is not visible for the vRA, so many of the properties are currently not available, but you will fix is after the blueprints are imported into the vRA.

 

Step#3 : Import your .zip file to vRA 7.x

 

Before importing your .zip files, you need to modify your vRA blueprints (that are referenced by Dukes bank app) in vRA to point to a new template. Different template is needed for provisioning dukes bank with 7.x., you will need a template that has the Software agent used in vRA 7.x.  You can download the new agent by visiting this address: https://<migrated-vRA-7x>/software/index.html

I used mk-appd-test1 with 6.2.4 and centos63x64-appMigration-JRE1.6 with 7.2

Download Cloud Client from the official VMware’s download page.

  1. Cmd to location where your Cloud Client is extracted
  2. Run the following command to run the bat file bin\cloudclient.bat
  3. Once cloud client opens up, login to vRA using this command:
    vra login userpass —server <vRA-hostname-or-IP> —user service.admin@sqa.local —tenant sqa
  4. When prompted, provide password for user service.admin
  5. Trust the certificate (Y/N)
  6. Trust IaaS Certificate (Y/N)
  7. Use below command to check the contents in vRA vra content list

You should see a list like this one:

 

  1. Run the following command to import content to vRA.

vra content import —resolution OVERWRITE —path C:\AppD\output\ClusteredDukesBankApp210_mk_dukes.zip –precheck WARN

NOTE: service.admin@sqa.local (user who is performing the import) should have Software Architect role and Application architect role in vRA 7.2

Where:

  • resolution – means if the command should overwrite or not if there is such blueprint in the target environment
  • path – is the folder where the ZIP file created in the previous step is located
  • precheck WARN means to skip the warning and import it anyways

 

Step#4 : Update imported dukesbank blueprint to work with 7.2

 

  • Navigate to each software component. Delete property ‘global_conf’.
  • In the action scripts, comment out the line importing global_conf

#. $global_conf

  • Invoke canvas of dukes bank application. Click on the software component.

Wherever it refers to darwin.server or darwin.content.server url(Ex: http://${Darwin.Content.ServerIP} /artifacts/services/jboss/cheetah-2.4.4.tar.gz) replace the IP or hostname with the IP or hostname of the new HTTP content server.

  • Save the blueprint. Now your blueprint is ready for provisioning.

 

If you are interested in what’s new in vRA 7.3 please check the vRA 7.3 release notes

Here is a high-level blog introducing the vRA 7.3, including all new features.