How to Create and Deploy a Website with Windows Azure
Join the DZone community and get the full member experience.
Join For FreeCurator's note: This article originally appeared at WindowsAzure.com.
To use this feature and other new Windows Azure capabilities, sign up for the free preview.
Just as you can quickly create and deploy a web application created from the gallery, you can also deploy a website created on a workstation with traditional developer tools from Microsoft or other companies.
Table of Contents
- Deployment Options
- How to: Create a Website Using the Management Portal
- How to: Create a Website from the Gallery
- How to: Delete a Website
- Next Steps
Deployment Options
Windows Azure supports deploying websites from remote computers using WebDeploy, FTP, GIT or TFS. Many development tools provide integrated support for publication using one or more of these methods and may only require that you provide the necessary credentials, site URL and hostname or URL for your chosen deployment method.
Credentials and deployment URLs for all enabled deployment methods are stored in the website's publish profile, a file which can be downloaded in the Windows Azure (Preview) Management Portal from the Quick Start page or the quick glance section of the Dashboard page.
If you prefer to deploy your website with a separate client application, high quality open source GIT and FTP clients are available for download on the Internet for this purpose.
How to: Create a Website Using the Management Portal
Follow these steps to create a website in Windows Azure.
-
Login to the Windows Azure (Preview) Management Portal.
-
Click the Create New icon on the bottom left of the Management Portal.
-
Click the Web Site icon, click the Quick Create icon, enter a value for URL and then click the check mark next to create web site on the bottom right corner of the page.
-
When the website has been created you will see the text Creation of Web Site '[SITENAME]' Completed.
-
Click the name of the website displayed in the list of websites to open the website's Quick Start management page.
-
On the Quick Start page you are provided with options to set up TFS or GIT publishing if you would like to deploy your finished website to Windows Azure using these methods. FTP publishing is set up by default for websites and the FTP Host name is displayed under FTP Hostname on the Quick Start and Dashboard pages. Before publishing with FTP or GIT choose the option to Reset deployment credentials on the Dashboard page. Then specify the new credentials (username and password) to authenticate against the FTP Host or the Git Repository when deploying content to the website.
-
The Configure management page exposes several configurable application settings in the following sections:
-
Framework: Set the version of .NET framework or PHP required by your web application.
-
Diagnostics: Set logging options for gathering diagnostic information for your website in this section.
-
App Settings: Specify name/value pairs that will be loaded by your web application on start up. For .NET sites, these settings will be injected into your .NET configuration AppSettings at runtime, overriding existing settings. For PHP and Node sites these settings will be available as environment variables at runtime.
-
Connection Strings: View connection strings for linked resources. For .NET sites, these connection strings will be injected into your .NET configuration connectionStrings settings at runtime, overriding existing entries where the key equals the linked database name. For PHP and Node sites these settings will be available as environment variables at runtime.
-
Default Documents: Add your web application's default document to this list if it is not already in the list. If your web application contains more than one of the files in the list then make sure your website's default document appears at the top of the list.
-
How to: Create a Website from the Gallery
The gallery makes available a wide range of popular web applications developed by Microsoft, third party companies, and open source software initiatives. Web applications created from the gallery do not require installation of any software other than the browser used to connect to the Windows Azure Management Portal. In this tutorial, you'll learn:
-
How to create a new site through the gallery.
-
How to deploy the site through the Windows Azure Portal.
You'll build a Word press blog that uses a default template. The following illustration shows the completed application:
To complete this tutorial, you need a Windows Azure account that has the Windows Azure Web Sites feature enabled. You can create a free trial account and enable preview features in just a couple of minutes. For details, see Create a Windows Azure account and enable preview features.
Create a web site in the portal
-
Login to the Windows Azure Management Portal.
-
Click the New icon on the bottom left of the dashboard.
-
Click the Web Site icon, and click From Gallery.
-
Locate and click the WordPress icon in list, and then click Next.
-
On the Configure Your App page, enter or select values for all fields:
- Enter a URL name of your choice
- Leave Create a new MySQL database selected in the Database field
- Select the region closest to you
-
Then click Next.
-
On the Create New Database page, you can specify a name for your new MySQL database or use the default name. Select the region closest to you as the hosting location. Select the box at the bottom of the screen to agree to ClearDB's usage terms for your hosted MySQL database. Then click the check to complete the site creation.
After you click Complete Windows Azure will initiate build and deploy operations. While the web site is being built and deployed the status of these operations is displayed at the bottom of the Web Sites page. After all operations are performed, A final status message when the site has been successfully deployed.
Launch and manage your WordPress site
-
Click on your new site from the Web Sites page to open the dashboard for the site.
-
On the Dashboard management page, scroll down and click the link on the left under Site Url to open the site’s welcome page.
-
Enter appropriate configuration information required by WordPress and click Install WordPress to finalize configuration and open the web site’s login page.
-
Login to the new WordPress web site by entering the username and password that you specified on the Welcome page.
-
You'll have a new WordPress site that looks similar to the site below.
How to: Delete a Website
Websites are deleted using the Delete icon in the Windows Azure Management Portal. The Delete icon is available in the Windows Azure Portal when you click Web Sites to list all of your websites and at the bottom of each of the website management pages.
Next Steps
For more information about Websites, see the following:
Published at DZone with permission of Eric Gregory. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments