helmdockerk9sVerify that the cluster AKS is runningVerify that the cluster ADX is runningCreate an app registration in azure portal- Sign in to the Azure portal
- Navigate to the Azure portal and select the Azure AD service
- Select the App Registrations blade on the left, then select New registration
- In the Register an application page that appears, enter your application's registration information:
- In the Name section, enter a meaningful application name that will be displayed to users of the app.
- Under Supported account types, select Accounts in this organizational directory only.
- Select Register to create the application.
- In the app's registration screen, find and note the Application (client) ID. You use this value later.
- Create a client secret and note it. You use this value later.
Important
- Make sure to remove all permissions for all "
AAD object id failed to be resolved" item in each database azure data explorer (if exists) - Make sure to assign with
system-assignedall connections with event hubs in each database azure data explorer - Assign the Owner role in resource group for source and destination platform
- You will need the name and secret key value later
export K8S_NAMESPACE=<NAMESPACE>
export K8S_CONTEXT=
export MIGRATION_IMAGE_VERSION=<MIGRATION_IMAGE_VERSION>
export SRC_CLUSTER=<SOURCE_CLUSTER_URI>
export SRC_CLUSTER_NAME=
export SRC_RESOURCE_GROUP=
export SRC_ACCOUNT_KEY=
export SRC_STORAGE_NAME=
export DEST_CLUSTER=<DEST_CLUSTER_URI>
export DEST_RESOURCE_GROUP=
export DEST_ACCOUNT_KEY=
export DEST_STORAGE_NAME=
export REDIS_HOST=<REDIS_SERVICE_NAME>.<NAMESPACE>.svc.cluster.local
export REDIS_PORT=6379
export REDIS_USERNAME=default
export REDIS_PASSWORD=
# app registration
export MIGRATION_CLIENT_ID=
export MIGRATION_CLIENT_SECRET=
export AZURE_SUBSCRIPTION_ID=
export AZURE_TENANT_ID=
# account storage backend
export ACCOUNT_EXPORT_NAME=
export ACCOUNT_EXPORT_SECRET=
export CSM_KEY=- Create a values.yaml with environment variables
cat >values.yaml <<EOF
image:
repository: ghcr.io/cosmo-tech/migration-svc-image
tag: $MIGRATION_IMAGE_VERSION
nodeSize: highmemory
resources:
limits:
cpu: "15"
memory: "100Gi"
requests:
cpu: "10"
memory: "100Gi"
env:
SRC_CLUSTER: $SRC_CLUSTER
SRC_RESOURCE_GROUP: $SRC_RESOURCE_GROUP
SRC_ACCOUNT_KEY: $SRC_ACCOUNT_KEY
DEST_CLUSTER: $DEST_CLUSTER
DEST_RESOURCE_GROUP: $DEST_RESOURCE_GROUP
DEST_ACCOUNT_KEY: $DEST_ACCOUNT_KEY
MIGRATION_CLIENT_ID: $MIGRATION_CLIENT_ID
MIGRATION_CLIENT_SECRET: $MIGRATION_CLIENT_SECRET
AZURE_SUBSCRIPTION_ID: $AZURE_SUBSCRIPTION_ID
AZURE_TENANT_ID: $AZURE_TENANT_ID
ACCOUNT_EXPORT_NAME: $ACCOUNT_EXPORT_NAME
ACCOUNT_EXPORT_SECRET: $ACCOUNT_EXPORT_SECRET
REDIS_HOST: $REDIS_HOST
REDIS_PORT: $REDIS_PORT
REDIS_USERNAME: $REDIS_USERNAME
REDIS_PASSWORD: $REDIS_PASSWORD
CSM_KEY: $CSM_KEY
EOFhelm pull oci://ghcr.io/cosmo-tech/migration-svc-charts --version $MIGRATION_IMAGE_VERSIONkubectl config use-context $K8S_CONTEXThelm -n $K8S_NAMESPACE install -f values.yaml csm-migration-svc migration-svc-charts-$MIGRATION_IMAGE_VERSION.tgzkubectl port-forward svc/csm-service 8000:31001 -n $K8S_NAMESPACE &
# Press Ctrl + C to return to the command prompt while port-forwarding runs in the background.wget https://raw.githubusercontent.com/Cosmo-Tech/migration-svc-image/main/scripts/storage.shchmod +x storage.sh
./storage.shwget https://raw.githubusercontent.com/Cosmo-Tech/migration-svc-image/main/scripts/solution.shchmod +x solution.sh
./solution.shwget https://raw.githubusercontent.com/Cosmo-Tech/migration-svc-image/main/scripts/kusto.shchmod +x kusto.sh
./kusto.shIf you have any issue during data migration, specifically with Azure Data Explorer.
helm -n $K8S_NAMESPACE uninstall csm-migration-svc
helm -n $K8S_NAMESPACE install -f values.yaml csm-migration-svc migration-svc-charts-$MIGRATION_IMAGE_VERSION.tgz
kubectl port-forward svc/csm-service 8000:31001 -n $K8S_NAMESPACE &
# Press Ctrl + C to return to the command prompt while port-forwarding runs in the background.-
Remove Owner role in source and destination resource group
-
Delete the app registration
-
Delete the storage account
-
Uninstall service
helm -n $K8S_NAMESPACE uninstall csm-migration-svc