azure-connectiontoolkit-cicd

0.0.4 • Public • Published

CICD Tool - Cross Platform CLI for MAC, Linux and Windows

NPM version

Continuous Integration Continuous Delivery (CICD) Tool help customers to migrate their services between Azure datacenters, independent of the location and/or environment.

Given the scenario, one company has a VM in Azure East Asia hosting their web services. Subject to the business growth, they need to extend their web services into China, and they need a tool to help them replicate the VM into Azure China East. Besides, when there is an update to the web services in Azure East Asia, they want the change to be apply to the VM in Azure China East.

CICD Tool is designed to solve this problem by helping customer with minimum effort to replicate/migrate between different Azure datacenters. Moreover, it opens up the possibility to integrate the migration into the customer’s DevOps process. Ultimately, we are trying to evolve the CICD tool to help integrate services across different regions.

The cross platform version of CICD tool is a node.js based cmdlet which support platforms including Mac, Linux and Windows.

Features

ARM VM Migration

  • Support ARM VM migration from/to Azure, Azure in China and Azure in Germany.
  • Support data sync through VHD copy.

VM migration will be complete through four phases.

  1. Validate: Validation will check the prerequisite and requirement in source/destination environment to ensure the smooth migration.
  2. Prepare: Preparation will build up the dependencies of migration in destination including storage accounts and resource groups.
  3. VHDs Copy: VHD Copy will start the blob copy between source and destination.
  4. VM Build: VM Build will use the source VM configuration to build up the same VM in destination and perform validation after migration.

Supported Environment

Before installation, please make sure you have downloaded and installed the latest Node.js and npm.

Installation

Install from npm

To install CICD cross-platform CLI, run following command to install npm package.

npm install -g azure-connectiontoolkit-cicd

On Linux distributions, you might need to use sudo to successfully run the npm command, as follows:

sudo npm install -g azure-connectiontoolkit-cicd

Get Started

ARM VM Migration

To use CICD cross platform CLI, base command is:

azmigrate vm

Meanwhile, you need to input the information for each parameter to make it work. Here is the parameter list and description.

First of all, you need to specify the source environment and destination environment of migration. For example, AzureCloud to AzureChinaCloud.

-e, --srcEnv

source Azure environment (default is AzureCloud if not specified)

-E, --destEnv

destination Azure environment

Then, you need to specify the authentication mode you want to use, service principal or username/password. If MFA is enabled, you need to select service principal mode as authentication mode.

In service principal mode, you need to specify following information:

-i, --srcClientId

source AAD application client ID

-I, --destClientId

destination AAD application client ID

-c, --srcSecret

source AAD application secret

-C, --destSecret

destination AAD application secret

-d, --srcDomain

source domain or tenant id containing the AAD application

-D, --destDomain

destination domain or tenant id containing the AAD application

In username/password mode, you need to specify following information:

-u, --srcUserName

source AAD account user name

-U, --destUserName

destination AAD account user name

-p, --srcPassword

source AAD account password

-P, --destPassword

destination AAD account password

Then, you need to specify the source/destination subscription:

-s, --srcSubId

source subscription ID

-S, --destSubId

destination subscription ID

Finally, you need to specify the VM you would like to migrate and the target location:

-g, --srcGroup

source resource group name of the virtual machine

-n, --srcName

source virtual machine name

-L, --destLocation

destination location

For example, a complete command will be like this:

azmigrate vm -E AzureChinaCloud -d srcTenantId -i srcAppId -c srcAppSecret -D destTenantId -I destAppId -C destAppSecret -s srcSubId -S destSubId -g srcVmRg -n srcVmName -L chinaeast 

Need Help?

Please contact Azure Global Connection Team if you have any issue or feedback.

Package Sidebar

Install

npm i azure-connectiontoolkit-cicd

Weekly Downloads

2

Version

0.0.4

License

MIT

Last publish

Collaborators

  • herbchung