We are planning to use Umbraco for many website builds, and it would be a great timesaver if we could package up our 'boilerplate' requirements before we start the specific builds - for example have specific packages pre-installed, a set of Document Types and matching templates, macros, custom .NET controls, even some simple configuration things like turning labels on by default for TinyMCE content.
My only thought how to do this at the moment is create it to the point I want it, then essentially publish that by copying the files / backup and restore the database. Are there any other better ways of doing this? I'm sure I can't be the first person with this requirement? Are there any issues with doing an 'install' this way?
Doesn't need to be exceptionally simple to do, just reliable. Any advice greatly received!
In order to setup a boilerplate, which you base all new Umbraco projects on you should consider to use source control like git or mercurial. By doing so you can keep track of your versions of your boilerplate and it'll simply be much easier to make changes, add new stuff, bugfix etc. and people on your team can all be contributing to it.
Everytime you start up a new project you can simply just make a clone from the central repository and you're ready to go :) - I'll recommend that you base the boilerplate on SQL CE, since you can then just simply revert to another version if something is being messed up. When you're making a clone of the project to start up a new site then the SQL CE DB is easily migrated to a MSSQL server using WebMatrix.
There is no issue doing an "install" this way. All you need to do when setting up your local development is to make sure that permissions on the umbraco root folder is correct (Tip: Set the permissions on a root folder containing all your umbraco projects - then they'll automatically be inherited once you setup a new project in there), setup a site in IIS and make sure the app pool is setup correctly and then setup a host name in your hosts file and you should be good to go. If you migrate the SQL CE DB then you must of course remember to edit the connection string in web.config.
I hope this helps you a bit and provides some inspiration on how you can achieve your goal.
Great thanks for that, makes perfect sense. So I'm best keeping the core boilerplate in CE then converting it? All our sites are MSSQL, and we use VS rather than WebMatrix. We do all our installs manually rather than use the installer.
We don't use WebMatrix either - only to migrate the SQL CE DB to MSSQL - Since I'm a frontend guy I don't know what other tools are available but I've found that WebMatrix does an excellent job :)
If you should use SQL CE for the boilerplate or if you should use MSSQL depends on your workflow I think. I can make sense to use if you are many people working on the bolierplate at the same time, since you don't risk data is overwridden when you pull. But I think it's a matter of workflow and what makes sense in that context - The benefit of using SQL CE is that you can easily revert to an older version of the DB if something is messed up. The downside is that some packages may not be compatible with SQL CE for instance.
Once you have the boilerplate setup you don't need to run the installer - just clone, and setup the site in IIS etc :)
I tried scripting it using the MS Database Publishing Wizard, but it didn't seem to work, I think it missed a few core objects. I'd much rather have a script than a .bak file as it's much easier to version control for diffs. Any recommendations for a successful way to fully script it?
The easiest way I've found to script the whole database was by just running this from a batch file, it has worked perfectly every time (you may need to fiddle with your paths a little):
I can never work out how to install the Publishing Wizard if it doesn't get installed first time, I have it on my machine but on a dev machine it doesn't exist?
Maybe something to do with only having SQL Express on the Dev machine. If anyone knows how to install it after the initial install or how to add it to SQL Server express I'd be grateful.
I run 2010 Professional and if you go to Server Explorer, add a new data connection if necessary (for sql express), expand the database and you get a 'publish to provider' option. This kicks off the publishing wizard. I don't think this works for a SQL CE db but for that you can use Webmatrix.
I do like Seb's idea of running the cmd line publishing wizard in a batch file ( or a powershell script that deploys the whole site maybe?)
Creating a 'boilerplate' Umbraco baseline install
Hi,
We are planning to use Umbraco for many website builds, and it would be a great timesaver if we could package up our 'boilerplate' requirements before we start the specific builds - for example have specific packages pre-installed, a set of Document Types and matching templates, macros, custom .NET controls, even some simple configuration things like turning labels on by default for TinyMCE content.
My only thought how to do this at the moment is create it to the point I want it, then essentially publish that by copying the files / backup and restore the database. Are there any other better ways of doing this? I'm sure I can't be the first person with this requirement? Are there any issues with doing an 'install' this way?
Doesn't need to be exceptionally simple to do, just reliable. Any advice greatly received!
thanks
Alan
Hi Alan
In order to setup a boilerplate, which you base all new Umbraco projects on you should consider to use source control like git or mercurial. By doing so you can keep track of your versions of your boilerplate and it'll simply be much easier to make changes, add new stuff, bugfix etc. and people on your team can all be contributing to it.
Everytime you start up a new project you can simply just make a clone from the central repository and you're ready to go :) - I'll recommend that you base the boilerplate on SQL CE, since you can then just simply revert to another version if something is being messed up. When you're making a clone of the project to start up a new site then the SQL CE DB is easily migrated to a MSSQL server using WebMatrix.
There is no issue doing an "install" this way. All you need to do when setting up your local development is to make sure that permissions on the umbraco root folder is correct (Tip: Set the permissions on a root folder containing all your umbraco projects - then they'll automatically be inherited once you setup a new project in there), setup a site in IIS and make sure the app pool is setup correctly and then setup a host name in your hosts file and you should be good to go. If you migrate the SQL CE DB then you must of course remember to edit the connection string in web.config.
I hope this helps you a bit and provides some inspiration on how you can achieve your goal.
/Jan
Great thanks for that, makes perfect sense. So I'm best keeping the core boilerplate in CE then converting it? All our sites are MSSQL, and we use VS rather than WebMatrix. We do all our installs manually rather than use the installer.
But once again great advice, thanks!
Hi Alan
You're very welcome.
We don't use WebMatrix either - only to migrate the SQL CE DB to MSSQL - Since I'm a frontend guy I don't know what other tools are available but I've found that WebMatrix does an excellent job :)
If you should use SQL CE for the boilerplate or if you should use MSSQL depends on your workflow I think. I can make sense to use if you are many people working on the bolierplate at the same time, since you don't risk data is overwridden when you pull. But I think it's a matter of workflow and what makes sense in that context - The benefit of using SQL CE is that you can easily revert to an older version of the DB if something is messed up. The downside is that some packages may not be compatible with SQL CE for instance.
Once you have the boilerplate setup you don't need to run the installer - just clone, and setup the site in IIS etc :)
/Jan
FYI I version these things by scripting the MSSQL database to a SQL script instead of using SQL CE.
I tried scripting it using the MS Database Publishing Wizard, but it didn't seem to work, I think it missed a few core objects. I'd much rather have a script than a .bak file as it's much easier to version control for diffs. Any recommendations for a successful way to fully script it?
Database Publishing Wizard works for me.
You might also want to look at uSiteBuilder for a different way of setting this up.
Rich
The easiest way I've found to script the whole database was by just running this from a batch file, it has worked perfectly every time (you may need to fiddle with your paths a little):
Hi,
Nice script Sebastiaan!
I can never work out how to install the Publishing Wizard if it doesn't get installed first time, I have it on my machine but on a dev machine it doesn't exist?
Maybe something to do with only having SQL Express on the Dev machine. If anyone knows how to install it after the initial install or how to add it to SQL Server express I'd be grateful.
Cheeers
Rich
Hey Rich,
What version of Visual Studio do you have?
I run 2010 Professional and if you go to Server Explorer, add a new data connection if necessary (for sql express), expand the database and you get a 'publish to provider' option. This kicks off the publishing wizard. I don't think this works for a SQL CE db but for that you can use Webmatrix.
I do like Seb's idea of running the cmd line publishing wizard in a batch file ( or a powershell script that deploys the whole site maybe?)
Jay
here's a link to the Publishing Wizard installer. I can't confirm it works as I already have it installed as part of VS2010.
http://go.microsoft.com/fwlink/?LinkId=119368
Thanks Jay, I'll check it out.
is working on a reply...