Monthly Archives: November 2010

Azure apps : SDLC Cycle

Standard

Microsoft says that Azure development can be done with Visual Studio 2010. This means that we can perform the development functions of  Code and unit test, Packaging, automated tests and Release  with development machine. I started reading on this and there are a lot of great blogs that I read.  Wrote my learning for my reference. More if future post with more hands on.

On development process, one needs to keep in mind the following

  1. Deploying an application on Windows Azure does not provides us with a lot of options.You cannot copy files or deploy an MSI on Windows Azure, but for may be the VM role
  2. For testing the application also, one needs to l pay for servers and databases and storage. Windows Azure doesn’t treat testing separately.
  3. There is no ACL support for any management tasks. The LiveID account defined for service management can do anything and one cannot define finer grained access to the service. For example, we cannot assign “LiveID1” for create storage accounts and “LiveID2” for managing services, etc. This mean team members who need access to Azure portal needs to share that account. We can try with authentication mechanism: certificates. Please provide the developers and test engineers with responsibility to access the Azure account both from usage and also from metering if they mismanaged the Cloud infrastructure.

A possible Azure team might build Azure application with break-up of the responsibility as follows.

Team Role What he performs
Developers
  • Runs against the local dev fabric
  • Build server runs tests locally too.
  • Automated Packaging and deployment to Windows Azure
  • Test Engineer
  • The Test team runs tests both locally
  • The test team also runs tests on the “live” environment.
  • Administrator
  • Hel shares a single Admin LiveID  to (seldom) access the portal with all
  • He is also responsible for making payments and subscribing for the right account
  • One can understand some basic information about pricing at http://www.microsoft.com/windowsazure/offers/ and Windows Azure platform Comparison Table and http://blogs.msdn.com/b/patrick_butler_monterde/archive/2010/02/10/windows-azure-billing-overview.aspx

    I made use of the Using Development Storage , Limitation of Development Storage over Windows Azure Storage Services  to get a grasp of the development environment., As I have SQL Server on my machine, i need to reset my development storage config settings as follows. Go to Windows Azure SDK directory on the command line and launch the Initialization Tool [DSInit.exe]. One needs to point to the SqlInstance that you wish to create the tables on and in addition can make use of /forceCreate] option to create the tables. The InstanceName should not include periods or slashes
    DSInit.exe /sqlinstance:<YourDatabaseName>/forceCreate

    As developing your application to deploy for cloud is tricky and involves cost, there is a needs to build automated tests that can be run in the development environment  to catch errors before you deploy out to the cloud. The automated test should be generic to run both on the development environment and cloud environment with minimal changes. For examples, the configuration values can be provided in the ServiceConfiguration.cscfg file, and make use of methods like GetDefaultTableStorageAccountFromConfiguration() to run the code beautifully both when your code is configured to run locally or configure it for an endpoint in the cloud. As the configuration are set in the ServiceConfiguration.cscfg file, these values can be updated even after deploying to the cloud by uploading a new Service Configuration.

    To  run your tests on a dedicated build server, Windows Azure SDK needs to be installed and Azure Development Storage  should be verified for existence before start of test execution and also need to be running during the test execution on that machine. One needs to shut down the Development Storage upon completion of your tests.

    Please be aware that DevelopmentStorage.exe only gets automatically started when you start debugging a cloud application project in Visual Studio. if tests are run outside Visual Studio and Development Storage is not running, please issue a command line call from .NET using the Process and ProcessStartInfo and wait for the process to exit till the tests are complete.

    Learning SDL for Azure apps

    Standard

    Microsoft says that Azure development can be done with Visual Studio 2010. This means that we can perform the development functions of  Code and unit test, Packaging, automated tests and Release  from development machine. I started reading on this and there are a lot of great blogs that I read.  Wrote my learning for my reference. More if future post with more hands on.

    On development process, one needs to keep in mind the following

  • Deploying an application on Windows Azure does not provides us with a lot of options.You cannot copy files or deploy an MSI on Windows Azure, but for may be the VM role
  • For testing the application also, one needs to l pay for servers and databases and storage. Windows Azure doesn’t treat testing separately.
  • There is no ACL support for any management tasks. The LiveID account defined for service management can do anything and one cannot define finer grained access to the service. For example, we cannot assign “LiveID1” for create storage accounts and “LiveID2” for managing services, etc. This mean team members who need access to Azure portal needs to share that account. We can try with authentication mechanism: certificates.
  • A possible Azure team might build Azure application with break-up of the responsibility as follows.

    Team Role What he performs
    Developers
  • Runs against the local dev fabric
  • Build server runs tests locally too.
  • Automated Packaging and deployment to Windows Azure
  • Test Engineer
  • The Test team runs tests both locally
  • The test team also runs tests on the “live” environment.
  • Administrator
  • Hel shares a single Admin LiveID  to (seldom) access the portal with all
  • He is also responsible for making payments and subscribing for the right account
  • One can understand some basic information about pricing at Windows Azure Offers and Windows Azure platform Comparison Table and Windows azure billing overview.Let the developers and test engineers earn the responsibility to access the Azure account both from usage and also from metering if they mismanaged the Cloud infrastructure.

    The links Using Development Storage , Limitation of Development Storage over Windows Azure Storage Services  helped to me to get my application run in the development environment., As I have SQL Server on my machine, i need to reset my development storage config settings as follows. Go to Windows Azure SDK directory on the command line and launch the Initialization Tool [DSInit.exe]. One needs to point to the SqlInstance that you wish to create the tables on and in addition can make use of /forceCreate] option to create the tables. The InstanceName should not include periods or slashes
    DSInit.exe /sqlinstance:<YourDatabaseName>/forceCreate

    As developing your application to deploy for cloud is tricky and involves cost, there is a needs to build automated tests that can be run in the development environment  to catch errors before you deploy out to the cloud. The automated test should be generic to run both on the development environment and cloud environment with minimal changes. For examples, the configuration values can be provided in the ServiceConfiguration.cscfg file, and make use of methods like GetDefaultTableStorageAccountFromConfiguration() to run the code beautifully both when your code is configured to run locally or configure it for an endpoint in the cloud. As the configuration are set in the ServiceConfiguration.cscfg file, these values can be updated even after deploying to the cloud by uploading a new Service Configuration.

    To  run your tests on a dedicated build server, Windows Azure SDK needs to be installed and Azure Development Storage  should be verified for existence before start of test execution and also need to be running during the test execution on that machine. One needs to shut down the Development Storage upon completion of your tests.

    Please be aware that DevelopmentStorage.exe only gets automatically started when you start debugging a cloud application project in Visual Studio. if tests are run outside Visual Studio and Development Storage is not running, please issue a command line call from .NET using the Process and ProcessStartInfo and wait for the process to exit till the tests are complete.

    Migrate software development to cloud : pointers to be aware

    Standard

    Prior to the migration of an application to cloud, would it not be a good idea to migrate the development (code and build) and test environment to the cloud? I think this would be an idea to sell to the management the practical benefits of cloud and overcome internal objections in the process of proving a cloud solution.

    The development and test environment of traditional software development has the below inherent challenges, which cloud migration can provide efficient solutions.
    • Utilization of development servers is very less, if they are running at all .
    • Provide very less business value compared to the cost to maintain them
    • Access to compute and storage resources for distributed teams like team members distributed geographically or across outsourced teams.
    • Agile mode of development demanding quality decisions in short time.
    • Managing multiple environments in parallel

    This model can transform in to resources hosted on private cloud model or on public cloud provider or hosting provider or a combination of the above. This give rise to 3 variations of the model for development irrespective of deployment model.
    • Develop and Build on–premise and Deploy on the cloud
    • Develop and Build on the cloud and deploy on the cloud
    • Develop and Build on the cloud and Deploy on-premise.

    Irrespective of the mode of cloud adoption for software development and testing , one should look for the following in the new model.

    1. Environments need standard VMs. Some of VMs might take time to be setup. Hence the cloud shall be able to provide a set of available predefined template of available VMs is necessary for software and sizes. For example, AppServer VM is equivalent to VM with operating system WS 2008 R2 and specific roles enabled.
    2. There should be capability to build specialized templates of development environments like single tier, client-server, three tier and multi-tier environments. Some specialized template examples are
    • AppServer and Database
    • AppServer and Load Balancer, Database
    • AppServer and Load Balancer, Master Database and Slave database
    3. There should be capability to inspect, clone and customize an established development or testing environment with minimal effort at a short duration of time.
    4. There should be ability to audit who, what and when across the environment
    5. In all of the above scenarios, there should be the ability to make use of available licenses with enterprise.

    Some constraints that might still be open after migrating to cloud are
    1. Server Failures
    2. Network outages
    3. Inefficient usage of cloud resources resulting in increase of costs.
    4. Ramp Down of resources is a challenge and finding optimal resource usage takes effort and time

    Get ready to deploy in the Cloud

    Standard

    Whether the target is public cloud or private cloud or hybrid cloud or the target is to build a new cloud application or migrate existing application or part of the same to cloud, one can start preparing on some pointers to easily deploy the application on the cloud.

    1. Separation of networks: Build isolation between all of the different networks that are part of the virtualization infrastructure. IT staff needs to learn how to distinguish the different users in the new infrastructure.
    2. Self Service automated portal: Make the compute clod easily available for both developers and IT professionals. It is better to have a self-service automated portal that enables addition and removal of resources(network, storage)without provisioning overheads.
    3. Separation of customer data : This is done to ensure that no traffic is rooted between networks and there can be physical or virtual appliance firewalls between networks. The application needs support for multi tenancy.
    4. Secured customer access to cloud resources: Encrypt Critical data. Make use of SSL encryption. Provide a management portal that is encrypted.
    5. Strong security : It become highly important in a cloud deployment to know who performed task in the system(authentication), when the task was performed and what exactly they performed(audit mechanism). Make sure only authorized administrators have access to resources.
    6. Perform better resource management: Be aware that the cloud based resources shared between customers is directly related to what th customer has paid for. An effective cloud solution needs to scalable and one needs to be aware of the boundary conditions different from the traditional model as one owns the decision when to provision additional cloud resource.
    7. Plan for charge backs: Even when you migrate an internal application to cloud, the ability to create transparency in costs and services can help justify expenses.