Database packaging and Powershell scripts

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

Database packaging and Powershell scripts

Postby jtucker@inflexxion.com » Thu Jun 27, 2013 10:41 pm

The new SSMS add-in with DM 2.0 allows me to generate a quick database pkg for a chosen database, but how am I to add in any powershell scripts? What am i missing?
jtucker@inflexxion.com
 
Posts: 12
Joined: Thu Jun 27, 2013 10:23 pm
Location: Boston

Postby justin.caldicott » Fri Jun 28, 2013 1:07 pm

Hi Jeff,

What actions are you looking to perform with the PowerShell, over the built-in deployment logic? Do they need access to the extracted database scripts?

If not, then you can package up some custom PowerShell using RgPublish, and add that as a step, that can be reused as needed.

If they do need access to the database scripts, then this would need to be done using the sqlCI command line tool / build scripts, that are part of the automation pack we mentioned:
http://www.red-gate.com/products/sql-de ... tion-pack/

Using custom PowerShell that has access to the database scripts is not possible from the SSMS add-in yet. It's something on our list to address. How big of an issue is this for you?

Thanks,

Justin
Justin Caldicott
Product Manager - Deployment Manager
Red Gate
justin.caldicott
 
Posts: 55
Joined: Wed Apr 20, 2011 5:42 pm

RgPublish and powershell with database packaging

Postby jtucker@inflexxion.com » Wed Jul 03, 2013 1:31 pm

I won't need access to the sql scripts for database deployment. However, since database deployment is done first, I'd still need to do safety tasks like backing up some databases, turning off the application, and so on. What is the best way here? I was thinking I could create my own package with just powershell scripts to do the database backups, and turn off the app, call it "preliminaries" before any other step runs...

I don't see a way to add my powershell to the database pkg. Not sure it would help.
jtucker@inflexxion.com
 
Posts: 12
Joined: Thu Jun 27, 2013 10:23 pm
Location: Boston

Postby james.billings » Thu Jul 04, 2013 9:31 am

You could create a Deploy.ps1 in a folder of it's own that would perform any extra steps you need, use RGPublish to package that up, then add it to your release as a step before the database deployment step?
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests