Nupkg Package Size

Automated deployment for web applications and databases

Nupkg Package Size

Postby shanejokeeffe » Thu Dec 19, 2013 3:44 pm

Along with TeamCity, I'm trialling Deployment Manager and the SQL Automation Pack. For application building and deployment everything is going well but I'm having some issues with automating the database side of things.

I've installed the TeamCity plugin and I have a build step using the Red Gate runner that I've configured to Generate Upgrade Scripts and also Create a Database Package into Deployment Manager.

The issue I'm having is that the nupkg files begin generated as part of the database build step are pretty big at around 300Mb. There are a lot of objects in the database but given a minor changeset (one stored procedure change), I don't understand the size of the files. Am I setting this up correctly?

Regards,

Shane.
shanejokeeffe
 
Posts: 14
Joined: Thu Dec 12, 2013 8:05 pm

Postby Mike Upton » Thu Dec 19, 2013 5:29 pm

Hi Shane,

Thanks for trying out Deployment Manager.

The packages that we create for databases are not incremental; they don't just contain the changes, they contain a snapshot of the entire database state (including any static data you've defined). This allows the package to be used to update any version of the database to the appropriate state.

There is more information about the way database deployments work in this page of the documentation
Mike Upton

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 190
Joined: Wed May 11, 2011 8:04 am
Location: Redgate

Postby shanejokeeffe » Thu Dec 19, 2013 5:47 pm

Thanks for that Mike and I'm starting to make sense of it. So given the size of my database, I can just expect that size of package to remain fairly standard.

Following on from that, does this mean that if I have deployed v1.1.10 to production, produce a number of test builds and then at a later date attempt to upgrade production directly to v1.1.20 that it will upgrade all of the bits in between?
shanejokeeffe
 
Posts: 14
Joined: Thu Dec 12, 2013 8:05 pm

Postby Mike Upton » Thu Dec 19, 2013 5:58 pm

That's right.
Mike Upton

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 190
Joined: Wed May 11, 2011 8:04 am
Location: Redgate

Postby shanejokeeffe » Thu Dec 19, 2013 6:20 pm

Thanks for the quick answers Mike.

I'm still curious as to why the size of the package is so large though.

This database has roughly the following objects and I am not including any data in TFS:

Tables: 200
SPs: 700
Triggers: 150
Views: 100

The Database folder generated by SQL Source Control into TFS is only 5Mb - why is the NuGet package over 300Mb?
shanejokeeffe
 
Posts: 14
Joined: Thu Dec 12, 2013 8:05 pm

Postby Mike Upton » Thu Dec 19, 2013 6:30 pm

If you've asked the TeamCity plugin to generate upgrade scripts, it will generate the appropriate SQL to upgrade from all deployed versions of the package to the latest state. This might mean that the package contains several different versions of the upgrade script.

These scripts are only used for static upgrade mode, so if you're using dynamic upgrades you don't necessarily need to generate them.

You can check the contents of the package file if you want; if you change the file extension from .nupkg to .zip, Windows Explorer will let you navigate into the package and see what files are included. That might help you work out why they're so big.
Mike Upton

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 190
Joined: Wed May 11, 2011 8:04 am
Location: Redgate

Postby shanejokeeffe » Tue Dec 24, 2013 12:35 pm

Thanks for the tip.

By looking in the package contents, I could see that in the state folders, all of the contents of the BuildCheckOut directory in TeamCity were being included. This build configuration also builds a number of .net applications so those files (binaries and all) were being added to the package.

I changed the path in the Red Gate TeamCity plugin to not use the root path of my VCS setup and now the database package sizes are a much more manageable 2mb.

Thanks again for the assistance!

Shane.
shanejokeeffe
 
Posts: 14
Joined: Thu Dec 12, 2013 8:05 pm


Return to Deployment Manager

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests