How My Company Uses Windows Azure in Development Process
How My Company Uses Windows Azure in Development Process
Join the DZone community and get the full member experience.Join For Free
I have used MSDN Ultimate Windows Azure benefit from the day it was made available and since then I have more and more used Windows Azure in my everyday development work. I’m building mostly web-based applications and services and Windows Azure fits well for this scenario. In this post, I will introduce you how Windows Azure supports development work in the practice of one small software company.
Why Windows Azure?
This is the first question that developers from other companies ask me when they hear about my heavy use of Windows Azure. I have experiences from the past – based on server and shared hosting – and I can say that Windows Azure makes my life way easier. These are the main reasons:
- no hardware costs – I don’t have to rent or buy servers, I don’t have to monitor their physical health and it’s not my responsibility to buy more hardware, replace broken parts or buy new machines when old ones need to be retired,
- no maintenance costs – I don’t have to spend my time on deploying updates, make fancy configuration changes and other administrative work I had to buy in before or in the case of over-shared shared hosting I had to have endless discussions with tech support to get test sites to run at normal speed,
- no backups – what’s on the cloud will stay on the cloud – I don’t have to worry about installing my systems again when some environment crashes because it is up to Windows Azure service to keep my machines alive and backed up,
- control over server – something you don’t get with shared hosting is control over your server environment – on Windows Azure I can access my virtual machines over Remote Desktop to detect problems or made some simple configuration changes,
- small or zero expenses- if you have small company and you have an MSDN Ultimate subscription you have Windows Azure as part of your development environment for free (of course, if you spend more resources than the amount included to your MSDN benefit you must pay).
From practice. Windows Azure, by costs, is somewhere between shared and server hosting. Comparing calculations are not easy to do because when calculating expenses on your side you have to consider also people’s work related to supporting servers, operating systems etc. It’s possible you have cheaper model worked out. I’m owner of small company and I’m only happy when price and outcome are in very good balance.
It is easy to involve Windows Azure in your development processes and once it’s done you will definitely enjoy it.
Scenarios for Windows Azure
For me the most important scenarios in development processes where Windows Azure comes in are as follows:
- test environments – on test environments we do in-house or team testing,
- public test environments – here are also customers involved,
- demo environments – do demo our systems to possible new customers.
For all of these scenarios I like one common characteristic – it’s fire and forget deployment.
From practice. All these environments are important to us and other people who are involved in our work. Stability and availability must be very good and this is where Windows Azure is the best choice for us. We don’t need endless discussions and negotiations with tech support of services anymore – if we need more resources we can buy what we need.
Deployments to cloud environment
Deploying systems to cloud environment is damn easy. You can use Visual Studio for it and if you like to automate things then you can also use MS Build and PowerShell. Here are possible options for deployments:
- Cloud projects on Visual Studio,
- PowerShell scripts to build and deployment packages,
- MS Deploy – works also for Windows Azure web sites,
- Integration with Team Foundation Services.
From practice. I’m using mostly cloud projects and to some compute instances we deploy more than one separate system with one shot. We are using special deployment projects that include folder for each separate system and these systems are deployed to folders using Visual Studio file deployment. When systems are deployed to folders we run cloud deployment project that moves all new stuff to cloud. We do it around 4-5 times per day and preparation for deployment takes only some minutes,
With systems we must also deploy their databases. In most cases SQL Azure web database is more than enough for us. Visual Studio makes it extremely easy to deploy database updates from database to Visual Studio database project and from database project to different database.
It’s also possible to use database deployments where database is recreated before deployment. Test data can be part of database project – you can use post-deployment scripts to pump test data to database. There’s nothing complex. Just spend some hours on playing with database projects and you are there.
You can find some reading about database projects here:
- Using Visual Studio database projects in real life
- Using Visual Studio database post-deployment scripts in practice
- Comparing and updating database schemas using Visual Studio 2010
From practice. Visual Studio database projects are very powerful tool to synchronize changes between databases. Of course, it’s not silver bullet that solves all your problems but still it’s very good result if database deployment takes you couple of minutes instead of hours of manual update. SQL Azure is also supported, just make sure you set SQL Azure as target database.
Architectural changes in applications
Now comes the most complex part – in-premises and shared hosting applications are not usually built to handle file system, sessions and cache as services. If you write simple web applications then Windows Azure Web Sites should be enough for you – similar to shared hosting and fast deployments using MS Deploy.
For compute instances you need some tweaking. You have to build application the way that it works in shared hosting and on compute instance. This means using dependency injection to plug file access and session providers to your application depending on where it is running.
From practice. First time it takes time to get all those pieces together and function normally on Windows Azure. Consider two-three working days for some of your great developers for this task. When everything starts running and you have idea how things work then next times it takes you around hour to get all tweaks done for new project.
I started using Windows Azure when it was young platform and over time I have reached the point where Windows Azure is mandatory service in my development processes. There are many ways how Windows Azure can support your development processes and it’s not hard to get there. Visual Studio provides you with very good tools and making some more advanced use of database projects in Visual Studio you will work also deploy your databases very fast. Your first time on building up everything described here may take time and be painful for you but when you get things running you will never want to go back.
Published at DZone with permission of Eric Genesky . See the original article here.
Opinions expressed by DZone contributors are their own.