Navigate Up
Sign In

SharePoint on Windows Azure - Part 5: 10 Tips

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.

You may also be interested in: fpweb.net

 

Editor's note: Contributor Wahid Saleemi is is a Senior Consultant with Microsoft Services. Follow him @wahidsaleemi

SharePoint on Windows Azure Series

Tip #1: Growing Your SharePoint Farm

So you have a bunch of servers in your farm but you need one or two more. The steps I outlined before will work with some modification. Now that you’ve already created your Cloud Service, you have to do things a bit differently. If you try to do the New-AzureVM command like before, you’ll likely see “DNS name already taken” error that I’ve highlighted further down.

To add additional servers to your Cloud Service, follow the guidance from the previous articles about connecting to Windows Azure, specifying your Cloud Service, storage account, and other pertinent information.

Then define your new server or servers as we did before.


## Create SP App3 
$size = "Small"
$vhdname = "Arch-SPApp3.vhd" 
$vmStorageLocation = $mediaLocation + $vhdname
$spwebnew = New-AzureVMConfig -Name 'Arch-SPApp3' -AvailabilitySetName $avsetwfe -ImageName $spimage -InstanceSize $size -MediaLocation $vmStorageLocation | Add-AzureEndpoint -Name 'https' -LBSetName 'lbhttps' -LocalPort 443 -PublicPort 443 -Protocol tcp -ProbeProtocol http -ProbePort 80 -ProbePath '/healthcheck/iisstart.htm' | Add-AzureEndpoint -Name "RemoteDesktop" -Protocol TCP -PublicPort (get-random -max 65000 -min 20000) -LocalPort 3389 | Set-AzureSubnet $subnetName | Add-AzureProvisioningConfig -Password 'pass@word1' -Windows

The example I’m showing would create a new Windows server without SharePoint. Then here’s the part to really pay attention to, the New-AzureVM command:


New-AzureVM -DeploymentName "NewSharePointServer" -ServiceName $serviceName -VNetName $vnetname -VMs $spwebnew

Here, we only need to give the –ServiceName, -VNetName, and –VMs parameters. If you put in more information, especially the AffinityGroup, you’ll get the DNS already taken error.

Tip #2: DNS name already taken

2013-04-14-SPA-Part05-01.png

If you get this, it usually means this is the second time you’ve run the New-AzureVM for the Cloud Service. If everything is OK and you just want to add a server, see tip #1. If something is wrong, remove the Cloud Service and try it (the New-AzureVM cmdlets) again:

Remove-AzureService -ServiceName "ArchSharePoint" –Force

Tip #3: Finish Up

Remember to create the healthcheck file. In our examples, we specified the -ProbePath '/healthcheck/iisstart.htm'. So, we need to go to each server that we want our Azure load balancer to use and add that file. To do so, open IIS Manager and expand the Default Web Site. Right-click on the Default Web Site and select Add Virtual Directory. Give it a name (Alias) of “healthcheck” and choose a path (I used C:\Inetpub\wwwroot). Finally copy the “iisstart.htm” from the root of Default Web Site to the healthcheck folder, or just create an empty file called “iisstart.htm”

Here’s how it looks when its finished.

2013-04-14-SPA-Part05-02.png

Tip #4: Automate

If you’re going to be doing this repeatedly (for example, to perform a bunch of tests), automate. Lucky for us, Ram Gopinathan has written a script to do just that:
http://gallery.technet.microsoft.com/PowerShell-Script-for-f43bb414

Ram’s script using an input file so you can easily document what you’re doing, then it provisions all your VMs. After you’re done, it’ll tear everything down, nice and neatly.

Tip #5: CSUpload Error: Too many arguments for command Add-Disk

This error occurred when using Add-Disk:

2013-04-14-SPA-Part05-03.png

The problem was the – (the dashes). I used notepad, PowerGUI and other tools, but the dash doesn’t translate to the command prompt. To resolve this, just re-type the dashes.

Tip #6: CSUpload Error: CSUpload is expecting a page blob

I had copied down a vhd to make some modifications and then tried to upload it later. Here’s what I kept getting:

2013-04-14-SPA-Part05-04.png

In fact, CloudXplorer and other tools I tried reported the same thing. What’s the fix? Use AzCopy. See the link to read up on how to get it. AzCopy is great because it can multi-thread. My uploads using AzCopy were very fast. By specifying the /BlobType:page parameter, you can upload a block blob as a page blob. Here’s how my command looks:


azcopy E:\ftproot\vhd http://storageacct.blob.core.windows.net/vhds/ /blobtype:page /destkey:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxx/== /Z /V

Tip #7: No RemoteDesktop Endpoint

I also realized that none of my VMs had an endpoint for Remote Desktop. We can add that by using a command like this:

$vmname = "Arch-SQL1"

Get-AzureVM -ServiceName “ArchSharePoint” -Name $vmname | Add-AzureEndpoint -Name “RemoteDesktop” -Protocol "TCP" -PublicPort 53223 -LocalPort 3389 | Update-AzureVM

Remember to use a different PublicPort for each VM in a particular Cloud Service. I just incremented by one (53223, 53224, etc.). Or, this should work too:
Get-AzureVM -ServiceName $servicename | ForEach-Object {Add-AzureEndpoint -Name $endpointname -Protocol TCP -PublicPort (get-random -max 65000 -min 20000) -LocalPort 3389} | Update-AzureVM

I understand that it’s possible, but not likely, Get-Random could pick the same random number. I supposed you could script it further to check if a port is being used but that wasn’t worth the effort here.

Tip #8: Office Web Apps Tip

I published my SharePoint farm publicly, by creating an endpoint at 443. This allows me to browse SharePoint from anywhere using https://<cloud service name>.cloudapp.net. However, I couldn’t use my Office Web App servers since they were only accessible from within Azure. The Office Web Apps were configured to use https and run on port 443.

I could publish an endpoint, but I had already used 443 for SharePoint (and I don’t want to use an insecure port, like 80). So, I picked a random port, 9443. Now, how do we get SharePoint to know about this? SharePoint will PULL information from Office Web Apps, so first we need to configure Office Web Apps with this information (do this on any Office Web Apps server):

# Set the ExternalUrl on any Office Web Apps Server

New-OfficeWebAppsFarm –ExternalUrl https://archsharepoint.cloudapp.net:9443

Then, on the SharePoint server, New-SPWopiBinding will bind to the public address on the public port (https://archsharepoint.cloudapp.net:9443).

Create an endpoint in the WAC server for a TCP connection on public port 9443 to private port 443.

Tip #9: Blocked RDP in Firewall

During testing of ports and protocols, I blocked all connections on one of my servers. Obviously, that included the RDP port. If you do that, the only thing you can really do is download the VHD for that server, mount it on-premises somewhere (which will give you console access) and change it. Then, upload it back to Windows Azure. It’s a tedious process, so if you really don’t need machine or data, re-create it.

Tip #10: Reduce costs

If you’re testing scenarios over a period of week or months and you don’t necessarily use your VM’s every day – you can cut some costs. For some of my work, I might go a week or two without ever logging in to my SharePoint farms in Windows Azure. All the while though, you’re being charged for compute hours. The only way to stop that is to delete your VMs. Powering down doesn’t cut your costs, you’re still charged for compute hours.

You can use tip #4 to do a complete “tear down,” or use some PowerShell snippets to do a partial tear down. I’ll show you an example that should be pretty easy to follow. First, we’ll backup our VM configs:


#Region Func: BackupVMConfigs
function BackupVMConfigs () 
{
	param
    (
        [Parameter(Mandatory=$True)][ValidateNotNullOrEmpty()]
        [String]$CloudService,
        [Parameter(Mandatory=$True)][ValidateNotNullOrEmpty()]
        [String]$Folder
	)
If (Get-AzureVM -ServiceName $cloudservice) 
	{
		Write-Host "Backing up SharePoint VM Configurations..."
		Try {
			Get-AzureVM -ServiceName $cloudservice | foreach {
			$path = $folder + $_.Name + '.xml'
			Export-AzureVM -ServiceName $cloudservice -Name $_.Name -Path $path 
			}
			}
		Catch 
			{
			Write-Output $_
			Throw " - Error occurred. Not continuing since VM configuration may not have been saved and we don't want to delete them."
			}	
	}
Else { Write-Host " - Skipping $cloudservice because it doesn't seem to exist." -ForegroundColor Yellow}
Write-Host " - Done backing up. Removing VM's from Cloud Service..." -ForegroundColor Yellow
}
#EndRegion

To use that function, you’d type in BackupVMConfig –CloudService “<name of cloud service> -Folder “<path to folder, include trailing slash>”

I’ve used that function in the next snippet, where we actually remove the Cloud Service/Deployment:


#Region Func: Remove SP Deployment
function RemoveSP {
$CloudService = "ArchSharePoint"
BackupVMConfigs -CloudService $CloudService -Folder "C:\Scripts\Azure\SharePoint\"
#Removing all VMs while keeping the cloud service/DNS name
Remove-AzureDeployment -ServiceName $cloudservice -Slot Production -Force
Write-Host "Removed all SharePoint VMs"
}
#EndRegion

Once you run the “RemoveSP” function, you’re no longer incurring compute charges. The actual VHD’s are still there in your Windows Azure storage account though. The charges for storage are very small, almost insignificant so we keep those there.

Later, when you’re ready to fire up your farm you can do the inverse. First, I have a function to do the actual import of the VMs:


#Region Func: ImportVMs ($CloudService, $Folder)
function ImportVMs ()
{
	param
    (
        [Parameter(Mandatory=$True)][ValidateNotNullOrEmpty()]
        [String]$CloudService,
        [Parameter(Mandatory=$True)]
		[ValidatePattern({\\$})]
		[ValidateScript({Test-Path $_ -PathType 'Container'})] 
        [String]$Folder
	)
$cs = Get-AzureVM -ServiceName $cloudservice
If ($cs.Count -ge 1) 
	{
	Write-Host "It looks like (at least some) of the VMs are up. Skipping restore..." -ForegroundColor Green
	}
Try 
	{
	Write-Host " - Importing VMs..." -ForegroundColor Yellow
	$script:vms = @()
	Get-ChildItem $folder | foreach {
		$path = $folder + $_
		$script:vms += Import-AzureVM -Path $path
		}
	}
Catch
	{
	Write-Output $_
	Throw " - Error occurred."
	}	
}
#EndRegion

And here’s where I’m using it:


#Region Restore SharePoint Deployment
function RestoreSharePoint 
{
$cloudservice = "ArchSharePoint"
$folder = "C:\Scripts\Azure\SharePoint\" #must include trailing \
ImportVMs -CloudService $CloudService -Folder $Folder
Write-Host " - Restoring takes about 30 minutes..." -ForegroundColor Yellow
Measure-Command {New-AzureVM -ServiceName $cloudservice -VNetName "vNet-Arch" -VMs $vms}
}
<# 
#This is used if the Cloud Service was deleted
## Cloud Service Paramaters  
$serviceLabel = $cloudservice
$serviceDesc = "Architecture SharePoint Farm" 
$ag = 'AG-SharePoint-Arch'
Measure-Command {New-AzureVM -ServiceName $cloudservice -ServiceLabel $serviceLabel -ServiceDescription $serviceDesc -AffinityGroup $ag -VNetName $vNet -VMs $vms}
#>
#EndRegion

Running the “RestoreSharePoint” function will call the ImportVMs function with the right parameters and attach your VHDs to some shiny new VMs based on the backups you took before.

Conclusion

That’s the end of our series. I hope I’ve achieved my goal of consolidating all the information needed to understand and setup SharePoint farms on Windows Azure IaaS. If you haven’t started playing around yet, go back to the introduction to learn how to sign up for a free account. A big thanks to my colleagues who helped me throughout the series: Paul Stubbs, Len Cardinal, Kosma Zygouras, Shane Laney.

Categories: Azure; SharePoint; Management; Cloud

Comments

china wholesale

china wholesale

Posted 29-Jun-2013 by china wholesale
Gucci Galaxy S4 Case

Gucci Galaxy S4 Case

Hi. I've got to say this is the quite interesting report. My partner and i by myself also have a web site, you should check them in this articleLouis Vuitton iPad Mini Case

Posted 25-Jul-2013 by Gucci Galaxy S4 Case
Honda GNA600 für Verkauf

Honda GNA600 für Verkauf

Keep it up and I'll be back soon to find out more mate. DEMI

Posted 23-Sep-2013 by Honda GNA600 für Verkauf
Sheet metal prototype manufacturer

Rapid Prototype

vc 3E Rapid Prototype is one of the most advanced techniques of modern designing. It's manufacturing in China to provide end to end solutions at competitive rate.

Posted 25-Sep-2013 by Sheet metal prototype manufacturer
Candly019

Thank you for sharing!

Thank you for sharing. Your post worth of reading. Waiting for new posts. buyincoins, where you can buy good products from China directly without any shipping fee.

Posted 29-Oct-2013 by Candly019
Autoboss v30 Eliet

Autoboss v30 Eliet

thanks for sharing,I wish to see future updates...

Posted 02-Nov-2013 by Autoboss v30 Eliet
Autoboss v30 Eliet

Autoboss v30 Eliet

thanks for sharing,I wish to see future updates...

Posted 02-Nov-2013 by Autoboss v30 Eliet
i:0e.t|liveid|00034001afea33fc@live.com

SharePoint Online 2013

Hi,
These are the types of questions I am looking for answers for SharePoint Online 2013:
•Can you backup SharePoint on Windows Azure?
•How often are backups?
•How long are backups kept?
•What is the process for requesting a restore?
•Can restores be performed to a new location or only over the existing content?
•What level of granularity is there for restore requests (document, library, web, site collection?)
•How long does it take between making a request and getting the content restored?
•Is there an additional charge for performing restores?

I am not enquiring about saving a site as a template, recovering items from the recycle bin or third party products.
 
 

Toyota android car DVD player

Toyota android car DVD player

Welcome to [URL=http://www.chinaobdii.com/en/76-android-dvd-for-toyota]Toyota android car DVD player[/URL] group, choose your models to find suitable for your [URL=http://www.chinaobdii.com/en/25-car-dvd-player]DVD player[/URL], cheap online shop[URL=http://www.chinaobdii.com/en/all-categories/397-for-toyota-camry-2012-8-android-car-dvd-for-toyota-cp-t052-with-3g-wifi-hotspot-rds-analong-tv-bluetooth.html]android Toyota car DVD player[/URL], biggest Toyota car dvd player online shop in china.

Posted 25-Nov-2013 by Toyota android car DVD player
toko sepatu original

must read

Your writings, articles, blogs I mean over all contents is must read matter. celana denim | harga sepatu vans | harga sepatu new balance

Posted 11-Dec-2013 by toko sepatu original
OP-COM

OP-COM

[URL=http://www.chinaobdii.com/en/car-professional-diagnostic-tools/81--op-com-op-com-opcomfull-status-information-supports-many-control-units.html]OP-COM [/URL]- PC based Opel diagnostic VERSION: 201008OP-COM is a PC based diagnostic program.

Posted 18-Dec-2013 by OP-COM
abby

A reliable blog always

A reliable blog always comes-up with new and exciting information and while reading I have experience that this blog is really have all those quality that qualify a blog to be a good one.

Posted 05-Jan-2014 by abby
khang

What you're saying is completely true

What you're saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what you're trying to say! contact ee

Posted 08-Jan-2014 by khang
fadinai

Mr......

Such a very informatics post, as I have browsed the majority of your posts. But I found this post is almost certainly where I got the most useful information for my research. It is really youtube.com video very interesting to read this particular post. I just would like to say thanks for your great efforts.

Posted 13-Jan-2014 by fadinai
fadinai

Mr......

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work. http://dangerousgarciniacambogia.com

Posted 13-Jan-2014 by fadinai
laoini

another great work

Another great example of innovation, I am glad to locate it. There are so several developers working on this segment but this is one of the best innovative idea ever. Thanks for sharing it here. wells dentist

Posted 16-Jan-2014 by laoini
jaferi322

jafrie likes your post

I really do appreciate this so much. This was a very good and interesting article to say the least. Thanks! I work for a design company and I have really learned so much from this great site. best bb cream

Posted 22-Jan-2014 by jaferi322
khang

What you're saying

What you're saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what you're trying to say! Learn more

Posted 24-Jan-2014 by khang
jeferio

You could post on

You could post on the friendless of the blog owner. You may illustrate it's mesmerizing. Your blog feedback may add to your contacts. kohls coupons

Posted 26-Jan-2014 by jeferio
henrykhan

Mr...

A reliable blog always comes-up with new and exciting information and while reading I have experience that this blog is really have all those quality that qualify a blog to be a good one. venus factor diet

Posted 17-Mar-2014 by henrykhan
Custom Computer Bags

Mr...

A very wonderful article. It touches a lot of urgent issues of our society. We can not be indifferent to these problems. This article gives good ideas and concepts. Keep it up. Custom Computer Bags

Posted 17-Mar-2014 by Custom Computer Bags
Hotels in Lithuania

Mr...

It was great to see the old printshop and everyone who works there again. I am excited to see a printing business still operating and growing, great job guys Hotels in Lithuania

Posted 18-Mar-2014 by Hotels in Lithuania
dsadsarwe

Mr...

Awesome publish superb perform when i advantage efficiency. Be happy. Maintain disclosing. Awesome publish. DesignRope

Posted 19-Mar-2014 by dsadsarwe
jieo

A outstanding

A outstanding internet promotion technique with a outstanding catchphrase could create you buy a item, even if the top quality it`s not very outstanding. blog bouteille personnalisée

Posted 23-Mar-2014 by jieo
jaioo

it was great

It was great to see the old printshop and everyone who works there again. I am excited to see a printing business still operating and growing, great job guys http://watchthisfree.com/

Posted 24-Mar-2014 by jaioo
buy vimax

buy vimax

This is just the information I am finding everywhere.Me and my friend were arguing about an issue similar to this! Now I know that I was right.Thanks for the information you post. buy vimax

Posted 25-Mar-2014 by buy vimax
house for rent chiang mai

house for rent chiang mai

The female condom puts the power and protection in her hands. Pathfinder International is on the ground around the world working to tear down these barriers and we need your help. house for rent chiang mai

Posted 25-Mar-2014 by house for rent chiang mai
Rebecca

SharePoint

This is highly informative, I study something more difficult on totally different blogs everyday. It's going to always be stimulating to learn content from other writers and apply a bit something from their store. ninja cooking system

Posted 29-Mar-2014 by Rebecca
jaino

First You got

First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks. http://www.doubleglazingcostonline.org.uk/

Posted 29-Mar-2014 by jaino
carteranderson

SRSG incorporated in

SRSG incorporated in 1997 with a vision to provide the technology of Apple. SRSG is one and half decade old agile and adaptable company dealing with wide spectrum of broadcast IT and media technology products and services. web design agency

Posted 31-Mar-2014 by carteranderson
montre guess

montre guess

Ce groupe particulier de guess pas cher design élégant ainsi que de la personnalité sans se presser est effectivement tenir compte des modifications subtiles dans leurs esprits particuliers. sac guess faire leur utilisateur un look authentique,pensées spécifiques Im se référant à des sacs guess spéciaux.L'équipage de la dentelle sur la ligne supérieure de guess sac à fermeture éclair, la première question en essayant d'ouvrir le sac guess pas cher est très élégant et rappelle déMais des années 50, lorsque le complexe a été la beauté de la métropole de la mode. Foulards précédents faits de coton ou de laine a été utilisé comme protection contre le froid.Sa ressemblance avec le molleton est la conception louchie qu'ils partagent, et leur prix sacs guess abordable sont un gros plus. passez à la friperie. Assurez-vous que vos sacs guess reflètent votre personnalité. Pas beaucoup à comprendre, même si, que le nom sac guess renommée mondiale dispose débuts très humbles. les vous ne voulez pas de les enlever plus ce modèle guess permettra d'éviter des visiteurs ciblés et aussi avoir des personnes regardant. Aujourd'hui, je suis ici pour recommander un des sacs guess piste de bowling pour tous conscient. Harnais 4 points. Beaucoup de gens se rendre compte que c'est vraiment le plus remarquable sur le monde et oui c'est souvent tottenham les guess Soldes theifs de vérifier en un seul particulier leur, que peut bracelet guess m'apporter personnellement à un autre thème emplacement. L'étiquette guess contenu mens a gonflé dans les dernières 2-plusieurs années. Considèrent généralement que cette note recommandation car il existe une excellente raison la raison principale pourquoi il est vraiment présent là-bas.Beaucoup de graphistes essentiellement apprendre à saisir vos cœurs en papier associés à un lot d'un si utilisé vers le sac à main guess. Vous pouvez constater que c'est soit l'accessoire standard ou en option. bien que celui spécifiquement désignée pour vos raquettes est effectivement isolé de manière à faire en sorte que vos raquettes rester protégé montre guess contre les variations extrêmes de température.Plus d'espace a été ajouté à ce modèle que les sacs des années précédentes, pour l'équitation de dossier de siège confortable et toutes les tailles de sièges d'auto. http://www.paris-guess.com/

Posted 17-Apr-2014 by montre guess

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: