Added a prerequisite step for the Add-AzureAccount cmdlet. Sometimes, the script may not run correctly (resources not found) if you have the wrong subscription saved in your PS session profile.

Added a warning in the deployment script if the service bus namespace is not found in the subscription.
Added debugging options in the iisnode.yml configuration file.
This commit is contained in:
CGI\franck.cornu 2016-11-02 13:57:07 -04:00
parent f2819a0799
commit a1988489e2
3 changed files with 13 additions and 3 deletions

View File

@ -36,7 +36,7 @@ Write-Host -ForegroundColor Green "Done!"
# -----------------------------------------------------
Write-Host -ForegroundColor Magenta "Login to Azure..."
Login-AzureRmAccount
Login-AzureRmAccount
$GitPublishingUserName = "tempdeployuser" + [Guid]::NewGuid();
$GitPublishingUserPassword = "socketio123!"
@ -82,13 +82,20 @@ Try {
# Check if the namespace already exists or needs to be created
if ($CurrentNamespace) {
# Set the Web Applicatio settings
Write-Host -ForegroundColor Magenta "Set application settings for service bus connection..."
# Set the Web Application settings
$AppSettings = New-Object Hashtable
$AppSettings["AZURE_SERVICEBUS_ACCESS_KEY"]=$CurrentNamespace.ConnectionString
# Set application settings and enable WebSockets
Set-AzureWebsite -Name $AzureWebAppName -AppSettings $AppSettings
} else {
Write-Warning "Azure Service Bus namespace '$AzureSBNamespace' not found. Make sure you've selected the right Azure subscription (forgot to run the Add-AzureAccount cmdlet?)"
}
Write-Host -ForegroundColor Green "Done!"
# Deploy the code to the Web Application using Local Git

View File

@ -33,6 +33,7 @@ Here is the solution overview:
Before starting, you'll need to install some prerequisites:
- Install the [Azure PowerShell SDK](https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/). Make sure you've installed the AzureRM module as well.
Run the `Add-AzureAccount` cmdlet and optionaly select the correct Azure subscription to work with by running the `Select-AzureSubscription` cmdlet.
- Install the latest release of [PnP PowerShell cmdlets 'SharePointPnPPowerShellOnline'](https://github.com/OfficeDev/PnP-PowerShell/releases) or a version compatible with the 201605 PnP schema version.
- Install [Node.js](https://nodejs.org/en/) on your machine.
- Install [Git for Windows](https://git-scm.com/download/win).

View File

@ -1 +1,3 @@
debuggingEnabled: true
debuggingEnabled: true
loggingEnabled: true
devErrorsEnabled: true