Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hsachinraj committed Apr 21, 2017
1 parent 96c4526 commit 2b08d13
Show file tree
Hide file tree
Showing 539 changed files with 22,009 additions and 2 deletions.
29 changes: 29 additions & 0 deletions BuildScripts/DropDatabasesRG.ps1
@@ -0,0 +1,29 @@
[cmdletbinding()]
param (
[string]$resourcegroup
)

Write-Host "Drop databases"

$servers = Get-AzureRmSqlServer -ResourceGroupName $resourcegroup

foreach ($sqlServerName in $servers){

Write-Host $sqlServerName.ServerName

$databases = Get-AzureRmSqlDatabase -ResourceGroupName $resourcegroup -ServerName $sqlServerName.ServerName

foreach ($databasename in $databases){

Write-Host $databasename.DatabaseName

if (-Not ($databasename.DatabaseName = 'master')) {
Remove-AzureRMSqlDatabase -ResourceGroupName $resourcegroup –DatabaseName $databasename.DatabaseName -ServerName $sqlServerName.ServerName -Force
}

}


}


25 changes: 25 additions & 0 deletions BuildScripts/Prebuild.ps1
@@ -0,0 +1,25 @@

# bootstrap DNVM into this session.
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}

# load up the global.json so we can find the DNX version
$globalJson = Get-Content -Path $PSScriptRoot\..\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore

if($globalJson)
{
$dnxVersion = $globalJson.sdk.version
}
else
{
Write-Warning "Unable to locate global.json to determine using 'latest'"
$dnxVersion = "latest"
}

# install DNX
# only installs the default (x86, clr) runtime of the framework.
# If you need additional architectures or runtimes you should add additional calls
# ex: & $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -r coreclr
& $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -Persistent

# run DNU restore on all project.json files in the src folder including 2>1 to redirect stderr to stdout for badly behaved tools
Get-ChildItem -Path $PSScriptRoot\..\ -Filter project.json -Recurse | ForEach-Object { & dnu restore $_.FullName 2>1 }
10 changes: 10 additions & 0 deletions BuildScripts/Publish.ps1
@@ -0,0 +1,10 @@


# load up the global.json so we can find the DNX version
$globalJson = Get-Content -Path $PSScriptRoot\..\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore

$runtime = "dnx-clr-win-x86.$($globalJson.sdk.version)"
$dnu = "$($env:USERPROFILE)\.dnx\runtimes\$($runtime)\bin\dnu"

# Incude 2>1 to redirect stderr to stdout for badly behaved tools
& $dnu publish --runtime $runtime 2>1
37 changes: 37 additions & 0 deletions BuildScripts/PublishASPNET.ps1
@@ -0,0 +1,37 @@

param(
[parameter(Mandatory=$TRUE)]
[String] $ResourceGroupName,
[parameter(Mandatory=$TRUE)]
[String] $webAppName,
[parameter(Mandatory=$TRUE)]
[String] $webPackage
)

$webApp = Get-AzureRMWebApp -ResourceGroupName $ResourceGroupName -Name $webAppName

$publishProfile = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, "profile.xml"))
$pp = Get-AzureRMWebAppPublishingProfile -WebApp $webApp -OutputFile $publishProfile

[xml]$ppXml = Get-Content $publishProfile
$deployIisAppPath = "$webAppName/wwwroot"
$publishProperties = @{'WebPublishMethod'='MSDeploy';
'MSDeployServiceUrl'=$ppXml.publishData.FirstChild.publishUrl;
'DeployIisAppPath'=$deployIisAppPath;
'Username'=$ppXml.publishData.FirstChild.userName;
'Password'=$ppXml.publishData.FirstChild.userPWD}

$publishScript = "$PSScriptRoot\default-publish.ps1"
$webPackageFile = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $webPackage))
$webPackagePath = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, "temp"))

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($webPackageFile, $webPackagePath)

. $publishScript -publishProperties $publishProperties -packOutput $webPackagePath

Remove-Item $publishProfile
Remove-Item $webPackagePath -recurse



7 changes: 7 additions & 0 deletions BuildScripts/Runtest.ps1
@@ -0,0 +1,7 @@

$globalJson = Get-Content -Path $PSScriptRoot\..\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore

dnvm use $globalJson.sdk.version

dnx -p $PSScriptRoot\..\test\MyHealth.API.IntegrationTests testxml 2>1

18 changes: 18 additions & 0 deletions BuildScripts/ShutDownWebAppRG.ps1
@@ -0,0 +1,18 @@
[cmdletbinding()]
param (
[Parameter(Mandatory=$true)]
[string] $ResourceGroupName
)


# Get Websites/webapps
$websites = Get-AzureRmWebApp -ResourceGroupName "$ResourceGroupName"

# Restart each website
Write-Output "Starting with the nap."

foreach ($website In $websites)
{
Write-Output "Sleeping $($website.Name)"
Stop-AzureRmWebApp $website.Name -ResourceGroupName "$ResourceGroupName"
}
18 changes: 18 additions & 0 deletions BuildScripts/StartWebAppRG.ps1
@@ -0,0 +1,18 @@
[cmdletbinding()]
param (
[Parameter(Mandatory=$true)]
[string] $ResourceGroupName
)


# Get Websites/webapps
$websites = Get-AzureRmWebApp -ResourceGroupName "$ResourceGroupName"

# Restart each website
Write-Output "Starting with the nap."

foreach ($website In $websites)
{
Write-Output "Sleeping $($website.Name)"
Start-AzureRmWebApp $website.Name -ResourceGroupName "$ResourceGroupName"
}
101 changes: 101 additions & 0 deletions BuildScripts/default-publish.ps1
@@ -0,0 +1,101 @@
[cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties, $packOutput, $nugetUrl)

# to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327
$publishModuleVersion = '1.0.1'
function Get-VisualStudio2015InstallPath{
[cmdletbinding()]
param()
process{
$keysToCheck = @('hklm:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0',
'hklm:\SOFTWARE\Microsoft\VisualStudio\14.0',
'hklm:\SOFTWARE\Wow6432Node\Microsoft\VWDExpress\14.0',
'hklm:\SOFTWARE\Microsoft\VWDExpress\14.0'
)
[string]$vsInstallPath=$null

foreach($keyToCheck in $keysToCheck){
if(Test-Path $keyToCheck){
$vsInstallPath = (Get-itemproperty $keyToCheck -Name InstallDir -ErrorAction SilentlyContinue | select -ExpandProperty InstallDir -ErrorAction SilentlyContinue)
}

if($vsInstallPath){
break;
}
}

$vsInstallPath
}
}

$vsInstallPath = Get-VisualStudio2015InstallPath
$publishModulePath = "{0}Extensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath, $publishModuleVersion

if(!(Test-Path $publishModulePath)){
$publishModulePath = "{0}VWDExpressExtensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath, $publishModuleVersion
}

$defaultPublishSettings = New-Object psobject -Property @{
LocalInstallDir = $publishModulePath
}

function Enable-PackageDownloader{
[cmdletbinding()]
param(
$toolsDir = "$env:LOCALAPPDATA\Microsoft\Web Tools\Publish\package-downloader-$publishModuleVersion\",
$pkgDownloaderDownloadUrl = 'http://go.microsoft.com/fwlink/?LinkId=524325') # package-downloader.psm1
process{
if(get-module package-downloader){
remove-module package-downloader | Out-Null
}

if(!(get-module package-downloader)){
if(!(Test-Path $toolsDir)){ New-Item -Path $toolsDir -ItemType Directory -WhatIf:$false }

$expectedPath = (Join-Path ($toolsDir) 'package-downloader.psm1')
if(!(Test-Path $expectedPath)){
'Downloading [{0}] to [{1}]' -f $pkgDownloaderDownloadUrl,$expectedPath | Write-Verbose
(New-Object System.Net.WebClient).DownloadFile($pkgDownloaderDownloadUrl, $expectedPath)
}

if(!$expectedPath){throw ('Unable to download package-downloader.psm1')}

'importing module [{0}]' -f $expectedPath | Write-Output
Import-Module $expectedPath -DisableNameChecking -Force
}
}
}

function Enable-PublishModule{
[cmdletbinding()]
param()
process{
if(get-module publish-module){
remove-module publish-module | Out-Null
}

if(!(get-module publish-module)){
$localpublishmodulepath = Join-Path $defaultPublishSettings.LocalInstallDir 'publish-module.psm1'
if(Test-Path $localpublishmodulepath){
'importing module [publish-module="{0}"] from local install dir' -f $localpublishmodulepath | Write-Verbose
Import-Module $localpublishmodulepath -DisableNameChecking -Force
$true
}
}
}
}

try{

if (!(Enable-PublishModule)){
Enable-PackageDownloader
Enable-NuGetModule -name 'publish-module' -version $publishModuleVersion -nugetUrl $nugetUrl
}

'Calling Publish-AspNet' | Write-Verbose
# call Publish-AspNet to perform the publish operation
Publish-AspNet -publishProperties $publishProperties -packOutput $packOutput
}
catch{
"An error occurred during publish.`n{0}" -f $_.Exception.Message | Write-Error
}
59 changes: 59 additions & 0 deletions MHC_ASPNetCore.sln
@@ -0,0 +1,59 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{57584487-3A55-47C2-9FA5-5C62BF8D87ED}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0C9AB56B-4835-4539-8439-799F459911A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F1E42E5B-586D-453B-A7D8-05D6E647C3D9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyHealth.Model", "src\MyHealth.Model\MyHealth.Model.csproj", "{74909452-94ED-4B8B-B452-6A40F5A8F58C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyHealth.Data", "src\MyHealth.Data\MyHealth.Data.csproj", "{E4A09728-2A40-459F-983B-7DDBB8007AAB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyHealth.API", "src\MyHealth.API\MyHealth.API.csproj", "{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyHealth.Web", "src\MyHealth.Web\MyHealth.Web.csproj", "{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyHealth.API.IntegrationTests", "test\MyHealth.API.IntegrationTests\MyHealth.API.IntegrationTests.csproj", "{E150AB03-F223-4880-B248-90917C387899}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{74909452-94ED-4B8B-B452-6A40F5A8F58C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74909452-94ED-4B8B-B452-6A40F5A8F58C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74909452-94ED-4B8B-B452-6A40F5A8F58C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74909452-94ED-4B8B-B452-6A40F5A8F58C}.Release|Any CPU.Build.0 = Release|Any CPU
{E4A09728-2A40-459F-983B-7DDBB8007AAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4A09728-2A40-459F-983B-7DDBB8007AAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4A09728-2A40-459F-983B-7DDBB8007AAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4A09728-2A40-459F-983B-7DDBB8007AAB}.Release|Any CPU.Build.0 = Release|Any CPU
{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E}.Release|Any CPU.Build.0 = Release|Any CPU
{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4}.Release|Any CPU.Build.0 = Release|Any CPU
{E150AB03-F223-4880-B248-90917C387899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E150AB03-F223-4880-B248-90917C387899}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E150AB03-F223-4880-B248-90917C387899}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E150AB03-F223-4880-B248-90917C387899}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{74909452-94ED-4B8B-B452-6A40F5A8F58C} = {57584487-3A55-47C2-9FA5-5C62BF8D87ED}
{E4A09728-2A40-459F-983B-7DDBB8007AAB} = {57584487-3A55-47C2-9FA5-5C62BF8D87ED}
{42137795-6EFB-41C8-9CDD-96E5FF3C5B6E} = {57584487-3A55-47C2-9FA5-5C62BF8D87ED}
{11E2D7CC-1221-4E5C-9A4E-2653AE455ED4} = {57584487-3A55-47C2-9FA5-5C62BF8D87ED}
{E150AB03-F223-4880-B248-90917C387899} = {F1E42E5B-586D-453B-A7D8-05D6E647C3D9}
EndGlobalSection
EndGlobal
27 changes: 27 additions & 0 deletions MHC_LoadTesting.sln
@@ -0,0 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyHealth.LoadTests", "test\MyHealth.LoadTests\MyHealth.LoadTests.csproj", "{1EE007C9-B3BC-4E37-B615-BB931A4775FE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8351F8EE-A4A6-4ADC-A34C-C8B872FE565E}"
ProjectSection(SolutionItems) = preProject
Local.testsettings = Local.testsettings
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1EE007C9-B3BC-4E37-B615-BB931A4775FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EE007C9-B3BC-4E37-B615-BB931A4775FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EE007C9-B3BC-4E37-B615-BB931A4775FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EE007C9-B3BC-4E37-B615-BB931A4775FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
22 changes: 22 additions & 0 deletions MHC_PackageManagement.sln
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyHealth.Helpers", "src\MyHealth.Helpers\MyHealth.Helpers.csproj", "{6AD1641E-B20B-4042-AAFF-F02560C4EF3C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6AD1641E-B20B-4042-AAFF-F02560C4EF3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AD1641E-B20B-4042-AAFF-F02560C4EF3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AD1641E-B20B-4042-AAFF-F02560C4EF3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AD1641E-B20B-4042-AAFF-F02560C4EF3C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
7 changes: 7 additions & 0 deletions NuGet.config
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="HealthClinic Repo" value="" />
</packageSources>
</configuration>

0 comments on commit 2b08d13

Please sign in to comment.