Through this post I will demonstrate how to create Web deployment Package and SQL DAC package that will be used to deploy the Incentive application in System Center Virtual Machine Manager 2012 using Services template which I will cover in anther post soon. I will use the incentive Social collaboration Software http://www.incentivecorp.com/ to show how to Build SQL DAC and Web deploy Packages. The Same approach would apply to any other web application.
we need to have up and Running application to extract the needed SQL DAC Package and Web deployment Package for Private Cloud deployment using System Center Virtual Machine Manager 2012 by Creating Service Templates using the VMM 2012 Service Template Designer.
Prerequisite to deploy Incentive:
1. install Windows 2008 R2 SP1 Server
2.Install Dot net Framework 3.51
4. Install IIS 7.5 Role
5.Install SQL 2008R2 Advance Express server
6. Install web Deploy 2.0 software
7. If you are using SQL server that does not have DAC framework installed , download and install the DAC Framework
8. download incentive software package form http://www.incentivecorp.com/download web site
once you have these you can start the process of building the DAC and Web Deploy Package , the first step is to build a functional Web Site. Then extract the DAC and Web Deploy packages from this installation. The incentive incentive-webdeploy.zip is already a web deployment package that can be used to deploy the application using web deploy but I’m using manual installation to build the incentive Site and DB.
So Let Start the Process of building functional Blogengine web Site:
- Download the Web Deployment package from http://www.incentivecorp.com/download-info. Unzip the incentive-webdeploy.zip to a local folder. (e.g. C:\inetpub\incentive)
- Create the database. (SQL Server 2005 or 2008, express with advanced services works as well)
- Open SQL Management Studio.
- Create an empty database. (Make sure that Use full-text indexingis checked, the installation will fail if this not is checked!)
- Install the tables and views needed by Incentive by running the script create.sqlfound in the root of the zip file you unzipped in step 1.
- Run the script prepare.sql.
- Create a database user and make sure that the user has the database roles db_datawriter and db_datareader on your created database.
3. open IIS Manager and right the default web Site and select add application , in the Alias type incentive and Browse to the location of the incentive application folder C:\inetpub\incentive
4. Check that the “defaultAppPool” is set to Integrated and .NET 2.0 Framework , also check that the intensive Application is set to use the “defaultAppPool” by clicking Basic setting link in IIS.
14. Open the file web.config edit Connection String string to read connectionString= “server=.\sqlexpress;database=incentive;user=incentive;password=P@ssw0rd”
3. Set security of the incentive local folder , by adding the “defaultAppPool” with read permission.
4. In IIS management console –> right click the incentive folder –>select edit permission –> select Security tab –> click edit –> add –> type “IIS AppPool\defaultAppPool” “ be sure that location read the name of the local machine , click check –> Ok –> select defaultAppPool and check that it has read and execute permission
5. repeat step 4 on Subfolders “app_data” , “temp” (Create this directory if it does not exist.) only this time select modify access.
6. Open web.config located in the web-directory and update the connection string “incentive”. Open your web browser and enter the address to your created site.
7. Open SQL management studio right Click the Security node in SQL Studio and select New logon
8. In the new logon screen enter user name and password (eg. intensive ,P@ssw0rd) , select SQL server Authentication , Select the intensive Database as the default database . deselect the enforce password policy.
9. in the right panel select User Mapping , select the Check box next to the incentive DB , and in the Database role membership select db_owner , click Ok and close the SQL Studio without saving.
10. Open you internet browser at http://localhost/incentive and check that the Application is running
since the application have been deployed successfully it’s now time to extract the DAC and web deploy packages form this installation.
Creating the Blogengine SQL DAC and Blogengine web deploy packages form this installation.
1. Open the SQL Management Studio , Right Click incentive Database name , the select tasks –> Extract Data-tier Application –> click next
2. you can Change Application Name , version , Description and the location to SAVE the DAC package and Click Next—>Next—> finish . close the SQL management Studio
3. Open the IIS manager console , expand the default web site and select the incentive Application , in the right Pane of IIS manager click Export Application Link to start the export wizard.
4. Click Manage Components , in the second row select click the provider cell and select setAcl , in the path type “Default Web Site/incentive/” , in the provider setting Cell , click the … icon to open the provider setting screen and set :
SelAcl access : readandexcute
click Close –> OK
in the Next row click the provider cell and select setAcl , in the path type “Default Web Site/incentive/App_data” , in the provider setting Cell , click the … icon to open the provider setting screen and set :
SelAcl access : modify
click Close –> OK
in the Next row click the provider cell and select setAcl , in the path type “Default Web Site/incentive/temp” , in the provider setting Cell , click the … icon to open the provider setting screen and set :
SelAcl access : modify
click Close –> OK
Your Screen would look like this
5.Click Next to open the parameters screen
6. Click Add parameter fill in:
default Value : server=.\sqlexpress;database=incentive;user=incentive;password=P@ssw0rd
tags : SQLConnectionString
Then Click Ok button
Select the Newly Added parameter MSSQLConnectionString , and Click add Parameter entry
Select XML file for type and fill in filed with:
you final screen would have five parameters and look like this
7.Click next , then Browse to the location to name and save the file. (eg. blogengineweb.zip) , then click Finish.
8. copy the extracted two files from the SQL and IIS to your SCVMM library .
In the next Blog I will demonstrate how to deploy incentive application using service template in SCVMM 2012
Notes to be considered:
- SQL DAC Packages does not include any stored Data from SQL DB in the DAC package.
- Web deploy Can be used to Deploy only Application , not a Site
- Web Deploy will always use the “defaultapppool” as application pool for application during deployment , so the .Net Framework of the deployed application should match the “defaultapppool” .Net Framework on the Target Machine