1) Setup Windows Azure Account

If you have not registered for a Windows Azure account, please go to this blog post to learn how to get your free trial.

– Setup hosted service

i) Go to Windows Azure Portal by clicking on the link.

ii) Click on Hosted Services, Storage Accounts and CDN.

iii) Click on Hosted Services and click add new hosted service.

iv) Choose an name for your service and then the desired URL for your Orchard application (Depending on availability). After that choose the closest region to you or where your users mainly based at. In my case, Southeast Asia and after that select “Do not deploy”. Click OK.

– Setup storage account

i) Click on Storage Accounts, and on the top-left, click create new storage account.

ii) Type in the desired URL address for your storage and select the region to host your storage, preferably the same as your hosted service.

– Setup SQL Azure account

i) On the bottom left of the screen, click Database. Then click Create (The third button from the left).

ii) Choose the region, again, preferably the same with your hosted service. Specify the admin username and password for the database.

iii) Next screen is the firewall rules for SQL Azure. Tick on allow Windows Azure Services to access the SQL Azure. Click Finish.

iv) Once you have configured the server for SQL Azure, then now we’re going to create a database to be used by Orchard. Click on Create(Button 6th from left).

v) Name your database. I named it as “orchard”. Click OK and Done!

 2) Deploy Orchard, Edit and Finish!

i) Download Orchard for Windows Azure deployment file. There are two files inside. One is Orchard.Azure.Web and another would be ServiceConfiguration file. [Updated] I have repackaged the package to be deployed as Extra Small instance when you deploy it on Windows Azure.

ii) You will need to change the storage account setting to point to your Windows Azure storage account. Get back into the Windows Azure Portal and go to Storage Accounts. On your right, you can click on View button under the primary access key to get the key to access your storage account and copy it. *Never reveal this key to anyone!

iii) Open up the ServiceConfiguration.cscfg file with notepad. Locate the line with “Setting name=”DataConnectionString”. Replace the entire line with the below line.Put in your storage account name and the account key would be the key that you have copied earlier on. Save it.

<Setting name=”DataConnectionString” value=”DefaultEndpointsProtocol=https;AccountName=your-account-name;AccountKey=your-account-key” />

iv) Go to Windows Azure Portal again, under hosted service, locate the hosted service that you have created. Select it and click “New Production Deployment”. Then give the deployment a name, and select the ServiceConfiguration.cscfg file and Orchard.Azure.Web.cspkg files to be uploaded. Click OK and Yes to the warning popup.

Now Windows Azure Portal will be uploading the files and then provision a Virtual Machine to host the files. Wait until the status turns to Ready state.

v) Once it is ready, browse to your website.http://<yourdnsprefix>.cloudapp.net

vi) If everything is good, you will see the Orchard setup screen. You need to configure Orchard to used with SQL Azure in order to ensure that application state is retained in the case of Windows Azure recycles the instances.

You can get the connection string for SQL Azure database when you select the database and click on View button under Connection Strings. Copy down the connection string under ADO.NET. Remember to change password to reflect the real password of your SQL Azure.

After completing the setup step, you will be shown the familiar Orchard home page and you can start configuring your site now!.

That’s it, easy right?

Tagged with:
 

One Response to 2 Simple Steps to Deploy your Orchard on the cloud

Leave a Reply