Posts Tagged 'Azure'

Committing to the Cloud

When I teach Learning Tree’s Introduction to Cloud Computing course I often get questions about how components from different public cloud vendors can be used together in an integrated application. The answer, of course, is: “it all depends on the application.” Here I would like to give a more comprehensive response than that.

This will be the first of a series of blog posts that will explore that question in some detail. I will go through the process of building a real-world application using services from Microsoft, Amazon and Google. Further, I will do all development and testing in the cloud. Dev/Test is often a good use case for organizations wishing to get started in the cloud. I will use a very minimal local machine which will allow me simply to connect to cloud resources using only RDP, SSH and HTTP.

My application will be designed using an n-tier architecture. There will be, at a minimum, a tier for storage, business logic and presentation. Since I am attempting to illustrate interoperability between cloud vendors it may make some sense to host components for each of the architectural tiers with different providers. So, somewhat arbitrarily, I will choose to host the storage on Amazon Web Services (exact service to be defined later), the business logic on Azure (so I can program in C# J) and the presentation on Google App Engine (since it is very cost-effective).

Follow along over the next few weeks. We will go from square zero to a fully functional, interoperable web application that uses services from the “Big 3″ public cloud providers. We will provision our development, testing and deployment environments from a lightweight client (tablet PC). All the while we will track cloud costs and development time.

This should be fun!

Kevin Kell

Compare Cloud Security to Your Security

There’s an assumption people make that if they put their data in the cloud it is less secure. There are three aspects to security: confidentiality, integrity, and availability. They are known as the CIA security model.

Confidentiality

Private data is kept confidential using encryption. This might require encrypting the data in the database. When transporting data across the internet, it requires using the HTTPS protocol. Whether using the cloud or local servers this does not change. It is our responsibility to secure our data no matter where it is physically stored.

Integrity

Integrity is maintained in distributed systems by verifying messages sent between computers have not tampered with. This is also achieved by using the HTTPS protocol. Again, this does not change when using the cloud.

Availability

Data should only be made available to those who are allowed to see it. This is done through some sort of authentication process, along with rules that govern access to the data. Authentication can be done using passwords, digital certificates, biometrics, passcodes, keys etc.

Securing the Infrastructure

Without a secure infrastructure, you can’t achieve the CIA’s of security. Servers must be patched, firewalls need to be configured, access to physical hardware needs to be limited, intrusion-detection systems need to be put in place, etc. Securing the infrastructure is very expensive and requires a great deal of administration.

This is where we can take advantage of a cloud provider’s economies of scale and expertise, to make our systems more secure! The fact is, very few people can afford to do what Microsoft and Amazon do to secure their data centers. And even if you can afford it, do you have the people who know how to do it?

To better understand why this is so, read the links below which describe what Microsoft and Amazon do to secure their data centers. Then, compare what they do, to what your organization does. You will likely realize that your data would be considerably MORE secure in the cloud than it is in your computer room.

Links

Windows Azure Security Overview – Microsoft

AWS Security and Compliance Center – Amazon Web Services

If you want to learn more about cloud computing and how it can benefit your organization, come to one of the courses in Learning Tree’s Cloud Computing curriculum

Doug Rehnstrom

 

Microsoft Release Azure SDK 1.5

Anybody who has been working with Azure from its earliest release will appreciate that both the platform and the associated development tools have improved beyond recognition from the early days. Its good to know that the rate of development is being maintained by Microsoft and the recent release of the Windows Azure SDK 1.5 and the associated Azure tools for Visual Studio 2010 have added some great new features.

Considering the SDK firstly, this adds a number of new features including:

  • A new architecture for the emulator which more closely resembles the target Azure cloud
  • Improved performance of emulator
  • Support for uploading service certificates

Performance of the emulator has always been a criticism of the SDK so this is a particularly welcome development. For the Visual Studio 2010 Azure tools improvements include :

  • New project type for ASP.NET MVC 3 roles
  • Profile applications running on Azure
  • Add an Azure deployment project to standard MVC, Web Forms and Web Service projects

The new features provide significant improvements in development productivity, type of applications for Azure and also in management tools for monitoring deployed applications. All combined, these provide an incredibly powerful platform for anybody developing Web applications or Services using .NET technology. The benefits, both technical and commercial to organisations is significant. If you would like to find out more about developing for Azure why not consider attending the four day Learning Tree course developed by Azure authority Doug Rehnstrom. I am sure you will learn a lot.

Chris Czarnecki

LightSwitch Released!

Last week Microsoft announced that LightSwitch for Visual Studio, which had been in Beta2 since March, is now a released product.

Those of you who have been following this blog may know that I am a fan of LightSwitch. Okay maybe I’m not quite a fanboy, but I do like it! LightSwitch has been featured in a couple of previous posts I have made. No, this is not an advertisement and no, I do not work for Microsoft. When I see something that I think is cool (and maybe even useful) I like to pass it on!

Maybe it is not technically just for cloud computing. I contend, however, that LightSwitch is an enabling technology that effectively democratizes parts of “the cloud”. Why? Well, there has always been a segment of the overall cloud market that is specifically targeted at custom application development. This is usually Platform as a Service (PaaS), but not always. LightSwitch greatly enhances the productivity of professional custom application developers. In addition, LightSwitch puts custom application development (including prototyping) into the hands of folks whose primary job description is not “programmer”.

No doubt there will be some who are going to squawk about how crappy application generators are and how this, that, the other thing and that the aesthetics of the generated code suck. The only real way to build an application is to code everything out yourself, right? That may be true, but it is not the reality of today’s world for most.

There will be others who will say that because it is Microsoft it is crap and you really need to be doing Ruby on Rails or PHP or something else because it’s way better. Maybe they are right, maybe they aren’t. That’s okay. LightSwitch is probably not for them anyway.

But there are some of us out there in the real world who are just trying to get things done. In the past we may have used tools like dBase or Access. Sometimes that was the right tool for the job and it served our clients very well. A large percentage of our applications are “Forms Over Data” anyway. 

I see LightSwitch kind of in the same light, but perhaps a little better. After all it is .NET and we can always go ahead and customize our application using a familiar framework and toolset. There are some of us who are just trying to solve problems for ourselves and for our clients. We don’t have the luxury of hand-coding everything. LightSwitch may be for us.

LightSwitch can transparently deploy to Azure, Amazon EC2, on-premises servers or even the desktop. This significantly reduces the degree of vendor lock-in although, admittedly, you are still locked-in to Windows. Still, that is a fair degree of flexibility and does give a number of runtime choices from the same code base. So, while it may not technically be about cloud computing, LightSwitch does give us an easy route to the cloud.

Check it out and let me know what you think. Does LightSwitch make sense for you? Is it easy for you to use or do you see a need for Instructor Led Training in LightSwitch?

Kevin Kell

Isn’t Azure just my ASP.NET Application hosted by Microsoft?

Well, yes … sort of … and no.

It is true that Microsoft has made it pretty easy for ASP.NET developers to develop Azure applications. It is also generally true that it is relatively straightforward to port most existing ASP.NET applications to Azure with little or no modification. Of course there are some that say the process is still too painful and that additional skills are required. Also, there are others that say Azure requires a new way of thinking about applications and for providing the capability for Internet-class scalability. As usual the reality for most people trying to come to grips with new technology is somewhere between the extremes.

Let’s take, for example a simple ASP.NET web application vs. a simple Azure application. The experience for each is similar but different. In particular, let’s look at the support for application security. At the broadest level this means providing for creation of user logins and roles and providing access to resources based on those credentials.

How does the Azure application generated out-of-the-box compare with an ASP.NET Web Application? Even though the Azure project wizard creates almost the same starting point as the ASP.NET project wizard there are a few things that are different.

In an ASP.NET application the project wizard will do most of the heavy lifting for you. The ASP.NET wizard creates an empty App_Data folder in the project. By default, when the application runs and a login is requested, a SQL Express database file will be created that stores user login information. This SQL Express file can be used in the deployed application or (probably more commonly) could be upsized to a real SQL Server. This is part of the ASP Providers services Microsoft has offered since ASP.NET 2.0.

The Azure wizard also creates an empty App_Data folder. However when the Azure application is run no SQL Express database will get created. In fact, the application will throw an exception.

So what? What does this mean? Why should you care?

While it may be possible to adjust some settings and tweak things a bit to get the Azure application to work with SQL Express like the ASP.NET application does, in practice you would probably never want to do so. Using SQL Express to store application state for an Azure application would be like having training wheels on your Harley! It would seriously limit the scalability of the application and scalability is one of the main benefits of Azure. A better approach would be to use Azure table storage or SQL Azure to persist membership data. Microsoft provides sample code that shows how to do this.

The truth is that if you are looking to run a single, simple ASP.NET website, Azure may not be your most cost effective solution. If you are running multiple applications, however, which have non-trivial processing requirements and possibly share membership data, Azure may make sense. Certainly Microsoft has done a good job of extending the .NET namespaces to include first class support for Azure. Additionally the Web Role/Worker Role paradigm offers scalability far beyond what could be achieved with a simple ASP.NET application.

To help sort out all of the various details and choices which arise when evaluating architecture options Doug Rehnstrom has authored Course 2602 – Windows® Azure Platform Introduction: Programming Cloud-Based Applications. Programmers who attend this course will leave with an appreciation for what Azure has to offer and practical knowledge in how to leverage this platform for their organization’s business interests.

Kevin

Creating an Azure Application without Writing Code

In Learning Tree’s Cloud Computing Introduction course when we introduce the topic of Platform as a Service (PaaS), we say that the vendor offerings can be broadly divided into two categories. There are PaaS for programmers which require custom programs to be written and there are PaaS for non-programmers which allow for application development without programming. We examine Azure as an example of the first kind and Force.com as an example of the second. Things can and do change quickly in the cloud, though!

Microsoft has recently released Beta 2 of their Visual Studio LightSwitch product. LightSwitch is positioned as a product non-programmers can use to build business applications without coding. If necessary, however, custom code can be added to the generated project. These applications are sometimes referred to as “forms over data” because they typically allow for the creation, retrieval, update and deletion (CRUD) of database records via a user form.

LightSwitch Beta 1 has been around for some time. What’s new with Beta 2, however, is the ability to deploy applications directly to Azure. So it seems Microsoft is moving towards providing a cloud application development option that is targeted towards developers who may not necessarily be hardcore programmers.

Getting started with LightSwitch is pretty straightforward. If you already have Visual Studio 2010 you need to make sure that you have SP1 installed. Then you can download and install LightSwitch.

Once installed there will be a LightSwitch project type available in Visual Studio. LightSwitch projects can be deployed to the desktop, the Web or to Azure. There is a publishing wizard which seamlessly handles deployment to Azure and migration of the database schema from the developer’s SQL Server Express Edition to SQL Azure.

This screencast walks through creating a simple LightSwitch project and deploying it to Azure:

The evolution of LightSwitch is an example of how vendor offerings can and do shift and change as the various players compete in the cloud. For a good grounding in cloud fundamentals Learning Tree offers a comprehensive hands-on introductory course. We also have an excellent course in cloud security as well as Azure programming for the more technically inclined!

I hope to see you at a Learning Tree education center soon!

Kevin

Windows Azure Training Series: Creating an Azure Storage Account

In this blog post, I assume you already have an Azure subscription and a user account set up. If you do not, check out Windows Azure Training Series:  Understanding Subscriptions and Users. You might also like to read Windows Azure Training Series: Understanding Azure Storage for an overview of Azure storage.

Creating a new Azure storage account

To use Azure storage, you need to create a storage account. To do this, first go to the Windows Azure Platform Manage Portal and log in. Then, click on the New Storage Account button at the top left corner of the portal as shown below.

You will be prompted to enter a unique URL (or account name) for this storage account. Azure storage is always accessed using a URL based on this name, plus the type of storage you’re accessing, plus the “core.windows.net” domain. So, using the name shown below, accessing blob storage would be done using the URL, http://myuniqueaccountname.blob.core.windows.net/. To access table storage you would use the URL, http://myuniqueaccountname.table.core.windows.net/.

After entering your URL, choose a region where your storage account will be located and then click create.

Azure Storage account properties

After the account is created you can view its properties in the Properties grid on the right side of the management portal. The most important property is the primary access key. To access it, click on the View button.

The window shown below will open; it allows you to view and copy the access keys to the clipboard. You will need to add the access key to the configuration file of your Azure application.

In Visual Studio, open the ServiceDefinition.csdef file in your Azure service project, and add the configuration setting shown below.

Also, open the ServiceConfiguration.cscfg file, and set the value of that setting as shown below. Of course, you’ll use your own account name and account key.

Finally, you’ll need to add the following code to your WebRole.cs file.

Tune in next time and we’ll take a look at the code required to write to blob storage.

Doug Rehnstrom

To learn more about Windows Azure, check out Learning Tree’s course, Windows Azure Platform Introduction: Programming Cloud-Based Applications.

Remote Desktop Functionality in Azure Roles

One of the cool new features of version 1.3 of the Azure SDK is the ability to connect to Azure roles using Remote Desktop. The increased visibility into the role makes monitoring activity and troubleshooting problems easier than ever. This allows for unprecedented flexibility and control over the role instance.

Configuring a role for Remote Desktop access is relatively straightforward. From the Publish dialog in Visual Studio you can configure the Remote Desktop connection parameters.

Figure 1 Publish Dialog

Figure 2 Configure Remote Desktop connections

In the configuration you need to specify a user name and password to use and a certificate to encrypt those credentials. The certificate will be uploaded to the hosted service on Azure. Thus a secure relationship is established for RDP. If you want more information on how certificates can be used to deliver passwords securely and cloud security in general, consider Learning Tree’s course 1220: Securing the Cloud.

After the project is published in this manner and is started on Azure you can connect to the running instance using Remote Desktop. As usual, I think a demo makes this clearer.

Azure continues to evolve, as do the services offered by the other cloud providers. One thing is for sure, competition benefits consumers! In our course 1200: Cloud Computing Technologies a Comprehensive Hands-on Introduction we develop a framework for understanding cloud computing that will be useful now and in the future!

Kevin

Windows Azure Training Series: Understanding Azure Storage

Windows Azure Storage Choices

There are a couple common ways of storing data when using Microsoft Windows Azure. One is SQL Azure, which is a cloud-based version of Microsoft SQL Server. The other is Azure storage. SQL Azure will be familiar to those who already understand relational databases. It may also make moving an application to cloud easier, if that application already uses SQL Server.

Azure storage has some advantages as well. First it is inexpensive. Azure storage costs about 15 cents per gigabytes per month, compared to $10 per gigabyte per month for SQL Azure. It can also be very large. Depending on your instance size, it can be up to 2 terabytes. It is also cross-platform, and accessed using standard internet requests.

Types of Windows Azure Storage

There are four types of Azure storage: blob storage, table storage, queue storage and Azure drives.

Blob storage is used to store binary data. This could be pictures, videos, or any other binary data.

Table storage is used to store structured data. It is similar to a database, but not relational. Table storage is a convenient way of saving business entities in an object-oriented program. In many ways it is simpler than relational storage.

Queue storage provides a simple messaging system that allows different Azure roles to communicate. For example, a user may request a report to be run using an application running in a Web role. That request could be sent to an Azure queue. Later a worker role can process the request, and then email the completed report to the user.

Azure drives allow storage to be access using standard NTFS APIs. This could be particularly useful if you have an application that already writes to a hard disk and you want to migrate it to the cloud.

Accessing Azure Storage

Azure storage can be access using a REST-based API via HTTP. This means storage can be used from any application, whether it is written in .NET, Java, Python, JavaScript or something else.

If you’re using .NET though, accessing storage is made easier using the Azure SDK. If you don’t already have it, go to this link, http://www.microsoft.com/windowsazure/windowsazure/, and then click on the “Get tools and SDK” button. You might also like to read this article, Windows Azure Training Series – Setting up a Development Environment for Free.

Once you have the SDK installed, set a reference to Microsoft.WindowsAzure.StorageClient.dll, and you’re ready to go.

In later posts, we’ll take a look at some code to write to Azure storage. In the meantime, you might like to read the prior posts in this series.

Windows Azure Training Series – Understanding Subscriptions and Users

Windows Azure Training Series – Setting up a Development Environment for Free

Windows Azure Training Series – Creating Your First Azure Project

Windows Azure Training Series – Understanding Azure Roles

Windows Azure Training Series – Deploying a Windows Azure Application

You might also like to come to Learning Tree course 2602, Windows Azure Platform Introduction: Programming Cloud-Based Applications.

Doug Rehnstrom

Windows Azure Training Series: Deploying a Windows Azure Application

This is the fifth in a series I’ve been writing on learning Microsoft Windows Azure. In this post, you’ll deploy the application created earlier; see Windows Azure Training Series – Creating Your First Azure Project.

Configuring an Azure Role

With your Square a Number Azure project open in Visual Web Developer (or Visual Studio), go to the Solution Explorer window. Remember, there will be two projects, the Web role project and the service project. Expand the Roles branch of the service project’s tree. Right-click on the Web role, in this case SquareANumber.Web, and select Properties.

The properties Window will open as shown below. You need to set instance count and VM size. For this example, set the size to ExtraSmall and the count to 2. Then, save your project.

In Solution Explorer, double-click the ServiceConfiguration.cscfg file and you will see where the instance count was set. Double-click on the ServiceDefinition.csdef file, and you will see where the instance size was set. That’s it!

Creating the Deployment Package

Again in Solution Explorer, right-click on the service project, not the Web role, and select Publish. The following window will open. Select the Create Service Package Only option, and then click OK.

The deployment package is created and the configuration file is copied into the same folder. A Windows Explorer instance will open at that path. Make note of where the folder is, you’ll need it in a minute. (You might want to copy the full path to the clipboard to make finding it easier.)

Creating a Windows Azure Hosted Service

To upload the deployment package you need to go to the Windows Azure Management portal. The easiest way to get there is to again right-click on the service project, and select Browse to Portal. You will need to log in using your Windows Live ID.

In the management portal, click on the New Hosted Service button at the top left. The following window will open. Fill it out similar to what is show below. You’ll need to have a subscription before doing this. See the first article in this series, Windows Azure Training Series – Understanding Subscriptions and Users.

When filling out this form, you’ll need a URL prefix that is not already used. The URL prefix is used to determine the location of your Web application. You can deploy to staging or production. In a real project, you’d deploy to staging first for testing, but for this example just go directly to production. Click the Browse Locally button and find the package and configuration file you just created. Click the OK button and the files will be uploaded.

You’ll have to wait a few minutes for the instances to start. Once started, you should see two extra-small instances running. See the screenshot below.

When the management portal says it’s ready, test it in the browser. The URL will be, “http://<your URL prefix>.cloudapp.net”. You’re spending money now, so don’t forget to Stop and then Delete the deployment when you are finished.

To learn more about Windows Azure, come to Learning Tree course 2602, Windows Azure Platform Introduction: Programming Cloud-Based Applications.

Doug Rehnstrom

Next Page »


Learning Tree Logo

Cloud Computing Training

Learning Tree offers over 245 IT and Management courses, including over 10 courses on Cloud Computing and Virtualization.

Enter your e-mail address to follow this blog and receive notifications of new posts by e-mail.

Join 1,701 other followers

Follow Learning Tree on Twitter

Archives

Do you need a customized Cloud training solution delivered at your facility?

Last year Learning Tree held nearly 2,500 on-site training events worldwide. To find out more about hosting one at your location, click here for a free consultation.
Live, online training
.NET Blog

Follow

Get every new post delivered to your Inbox.

Join 1,701 other followers