Skip to content

Commit

Permalink
Parts Unlimited Refresh Work
Browse files Browse the repository at this point in the history
1. Upgrade and test source code from .Net Core RC2 to RTM
2. Update .NET core base documentation
3. Port existing HOLs to work with the .Net Core code
4. VSTS Quick start HOL
  • Loading branch information
steven2000nz committed Oct 3, 2016
1 parent 7903c98 commit 0039c89
Show file tree
Hide file tree
Showing 203 changed files with 2,847 additions and 1,761 deletions.
30 changes: 16 additions & 14 deletions PartsUnlimited.MRP.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22806.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{44621553-AA7D-4893-8834-79582A7D8348}"
EndProject
Expand All @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B7B176B6-8D4
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{363D2681-31A6-48C9-90BB-9ACFF4A41F06}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited", "src\PartsUnlimitedWebsite\PartsUnlimited.xproj", "{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited.UnitTests", "test\PartsUnlimited.UnitTests\PartsUnlimited.UnitTests.xproj", "{0C64E1A0-7791-457B-BD8A-60CBA4979702}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited.Models", "src\PartsUnlimited.Models\PartsUnlimited.Models.xproj", "{AF7CC9D8-E786-472B-85CD-8EE5E7429D25}"
Expand All @@ -25,6 +23,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited.WebJobs.Upda
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited.WebJobs.ProcessOrder", "src\PartsUnlimited.WebJobs.ProcessOrder\PartsUnlimited.WebJobs.ProcessOrder.xproj", "{69D44EF8-50EB-4DB4-9371-AF08C69C8586}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimitedWebsite", "src\PartsUnlimitedWebsite\PartsUnlimitedWebsite.xproj", "{7C4EF04F-1261-42E3-A1D9-71197299585E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -35,16 +35,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Release|Any CPU.Build.0 = Release|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0}.Release|x86.ActiveCfg = Release|Any CPU
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -93,15 +83,27 @@ Global
{69D44EF8-50EB-4DB4-9371-AF08C69C8586}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{69D44EF8-50EB-4DB4-9371-AF08C69C8586}.Release|x86.ActiveCfg = Release|Any CPU
{69D44EF8-50EB-4DB4-9371-AF08C69C8586}.Release|x86.Build.0 = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|x86.ActiveCfg = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Debug|x86.Build.0 = Debug|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|Any CPU.Build.0 = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|x86.ActiveCfg = Release|Any CPU
{7C4EF04F-1261-42E3-A1D9-71197299585E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3CFBED5D-2ED8-49DB-96FB-BDAA748DC5A0} = {B7B176B6-8D4D-4EF1-BBD2-DDA650C78FFF}
{0C64E1A0-7791-457B-BD8A-60CBA4979702} = {363D2681-31A6-48C9-90BB-9ACFF4A41F06}
{AF7CC9D8-E786-472B-85CD-8EE5E7429D25} = {B7B176B6-8D4D-4EF1-BBD2-DDA650C78FFF}
{6F44879B-8659-4093-B9BB-E811B286CB49} = {B7B176B6-8D4D-4EF1-BBD2-DDA650C78FFF}
{69D44EF8-50EB-4DB4-9371-AF08C69C8586} = {B7B176B6-8D4D-4EF1-BBD2-DDA650C78FFF}
{7C4EF04F-1261-42E3-A1D9-71197299585E} = {B7B176B6-8D4D-4EF1-BBD2-DDA650C78FFF}
EndGlobalSection
EndGlobal
16 changes: 15 additions & 1 deletion PartsUnlimited.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{44621553-AA7D-4893-8834-79582A7D8348}"
EndProject
Expand All @@ -21,6 +21,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{024D69BE-C
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PartsUnlimited.UnitTests", "test\PartsUnlimited.UnitTests\PartsUnlimited.UnitTests.xproj", "{0C64E1A0-7791-457B-BD8A-60CBA4979702}"
EndProject
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "PartsUnlimitedEnv", "env\PartsUnlimitedEnv.deployproj", "{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -65,6 +67,18 @@ Global
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Release|x86.ActiveCfg = Release|Any CPU
{0C64E1A0-7791-457B-BD8A-60CBA4979702}.Release|x86.Build.0 = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Debug|x86.Build.0 = Debug|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|Any CPU.Build.0 = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|x86.ActiveCfg = Release|Any CPU
{BD52204A-7129-4FF2-B66C-34A5E6F70CDD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions PartsUnlimited.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/EventHandlerPatternLong/@EntryValue">$object$_On$event$</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/EventHandlerPatternLong/@EntryValue">$object$_On$event$</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
104 changes: 36 additions & 68 deletions docs/Deployment.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,43 @@
#Deployment#
# Deployment
For full deployments, you can deploy the PartsUnlimited app to slots as needed. The website is setup to keep the connection strings with the slots. This means that if staging and main website slots are switched, the main website will still use the production database, while the staging slot will keep pointing to the staging database.

##How to Deploy Demo/Simple Environment and Publish Website##

1. Create a storage account (or use an existing one) where deployment artifacts can be uploaded. The Storage account must be on the same subscription as the one the website will be deployed to.
1. If you haven’t already done so, install [Microsoft Azure PowerShell - November 2015](https://github.com/Azure/azure-powershell/releases/download/v1.0.1-November2015/azure-powershell.1.0.1.msi)
1. Open env\PartsUnlimited.Environment\PartsUnlimited.Environment.sln
1. Right-click on the PartsUnlimited.Environment and choose Deploy -> New Deployment…
1. Choose the subscription to which you want to deploy
1. Under Resource Group select New…
* Enter a Resource Group name
* Name should not include periods
* Choose Resource group location.
1. For Deployment template, choose demoenvironmentsetup.json.
1. For Deployment template parameters, choose demoenvironmentsetup.param.json.
1. Click Deploy.
1. If prompted, edit the parameter to add any required value for the deployment template.
## How to Manually Deploy Full Environment And Publish Website
1. Open PartsUnlimited.sln at the root of the directory
2. If you haven’t already done so, install PowerShell Tools for Visual Studio by following these steps:
* Go to Tools - Extensions and Updates and search for "PowerShell"
![PowerShell Tools for Visual Studio](./img/PowerShellToolsVS.jpg)
* If it is not present, then click the Online - Visual Studio Gallery section and search for "PowerShell" there and then install.
* Restart Visual Studio to complete the installation
* Re-open the Visual Studio project PartsUnlimited.sln
3. Right-click on the `PartsUnlimitedEnv` folder (the deployment project root) and choose Deploy -> New…
4. Choose subscription to deploy to.
5. Under Resource Group choose New…
* Enter Resource Group name
* Name should not include periods.
* Choose Resource group location.
6. For Deployment template, choose `fullenvironmentsetupmerged.json`.
7. For Deployment template parameters, choose `fullenvironmentsetupmerged.param.json`.
8. Click OK.
9. If prompted, edit the parameter to add any required value for the deployment template and click Save.
* Do not fill in values for anything that has ‘auto-generated’ for its value.
1. If prompted fill in any values the scripts ask for. This will only happen if you leave a non-auto-generated parameter blank.
* The SQL Server name (specified by PartsUnlimitedServerName) should be all lowercase
* The Storage Account name (specified by CdnStorageAccountName) should be all lowercase and be 3 to 24 characters in length
* The Storage Container name (specified by CdnStorageContainerName) should be all lowercase and be 3 to 63 characters in length
1. Now that the environment is setup, it is time to publish the website bits.
1. Open PartsUnlimited.sln.
1. Wait for package loads to complete.
1. Build the project
1. Right-click on src\PartsUnlimited project and choose Publish…
1. For Publish Web Wizard
* On Profile Page
* Choose ‘Microsoft Azure Web Apps’ under ‘Select a publish target’. Select the website created above. (Website name specified by WebsiteName parameter name in picture above.)
* Click Next.
* On Connection Page, just click Next. This should be automatically filled out when the website was chosen on the previous page.
* On Settings Page, verify the configuration is what you want (i.e. Release – Any CPU).
* On Preview Page. Click Publish
* Users can click ‘Start Preview’ to verify the deployment will work, if they wish.
1. Wait for publish to complete and load the website.
* The website is set up to automatically update the database shape, only if the database is empty. No extra EF migrations commands needed for the first deployment.
* `PartsUnlimitedHostingPlanSKU` needs to be value that supports slots or else the deployment will fail. (I took out the Free hosting plan from available hosting plans for the full setup template, but still worth noting for
* The SQL Server name (specified by `PartsUnlimitedServerName`) should be all lowercase
* The Storage Account names (specified by `CdnStorageAccountName`, `CdnStorageAccountNameForDev` and `CdnStorageAccountNameForStaging`) should be all lowercase and be 3 to 24 characters in length
* The Storage Container names (specified by `CdnStorageContainerName`, `CdnStorageContainerNameForDev` and `CdnStorageContainerNameForStaging`) should be all lowercase and be 3 to 63 characters in length

##How to Deploy Demo/Full Environment And Publish Website##
1. Create a storage account (or use an existing one) where deployment artifacts can be uploaded. The Storage account must be on the same subscription as the one the website will be deployed to.
1. If you haven’t already done so, install [Microsoft Azure PowerShell - November 2015](https://github.com/Azure/azure-powershell/releases/download/v1.0.1-November2015/azure-powershell.1.0.1.msi)
1. Open env\PartsUnlimited.Environment\PartsUnlimited.Environment.sln
1. Right-click on the PartsUnlimited.Environment and choose Deploy -> New Deployment…
1. Choose subscription to deploy to.
1. Under Resource Group choose New…
* Enter Resource Group name
* Name should not include periods.
* Choose Resource group location.
1. For Deployment template, choose fullenvironmentsetup.json.
1. For Deployment template parameters, choose fullenvironmentsetup.param.json.
1. Click Deploy.
1. If prompted, edit the parameter to add any required value for the deployment template.
a. Do not fill in values for anything that has ‘auto-generated’ for its value.
b. PartsUnlimitedHostingPlanSKU needs to be value that supports slots or else the deployment will fail. (I took out the Free hosting plan from available hosting plans for the full setup template, but still worth noting for
* The SQL Server name (specified by PartsUnlimitedServerName) should be all lowercase
* The Storage Account names (specified by CdnStorageAccountName, CdnStorageAccountNameForDev and CdnStorageAccountNameForStaging) should be all lowercase and be 3 to 24 characters in length
* The Storage Container names (specified by CdnStorageContainerName, CdnStorageContainerNameForDev and CdnStorageContainerNameForStaging) should be all lowercase and be 3 to 63 characters in length
1. If prompted fill in any values the scripts ask for. This will only happen if you leave a non-auto-generated parameter blank.
1. Now that the environment is setup, it is time to publish the website bits.
1. Open PartsUnlimited.sln.
1. Wait for package loads to complete.
1. Build the project
1. Right-click on src\PartsUnlimited project and choose Publish…
1. For Publish Web Wizard
* On Profile Page
* Choose ‘Microsoft Azure Web Apps’ under ‘Select a publish target’. Select the website created above. (Website name specified by WebsiteName parameter name in picture above.) This time choose the ‘WebsiteName(slotname)’ website to publish to a slot for the website.
* Click Next.
10. If prompted fill in any values the scripts ask for. This will only happen if you leave a non-auto-generated parameter blank.
11. Now that the environment is setup, it is time to publish the website bits.
12. Open PartsUnlimited.sln.
13. Wait for package loads to complete.
14. Build the project
15. Right-click on `src\PartsUnlimitedWebsite` project and choose Publish…
16. For Publish Web Wizard
* On Profile Page choose ‘Microsoft Azure App Service’ under ‘Select a publish target’.
* On the App Service page select the right subscription and view resource group. Open the resource group and the website created above (Website name specified by `WebsiteName` parameter name in previous steps.) This time choose a slot to publish the website to. Click OK.
* On Connection Page, just click Next. This should be automatically filled out when the website was chosen on the previous page.
* On Settings Page, verify the configuration is what you want (i.e. Release – Any CPU).
* On Preview Page. Click Publish
* On Settings Page, verify the configuration is what you want (i.e. Release – Any CPU) and click Next.
* On Preview Page, click Publish
* Users can click ‘Start Preview’ to verify the deployment will work, if they wish.
1. Wait for publish to complete and load the website.
17. Wait for publish to complete and load the website.
* The website is set up to automatically update the database shape, only if the database is empty. No extra EF migrations commands needed for the first deployment.
1. Website is all setup to use slot switching. Users can publish to individual slots as they need. Website is setup to keep the connection strings with the slots. This means that if staging and main website slots are switched the main website still uses the production database.
18. Website is all setup to use slot switching. Users can publish to individual slots as they need. Website is setup to keep the connection strings with the slots. This means that if staging and main website slots are switched the main website still uses the production database.
4 changes: 2 additions & 2 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The following instruction is for Windows. For Linux or Mac OS X, please see
[Getting Started for Linux/OS X](GettingStartedLinuxOSX.md)

## Set up your machine ##
1. Install [Visual Studio 2015 RC](http://go.microsoft.com/fwlink/?LinkId=517106)
1. Install [Visual Studio 2015 Update 3](http://go.microsoft.com/fwlink/?LinkId=517106)
2. Install [Microsoft Web Platform Installer](http://www.microsoft.com/web/downloads/platform.aspx)
3. When Web Platform Installer opens, click the Add button for `Microsoft Azure SDK for .NET (VS 2015) - 2.7.1`
3. When Web Platform Installer opens, click the Add button for `Microsoft Azure SDK for .NET (VS 2015) - 2.9.5`
4. When Web Platform Installer opens, click the Add button for `Microsoft Azure PowerShell`
5. Click the Install button and follow the prompts to complete the installation

Expand Down
Loading

0 comments on commit 0039c89

Please sign in to comment.