Skip to content

Commit

Permalink
Merge pull request #1 from papatid/users/haraka/mongo-migrations
Browse files Browse the repository at this point in the history
Mongo migrations
  • Loading branch information
haraka-microsoft authored Aug 18, 2023
2 parents 215105d + 04e695a commit 6ef75ef
Show file tree
Hide file tree
Showing 7 changed files with 1,053 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"targetResourceName": "targetCosmosDbClusterName",
"migrationName": "migrationRequest",
"api-version": "2023-07-15-preview",
"parameters": {
"properties": {
"kind": "MongoToCosmosDbMongo",
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService",
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88,
"userName": "abc",
"password": "placeholder",
"useSsl": true
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255,
"userName": "def",
"password": "placeholder",
"useSsl": true
},
"collectionList": [
{
"sourceDatabase": "sourceDb1",
"sourceCollection": "sourceCol1",
"targetDatabase": "targetDb1",
"targetCollection": "targetCol1"
},
{
"sourceDatabase": "sourceDb2",
"sourceCollection": "sourceCol2",
"targetDatabase": "sourceDb2",
"targetCollection": "sourceCol2"
}
]
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"collectionList": [
{
"sourceDatabase": "sourceDb1",
"sourceCollection": "sourceCol1",
"targetDatabase": "targetDb1",
"targetCollection": "targetCol1"
},
{
"sourceDatabase": "sourceDb2",
"sourceCollection": "sourceCol2",
"targetDatabase": "sourceDb2",
"targetCollection": "sourceCol2"
}
],
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Creating",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "InProgress",
"migrationStatusDetails": {

},
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest",
"name": "migrationRequest",
"type": "Microsoft.DataMigration/databaseMigrations"
},
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview",
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"targetResourceName": "targetCosmosDbClusterName",
"migrationName": "migrationRequest",
"api-version": "2023-07-15-preview",
"parameters": {
"properties": {
"kind": "MongoToCosmosDbMongo",
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService",
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88,
"userName": "abc",
"password": "placeholder",
"useSsl": true
},
"targetMongoConnection": {
"connectionString": "placeholder"
},
"collectionList": [
{
"sourceDatabase": "sourceDb1",
"sourceCollection": "sourceCol1",
"targetDatabase": "targetDb1",
"targetCollection": "targetCol1"
},
{
"sourceDatabase": "sourceDb2",
"sourceCollection": "sourceCol2"
}
]
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongo.cosmos.azure.com",
"port": 10255
},
"collectionList": [
{
"sourceDatabase": "sourceDb1",
"sourceCollection": "sourceCol1",
"targetDatabase": "targetDb1",
"targetCollection": "targetCol1"
},
{
"sourceDatabase": "sourceDb2",
"sourceCollection": "sourceCol2",
"targetDatabase": "sourceDb2",
"targetCollection": "sourceCol2"
}
],
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Creating",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "InProgress",
"migrationStatusDetails": {

},
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest",
"name": "migrationRequest",
"type": "Microsoft.DataMigration/databaseMigrations"
},
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview",
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"targetResourceName": "targetCosmosDbClusterName",
"migrationName": "migrationRequest"
},
"responses": {
"200": {},
"202": {
"headers": {
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/dropcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview"
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"targetResourceName": "targetCosmosDbClusterName",
"migrationName": "migrationRequest",
"api-version": "2023-07-15-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"collectionList": [
{
"sourceDatabase": "sourceDb1",
"sourceCollection": "sourceCol1",
"targetDatabase": "targetDb1",
"targetCollection": "targetCol1"
},
{
"sourceDatabase": "sourceDb2",
"sourceCollection": "sourceCol2",
"targetDatabase": "sourceDb2",
"targetCollection": "sourceCol2"
}
],
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Creating",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "InProgress",
"migrationStatusDetails": {

},
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest",
"name": "migrationRequest",
"type": "Microsoft.DataMigration/databaseMigrations"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"targetResourceName": "targetCosmosDbClusterName",
"api-version": "2023-07-15-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Creating",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "InProgress",
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1",
"name": "migrationRequest1",
"type": "Microsoft.DataMigration/databaseMigrations"
},
{
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Provisioned",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "Failed",
"migrationFailureError": {
"code": "400",
"message": "Source or Target database connectivity could not be validated."
},
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2",
"name": "migrationRequest2",
"type": "Microsoft.DataMigration/databaseMigrations"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testrg",
"migrationServiceName": "testMigrationService",
"api-version": "2023-07-15-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Creating",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "InProgress",
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1",
"name": "migrationRequest1",
"type": "Microsoft.DataMigration/databaseMigrations"
},
{
"properties": {
"sourceMongoConnection": {
"host": "abc.mongodb.com",
"port": 88
},
"targetMongoConnection": {
"host": "xyz.mongocluster.cosmos.azure.com",
"port": 10255
},
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName",
"provisioningState": "Provisioned",
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService",
"kind": "MongoToCosmosDbMongo",
"migrationStatus": "Failed",
"migrationFailureError": {
"code": "400",
"message": "Source or Target database connectivity could not be validated."
},
"startedOn": "0001-01-01T08:00:00Z",
"endedOn": "0001-01-01T08:00:00Z",
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2",
"name": "migrationRequest2",
"type": "Microsoft.DataMigration/databaseMigrations"
}
]
}
}
}
}
Loading

0 comments on commit 6ef75ef

Please sign in to comment.