Hello Windows azure--Cloud version

Source: Internet
Author: User
Keywords This cloud running environment
Tags access address an application application aspx based blog click
Because the application is very simple, in fact, mainly based on Jim Nakashima's article Deploying a Service on Windows Azure, the entire Windows Azure Service deployment of a practice and walkthrough.

You can use this blog as a Chinese or graphic version of Jim Nakashima's article, and I'll post more pictures.

According to Jim Nakashima article planning, the entire from the development phase to deployment to the cloud run will be divided into three phases:

First: Complete application, development, testing and execution of a development environment.

Second: If the application involves Windows Azure storage in the cloud, then this phase can configure the application of the development environment to the cloud's database account, and test to ensure that the data access is fully functional, and because Windows Azure storage is relatively fragmented and independent, Basically a unique indication of the ability to represent a data storage, so need another user to mark or access the account, which needs to be configured in the configuration file, and the configuration file needs to be uploaded to the Windows Azure Management portal, so this phase, can be understood as Windows Azure Storage-related testing, configuration, and deployment preparation. Since my application does not use any Windows Azure storage, this step can be taken without consideration.

Third: Deploy the application to the Windows Azure Runtime environment in the cloud. So this article focuses on the third stage, how to deploy an application to the Windows Azure running environment and run it. As shown in the following figure, the diagram of the deployment steps given by Jim Nakashima.

Once you've figured it out, you can start working on it.

First, you'll need access to Windows Azure's management portal, create projects, create your application in Windows Azure's running environment, and then upload and configure your application.

Visit: http://go.microsoft.com/fwlink/?LinkID=128009

After conversion may be the following address, then enter your Windows Azure account number and password.

Https://lx.azure.microsoft.com/Cloud/Provisioning/Templates.aspx

Select the new project option.

Because Windows Azure's running environment is a shared, managed-running environment, project label can be imagined as an application indicator, and you will find that it can also be labeled as a two-level domain name (cloud service name) in the future, and for Windows Azure's operating environment itself, this application will have a unique code that corresponds to your project label/application.

The Windows Azure Admin Portal then lets you select a service name, and if your service name is exactly the same as project label, this service name serves as an access resource for a level two domain that needs to be unique across Windows Azure's running environment, If it already exists then Windows Azure Management Portal prompts you to reset a

After you set the project label and service name, it means you can go to the next step and apply the upload and configuration phases. At this point it requires you to upload your application to Windows Azure's cloud and hosting environment, and Windows Azure will decide to deploy to that server. and Windows Azure is very good, it is deployed in the process of meticulous management, it is clearly divided into two other phases, the cloud deployment testing phase, and the cloud running phase.

When the project is complete, the Windows Azure management platform goes into the upload deployment phase, and first you get into the cloud deployment test phase (Staging), and you see the image below, the cloud running phase (Production) has nothing, and the cloud deployment test phase waits for the application to upload.

But you would say, I upload what application ah, is my aspx or C # code upload it? There is also a process for applying packaging. This is done through the tools provided by the Windows Azure SDK. In other words, Windows Azure does not accept ASPX or C # code files, and you need to use the Cspack.exe in the SDK to package your application. Of course, if you use the advanced and powerful visual Studio 2008, you can do the packaging process graphically. The specific steps are as follows:

First of all you can see from the above diagram that the Windows Azure Runtime environment gives you the assigned application labeled-application ID, you copy this ID and mark, and then go to Visual Studio 2008 to select the Project option, set this code, as shown below:

Then save the project and recompile the project.

Then select your project in Visual Studio 2008 and right-click on the publication (Publish ...) as shown below

If it's done, it's going to be pretty smooth, and you'll find that Visual Studio 2008 automatically opens the published directory and even starts IE, accessing the following address: http://go.microsoft.com/fwlink/? Linkid=127998&appid=0000000040007f1a

And 0000000040007F1A is your application indicator. My development environment is in a virtual machine environment, so I copy the files from the publishing directory because the items are small, the packages are small, and the files and configuration files are smaller.

Oddly enough, my project is Hello, but the final release directory appears to be in the C:myprojecthellohellohellobindebugpublish directory.

You'll find that Visual Studio 2008 has helped you pack your applications, but you need to thank Windows Azure Tools for Microsoft Visual Studio because it's the work that calls Windows Azure The cspack.exe of the SDK is complete.

With packaged apps, you can deploy, click Deploy ... Key

After the more perfect, according to the following picture requirements, you are basically according to the picture in the blank, very simple.

Fill in the blanks and press deploy button.

Then you'll notice the following hint and warning, because the current Windows Azure environment has a limited number of applications running, basically two instances of web role, and Workrole in the background is also two note:the current constraint For the number of instances you can run on Windows Azure as part of the CTP are a maximum of 2 Web role instances and 2 Worker role I Nstances.), do not know whether the future will increase or exceed the part of the charge.

Here can be long-winded, in fact, the technical content is still very high, this means that the Windows Azure environment will help you complete the lifecycle management of your instance, which means that the maximum availability is up to two, technically either four (one-to-one) or three (n). And you have previously set the level two domain name and the reliability of these two instances, Windows Azure running environment will be managed.

After that you just need to modify the Serviceconfiguration.cscfg file-The following figure, this does not have to be repackaged or published once, and I believe that, after you know the story, you will change the configuration file before you publish it.

Then you'll need to follow the illustration below, go for a cup of tea or wait a little while, and the Windows Azure Runtime environment is looking for the right server for your programmatic and automated deployment.

If it goes well, you'll be in the twilight of victory, showing the following illustration:

This means that you have completed the deployment testing phase of the Cloud (Staging), where your application has been successfully uploaded and configured successfully, Windows Azure environment has completed the search, allocation and configuration of related resources, you can launch it in the deployment test environment, If it succeeds, it lands and is hosted on a cloud and is well cared for, and can be run. Run successfully, indicating that your application function is normal, the only difference is that this application can not "out of the street to see people" – that is, the outside world is not visible, you can also understand that the relevant domain name is not binding.

At this point you can also configure the view, and then modify some parameters and so on ...

If there is no problem or need to configure, you can start this application. After starting successfully, the following figure:

Then you click on the blue button in the middle (promote [Promote] to the production state), that is, into the cloud running phase. The following figure:

(In fact, you'll find that promote is a very good feature that will allow you to switch to the deployment test phase (Staging) in the future)

You will also find Windows Azure running environment has opened the access address of your service, application has the domain name of access. Like my name: http://ccboyhello.cloudapp.net

You can access this address directly from the browser, and you will find the following results. Oh, it's fun.

Windows Azure has an app supermarket reinstates Azure Gallery so you can register your service, and you can also go inside to find out if you have this for me or your favorite Windows Azure app.

The feeling of the clouds is still good, I like Windows Azure, I hope you are the same.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.