January, 2012 - Yung Chou on Hybrid Cloud - Site Home - TechNet Blogs

Yung Chou on Hybrid Cloud

Virtually speaking about witnessing a clear cloudy day

January, 2012

  • Yung Chou on Hybrid Cloud

    Deploying StockTrader Application as Service to Private Cloud with System Center Virtual Machine (VMM) 2012 (3/5): Service Template Designer

    This 5-part series listed as below highlights the steps to deploy StockTrader as a service to a private cloud using the . After successfully importing the StockTrader in VMM 2012 in Part 2, we can then customize the , as preferred, using Service Template Designer. Which is the scenario here.

      • Part 1: Scenario and Lab Environment image
      • Part 2: Importing Service Template into Library Share 
      • Part 3: Designer (This article)
      • Part 4: Deploying Service Template to Target Private Cloud
      • Part 5: Managing Service Instance

    In the admin console of VMM 2012, the Library workspace is the repository where all file-based resources including vhds, iso images, application packages, scripts, etc. are kept and made visible in the private cloud. The context sensitive UI will display utilities applicable to the type of a highlighted resource. The following illustrates a list of the resources indexed in all the associated network shares of an examined Library Server, here r2host.contoso.corp. The UI is content sensitive and presenting the utilities available for operating on Answers File which is the type of a .

     image

    Examine the Library workspace, in addition to Library Servers there are other containers including Templates and Profiles. And specifically Template container is where s are presented.

    Designer

    This is a new tool in VMM 2012 for authoring and examining a . In Library workspace, when highlighting a in Service Templates container, Service Template Designer becomes available in the group, Service Template Tools. Click Open Designer, as illustrated below, to load the into Designer.image

    Application Architecture Encapsulated in Service Template

    When the StockTrader service template is loaded in the Designer, a visual presentation of the application architecture reveals a four-tier design signified by the four corresponding VM templates, as depicted below, including a web front-end, business service layer, operations layer, and a database back-end. The four VMs are connected with a logical network and collectively form the application architecture of StockTrader. The what ,when, why, and how to configure these VMs are specified in the VM templates. Further examination reveals that within these VM templates there are dependencies defined including: two web applications are to be configured in the Web Tier, a server app-v package is to be deployed in each of the two Mid Tier machines, and a number of dacpac packages are to be installed to the SQL Tier during VM instances creation.

    image

    Properties of the service or an examined VM template provide the configuration details with intelligence of why, when, and how to instantiate these objects.

    image

    The accessibility of a service can be directly defined in a service template. The following shows StockTrader Service Owner, a defined self-service user role, is given the access to the StockTrader service.

    SNAGHTML95f3f2

    Within VM template properties, VMM 2012 now includes features and settings with cloud computing in mind. Scalability, memory optimization, server roles and features designation, operational intelligence and precision, SQL deployment, quota are just a few highlighted below.

    image

    image

    image

    image

    image

    image

    These properties shown above are validated and customize, as preferred. Once done, the is almost ready for deployment. Almost, however not yet. Part 4 will explain.

    [To Part 1, 2, 4, 5]

  • Yung Chou on Hybrid Cloud

    Deploying StockTrader Application as Service to Private Cloud with System Center Virtual Machine (VMM) 2012 (2/5): Importing Service Template into Library Share

    To deploy an application as a service to a private cloud in VMM 2012, a is the key. In this second article of the 5-part blog post series as shown below, let’s walk through the process to make a ready for use.

    • Part 1: Scenario and Lab Environment  image
    • Part 2: Importing Service Template into Library Share (This article)
    • Part 3: Changing Service Template
    • Part 4: Deploying Service Template to Target Private Cloud
    • Part 5: Managing Service Instance

    For those who would like to build a test lab, download Windows Server 2008 R2 SP1 and System Center products including VMM 2012. There are also free eBooks and posters illustrated many important concept of virtualization.

    imageThis is a main delivery of VMM 2012. And a noticeable differentiator from VM 2008 R2 is VMM 2012 is designed with the service concept and a private cloud in mind. A service in VMM 2012 is a set of VMs collectively delivering a business function, and they are configured, deployed, operated, and managed as a whole. And a is a vehicle to realize the service concept.

    Physically an XML file, a service template encapsulates “everything” needed to do a push-button deployment of an application architecture with a running instance of an target application.  Just imagine all the knowledge and tasks other than hardware allocations involved in an application deployment from application architecture to configurations, operations, and procedures are all orchestrated and encapsulated in this XML file. Here the hardware allocation is managed by VMM 2012 with the private cloud fabric and transparent to an application. And specifically “everything” of an application deployment I mean:

    • contents like syspreped images in vhd, application code, server app-v packages, database packages, etc.
    • server operations and installation procedures to install, configure, and deploy VM with naming scheme, credentials, product keys, privileges, policies, scripts, local and global settings, etc.
    • criteria and intelligence including requirements, capacity, scalability, timing, dependencies, and event-driven processes to successfully install, configure, run, monitor, and scale intended software and application instances
    image

    Importing into Private Cloud Fabric

    To deploy an application as a service into target private cloud, first make all resources relevant to the deployment visible in private cloud fabric. And this can be easily done by simply first xcopy the StockTrader package, as shown on the right, into a library share of a VMM 2012 already configured as part of the private cloud fabric. (The information to download StockTrader is detailed at the end of Part 1.) Then in the admin console of VMM 2012, import the service template as shown above.

    By default VMM 2012 refreshes a library share in 60 minutes as shown below. Depending on how often changes are introduced as well as the network topology and bandwidth, this refresh interval should be set.

    SNAGHTMLb5b3a8

    imageAs needed, an administrator can simply right-click and manually refresh a library share in VMM 2012 admin console, as shown on the left here, to index and make a newly added resource available upon refresh. Once the application package appears in the library share, we can now import the StockTrader . As VMM 2012 reads in the content of a for the first time, all resources referenced by the service template are validated against the private cloud fabric settings. For instance, when developing/testing application in a development environment, the employed credentials and network naming are often different from those in production. Individual settings must be validated against the corresponding ones in a target environment. Once validated, the application and associated resources become ready for employment in the private cloud fabric.

    Recall that fabric is an important abstraction in cloud computing and signifies the ability to discover, identify, and manage computing resources. The presumption is that if a resource is added into one of the three resource pools in private cloud fabric, it can be discovered, identified, and managed by VMM 2012. And the importing process is in essence to examine a service template and flag settings for corrective actions, as applicable, such that all resources referenced by the service template are validated via an associated library servers where the resources reside.

    The following illustrates the process of importing the StockTrader service template. If you want to import sensitive settings such as passwords, product keys, and application and global settings that are marked as secure, select the Import sensitive template settings check box. If you do not want to import sensitive data, you can update the references later the import process.

    image

    When VMM 2012 examines a service template, those references not properly resolved are list with yellow waning triangles. In such case, edit and validate an entry by clicking the pencil icon. Each entry with a red cross is actually an indicator that the referenced resource is validated, as shown below.

    image

    Like many Microsoft products, behind the scene, it is implemented with PowerShell. And a set of scripts associated to a series of operations with specified settings can be easily generated for later batch processing and automation. The following shows the View Scripts button available for generating PowerShell script during a service template import process.

    image

    Upon a successfully import, the service template is now listed as a resource available for deployment. Check the properties, as shown below, to reveal important information including service settings and dependencies defined in the service template.

    image

    StockTrader is a 4-tier application and in the service template properties, as illustrated below. The VHD, server app-v package, customization scripts, etc. to be installed are all listed under an associated VM template. When instantiating a VM instance, these dependencies become in effect and ensure all requirements are orchestrated and met along a deployment process.

    image

    At this time, the StockTrader service template is successfully imported and ready for use. Next is to examine the application architecture defined and configured in the service template. Life is good so far.

    [To Part 1, 3, 4, 5]

  • Yung Chou on Hybrid Cloud

    Deploying StockTrader Application as Service to Private Cloud with System Center Virtual Machine (VMM) 2012 (1/5): Scenario and Lab Environment



    image image image image

    To accelerate the learning of private cloud, a direct and effective way is to walk through the process of deploy one. And that is what this blog post and screencast series will deliver by detailing the essential operations and steps to deploy and manage a service deployed to a private cloud in SCVMM 2012 including:

    • Part 1: Scenario and Lab Environment (This article) image_thumb7
    • Part 2: Importing Service Template into Library Share
    • Part 3: Changing Service Template 
    • Part 4: Deploying Service Template to Target Private Cloud 
    • Part 5: Managing Service Instance

    Scenario

    The process I am focusing on in this series starts from the signoff of a to-be-deployed application, here StockTrader. And in this series, I as a Private Cloud Administrator will walk through the process to “deploy” StockTrader as a service to a target private cloud. How the application was developed, configured, and packaged are not the subjects here. How it is to be deployed as a service to a target private cloud is. Deploying and managing an application as a service is an important concept and a key delivery of VMM 2012. The following further explains.

    Notice that in VMM 2012 a service means specifically a set of VMs which collectively delivers a business function. At operational level, this set of VMs can be configured, deployed, and managed as a whole, i.e. one entity. This is achieved in VMM 2012 by employing a . By predefining the application architecture with the content, configurations, deployment operations, and procedures of an intended application in a VMM 2012 s, we can now essentially deploy an application architecture with a running instance of an intended application, i.e. deploy an application as a service. And by managing the instance of a s, we are now managing all associated resources of a running instance of an intended application which may encompasses multiple VM instances in multiple tiers.

    StockTrader

    This is an end-to-end sample application based on Windows Communication Foundation and ASP.NET. StockTrader is designed as a high-performance application that can seamlessly scale out across multiple servers with load-balancing and failover at the service-request level. In addition, the application can be deployed to Windows Azure Platform, a private cloud, or a hybrid environments with securely communication between Windows Azure instances and on-premise services. It illustrates many of the .NET enterprise development technologies for building highly scalable, rich "cloud-connected" applications.

    The StockTrader application package I downloaded from http://connect.microsoft.com (find more details at the end of in this blog post) includes pre-baked syspreped vhd images, application code, scripts, app-v packages, and a s which defines the multi-tier application architecture, the operations and procedures, the dependencies and intelligence, etc. with VM templates. We will use the provided s to deploy StockTrader as a service to a target private cloud.

    From a consumer’s point of view, regardless where and how StockTrader is deployed, it is a web application. The cloud connotation is relevant to mainly a service provider to signify the ability to deploy, exhibit, and manage an application with the 5-3-2 principle of cloud computing or NIST SP 800-145.

    Lab Environmentimage

    The test lab is a simple environment including a windows domain with a VMM 2012 and a Hyper-V host as members. This lab is the starting point of a private cloud environment. It is a test lab, not an idea nor a realistic representation all components/functions needed to deliver a comprehensive private cloud solution. A comprehensive private solution including configuration management, deployment vehicle, process automation, service/help desk, virtual machine manager, self-service portal, etc. is what System Center 2012 delvers. For those who would like to build a test lab similar with mine, here is the hardware and software information:

    Hardware

    You will need 64-bit hardware to build a Windows domain with a domain controller, a SCVMM 2012 server, and a Hyper-V host to get started with a simple yet realistic enough test lab. The Hyper-V host need to have access to the hardware since it needs to be a root/parent partition run virtual machines.  A great poster to help you better understand Hyper-V is available at http://aka.ms/free. The rest two, a domain controller and a SCVMM 2012 box, can be physical or virtual machines. And as needed, other System Center 2012 family members can be later added into the environment to form a comprehensive private cloud solution. Having a SCVMM 2012 server and a Hyper-V host into a Windows domain is the beginning and the essentials to start building a private cloud solution.

    I set up the environment with my laptop where the booted Windows Server 2008 R2 SP1, i.e. the root partition, is a Hyper-V host as a member of the contoso.corp domain which includes a domain controller and a SCVMM 2012 server are both virtual machines and each running as guest OS. The following are the hardware information.

    image

    As far as the hardware is concern, RAM is a significant resource in virtualization and where I will spend my money.

    Software

    • Join http://connect.microsoft.com and download StockTrader for SCVMM 2012 RC build from System Center in the Datacenter and Cloud Connection. There may be an approval process which can take possibly a few days to grant the access. (As of April of 2012, StockTrader apparently is no longer available in Connect.)
    • Download the evaluation copy of Windows Server 2008 R2 SP1 as needed since we will need it to run a Windows domain and a Hyper-V host.
    • Download the evaluation copies of SCVMM 2012 and get all the requirements 

    [To Part 2, 3, 4, 5]

  • Yung Chou on Hybrid Cloud

    Building a Windows Server 2012 Test Lab

    image image image image

    To setup your Windows Server 2012 lab for the "Early Experts" Challenge and/or IT Camp, you'll need a PC that meets the following requirements:

    • 64-bit capable hardware (x64)
    • Intel-VT or AMD-V support in firmware
    • Hardware-assisted memory protection in firmware (XD)
    • At least 4GB total RAM
    • At least 60GB free space on HDD

    and

    • Windows Vista, Windows 7 or Windows 8 as installed OS
    • Full Administrator Rights to existing PC OS
    • No disk encryption or pre-boot authentication

    NOTE: If your PC does not meet the above requirements, do not continue with this process. Instead, you may prefer to build a Windows Server 2012 box in the cloud by leveraging Windows Azure Virtual Machines.  Building your lab in the cloud will allow you to complete most hands-on activities in this study group, but will not permit you to perform hands-on activities related to Windows Server 2012 Hyper-V.

    Dual Boot with Boot-to-VHD

    DISCAIMER: This process installs Windows Server 2012 in a dual-boot scenario using Boot-to-VHD features in Windows Vista, Windows 7 and Windows 8.  While this process is not intended to disrupt your existing OS installation, these steps are for use at your own risk.  No support or warranties are implied or provided.

    1. Backup your existing PC operating system before beginning this process.  While this process is not intended to disrupt the existing OS installation on your PC, performing a backup before any system upgrades or installation is recommended as a precaution.
    2. Download the Windows Server 2012 installation bits in VHD format from the closest download
    3. Extract the downloaded VHD file by running the compressed .EXE file.
    4. Copy the Extracted VHD file to C:\BootVHD\Server2012.vhd
    5. Mount the copied VHD file as a virtual Drive Letter
      - Right-click on the "Command Prompt" shortcut and select "Run as Administrator"
      - Run "DISKPART.EXE" from the Command Prompt
      - At the "DISKPART>" prompt type the following commands, pressing Enter after each:
            SELECT VDISK FILE="C:\BootVHD\Server2012.vhd"
            ATTACH VDISK
            EXIT
    6. Wait for the VHD file to be mounted as new Drive Letter.  When completed, this new drive letter will display in "My Computer" and "Windows Explorer"
    7. Add a new OS Boot Menu Choice for Windows Server 2012
      - Right-click on the "Command Prompt" shortcut and select "Run as Administrator"
      - Run "BCDBOOT <mounted_drive_letter>:\WINDOWS" from the Command Prompt
    8. Reboot and select "Windows Server 2012" for the OS Boot Menu displayed
    9. Complete the OS installation process using the steps documented in the video below:
    10. Join the "Early Experts" Challenge! Now that you have your study lab built, join our FREE online study group to begin learning about Windows Server 2012 and preparing for the new MCSA certification exams ...
Page 1 of 1 (4 items)