Create advanced dashboards with CAST and Looker Studio

This page describes how to use MConnect to generate Looker Studio dashboards from data that you collected with Google Cloud Migration Center and CAST.

Get started with MConnect by watching the tutorial.

Overview

MConnect is a command-line interface that helps you merge information from Migration Center and from static code analysis of applications performed by CAST Software. It then exports the data to BigQuery and to Looker Studio for advanced data analysis.

It assists in modernizing applications by comparing various dimensions of the transformation, such as level of effort, level of code readiness, and compute resource impact.

Before you begin

Before you use MConnect, perform the following steps:

  1. Create a Google Account and Google Cloud account.
  2. Create a Google Cloud project and enable the BigQuery and Migration Center API.
  3. Install the Google Cloud CLI on your local machine.
  4. Create a CAST Highlight report named analysisResults.csv.

Pricing

You might be billed for BigQuery, Looker Studio, and CAST, according to their respective pricing.

Generate a dashboard for your data

The following sections explain how to generate a Looker Studio dashboard for your CAST data.

Set up the tool

Before you can use MConnect, perform the following steps:

  1. If you use Linux, download the latest binary. For other OS platforms, clone the migrationcenter-utils repository and build MConnect on your local machine.

  2. Authenticate to the Google Cloud CLI:

    gcloud init
    gcloud auth application-default login
    

    Make sure that the account you're using has the necessary permissions to create and delete groups in Migration Center, and to create and delete tables in BigQuery in the project you want to use.

Upload the assets to Migration Center

Upload the assets related to the applications in your CAST report to Migration Center. If you already performed an inventory discovery for your infrastructure, you can skip this step.

For more information, see Start an asset discovery.

Create groups in Migration Center

Use the applications identified in your CAST report to create groups in Migration Center. On your local machine, run the following command:

mconnect create-groups --path=ANALYSIS_PATH --project=PROJECT_ID --region=REGION

Replace the following:

  • ANALYSIS_PATH: The path to your CAST report file.
  • PROJECT_ID: The ID of your project.
  • REGION: The region you're using for Migration Center. Only us-central1 and europe-west1 are supported.

After you create the groups, you can filter them in Migration Center using the mconnect label.

Assign assets to groups

In Migration Center, assign your assets to their corresponding application groups. You can perform this in the Migration Center UI or with the API.

Export CAST report and Migration Center data to BigQuery

Export the data from your CAST report to BigQuery:

mconnect export --path=ANALYSIS_PATH --project=PROJECT_ID --region=REGION

The command performs the following actions:

  1. It creates a new database in BigQuery called mcCast.
  2. It creates a new table in BigQuery called castResults and populates it with the CAST report data.
  3. It exports your Migration Center data to BigQuery by creating three tables called assets, groups, and preference_sets.

Create views in BigQuery

From the data you uploaded to BigQuery, create the corresponding views:

mconnect create-views --project=PROJECT_ID --dataset=mcCast

The command creates three views:

  • migrationcenterinfra_vw
  • castreadiness_vw
  • mccastreadinesscombined_vw

The output of this command provides a link to a Looker Studio report using the mccastreadinesscombined_vw view.

Set up the Looker Studio report

You can set up the generated Looker Studio report in two ways, as described in the following sections.

  1. Copy the link obtained in the previous step to your web browser.
  2. Click Save and Share, then click Acknowledge and save.

Manually copying the data

If the link provided is broken, you can manually set up the Looker Studio report using your data:

  1. In Looker Studio, open the Migration Center / CAST Analysis report.
  2. Click More options.
  3. Click Make a copy > Copy Report.
  4. In the new report, click Resources > Manage added data sources.
  5. Using the data source named McCastReadinessCombined_vw, click Edit.
  6. Provide the project ID and the dataset ID used in the previous step, and choose mccastreadinesscombined_vw.
  7. Click Reconnect, and then Apply.
  8. Click Done and refresh the page.

This creates a new report called Migration Center / CAST Analysis using your data.

MConnect reference

The following sections provide the available MConnect commands and their flags.

mconnect

Usage: mconnect [command] [args] [flags]

Available commands

create-groups
Creates a group for each CAST application in Migration Center and adds a 'mconnect' label to it.
create-views
Creates three views in BigQuery using Migration Center and CAST data.
export
Exports CAST data to BigQuery.
help
Help about any command.

Flags

-h, --help
Help for mconnect.
-t, --toggle
Help message for toggle.
-v, --version
Version for mconnect.

create-groups

Creates a group for each CAST application in Migration Center and adds the 'mconnect' label to it.

Usage: mconnect create-groups path project region [flags]

Examples

mconnect create-groups --path=path/to/cast/analysisResults.csv --project=my-mc-project-id --region=my-region1

mconnect create-groups --path=path/to/cast/analysisResults.csv --project=my-mc-project-id --region=my-region1 --ignore-existing-groups=true

Flags

-h, --help
Help for create-groups.
-i, --ignore-existing-groups
Continue if mconnect is trying to create a group that already exists in Migration Center. If set to 'true', the 'mconnect' label will be added to every group that already exists as well.
--path
The CSV file's path which contains CAST's report (analysisResults.csv). (Required)
--project
The project ID in which to create the Migration Center groups. Make sure to use the same project ID for every command. (Required)
--region
The Migration Center region in which the groups will be created. (Required)

export

Exports CAST report and Migration Center data to BigQuery. By default it will be assumed that the project and region used for Migration Center and BigQuery are the same.

Usage: mconnect export path project region dataset [flags]

Examples

mconnect export --path=path/to/cast/analysisResults.csv --project=my-project-id --region=my-region1 # the default dataset will be set to 'mcCast'.
mconnect export --path=path/to/cast/analysisResults.csv --project=my-project-id --region=my-region1 --dataset=dataset-id 
mconnect export --path=path/to/cast/analysisResults.csv --project=my-project-id --region=my-region1 --dataset=dataset-id  --force=true
mconnect export --path=path/to/cast/analysisResults.csv --project=my-project-id --region=my-region1 --dataset=dataset-id --mc-project=my-mc-project-id --mc-region=my-mc-region

Flags

--dataset
The dataset-id to export the data to. If the dataset doesn't exist it will be created. If not specified, the default name will be 'mcCast'. Make sure to use the same dataset for every command.
-f, --force
Force the export of the data even if the destination tables exist. The operation will delete all the content in the original tables.
-h, --help
Help for export.
--path
The CSV file's path of the CAST report (analysisResults.csv). (Required)
--project
The BigQuery project ID to export the data to. (Required)
--region
The BigQuery region in which the dataset and tables will be created. (Required)

Hidden flags

--mc-project
The Migration Center project ID used to export its data to BigQuery.
--mc-region
The Migration Center region from which to export the data.

create-views

Creates three views in BigQuery using Migration Center and CAST data. Provides a link for a Looker Studio report using the mccastreadinesscombined_vw view.

Usage: mconnect create-views project dataset [flags]

Views created

  • migrationcenterinfra_vw: Shows grouped asset data from Migration Center.
  • castreadiness_vw: Shows data from the CAST Analysis file.
  • mccastreadinesscombined_vw: Combines the two previous views. This view is also used in Looker Studio's Template.

Examples

mconnect create-views --project=my-project-id --dataset=dataset-id
mconnect create-views --project=my-project-id --dataset=dataset-id --force=true

Flags

--dataset
The BigQuery dataset ID to create the views in. Make sure to use the same dataset as in the export command. (Required)
-f, --force
Force the creation of views even if only one of the destination views exist. The operation will replace all the contents in the old existing views.
-h, --help
Help for create-views.
--project
The BigQuery project ID to create the views in. (Required)