This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| azuresub=$1 | |
| demolocation=$2 | |
| demoresourcegroup=$3 | |
| mysqlservername=$4 | |
| mysqladminuser=$5 | |
| mysqladminpass=$6 | |
| appplanname=$7 | |
| webappname=$8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| azuresub=$1 | |
| demoresourcegroup=$2 | |
| webappname=$3 | |
| deployuser=$4 | |
| deploypass=$5 | |
| # CAUTION! RESTS CREDS for *all* Web Apps | |
| # az webapp deployment user set --user-name $deployuser --password $deploypass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| azuresub=$1 | |
| demoresourcegroup=$2 | |
| mysqlservername=$3 | |
| firstip=$4 | |
| secondip=$5 | |
| thirdip=$6 | |
| fourthip=$7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $workingFolder = "C:\temp\" | |
| $packerFolder = "C:\DeployTemp\a\" | |
| $webPIURL = "http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi" | |
| $webPIInstaller = $workingFolder + "WebPlatformInstaller_amd64_en-US.msi" | |
| $webPIExec = $env:ProgramFiles + "\Microsoft\Web Platform Installer\WebPiCmd-x64.exe" | |
| $webDeployPackage = $packerFolder + "MyWebsite.API.zip" | |
| $webDeployParams = $packerFolder + "MyWebsite.API.SetParameters.xml" | |
| # Create working directory | |
| New-Item $workingFolder -Type Directory -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Configuration Main | |
| { | |
| Node ('localhost') | |
| { | |
| WindowsFeature WebServerRole | |
| { | |
| Name = "Web-Server" | |
| Ensure = "Present" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True)] | |
| [string]$imageResourceGroupName, | |
| [Parameter(Mandatory=$True)] | |
| [string]$imageResourceGroupAzureRegion, | |
| [Parameter(Mandatory=$True)] | |
| [string]$osDiskVhdUri, | |
| [Parameter(Mandatory=$True)] | |
| [string]$baselineImageName, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MyDemo.Website.WebApi.Helpers | |
| { | |
| public static class KevVaultUtils | |
| { | |
| // You could also utilise a certificate-based service principal as well | |
| // Yes, these are hardcoded :) | |
| private const string kvSP = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
| private const string kvSPkey = "NOTREALLYTHEPASSWORD"; | |
| public static async Task<string> GetToken(string authority, string resource, string scope) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MyDemo.Website.WebApi | |
| { | |
| public class WebApiApplication : System.Web.HttpApplication | |
| { | |
| // This value is used if for some reason the configuration doesn't have a defined | |
| // application insights instrumentation key | |
| private const string DefaultAppInsightsKey = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
| // Yes, these are hardcoded - need to change? Recompile and build VM Image and redeploy. | |
| private const string ConfigurationDbId = "apiconfigs"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "swtst01-webapi", | |
| "AccessKey": "MATCHES_KEY_OF_CONFIG DB", | |
| "AppInsightsKey": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", | |
| "LoggingDatabaseAccount": "https://myruntimedb.documents.azure.com:443/", | |
| "LoggingDatabaseKey": "COSMOS_DB_KEY_OF_DBACCOUNT", | |
| "LoggingDatabase": "runtimeitems", | |
| "LoggingDatabaseCollection": "runtimedatabases", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "adminPassword": { | |
| "reference": { | |
| "keyVault": { | |
| "id": "/subscriptions/{subscription-guid}/resourceGroups/{keyvault-rg}/providers/Microsoft.KeyVault/vaults/ProvisioningVault" | |
| }, | |
| "secretName": "LocalAdminPass", | |
| "secretVersion": "6A12A286385949DB8B5F82AFEF85CAE9" | |
| } | |
| } |