OK, so I just posted this and xacn't locate it anywhere so posting again...
I'm attempting to use roundhouse to deploy a db to a remote share however I keep getting an error that makes no sense to me. Everytime I run it I get the following woefully unhelpful message:
Can you please explain what it means?
System.Management.ManagementException: Invalid parameter
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementPath.SetWbemPath(IWbemPath wbemPath, String path)
at System.Management.ManagementPath.CreateWbemPath(String path)
at dropkick.Wmi.WmiProcess.Run(String machineName, String commandLine, String args, String currentDirectory) in c:\Solutions\dk-fc\product\dropkick\Wmi\WmiProcess.cs:line 18
at dropkick.Tasks.CommandLine.RemoteCommandLineTask.Execute() in c:\Solutions\dk-fc\product\dropkick\Tasks\CommandLine\RemoteCommandLineTask.cs:line 72
at dropkick.DeploymentModel.DeploymentDetail.Execute() in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentDetail.cs:line 32
at dropkick.DeploymentModel.DeploymentPlan.<>c__DisplayClass7.<Execute>b__6(DeploymentDetail d) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentPlan.cs:line 72
at dropkick.DeploymentModel.DeploymentPlan.<>c__DisplayClassc.<Ex>b__a(DeploymentDetail d) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentPlan.cs:line 93
at dropkick.DeploymentModel.DeploymentServer.ForEachDetail(Action`1 detailAction) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentServer.cs:line 82
at dropkick.DeploymentModel.DeploymentPlan.<>c__DisplayClassc.<Ex>b__9(DeploymentServer s) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentPlan.cs:line 90
at dropkick.DeploymentModel.DeploymentRole.ForEachServerMapped(Action`1 detailAction) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentRole.cs:line 42
at dropkick.DeploymentModel.DeploymentPlan.Ex(Action`1 action) in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentPlan.cs:line 87
at dropkick.DeploymentModel.DeploymentPlan.Execute() in c:\Solutions\dk-fc\product\dropkick\DeploymentModel\DeploymentPlan.cs:line 60
at dropkick.Engine.DeploymentPlanDispatcher.<.cctor>b__0(DeploymentPlan d) in c:\Solutions\dk-fc\product\dropkick\Engine\DeploymentPlanDispatcher.cs:line 30
at dropkick.Engine.DeploymentPlanDispatcher.KickItOutThereAlready(Deployment deployment, DeploymentArguments args) in c:\Solutions\dk-fc\product\dropkick\Engine\DeploymentPlanDispatcher.cs:line 45
at dropkick.Engine.Runner.Deploy(String commandLine) in c:\Solutions\dk-fc\product\dropkick\Engine\Runner.cs:line 131
Do I need to use access credentials as this is specified anywhere in the documentation. If so, how is this achieved?
Here is my implementation:
public Restore()
{
Define(settings =>
{
DeploymentStepsFor(Baseline,
s =>
{
VerifyDeploymentIsSafe(this);
//prepare for copying
var copyFromPath = System.IO.Path.Combine(settings.DbRestoreRemoteArchive, settings.DbRestoreFile);
bool copyToLocalPath = string.IsNullOrWhiteSpace(settings.DbServerBaselineFolderUnc);
var copyToFolder = copyToLocalPath ? settings.DbServerBaselineFolder : settings.DbServerBaselineFolderUnc;
var copyToPath = System.IO.Path.Combine(copyToFolder, settings.DbRestoreFile);
System.Console.WriteLine("CopyFromPath: {0}", copyFromPath);
System.Console.WriteLine("CopyToLocalPath: {0}", copyToLocalPath);
System.Console.WriteLine("CopyToFolder: {0}", copyToFolder);
System.Console.WriteLine("username: {0}", WindowsIdentity.GetCurrent());
//System.Console.WriteLine("CopyToPath: {0}", copyToPath);
//System.Console.WriteLine("Copying baseline from {0} to {1}", copyFromPath, copyToPath);
s.CopyFile(copyFromPath).ToDirectory(copyToFolder);
});
DeploymentStepsFor(Db,
s =>
{
VerifyDeploymentIsSafe(this);
//prepare for restoring
var restoreFromPath = System.IO.Path.Combine(settings.DbServerBaselineFolder, settings.DbRestoreFile);
//System.Console.WriteLine("Running roundhouse restore and update against {0}...", restoreFromPath);
s.CommandLine("rh.exe")
.Args(
string.Format(
"--db={0} --server={1} --env={2} --files=Scripts --restore --restorefrom=\"{3}\" --restoreoptions=\"{4}\" --noninteractive --simpleoutput --ct={5}",
settings.DbName, settings.DbServer, settings.Environment, restoreFromPath,
settings.DbRestoreOptions, settings.CommandTimeout))
.ExecutableIsLocatedAt(".");
});
});
}