Deploying-a-Simple-Application_thumb[2]

If you’ve started reading from this post, you’ll need to go through the previous parts of this series before going starting this one:

Introduction
Part 1: Setting Up a SQL Azure Server and Database
Part 2: Scripting the On-Premise Database for SQL Azure
Part 3: Executing the Scripts on the SQL Azure Database
Part 4: Creating the Cloud Solution
Part 5: Testing Locally
Part 6: Preparing the Deployment Package
Part 7: Creating the Hosted Service
Part 8: Promoting from Staging to Production

Since this blog series was intended for your learning, before we can consider the walkthrough completed, we need to make sure that we take down everything that we setup in order to ensure that you don’t incur any charges on your credit card as a result of your learning.

Dropping the SQL Azure Database

  1. From the Windows Azure Management Portal, click on Database in the left hand navigation.
  2. In the left hand top navigation, expand the subscription under which you created the SQL Azure database server and database.
  3. Expand the SQL Azure database server and highlight the NerdDinner database.
  4. Click Drop from the top toolbar.

    image
  5. You’ll be asked if you want to drop the database. Click Drop.
  6. The database has now been dropped.

IMPORTANT: Once a database is dropped, it cannot be restored. In a real scenario, make sure that the database you select to drop is, in fact, the database that you want to drop.

Dropping the SQL Azure Server

  1. Select the server node in the left hand top navigation.
  2. Click Drop from the top toolbar.

    image
  3. You’ll be asked if you want to drop the server. Click Drop.
  4. The database server has now been dropped.

IMPORTANT: Once a database server is dropped, it cannot be restored. In a real scenario, make sure that the server you select to drop is, in fact, the server that you want to drop.

Deleting the Hosted Service

  1. Click on Hosted Services, Storage Accounts & CDN from the left hand bottom navigation.
  2. Expand the subscription under which you created the hosted service in part 7.
  3. Expand the hosted service that you created.
  4. Click on the row that specifies Deployment as the type.
  5. Click Stop in top toolbar.

    image

    After a few moments, the list will refresh indicating that the deployment has been stopped.

    image

    NOTE: From a billing perspective, even though your deployment is stopped (i.e. no one can access the hosted service), you’ll still be billed for the compute hours. This is because your deployment is still consuming resources on the server to which it was deployed.

  6. With the deployment still highlighted, click Delete from the top toolbar.

    image
  7. You’ll be asked if you want to delete the deployment. Click Yes.

    IMPORTANT: Once a deployment is deleted, it cannot be restored. In a real scenario, make sure that the deployment you select to delete is, in fact, the deployment that you want to delete.

    After a few moments, you will see that the deployment has been deleted.

    image
  8. Click on the row that specifies Hosted Service as the type.
  9. Click Delete from the top toolbar.
  10. You’ll be asked if you want to delete the hosted service. Click Yes. After a few moments, you will see that the hosted service has been deleted.

    image

With that, you’ve now removed all of the resources that you allocated during the steps you followed to setup the environment.

Congratulations! You have successfully setup staging and production environments, deployed your simple Cloud application, and then decommissioned those environments when they were no longer required. Let’s take a step back for a moment and reflect on what we’ve done here and the ease with which we did it. We’ve proven why Cloud computing works and how we, as developers, now have an infinite platform on which to build solutions that deliver on business opportunities without the constraints of physical infrastructure and geographic location.

Take a moment to share what you thought of the walkthrough, what you’ve learned, and what next steps you’ll take on your journey to the Cloud in this LinkedIn Cloud Development group discussion. I’ll be reading through your responses and taking your feedback as input for next walkthrough and series of events that we’ll do together. We’ll go deeper into Windows Azure concepts and explore further the Visual Studio Windows Azure tooling experience.