Visual Studio 2013 Gallery image for MSDN subscribers

Contents

Visual Studio 2013 Gallery image for MSDN subscribers. 1

Introduction. 1

Provisioning a developer desktop from Windows Azure Portal 2

Provisioning a Visual Studio 2013 image from PowerShell 10

Get the scripts. 10

Set up the Azure PowerShell environment. 10

Web and SQL. 10

SharePoint Stand Alone (No Active Directory) . 11

SharePoint and Active Directory . 12

Provision a virtual machine with Active Directory . 14

Provision a virtual machine with Visual Studio 2013 and SharePoint and join it to a domain. 15

Connecting Visual Studio to an on premise TFS server . 16

 

Introduction

The Visual Studio 2013 image is an exclusive offer for MSDN subscribers and provides the capability to quickly provision a development environment for Web/SQL development and for SharePoint 2013 development on an Azure Virtual machine. The image is available for MSDN Professional, Premium and Ultimate subscribers. You need to choose an image that corresponds to your subscription level. Visual Studio will check your subscription level during sign in and will only allow you to proceed if your subscription level matches the VS SKU on the image.

The image contains the following components:

·          Visual Studio 2013 Professional|Premium|Ultimate

·          SQL Server 2012 Express

·          SharePoint 2013 Trial

·          Scripts to provision SharePoint 2013 and SQL Express

 

The scripts on the image allow you to configure the virtual machine for either SQL, Web development or for SharePoint development.

The virtual machine can be provisioned through the portal or through PowerShell and PowerShell Remoting. This tutorial will guide you through both options.

Provisioning a developer desktop from Windows Azure Portal

1.        Sign in to the Windows Azure Portal

2.        Click in the + sign at the bottom of the Portal page

3.        Select Compute->Virtual Machine->From Gallery

4.        Scroll down the image list and choose the Visual Studio 2013 image that corresponds with your MSDN subscription and click on the arrow on the lower right corner

 

5.        In the Virtual machine configuration page enter the information required and click next

Note: We recommend that you use a Large VM size for Web/SQL development and an Extra Large for SharePoint development.

6.        In the Virtual machine mode page enter the information needed and click next

Note: If you want to connect Visual Studio to an on premise TFS server you need to provision the virtual machine into a virtual network as shown in the screenshot. For more information see Connecting Visual Studio to an on premise TFS server later in this article.

7.        In the virtual machine options page make sure that the endpoints for Windows PowerShell Remoting and RDP are enabled.

8.        Click the finish icon to start the provisioning process.

9.        Once the image is provisioned you can use remote desktop to connect to it. In the Portal Virtual machine page click on the newly created image and choose connect

   

10.    Once connected click on the “Configure Developer Desktop” shortcut icon on your desktop.

The folder contains three subfolders. The table below describes the subfolder and their contents

Folder Name

Content

 

 

Scripts

Scripts to configure different environments. The content of this folder is described in Table 2

Software

The folder contains SQL 2012 Express bits and WorkflowManager bits. If you target SharePoint workflow development you need to install and configure Workflow Manager after you have provisioned SharePoint. For more information on how to configure workflow see http://technet.microsoft.com/en-us/library/jj658588.asp

Tools

The folder contains PsExec a helper utility needed to provision SQL Server 2012 Express remotely.

 

As mentioned at the beginning of this article you can use scripts that come with the image to configure your target environment. The table below describes the scripts their purpose and parameters:

Script Name

Result

Parameter

ConfigureSharePointFarm.ps1

NOTE: This configuration of SharePoint is only supported for development purposes.

The script will produce the following SharePoint environment.

·          Provisioned SQLExpress with an instance called SQLEXPRESS

·          SharePoint configuration database: “SP2013_Configuration”

·          SharePoint Central Administration content database:

“SP2013_Content_CentralAdministration”

Central Administration Port: 11111

Central Administration Authentication: NTLM

·          Web Application “Developer Test Site” on port 80 with default authentication provider.

Using default app pool running under –localSPFarmAccountName identity

·          Root site collection “Developer Test Site Collection”

Based on team site template

Primary site collection owner is the logged on user

 

-localSPFarmAccountName: SharePoint farm account that will be used by SharePoint to connect to the configuration database and also serves as identity for the application pools

-localSPFarmAcountPassword:

SharePoint farm account password

ConfigureSharePointFarmInDomain.ps1

In addition to the functionality mentioned above this script assumes that you have a virtual machine serving as a domain controller in the same virtual network as the Visual Studio 2013 virtual machine has been provisioned into. This configuration will open up all SharePoint development scenarios including using user profiles.

-domainName: Domain name

-domainSPFarmAccountName:

SharePoint farm account that will be used by SharePoint to connect to the configuration database. It should be a domain user account created in advance.

-domainSPFarmAcountPassword

SharePoint farm account password

ConfigureSQLExpress.ps1

 

Script to configure SQL Express. A default instance called SQLExpress will be created. The built-In administrators will be added to the database sysadmin.

-           None

 

11.    Run the script of your choice. You can also skip running either of those scripts. In that case Visual Studio will use SQL Server 2012 Express LocalDB. The sample below shows the configured SharePoint environment of the ConfigureSharePointFarm.ps1 script

12.    Launch Visual Studio 2013 by double clicking in the Visual Studio icon on the desktop or from the taskbar. Visual Studio 2013 will require you to sign with a valid Microsoft account that is associated with a MSDN subscription.

13.    Enter your Microsoft account. After the Microsoft account has been validated you will be asked to enter your full name.

14.    As a last step Visual Studio will ask you for your development environment settings as well as for your preferred color theme.

15.    Start developing

<

Provisioning a Visual Studio 2013 image from PowerShell

The Visual Studio 2013 image can be provisioned entirely by using PowerShell and PowerShell Remoting. This option gives you the most flexibility with regards to automating the provisioning of the developer desktop. In addition the scripts will also automate the SQL and SharePoint provisioning so that you have the development environment fully configured and ready to go.

Get the scripts

As a first step you need to download the scripts from http://download.microsoft.com/download/C/4/B/C4BB2A5D-1296-4DB8-A448-ABEB13B5974D/ConfigureDeveloperDesktopSampleScripts.zip onto your machine. Keep in mind to always launch PowerShell or PowerShell_ISE in elevated mode for executing the scripts.

Set up the Azure PowerShell environment.

·          Enable the ByPass PowerShell execution policy by running Set-ExecutionPolicy ByPass. This will allow the downloaded scripts to run without individually prompting you. For more details about Set-ExecutionPolicy. http://technet.microsoft.com/en-us/library/hh849812.aspx

·          Connect the PowerShell environment to Windows Azure. Follow the steps described in this article http://msdn.microsoft.com/en-us/library/windowsazure/jj554332.aspx

Web and SQL

If you want to provision a virtual machine for Web and SQL development you need to run the following script: CreateWebSQLDeveloperMachine.ps1 The table below describes the parameters for this script.

Parameter Name

Purpose

imageName

This is the name of the developer desktop image: isual-Studio-2013-Ultimate-12.0.21005.1

azurePublishSettingsFile

Path to your Azure Publish settings file

subscriptionName

Your subscription name

storageAccountName

Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.

vmName

The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.

vmSize

The size of the virtual machine. For Web and SQL development we recommend Large VMs. More information on VM sizes can be found here: http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx

adminUserName

The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine

adminUserPassword

The password for the account

vnetName (optional)

The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network. See for more information on creating a virtual network

subnetNames (optional)

The name of subnet. If you don’t specify subnet name it will simply assign a range

 

 

Sample

CreateWebSQLDeveloperMachine.ps1 -imageName "isual-Studio-2013-Ultimate-12.0.21005.1" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName “samplewebdev" -vmSize "Large" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1"

 

SharePoint Stand Alone (No Active Directory)

If you want to provision a virtual machine for SharePoint development you need to run the following script: CreateSharePointDeveloperMachine.ps1.The table below describes the parameters for this script.

Parameter Name

Purpose

imageName

This is the name of the developer desktop image: isual-Studio-2013-Ultimate-12.0.21005.1

azurePublishSettingsFile

Path to your Azure Publish settings file

subscriptionName

Your subscription name

storageAccountName

Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.

vmName

The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.

vmSize

The size of the virtual machine. For SharePoint development we recommend Extra Large VMs. More information on VM sizes can be found here: http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx

adminUserName

The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine. The user will also be added as the primary site collection owner for the demo site collection.

adminUserPassword

The password for the account

localSPFarmAccountName

The SharePoint farm account. The account will also be used as the account for the application pool for the web application that hosts the demo site collection

localSPFarmAccountPassword

The SharePoint farm account password

vnetName (optional)

The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network

subnetNames (optional)

The name of subnet. The name of subnet. If you don’t specify subnet name it will simply assign a range.

 

Sample

CreateSharePointDeveloperMachine.ps1 -imageName "isual-Studio-2013-Ultimate-12.0.21005.1" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName “samplespdev" -vmSize "ExtraLarge" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1" -localSPFarmAccountName "sp_farm" -localSPFarmAccountPassword "Pass@word1"

 

SharePoint and Active Directory

Configuring SharePoint with an Active directory requires the following steps.

1.        Create a Virtual Network

2.        Provision a virtual machine with AD

3.        Provision the developer desktop virtual machine. Before you can execute the script you need to enable CredSSP on the client machine for delegation before executing.

 

a.        Run Set-WSManQuickConfig to make sure WinRM service is running

b.       Run Enable-WSManCredSSP -Role Client -DelegateComputer "*.cloudapp.net"

Note: This command will fail if your client machine is connected to any networks defined as "Public network" in "Network and Sharing Center."

c.        Enable delegating of fresh credentials using group policy editor on your client machine. Computer Configuration -> Administrative Templates -> System -> Credentials Delegation and then change the state of "Allow Delegating Fresh Credentials with NTLM-only server authentication" to "Enabled."(Its default state will say, "Not configured.") In the Add Servers sections add : WSMAN/*.cloudapp.net. For more details on enabling CredSSP:

http://msdn.microsoft.com/en-us/library/windows/desktop/ee309365(v=vs.85).aspx

Create a virtual network

To create a VNET you need to provide a configuration file. The configuration file follows the schema definition which can be found here:http://msdn.microsoft.com/en-us/library/windowsazure/jj157100.aspx

Create a VNET: Execute CreateVNET.ps1. The table below describes the parameters for this script

Parameter Name

Purpose

azurePublishSettingsFile

Path to your Azure Publish settings file

subscriptionName

Your subscription name

vnetConfigurationPath

Path to the VNET configuration file

affinityGroupName

Name of the Affinity Group

affinityGroupLocation

Location of the Affinity Group

 

VNET Configuration sample file

<?xml version="1.0" encoding="utf-8"?>

<NetworkConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration">

<VirtualNetworkConfiguration>

<VirtualNetworkSites>

<VirtualNetworkSite name="VNet1" AffinityGroup="AffinityGroup1">

<AddressSpace>

<AddressPrefix>10.0.0.0/20</AddressPrefix>

</AddressSpace>

<Subnets>

<Subnet name="Subnet1">

<AddressPrefix>10.0.0.0/28</AddressPrefix>

</Subnet>

</Subnets>

</VirtualNetworkSite>

</VirtualNetworkSites>

</VirtualNetworkConfiguration>

</NetworkConfiguration>

Sample

CreateVNet.ps1 -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -vnetConfigurationPath "C:\Sample\vnet.xml" -affinityGroupName "AffinityGroup1" -affinityGroupLocation "West US"

 

Provision a virtual machine with Active Directory

Run CreateNewADDSForest.ps1.The script will provision a virtual machine based on the Windows Server 2012 Datacenter image. The table below describes the parameters for this script   

 

Parameter Name

Purpose

ws2012ImageName (optional)

This is the name of the developer desktop image. The image must be Windows Server 2012 Datacenter based. Default value: 2012imahgea699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201305.01-en.us-127GB.vhd

azurePublishSettingsFile

Path to your Azure Publish settings file

subscriptionName

Your subscription name

storageAccountName

Storage account which will be used to store the Virtual Machine

vmName

The name of the virtual machine

vmSize

The size of the virtual machine.

adminUserName

The user name that you will use to connect to the machine. After Active Directory is configured, the account will be turned into domain admin user. You need to connect to the machine using “domainName\adminUserName”. If you don’t want to create a new domain user, you can use this account as domain users in CreateSharePointDeveloperMachineInDomain.ps1.

adminUserPassword

The password for the account

domainName

The fully qualified domain name (FQDN) for the root (first) domain in the forest. For more information see: http://technet.microsoft.com/en-us/library/hh974720(v=wps.620).aspx

safeModeAdminPassword

The password for the administrator account when the computer is started in Safe Mode or a variant of Safe Mode, such as Directory Services Restore Mode. You must supply a password that meets the password complexity rules of the domain and the password cannot be blank. For more information see: http://technet.microsoft.com/en-us/library/hh974720(v=wps.620).aspx

domainSPFarmAccountName

SharePoint farm domain account

domainSPFarmAccountPassword

SharePoint farm domain password

vnetName

The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network

subnetNames (optional)

The subnet name.

 

Sample:

CreateNewADDSForest.ps1 -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName "sampleadds" -vmSize "Medium" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1" -domainName "sample.contoso.com" -safeModeAdminPassword "Pass@word1" -domainSPFarmAccountName "sp_farm" -domainSPFarmAccountPassword "Pass@word1" -vnetName "VNet1" -subnetNames "Subnet1"

 

Provision a virtual machine with Visual Studio 2013 and SharePoint and join it to a domain.

 

Run: CreateSharePointDeveloperMachineInDomain.ps1.The table below describes the parameters for this script:    

Parameter Name

Purpose

imageName

This is the name of the developer desktop image: isual-Studio-2013-Ultimate-12.0.21005.1

azurePublishSettingsFile

Path to your Azure Publish settings file

subscriptionName

Your subscription name

storageAccountName

Storage account which will be used to store the Virtual Machine

vmName

The name of the virtual machine

vmSize

The size of the virtual machine.

adminUserName

The user name of the built-in admin account.

adminUserPassword

The password for the account.

domainDnsName

Specifies the fully qualified domain name (FQDN) of the Windows domain to join.

domainName

Specifies the domain of the domain user account that has permission to add the computer to a domain.

domainUserName

Specifies the name of the domain user account that has permission to add the computer to a domain. The user will be added to the administrator group of the virtual machine. The user will also be added as the primary site collection owner for the demo site collection. After the setup, you will use this account to connect to the machine.

domainUserPassword

Specifies the password of the domain user account that has permission to add the computer to a domain.

domainSPFarmAccountName

SharePoint farm domain account

domainSPFarmAccountPassword

SharePoint farm domain password

vnetName

The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network

subnetNames (optional)

The subnet name.

 

Sample

CreateSharePointDeveloperMachineInDomain.ps1 -imageName "isual-Studio-2013-Ultimate-12.0.21005.1" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName " SampleSub" -storageAccountName "samplestorage" -vmName "samplespdev" -vmSize "ExtraLarge" -adminUserName "SampleUser2" -adminUserPassword "Pass@word1" -domainDnsName "sample.contoso.com" -domainName "sample" -domainUserName "SampleUser1" -domainUserPassword "Pass@word1" -domainSPFarmAccountName "sp_farm" -domainSPFarmAccountPassword "Pass@word1" -vnetName "VNet1" -subnetNames "Subnet1"

Connecting Visual Studio to an on premise TFS server

This section describes how to use a Point to Site connection to connect the Visual Studio instance on the developer desktop to an on premise Team Foundation Server. As a first step you need to set up a Virtual Network and a Point to Site connection. You can follow the steps described here: http://msdn.microsoft.com/en-us/library/windowsazure/dn133792.aspx.

The image below shows the Windows Azure Portal with a Virtual Network called developervnet and a configured point to site connection with one client already connected.

  

 

From the client you can use the VPN client provided by the Client VPN package to connect back to your virtual network.The image below shows a client connecting back to the virtual network using the VPN tunnel:

 

As a next step you need to provision a virtual machine from the Visual Studio Ultimate 2013 image into the virtual network (in this example developervnet).

Once the virtual machine has been provisioned you can connect to the Team Foundation Server from Visual Studio as shown in the image below:

 

Note: In your environment you may need to add firewall rules to allow the communication.