Step by step guide.pdf

2 downloads 343 Views 1MB Size Report
Jun 24, 2011 - Website www.orbitone.com .... Provide the SQL Azure database name to create. 2. ... Create website in IIS
Umbraco on Windows Azure Step-by-step guide

th

This guide is used in the Workshop training on 24 June 2011 at OneOffice in Ghent. Presentation can be found on: http://www.slideshare.net/orbitone

It describes the installation and migration of an existing Umbraco website to Windows Azure using the new accelerator by Microsoft. http://waacceleratorumbraco.codeplex.com

Date: Developed by: Reference: Developed for:

Orbit One BVBA Raas van Gaverestraat 83 B-9000 GENT, BELGIUM Website www.orbitone.com

E-mail Tel. VAT Bank

24 June 2011 Wim De Coninck Umbraco on Azure Workshop

[email protected] +32 9 330 15 00 BE 456.457.353 442-7059001-50 (KBC)

Contents 1.

Prerequisites _______________________________________________________________ 3

2.

Umbraco Windows Azure accelerator ___________________________________________ 4

3.

4.

2.1.

Prepare the Storage Account ____________________________________________ 4

2.2.

Run the setup script ___________________________________________________ 5

2.3.

Prepare the Accelerator for deployment ___________________________________ 5

2.4.

Prepare the hosted service ______________________________________________ 6

2.5.

Prepare the SQL Azure Server ___________________________________________ 7

2.6.

Configure Umbraco with the setup script __________________________________ 7

2.7.

Upload a clean Umbraco ________________________________________________ 8

Migrate with SQL Azure Migration Wizard _______________________________________ 9 3.1.

Configure the source database ___________________________________________ 10

3.2.

Configure the destination database _______________________________________ 11

Umbraco from CodePlex _____________________________________________________ 12 4.1.

Install _______________________________________________________________ 12

4.2.

Configure ____________________________________________________________ 12

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

2

1.

Prerequisites

For running the setup scripts and generating the deployment package you will need the following pre-requisites:  Visual Studio 2010 and .NET 4  Windows Azure SDK and Tools for Visual Studio (March 2011) version 1.4  SQL Express 2008 R2  A Windows Azure account: You can request a free (no credit card required) account by visiting http://windowsazurepass.com/, enter your country and cloudcover for promo code. It will take a couple of days before you will receive your account, so please request it a week before attending the training.

Once you’ve installed those, let’s go get the rest:  The accelerator on CodePlex  SQL Azure Migration wizard

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

3

2.

Umbraco Windows Azure accelerator

2.1.

Prepare the Storage Account

First we need a Storage account. Follow the steps below. 1. Log on to the Windows Azure platform at http://windows.azure.com 2. Click New Storage account found in the ribbon 3. Choose a subscription 4. Enter a valid name for your storage account 5. Select a region: West Europe 6. Click OK

7. 8.

Select the storage account click View in the properties pane to see the Primary Access Key. Copy the Primary Access Key to the clipboard

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

4

2.2. 1. 2. 3.

Run the setup script Double click the Setup.cmd from the extracted accelerator folder Enter the storage account name Enter the storage accounts primary key

You are now prompted with the message: “You'll need to manually deploy the Accelerator to Windows Azure.”. Leave this message as it is for now.

2.3.

Prepare the Accelerator for deployment

1. 2. 3.

Open the Umbraco.sln file located in the code folder of the accelerator In the solution Explorer, right click the UmbracoAccelerator Cloud Project and Publish Select Create Service package only:

4.

Click Ok. When the deployment succeeded a new Explorer window opens with the following 2 files:

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

5

2.4.

Prepare the hosted service

1. 2.

Go back to the Windows Azure Platform portal Click New Hosted Service found in the ribbon

3. 4. 5. 6. 7. 8. 9.

In the dialog, select the subscription you are using. Enter a service name and URL prefix Choose the region: West Europe Choose Deploy to Production as a deployment option Give your deployment a name: eg: v1.0 Browse to the local location for the package and service configuration. Upload the remote desktop certificate. a. Click Add Certificate b. Browse to the Assets folder from the accelerator c. Select the remote.pfx certificate d. The password is q3&d3new7@0

The package begins to upload and shows the deployment status. This process can take from 5 to 15 minutes.

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

6

2.5.

2.6.

Prepare the SQL Azure Server 1. 2. 3.

In the Windows Azure Platform portal home screen select New Database Server Select the region: West Europe Choose an administrator name and a password

4.

Add the firewall rule for the Orbit One IP range: 195.80.238.1 - 255

5. 6.

Click Ok and then Finish. Take note of the server name (servername.database.windows.net)

Configure Umbraco with the setup script

Once the WebRoles have been deployed, go back to the command line window and proceed with the configuration process. 1. Provide the SQL Azure database name to create 2. Enter the user name and password 3. Do you want a clean install ? (Y/N) Choose Y in order to create a clean database. NOTE: Choose N to migrate an existing Umbraco database to SQL Azure. (see Migrate with SQL Azure Migration Wizard)

4. 5. 6.

Enter the SQL Azure server name from before Enter a database name Enter the credentials for the SQL Azure server (in this demo we will just use the sql azure admin account)

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

7

2.7. 1. 2. 3.

Upload a clean Umbraco Download the Umbraco 4.7 at http://umbraco.codeplex.com/releases Extract the package to c:\temp\umbraco\v4.7.0.378 Go back to the command line and provide the path to the Build folder (with trailing slash): c:\temp\umbraco\v4.7.0.378\build\ NOTE: If you want to migrate an existing site take a backup of the site and enter the physical path to the site with trailing slash in the command window.

4. 5. 6.

Give a database name for the Session State database (the same server will be used) Upload a site to the blob storage? Choose Yes Provide the site name (used as host header, eg. www.umbracoInTheCloud.com) To be able to view the site, you’ll need to register the domain to point to Windows Azure. To work around that, we enter the IP address at the bottom of the screen. To find this IP address you ping yoursite.cloudapp.net or look for it in the portal. It is the last property of your deployment in the hosted services tab.

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

8

3.

Migrate with SQL Azure Migration Wizard

Download the SQL Azure Migration Wizard at http://sqlazuremw.codeplex.com/releases Extract the zip file and start the program. Choose Analyze and migrate - SQL Database.

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

9

3.1.

Configure the source database

1. 2. 3. 4.

Enter the local database server Provide credentials Specify the database Click Connect

5. 6. 7.

Click Next 3 times Click Yes to generate the SQL script Click Next when the script is generated

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

10

3.2. 1. 2. 3.

4. 5.

Configure the destination database Enter the name of the SQL Azure database server Provide credentials I have a blank database on the SQL Azure database server  Specify the database  Click Connect I don’t have a blank database  Use the master database  Click Connect  Click Create database  Give the database a name  Click Create database Click Next Click Yes to run the scripts against the destination server

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

11

4.

Umbraco from CodePlex

4.1.

Install

1. 2.

4.2.

Download Umbraco 4.7 from codeplex: http://umbraco.codeplex.com/releases/ Extract to c:\inetpub\umbraco a. Create website in IIS and point to c:\inetpub\umbraco b. Change the application pool to .NET 4.0 c. Grant full control permission to the application pool user on the Umbraco folder.

Configure

Browse to the website, and complete the configuration process.

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

12

5.

Questions?

Wim De Coninck http://twitter.com/wimdc

Olivier Mangelschots http://twitter.com/omangels

Umbraco on Azure Workshop Umbraco on Windows Azure - Step-by-step guide - 24 June 2011

13