Archive for September, 2012

Introducing Windows Azure Storage Architecture, here is a new kind of Windows Azure Storage. Just remember it is windows azure storage because the data management service on windows azure has several types of storage.

Windows Azure Table Storage is another type of windows azure storage, you might think of it as table but however I would prefer to think of it as special type of storage. You might think of it as table and comparing it to the SQL Azure, there are a lot of points of points that you may want to differ and others in common. You will find all the require things about the SQL Azure in this post. So the table storage is composed of tables and has something like the primary key for SQL Azure, called the partition key.

The partition key is not for the whole table it is made to partition your table along the whole infrastructure. In other words, let’s imagine a table with hundreds of names, when searching for a specific name; you will need to write a query that goes all along the table name by name. When using the partition key you will have the opportunity to partition the table into several partitions, for the previous example, let’s assume that you will partition the table using the first character of each name.

The second main thing is called the row key. That’s what defines the entity; it must be unique along the whole application. For example when adding a new entity, you can define the entity with a string, like its id or email.

So for the development, there are main two classes that must be created, one for defining what the entities will contain and the second one for the operations done on these entities like adding new entities, searching the table for entities or a specific one.

You can find the source code for an application I developed that adds and searches entities in the table in this link.

Advertisements

Windows Azure the Microsoft Platform for Cloud Computing offers the developers different ways to deploy the application online. I went through the SDK several times, and there were introducing 3 ways to host the application. The first one was through the portal directly, the second one through PowerShell or service management API (here is an example about it) – I totally admit that I faced several problem with that, until I followed the instruction of the training kit – and the third one was through Visual Studio and this is a new one I think was an update with the Windows Azure SDK 1.6.

The certificate in the deployment was used in 2 of the 3 ways of the deployment. It is a very easy to get one, follow this blog post to create your own certificate.

When you develop your own application and host it on the VM as an instance on Windows Azure, each instance will run on top of guest OS installed on the VM. You can see and modify the Windows Azure VM guest operating system depending on your needs and your application needs from the VM.

In your application you can find several configuration files, one used for the service definition and the two others are for the configuration files for both options; if you run on the local machine or if you run on the cloud.

In the MSDN web page about the windows Azure guest OS, you can find all the details about the types of the OS that you can put in your service definition for your application. For me, the guest OS only contains some updates and security patches to your VM. I don’t really follow the updates on windows azure guest OS but I always allow it to be upgradable because it there are any updates done on the guest OS, my VM will be automatically upgraded.

To automate the upgrades, go to your management portal, from the deployment, that’s when you can change the upgrades mode and set it to automatic or manually.

When creating Windows Azure application in Visual Studio, two projects are created. Under the Windows Azure project, you can find two configuration files and one for the definition. The first one is called ServiceConfiguration.Cloud.cscfg this is the xml file responsible for the configuration for the VM for the role.

The configuration file contains several main thing about the role and its operating system, the number of instances and its configurations and connection strings. Here is a snapshot for the Configuration file, you can find it in this link. I also found this link, I hope you might find it useful.

After creating your windows azure application on visual studio, under the Windows Azure project you will find two configuration files and one for the definition. Two of these files are used for uploading, configuring your application and its VM on Windows Azure. In this post we will talk about the servicedefinition.csdef.

The service definition is an XML file that defines and describes your service that is hosted on Windows Azure VM. It contains all what is related to the endpoints, certificates, local resources and Startups. The service definition contains the configuration for any number of added roles (WebRole, WorkerRole and VirtualMachineRole) in the application, LoadBalancerProbes and NetworkTrafficRules.

During my online research I saw a web page containing several service definition files and each one of them has different contents and each one of them is explained in the same Web Page. You can find all this page in the following link.

This blog post is to show you how to create your own certificate, that you might need during deploying your application on Windows Azure, or also you might need it do to some connection between your applications hosted in different environments. For example, I have been through this before trying to connect an application hosted on Windows Azure to Microsoft Dynamics CRM, a certificate was asked to make sure that the connection made is secure and trusted. This example only runs if you do have the CRM hosted on-premises, if you do have the CRM online there are a tool to register your CRM on the Windows Azure Service Bus.

However let’s get back to the point, to create your own certificate, you can simply do this by opening your IIS manager

 

Second thing go to Server Certificates and open it, after that go to the right most of the page and under the action part, choose create self-signed certificate as shown in the following figure

 

A new pop-up windows will open asking for a certificate name. if you were running on a windows 8 you will be asked to define the purpose of issuing the certificate, whether if it is for a personal or a web hosting purpose, if you run any previous windows you will not be asked for this.

 

Once the certificate is created you can find it in the IIS manager under the server certificates. Right click on yours and click export.

 

You will be asked to choose the location where you want to put your certificate and you will be asked for a password.

Now you have your own certificate created and ready to be used in your cloud application for the deployment or any other purposes.