다음을 통해 공유


Announcing Windows Azure Infrastructure Services with PowerShell Quick Start Kit (https://aka.ms/QSK)

This quick start kit is for self-studies of windows Azure IaaS and Windows Azure PowerShell. I am making it available with pay-with-a-tweet.

My intent is to get more IT pros aware of and I thank you all for tweeting and helping me help more to better learn Windows Azure.  To demonstrate the user experience, I am also including a set of screen captures of two runs of QSK within the same PowerShell session in this post.

#region [synopsis] 
#---------------------------------------------------------------
# Windows Azure IaaS Quick Start Kit (https://aka.ms/QSK)
#---------------------------------------------------------------
#
# Copyright 2013. Yung Chou
# https://yungchou.com
# https://twitter.com/yungchou
#
# The content of this PowerShell script is provided AS IS; with no warranties, and confers no rights.
#
# This script is available for download at https://aka.ms/QSK.
# It deploys a set of Windows Azure VMs and each with a data disk.
# For demonstrating a complete configuration, all VMs are configured
# with a load-balancer on port 80, and placed into a service.
# This deployment shows how to form the base of a multi-tier
# application architecture by deploying a set of VMs to a Windows
# Azure cloud service. BY default, the script assumes the QSK
# script is extracted into the folder, _QSK.
#
# Virtual network is not employed in this script.
#
# Initially, recommend validating only:
# (1) the id of this session,
# (2) the location of the extracted QSK, and
# (3) the Windows Azure subscription name.
# and running the rest of the script as it is and troubleshooting it
# as needed, till a successful run has been achieved before further
# customizing the script.
#
# Within a PowerShell session, this script allows multiple deployments,
# namely repeated executions. While each execution of the script,
# like pressing F5 in ISE, deploys a service of a specified number of
# VMs, while each VM with an attached data disk and all VMs are placed
# in a load-balancer on port 80.
#
#  +-----------------< cloud service >------------------+
#  |                                                                                 |
#  |  Load-Balancer { VM-1, VM-2, ... etc. } on port 80  |
#  |                                                                                 |
#  +------------------------------------------------------+
#
# So, for instance, executing the script twice will deploy two
# services and two sets of resources, while for each deployment
# the service and the resources are identified by the same tag
# with their names.
#
# ------
# Note
# ------
#
# The script has neither error handling, nor optimization of any kind.
# This package is intended for and only for facilitating on learning
# Windows Azure IaaS deployment methodology and Windows Azure PowerShell.
# Recommended improvements of this script include wait-time and return
# code handler.
#
# Please use the hash tag, #AzureQSK, in tweeter for discussing
# and sharing your enhancements made on this script.
#
# ----------------
# Pre-requisites
# ----------------
#
# 1. Windows Azure Subscription acquired from the dropdown of https://aka.ms/TakeAzure
# 2. Install and configure Windows Azure PowerShell based on https://aka.ms/AzureCmdlets
# 3. Download and extract the package to a local drive
#
# -------
# Usage
# -------
#
# 1. Open a web browser session, access https://manage.windowsazure.com, and
#    log in Windows Azure for verifying the results of executing the script.
#    Once the script is validated and a successful run, logging into the
#    management portal is optional.
#
# 2. Bring up PowerShell ISE on the local OS session and run, for example,
#    get-AzureLocation to test the connectivity with Windows Azure.
#    The connectivity between Windows Azure and your the local PowerShell
#    session must be in place, else the script obviously will not work.
#
# 3. Open this script and validate the required parameters.
#
#    Test particular statements of the script by highlighting the selected
#    statements followed by pressing F8 in ISE.
#
# 4. When ready, run the entire script by pressing F5 in ISE
#
#    And after having already produced a successful run, review and make
#    changes of the [optional customization] section, as preferred.
#
# 5. To remove deployed resources, run the statement one by one
#    by following the instructions in the clean-up routine.
#
# Recommend subscribing Yung's blog, https://aka.ms/rss, and following him in
# Twitter, https://twitter.com/yungchou, to get the updates and additional
# content of Windows Azure IaaS and Windows Azure PowerShell.
#
# ---------------------
# Additional Reading
# ---------------------
#
#    https://aka.ms/AzureIaaSMethod
#
#endregion

Here’s the history of a PowerShell session where I deployed two services by executing the script twice.

image

In Windows Azure Management Portal, the following shows what were deployed.

 image image image     image image image image image    image

To remove all deployed resources, the 4-step clean up routine was run on step at a time.

image

image