Skip to content

Add MongoDb migration support to DataMigration service #7831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a8cdd9b
MongoDB migration scenario changes for Data Migration Service
haitsongmsft Oct 5, 2018
968ce5d
adding wait to commands
haitsongmsft Oct 8, 2018
f922d8a
mongo db
haitsongmsft Oct 8, 2018
0a2490c
merge latest
haitsongmsft Nov 1, 2018
1dcfe3b
MongoDB migration CommandLets for Data Migration Service
haitsongmsft Nov 14, 2018
ed86fac
update mongodb commandlet testing
haitsongmsft Nov 14, 2018
037a4b8
revert gitignore
haitsongmsft Nov 14, 2018
6639814
Merge branch 'preview' into preview
Nov 15, 2018
54e8cc3
renaming help file to the non-aliased one due to the staticanalysis e…
haitsongmsft Nov 20, 2018
d7b06d4
Merge branch 'preview' of https://github.com/haitsongmsft/azure-power…
haitsongmsft Nov 20, 2018
6215676
Mongodb migration changes
haitsongmsft Nov 30, 2018
008e8c4
remove creds
haitsongmsft Nov 30, 2018
e5483cd
remove creds
haitsongmsft Nov 30, 2018
43aa041
Fix cred scan issues
haitsongmsft Nov 30, 2018
716d204
merge from upstream/master
haitsongmsft Dec 3, 2018
aa680cb
merge
haitsongmsft Dec 3, 2018
91fb73b
merge
haitsongmsft Dec 3, 2018
fdf7de0
fix new commandlet naming to take constant of ResourceManager's Azure…
haitsongmsft Dec 4, 2018
ac0bfb9
manual merge the changes for mongodb migration help files
haitsongmsft Dec 4, 2018
be5f720
update az module exports for DataMigration
haitsongmsft Dec 11, 2018
d474f86
merge from upstream/master
haitsongmsft Dec 13, 2018
db8f699
Merge branch 'master' into preview
haitsongmsft Dec 13, 2018
46b1f02
Merge branch 'master' into preview
markcowl Dec 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.DataMigration" Version="0.5.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.DataMigration" Version="0.6.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,31 @@ function Create-Project($rg, $service, $targetPlatform)
return $project
}

function Create-ProjectMongoDbMongoDb($rg, $service)
{
$ProjectName = Get-ProjectName
$sourceConnInfo = New-SourceMongoDbConnectionInfo
$targetConnInfo = New-TargetMongoDbConnectionInfo

$project = New-AzureRmDataMigrationProject -ResourceGroupName $rg.ResourceGroupName -ServiceName $service.Name -ProjectName $ProjectName -Location $rg.Location -SourceType MongoDb -TargetType MongoDb -SourceConnection $sourceConnInfo -TargetConnection $targetConnInfo

return $project
}

function New-SourceMongoDbConnectionInfo
{
$sourceConn = [Microsoft.Azure.Commands.DataMigrationConfig]::GetConfigString("MONGODB_SOURCE_CONNECTIONSTRING")
$connectioninfo = New-AzureRmDmsConnInfo -ServerType MongoDb -ConnectionString $sourceConn
return $connectioninfo
}

function New-TargetMongoDbConnectionInfo
{
$cosmosConn = [Microsoft.Azure.Commands.DataMigrationConfig]::GetConfigString("COSMOSDB_TARGET_CONNECTIONSTRING")
$connectioninfo = New-AzureRmDmsConnInfo -ServerType MongoDb -ConnectionString $cosmosConn
return $connectioninfo
}

function getDmsAssetName($prefix)
{
$assetName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetAssetName("testName",$prefix+"-PsTestRun")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,27 @@ public void TestMigrateSqlSqlDBSync()
{
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-MigrateSqlSqlDBSync");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestConnectToSourceMongoDb()
{
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-ConnectToSourceMongoDb");
}


[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestConnectToTargetCosmosDb()
{
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-ConnectToTargetCosmosDb");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestMigrateMongoDb()
{
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-MigrateMongoDb");
}
}
}

Large diffs are not rendered by default.

Loading