Skip to content

Latest commit

 

History

History
126 lines (64 loc) · 6.47 KB

File metadata and controls

126 lines (64 loc) · 6.47 KB
# Hello All Worlds Demonstration#

The Hello All Worlds Demonstration shows how all of the major web development frameworks - PHP, Node.js, and various Microsoft tools from ASP to Razor syntax Web Pages - are all enabled by default in Windows Azure Web Sites.


Clone the repository from the GitHub.com repository.

Clone the repository from GitHub

Open up the Windows Azure Web Sites management portal. Click the New button to start creating a new web site.

Creating a new site in the Windows Azure Web Sites portal

Select the Web Site -> Quick Create menu. Then, type in a name for the site. In this example, the site will be named AllInOne.

Creating a new site in the Windows Azure Web Sites portal

Click the name of the site (the leftmost column) in the list of sites.

The list of sites in the portal account

Click the link labeled Set up Git publishing.

The web site dashboard, prior to creating a Git repository

Enter in a username and password, then confirm the password, that will be used during the Git deployment process. This is the user account and password you'll use in your Git client.

Creating a username and password for the Git repository

The portal will reflect the creation of the Git repository has started.

Git repository creation being executed

Once the Git repository has been created the portal will reflect the creation has completed.

Click the link labeled Clone Windows Azure site to my computer.

Confirmation of Git repository having been created

The portal will display a series of commands that, when executed, will result in the Git client cloning the contents of the new site to the client computer.

Copy the command beginning with Git clone... to the clipboard to make execution easier in the next step.

Helpful Git commands for this web site

Using the Git Bash command line client, paste (Alt-Space-E-P) in the command copied from the portal.

Note, adding a string at the end of the Git clone command will clone the repository into a separate directory than was copied down from GitHub.com. This wont be required after release, but since the portal is currently not visible to GitHub.com we can't go directly from a GitHub.com repository directly into Windows Azure Web Sites.

Using the Git Bash client to clone the Windows Azure Web Site Git repository

The Git repository will be cloned to the client computer and messages will be displayed to the user.

The Git clone process after execution

Copy the files from the folder created by cloning the GitHub.com repository into the folder created by cloning the Windows Azure Web Sites repository. Again, this part of the process won't be required following release, we are only doing it to copy the files into the new repository's folder.

Copying the site files into the Windows Azure Web Sites repository folder

Back in the Git Bash client, CD into the new site's repository.

Opening the new site repository folder in the Git Bash client

Type the command git add . to add the new files to the site's Git repository

Executing Git add

Execute the command git commit -m 'added files for site' in the Git Bash client. This will create a commit to the repository and provide the command you enter as the comment associated with the commit.

Committing the files using Git Bash

The commit message will display in the Git Bash client. Once the process completes, execute the command git push origin master to push the files and the commit message up to the server.

Pushing the code into the site Git repository

Enter the password used to create the Git repository user.

Note: If you want to see or demonstrate how the portal responds automatically upon a Git commit, make sure the portal window is visible at the same time as this command's execution.

Providing the Git repository password

The files will be pushed to the server. As the files are being pushed, Alt-Tab to view the portal browser window or make sure both windows are visible simultaneously.

Pushing the files to the web site repository

Each time files are pushed to the server using Git the dashboard will automatically update to reflect the deployment.

Automatic dashboard updates visible in the browser

Click the deployment item labeled Active Deployment and take note of the menu that appears in the portal.

The list of deployments

The menu will appear. Once it does, click the icon labeled Browse.

The Browse button

The Hello All Worlds demo will open up in the browser. Clicking each of the links will open up a different Hello World message in a new browser window.

Click the link labeled Static HTML.

The Hello All Worlds site

The static file will open in a new browser window.

The static version of the Hello World page

Clicking each of the additional links will execute each of the Hello World message windows written using each of the frameworks supported by Windows Azure Web Sites. Below, the Node.js sample is visible.

Hello world in Node.js

To see the JSON output of the ASP.NET Web API example, press the F12 key to open up the IE developer tools. Click the Network tab, then click the button labeled Start Capturing.

Starting a network traffic capture process

Click the Web API sample link. A dialog may appear requesting the user accept/decline the file-download process. This happens since the output format is JSON, and IE's default behavior is to request the user download JSON files rather than open them up in the browser.

Regardless of the answer provided by the download file-process, the results of the HTTP command are shown as a line item in the browser.

Results of the HTTP command shown in the network capture dialog

Click the Response body tab to view the JSON output in the tools window.

Viewing the JSON output of the Web API call