Creating Web deployment Package and MS SQL DAC Package for deploying Services Template in System Center Virtual Machine Manager 2012

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:

  1. 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)
  2. Create the database. (SQL Server 2005 or 2008, express with advanced services works as well)
    1. Open SQL Management Studio.
    2. Create an empty database. (Make sure that Use full-text indexingis checked, the installation will fail if this not is checked!)
    3. 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.
    4. Run the script prepare.sql.
    5. 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.

image

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.

image

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

image

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.

image

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

SetAclresourceType: Directory

click Close –> OK

image

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

SetAclresourceType: Directory

click Close –> OK

image

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

SetAclresourceType: Directory

click Close –> OK

Your Screen would look like this

image

5.Click Next to open the parameters screen

image

6. Click Add parameter fill in:

Name: MSSQLconnectionString

default Value : server=.\sqlexpress;database=incentive;user=incentive;password=P@ssw0rd

tags : SQLConnectionString

image

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:

\\web.config$

//connectionStrings//add//connectionstring

 

you final screen would have five parameters and look like this

image

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

Useful links

Web Deploy Parameterization

Introduction to Web Deploy

Advertisements

About Hikmat Kanaan

I’m big fan of technology; I have worked almost with every MS windows OS up to Windows 8 and server 2012 including OS deployment, AD and almost every MS OS service included major MS products ISA ,TMS, Exchange, System center ,Sharepoint ,SQL , Storage system, Networking, security, Cisco, HP, and Checkpoint products. Designing and Architecting IT solutions and infrastructure . I do admire automation and working based on best practices toward building highly reliable solution that provide the required services to Business. I also run the Jordan IT professionals user Group http://www.jitpros.net
This entry was posted in VMM2012 and tagged , , , . Bookmark the permalink.

2 Responses to Creating Web deployment Package and MS SQL DAC Package for deploying Services Template in System Center Virtual Machine Manager 2012

  1. Simon says:

    Where do domains fit in with these templates. If I create a template in my lab domain, will I have to re-make the template to have the auth use the live domain? or can I create the template domain neutral to maybe have the authorised accounts entered on service deployment?

  2. Hi, If you wish to make your template generic so that you can move the same template between different Domains , you need to use configurable service settings when building your service template , Service settings, just like Windows environment variables, are a set of dynamic named values that can affect the way a service is deployed/serviced
    This article should help you understand service setting http://blogs.technet.com/b/scvmm/archive/2011/10/03/sc-vmm-2012-service-settings.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s