Red Gate forums :: View topic - Deployment Manager on a cluster
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Deployment Manager on a cluster

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
dykesa



Joined: 19 Jan 2012
Posts: 11
Location: Indianapolis, IN

PostPosted: Tue Oct 22, 2013 3:36 pm    Post subject: Deployment Manager on a cluster Reply with quote

Does the deployment agent work on a cluster and are there any important installation points about it(Does the agent need to be installed on each node, etc.)?
_________________
( Twitter | Blog )
Back to top
View user's profile Send private message
csmith



Joined: 30 Jun 2011
Posts: 114
Location: Cambridge

PostPosted: Wed Oct 23, 2013 5:09 pm    Post subject: Reply with quote

Hi

The Deployment Manager agent was not designed to be cluster aware, I'm afraid. You would have to install DM agent specifically on each node. So, in the DM web portal, you'd create an environment and add each node in the cluster as an agent.

Making the Agent cluster-aware is something we want to do in the future. How, ideally, would you like it to work?

Best regards,
Chris
_________________
Chris Smith
Project Manager
Deployment Manager
Back to top
View user's profile Send private message
dykesa



Joined: 19 Jan 2012
Posts: 11
Location: Indianapolis, IN

PostPosted: Wed Oct 23, 2013 8:37 pm    Post subject: Reply with quote

Hi Chris,

Thanks for your response. I haven't tried this live (and I don't have a test cluster setup) but I would imagine that attempting to deploy to the passive node would fail. As for how I think it should work:

Optimally I think that it should only attempt to deploy to the active node if its cluster aware.

Additional options: Allowing the Deployment Manager to have variables set by powershell script so that step 1 could be to execute a powershell script that sets the databaseServer variable to the active node.

These are just a couple of thoughts.

Alan
_________________
( Twitter | Blog )
Back to top
View user's profile Send private message
justin.caldicott



Joined: 20 Apr 2011
Posts: 55

PostPosted: Thu Oct 24, 2013 4:43 pm    Post subject: Reply with quote

Hi Alan,

You're right you would need to just deploy out to the active node. The only reason to do otherwise is if the changes took too long to replicate to the passive nodes, but that might involve disabling the clustering during the deployment which may not be ideal.

You mention wanting to set the databaseServer variable from PowerShell. If just deploying to the active node, you can just configure to point to the appropriate server using variables specified for each of the environments you need. Does this do what you need?

Best wishes,

Justin
_________________
Justin Caldicott
Product Manager - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
dykesa



Joined: 19 Jan 2012
Posts: 11
Location: Indianapolis, IN

PostPosted: Thu Oct 24, 2013 4:51 pm    Post subject: Reply with quote

Hi Justin,

Technically yes, that would allow the deployment to go to only the active node. The reason I was mentioning being able to set a Deployment Manager variable from powershell (as a step of the deployment) is that it is possible to get the active node through powershell and the deployment could always be set to the active node.

It was just a thought about possible ways around the agent knowing about the cluster.

Thanks,

Alan
_________________
( Twitter | Blog )
Back to top
View user's profile Send private message
justin.caldicott



Joined: 20 Apr 2011
Posts: 55

PostPosted: Thu Oct 24, 2013 4:57 pm    Post subject: Reply with quote

I see, yes that would be nice if it could auto-detect the active node. Would you still have to pass all of the nodes into the PowerShell for it to be able to work out which is active? If you can point me to any PowerShell to do this that would be great.
_________________
Justin Caldicott
Product Manager - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
dykesa



Joined: 19 Jan 2012
Posts: 11
Location: Indianapolis, IN

PostPosted: Fri Oct 25, 2013 3:18 pm    Post subject: Reply with quote

I think there are cleaner ways to do this (if you have access to run a powershell directly on the cluster) but the below script I worked up can determine the active node of a cluster remotely through the SQL Server.

Call with:

.\{scriptname} <CLUSTERNAME> <USER> <PASSWORD>

ex: .\get_active_node.ps1 MYCLUSTERNAME ALAN SuperPass123

Powershell:

param(
[string]$inst=$null,
[string]$user=$null,
[string]$pass=$null
)


$assemblylist =
"Microsoft.SqlServer.Smo",
"Microsoft.SqlServer.Dmf ",
"Microsoft.SqlServer.SqlWmiManagement ",
"Microsoft.SqlServer.ConnectionInfo ",
"Microsoft.SqlServer.SmoExtended ",
"Microsoft.SqlServer.Management.RegisteredServers ",
"Microsoft.SqlServer.Management.Sdk.Sfc ",
"Microsoft.SqlServer.SqlEnum ",
"Microsoft.SqlServer.RegSvrEnum ",
"Microsoft.SqlServer.WmiEnum ",
"Microsoft.SqlServer.ServiceBrokerEnum ",
"Microsoft.SqlServer.ConnectionInfoExtended ",
"Microsoft.SqlServer.Management.Collector ",
"Microsoft.SqlServer.Management.CollectorEnum"


foreach ($asm in $assemblylist)
{
$asm = [Reflection.Assembly]::LoadWithPartialName($asm)
}

# Handle any errors that occur
Trap {
# Handle the error
$err = $_.Exception
write-host -ForegroundColor Red $err.Message
while( $err.InnerException ) {
$err = $err.InnerException
write-output $err.Message
Write-Host -ForegroundColor Red $err.Message
};
Exit 1
# End the script.
break
}

$svrConn = New-Object Microsoft.SqlServer.Management.Common.ServerConnection
$svrConn.ServerInstance=$inst
$svrConn.LoginSecure=$false
$svrConn.Login=$user
$svrConn.Password=$pass

$srv = new-object Microsoft.SqlServer.Management.Smo.Server($svrConn)
$db = $srv.Databases["master"]
$cmdstring = "SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [CurrentNodeName]"
$result = $db.ExecuteWithResults($cmdstring)
Write-Host $result.Tables[0].Rows[0].Item("CurrentNodeName")

Exit 0
_________________
( Twitter | Blog )
Back to top
View user's profile Send private message
justin.caldicott



Joined: 20 Apr 2011
Posts: 55

PostPosted: Fri Oct 25, 2013 3:20 pm    Post subject: Reply with quote

Thanks Alan!
_________________
Justin Caldicott
Product Manager - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
DatabaseJase



Joined: 20 Sep 2013
Posts: 7
Location: Northamptonshire

PostPosted: Fri Nov 01, 2013 11:32 am    Post subject: Reply with quote

I think the latest release with "1st class database support" would resolve this issue, because now you'd just define a "database" connection with the clustered resource name.

Problem solved?
Back to top
View user's profile Send private message
dykesa



Joined: 19 Jan 2012
Posts: 11
Location: Indianapolis, IN

PostPosted: Fri Nov 01, 2013 12:52 pm    Post subject: Reply with quote

It's possible that would work. I still don't have a test setup to try it on.
_________________
( Twitter | Blog )
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group