├── Chapter01 └── 01_docker-helloworld-iis │ ├── Dockerfile │ └── index.html ├── Chapter02 ├── 01_CreateAzureFilesSMBShare.ps1 ├── 02_InitializeMongoDBReplicaset.ps1 ├── 03_MongoDB_1903 │ └── Dockerfile └── 04_MongoDB_dotnet │ ├── .gitignore │ ├── 04_MongoDB_dotnet.csproj │ ├── Dockerfile │ └── Program.cs ├── Chapter03 ├── 01_iis-demo │ └── Dockerfile ├── 02_nginx-demo-index │ ├── Dockerfile │ └── index.html ├── 03_CreateAzureContainerRegistry.ps1 └── 04_iis-demo-index │ ├── Dockerfile │ └── index.html ├── Chapter04 ├── 01_pod-example │ └── nginx.yaml ├── 02_replicaset-example │ └── nginx-replicaset.yaml ├── 03_deployment-example │ └── nginx-deployment.yaml ├── 04_service-example │ └── nginx-service.yaml ├── 05_CreateAKSWithWindowsNodes.ps1 └── 06_windows-example │ └── windows-example.yaml ├── Chapter05 ├── 01_clusterip-service-example │ └── nginx-clusterip-service.yaml ├── 02_nodeport-service-example │ └── nginx-nodeport-service.yaml ├── 03_loadbalancer-service-example │ └── nginx-loadbalancer-service.yaml ├── 04_externalname-service-example │ └── externalname-service-example.yaml └── 05_ingress-example │ ├── ingress-example.yaml │ └── nginx-ingress-controller-aks.yaml ├── Chapter06 ├── 01_deployment-example │ └── nginx-deployment.yaml └── 02_patch-example │ └── linux-node-selector.yaml ├── Chapter07 ├── 01a_hyperv-ubuntu-netplan-dynamic │ └── 01-netcfg.yaml ├── 01b_hyperv-ubuntu-netplan-static │ └── 01-netcfg.yaml ├── 02_ubuntu-prepare-node.sh ├── 03_ubuntu-install-kubeadm.sh ├── 04_ubuntu-initialize-master.sh ├── 05_pod-network │ └── kube-flannel-host-gw.yaml ├── 06_ubuntu-install-pod-network.sh ├── 07_sig-windows-tools-kubeadm │ ├── KubeCluster.ps1 │ ├── KubeClusterHelper.psm1 │ ├── Kubeclusterbridge.json │ └── Kubeclustervxlan.json ├── 08_run-powershell-pod.ps1 └── 09_windows-example │ └── windows-example.yaml ├── Chapter08 ├── 01_aks-engine │ └── 01_CreateAKSEngineClusterWithWindowsNodes.ps1 ├── 02_windows-apimodel │ └── kubernetes-windows.json ├── 03_windows-example │ └── windows-example.yaml ├── 04_aks-engine-container-monitoring │ └── 01_CreateAKSEngineClusterWithWindowsNodes.ps1 └── 05_windows-apimodel-container-monitoring │ └── kubernetes-windows.json ├── Chapter09 ├── 01_declarative-management │ ├── windows-example-deployment.yaml │ └── windows-example-service.yaml ├── 02_windows-taint-toleration │ ├── windows-example-deployment.yaml │ └── windows-example-service.yaml ├── 03_ingress-example │ ├── windows-example-deployment.yaml │ ├── windows-example-ingress.yaml │ └── windows-example-service.yaml └── 04_autoscaling │ ├── windows-example-deployment.yaml │ └── windows-example-service.yaml ├── Chapter10 ├── 01_voting-application-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ └── IDateTimeProvider.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ └── DateTimeProvider.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 02_namespace │ └── dev.yaml ├── 03_sql-server │ └── sql-server.yaml ├── 04_voting-application │ └── voting-application.yaml ├── 05_ef6-update-database-job │ └── ef6-update-database.yaml └── 06_voting-application-debug │ └── voting-application.yaml ├── Chapter11 ├── 01_example-namespace │ └── namespace-prod.yaml ├── 02_voting-application-probes-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ └── IDateTimeProvider.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ └── DateTimeProvider.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 03_readiness-probe │ └── voting-application.yaml ├── 04_liveness-probe │ └── voting-application.yaml ├── 05_startup-probe │ └── voting-application.yaml ├── 06_resource-exhaustion │ └── voting-application.yaml ├── 07_resource-management │ └── voting-application.yaml ├── 08_voting-application-hpa-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ └── IDateTimeProvider.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ └── DateTimeProvider.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 09_hpa │ ├── hpa.yaml │ └── voting-application.yaml ├── 10_voting-application-configmap-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ └── IDateTimeProvider.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ └── DateTimeProvider.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── config │ │ └── customErrors.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 11_configmap │ ├── customErrors.config │ ├── voting-application-customerrors-config.yaml │ └── voting-application.yaml ├── 12_voting-application-persistentvolume-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ ├── IDateTimeProvider.cs │ │ └── IVoteLogManager.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ ├── DateTimeProvider.cs │ │ └── VoteLogManager.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ └── VotingLog.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── config │ │ └── customErrors.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 13_persistentvolume │ └── voting-application.yaml ├── 14_rollingupdate │ └── voting-application.yaml └── 15_rbac │ ├── role.yaml │ ├── rolebinding.yaml │ ├── serviceaccount.yaml │ ├── voting-application-customerrors-config.yaml │ └── voting-application.yaml ├── Chapter12 ├── 01_mssql-helm │ ├── prereq.yaml │ └── values.yaml ├── 02_voting-application-base │ ├── deployment.yaml │ ├── ef6-update-database.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ ├── service.yaml │ └── serviceaccount.yaml ├── 03_voting-application-helm │ ├── .gitignore │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── post-install-job.yaml │ │ ├── role.yaml │ │ ├── rolebinding.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml ├── 04_voting-application-azure-application-insights-src │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── ApplicationInsights.config │ ├── Connected Services │ │ └── Application Insights │ │ │ └── ConnectedService.json │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── DockerBuildAndPush.ps1 │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── ErrorHandler │ │ └── AiHandleErrorAttribute.cs │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ ├── IDateTimeProvider.cs │ │ └── IVoteLogManager.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ ├── DateTimeProvider.cs │ │ └── VoteLogManager.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ └── VotingLog.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── config │ │ └── customErrors.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── packages.config ├── 05_voting-application-azure-application-insights-helm │ ├── .gitignore │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── post-install-job.yaml │ │ ├── role.yaml │ │ ├── rolebinding.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml ├── 06_kubernetes-dashboard │ ├── clusterrolebinding.yaml │ └── serviceaccount.yaml └── 07_azds-demo │ ├── .dockerignore │ ├── Controllers │ └── HomeController.cs │ ├── Dockerfile │ ├── Dockerfile.develop │ ├── Models │ └── ErrorViewModel.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── Views │ ├── Home │ │ ├── Index.cshtml │ │ └── Privacy.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── azds-demo.sln │ ├── azds.yaml │ ├── azds_demo.csproj │ ├── azds_demo.csproj.user │ ├── bin │ └── Debug │ │ └── netcoreapp3.0 │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── azds_demo.StaticWebAssets.xml │ │ ├── azds_demo.Views.dll │ │ ├── azds_demo.Views.pdb │ │ ├── azds_demo.deps.json │ │ ├── azds_demo.dll │ │ ├── azds_demo.exe │ │ ├── azds_demo.pdb │ │ ├── azds_demo.runtimeconfig.dev.json │ │ └── azds_demo.runtimeconfig.json │ ├── charts │ └── azds-demo │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── secrets.yaml │ │ └── service.yaml │ │ └── values.yaml │ ├── obj │ ├── Container │ │ ├── AdditionalProbingPaths.cache │ │ ├── ContainerDevelopmentMode.cache │ │ ├── ContainerId.cache │ │ ├── ContainerOperatingSystemFlavor.cache │ │ ├── ContainerRunContext.cache │ │ ├── DebuggeeArguments.cache │ │ ├── DebuggeeKillProcessCommand.cache │ │ ├── DebuggeeProgram.cache │ │ ├── DebuggeeWorkingDirectory.cache │ │ ├── FastModeProjectMountDirectory.cache │ │ ├── ImageBuildContext.cache │ │ ├── ImageId.cache │ │ ├── OperatingSystemName.cache │ │ ├── RelativeOutputAssemblyPath.cache │ │ ├── TargetFramework.cache │ │ └── VsDbgScript.cache │ ├── Debug │ │ └── netcoreapp3.0 │ │ │ ├── Razor │ │ │ └── Views │ │ │ │ ├── Home │ │ │ │ ├── Index.cshtml.g.cs │ │ │ │ └── Privacy.cshtml.g.cs │ │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml.g.cs │ │ │ │ ├── _Layout.cshtml.g.cs │ │ │ │ └── _ValidationScriptsPartial.cshtml.g.cs │ │ │ │ ├── _ViewImports.cshtml.g.cs │ │ │ │ └── _ViewStart.cshtml.g.cs │ │ │ ├── azds_demo.AssemblyInfo.cs │ │ │ ├── azds_demo.AssemblyInfoInputs.cache │ │ │ ├── azds_demo.MvcApplicationPartsAssemblyInfo.cache │ │ │ ├── azds_demo.RazorAssemblyInfo.cache │ │ │ ├── azds_demo.RazorAssemblyInfo.cs │ │ │ ├── azds_demo.RazorCoreGenerate.cache │ │ │ ├── azds_demo.RazorTargetAssemblyInfo.cache │ │ │ ├── azds_demo.RazorTargetAssemblyInfo.cs │ │ │ ├── azds_demo.TagHelpers.input.cache │ │ │ ├── azds_demo.TagHelpers.output.cache │ │ │ ├── azds_demo.Views.dll │ │ │ ├── azds_demo.Views.pdb │ │ │ ├── azds_demo.assets.cache │ │ │ ├── azds_demo.csproj.CopyComplete │ │ │ ├── azds_demo.csproj.FileListAbsolute.txt │ │ │ ├── azds_demo.csprojAssemblyReference.cache │ │ │ ├── azds_demo.dll │ │ │ ├── azds_demo.exe │ │ │ ├── azds_demo.pdb │ │ │ └── staticwebassets │ │ │ ├── azds_demo.StaticWebAssets.Manifest.cache │ │ │ └── azds_demo.StaticWebAssets.xml │ ├── azds_demo.csproj.nuget.cache │ ├── azds_demo.csproj.nuget.dgspec.json │ ├── azds_demo.csproj.nuget.g.props │ ├── azds_demo.csproj.nuget.g.targets │ └── project.assets.json │ └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map ├── Chapter13 ├── 01_AksEngineCreateAadProfile.ps1 ├── 02_aks-engine-aad │ ├── CreateAKSEngineClusterWithWindowsNodes.ps1 │ └── kubernetes-windows-template.json ├── 03_network-policy │ ├── default-deny-all-ingress.yaml │ ├── default-nginx-allow-ingress.yaml │ ├── nginx-deployment.yaml │ └── nginx-service.yaml ├── 04_windows-secrets │ ├── secret-example.yaml │ └── windows-example-deployment.yaml └── 05_EncryptAzureVMDisks.ps1 ├── Chapter14 ├── 01_InstallWmiExporter.ps1 ├── 02_EnableDockerMetricServer.ps1 ├── 03_aks-engine-windows-extensions │ └── extensions │ │ └── prometheus-exporters │ │ └── v1 │ │ ├── installExporters.ps1 │ │ ├── supported-orchestrators.json │ │ ├── template-link.json │ │ └── template.json ├── 04_aks-engine-cluster-with-extensions │ ├── CreateAKSEngineClusterWithWindowsNodes.ps1 │ └── kubernetes-windows-template.json ├── 05_helm_prometheus │ ├── helm-values_grafana.yaml │ ├── helm-values_prometheus.yaml │ └── prereq.yaml ├── 06_voting-application-telegraf │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── ApplicationInsights.config │ ├── Connected Services │ │ └── Application Insights │ │ │ └── ConnectedService.json │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── DockerBuildAndPush.ps1 │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── ErrorHandler │ │ └── AiHandleErrorAttribute.cs │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ ├── IDateTimeProvider.cs │ │ └── IVoteLogManager.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ ├── DateTimeProvider.cs │ │ └── VoteLogManager.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ └── VotingLog.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── config │ │ └── customErrors.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── packages.config │ └── telegraf.conf ├── 07_voting-application-telegraf-helm │ ├── .gitignore │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── post-install-job.yaml │ │ ├── role.yaml │ │ ├── rolebinding.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml ├── 08_voting-application-prometheus-net │ ├── .dockerignore │ ├── .gitignore │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── NinjectWebCommon.cs │ │ ├── RouteConfig.cs │ │ └── WebApiConfig.cs │ ├── ApplicationInsights.config │ ├── Connected Services │ │ └── Application Insights │ │ │ └── ConnectedService.json │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── Controllers │ │ ├── HealthController.cs │ │ ├── HomeController.cs │ │ ├── OptionsController.cs │ │ ├── SurveysController.cs │ │ └── VotesController.cs │ ├── DockerBuildAndPush.ps1 │ ├── Dockerfile │ ├── Dockerfile.debug │ ├── Dockerfile.production │ ├── ErrorHandler │ │ └── AiHandleErrorAttribute.cs │ ├── Factories │ │ └── VotingApplicationContextFactory.cs │ ├── Filters │ │ └── LogExceptionFilter.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Interfaces │ │ ├── ICpuStressWorker.cs │ │ ├── IDateTimeProvider.cs │ │ └── IVoteLogManager.cs │ ├── LICENSE │ ├── LogMonitorConfig.json │ ├── Migrations │ │ └── Configuration.cs │ ├── Models │ │ ├── Option.cs │ │ ├── Survey.cs │ │ ├── Vote.cs │ │ └── VotingApplicationContext.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── PublishProfiles │ │ │ ├── DockerPublishProfile.pubxml │ │ │ └── DockerPublishProfileDebug.pubxml │ ├── Scripts │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.3.1.intellisense.js │ │ ├── jquery-3.3.1.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery-3.3.1.min.map │ │ ├── jquery-3.3.1.slim.js │ │ ├── jquery-3.3.1.slim.min.js │ │ ├── jquery-3.3.1.slim.min.map │ │ └── modernizr-2.8.3.js │ ├── Services │ │ ├── CpuStressWorker.cs │ │ ├── DateTimeProvider.cs │ │ └── VoteLogManager.cs │ ├── ViewModels │ │ ├── OptionResult.cs │ │ └── SurveyResult.cs │ ├── Views │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ └── VotingLog.cshtml │ │ ├── Options │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Surveys │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ ├── Index.cshtml │ │ │ ├── Results.cshtml │ │ │ └── Vote.cshtml │ │ ├── Votes │ │ │ ├── Create.cshtml │ │ │ ├── Delete.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Edit.cshtml │ │ │ └── Index.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── VotingApplication.csproj │ ├── VotingApplication.sln │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── config │ │ └── customErrors.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── packages.config │ └── telegraf.conf ├── 09_voting-application-prometheus-net-helm │ ├── .gitignore │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── post-install-job.yaml │ │ ├── role.yaml │ │ ├── rolebinding.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml ├── 10_helm_prometheus-net │ └── helm-values_prometheus.yaml ├── 11_helm_grafana_email_alerts │ └── helm-values_grafana.yaml └── 12_grafana_dashboard │ └── Voting Application-1575772504126.json ├── Chapter15 ├── 01_multimaster-aks-engine │ ├── CreateAKSEngineClusterWithWindowsNodes.ps1 │ └── kubernetes-windows-template.json ├── 02_CreateBlobContainerForBackups.ps1 ├── 03_etcd-snapshot-cronjob │ ├── Dockerfile │ ├── docker-entrypoint.sh │ ├── etcd-snapshot-cronjob.yaml │ └── etcd-snapshot-secrets.txt └── 04_AksEngineRestoreEtcdBackup.sh ├── Chapter16 ├── 01_aks-engine-flux │ ├── CreateAKSEngineClusterWithWindowsNodes.ps1 │ └── kubernetes-windows-template.json ├── 02_voting-application-flux │ ├── charts │ │ └── voting-application │ │ │ ├── .gitignore │ │ │ ├── .helmignore │ │ │ ├── Chart.lock │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ ├── NOTES.txt │ │ │ ├── _helpers.tpl │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ ├── post-install-job.yaml │ │ │ ├── role.yaml │ │ │ ├── rolebinding.yaml │ │ │ ├── service.yaml │ │ │ ├── serviceaccount.yaml │ │ │ └── tests │ │ │ │ └── test-connection.yaml │ │ │ └── values.yaml │ ├── namespaces │ │ └── demo.yaml │ ├── releases │ │ └── voting-application.yaml │ └── storageclasses │ │ └── azure-disk.yaml └── 03_DeployFlux.ps1 ├── LICENSE └── README.md /Chapter01/01_docker-helloworld-iis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903 2 | 3 | RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* 4 | WORKDIR /inetpub/wwwroot 5 | COPY index.html . -------------------------------------------------------------------------------- /Chapter01/01_docker-helloworld-iis/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World! 5 | 6 | 7 |

Hello World from Windows container!

8 | 9 | -------------------------------------------------------------------------------- /Chapter02/04_MongoDB_dotnet/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj -------------------------------------------------------------------------------- /Chapter02/04_MongoDB_dotnet/04_MongoDB_dotnet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.0 6 | _04_MongoDB_dotnet 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Chapter02/04_MongoDB_dotnet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build 2 | WORKDIR /app 3 | 4 | COPY *.csproj . 5 | RUN dotnet restore 6 | 7 | COPY *.cs . 8 | RUN dotnet publish -c Release -o out 9 | 10 | 11 | FROM mcr.microsoft.com/dotnet/core/runtime:3.0 AS runtime 12 | WORKDIR /app 13 | 14 | COPY --from=build /app/out ./ 15 | ENTRYPOINT ["04_MongoDB_dotnet.exe"] -------------------------------------------------------------------------------- /Chapter03/01_iis-demo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903 2 | 3 | WORKDIR /inetpub/wwwroot 4 | RUN powershell -NoProfile -Command ; \ 5 | Remove-Item -Recurse .\* ; \ 6 | New-Item -Path .\index.html -ItemType File ; \ 7 | Add-Content -Path .\index.html -Value \"This is an IIS demonstration!\" -------------------------------------------------------------------------------- /Chapter03/02_nginx-demo-index/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | 3 | WORKDIR /usr/share/nginx/html 4 | COPY index.html . -------------------------------------------------------------------------------- /Chapter03/02_nginx-demo-index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World! 5 | 6 | 7 |

Hello World from nginx container!

8 | 9 | -------------------------------------------------------------------------------- /Chapter03/03_CreateAzureContainerRegistry.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [Parameter()] 3 | [string]$azureLocation = "westeurope", 4 | [Parameter()] 5 | [string]$resourceGroupName = "acr-resource-group", 6 | [Parameter()] 7 | [string]$containerRegistryName = "handsonkubernetesonwinregistry" 8 | ) 9 | 10 | # You can omit logging in if you are already logged in. 11 | az login 12 | 13 | az group create ` 14 | --name $resourceGroupName ` 15 | --location $azureLocation 16 | 17 | az acr create ` 18 | --resource-group $resourceGroupName ` 19 | --name $containerRegistryName ` 20 | --sku Basic 21 | 22 | az acr login ` 23 | --name $containerRegistryName 24 | -------------------------------------------------------------------------------- /Chapter03/04_iis-demo-index/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903 2 | 3 | RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* 4 | WORKDIR /inetpub/wwwroot 5 | COPY index.html . -------------------------------------------------------------------------------- /Chapter03/04_iis-demo-index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World! 5 | 6 | 7 |

Hello World from IIS container! The image is provided by Azure Container Registry.

8 | 9 | -------------------------------------------------------------------------------- /Chapter04/01_pod-example/nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: nginx-pod-example 5 | labels: 6 | app: nginx-host 7 | spec: 8 | containers: 9 | - name: nginx 10 | image: nginx:1.17 11 | ports: 12 | - containerPort: 80 -------------------------------------------------------------------------------- /Chapter04/02_replicaset-example/nginx-replicaset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: ReplicaSet 3 | metadata: 4 | name: nginx-replicaset-example 5 | spec: 6 | replicas: 3 7 | selector: 8 | matchLabels: 9 | environment: test 10 | template: 11 | metadata: 12 | labels: 13 | environment: test 14 | spec: 15 | containers: 16 | - name: nginx 17 | image: nginx:1.17 18 | ports: 19 | - containerPort: 80 -------------------------------------------------------------------------------- /Chapter04/03_deployment-example/nginx-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: nginx-deployment-example 5 | spec: 6 | replicas: 3 7 | selector: 8 | matchLabels: 9 | environment: test 10 | template: 11 | metadata: 12 | labels: 13 | environment: test 14 | spec: 15 | containers: 16 | - name: nginx 17 | image: nginx:1.17 18 | ports: 19 | - containerPort: 80 -------------------------------------------------------------------------------- /Chapter04/04_service-example/nginx-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: nginx-deployment-example 5 | spec: 6 | selector: 7 | environment: test 8 | type: ClusterIP 9 | ports: 10 | - port: 80 11 | protocol: TCP 12 | targetPort: 80 -------------------------------------------------------------------------------- /Chapter04/06_windows-example/windows-example.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: windows-example 5 | labels: 6 | app: sample 7 | spec: 8 | replicas: 3 9 | selector: 10 | matchLabels: 11 | app: windows-example 12 | template: 13 | metadata: 14 | name: windows-example 15 | labels: 16 | app: windows-example 17 | spec: 18 | nodeSelector: 19 | "beta.kubernetes.io/os": windows 20 | containers: 21 | - name: windows-example 22 | image: mcr.microsoft.com/dotnet/framework/samples:aspnetapp 23 | resources: 24 | limits: 25 | cpu: 1 26 | memory: 800M 27 | requests: 28 | cpu: .1 29 | memory: 300M 30 | ports: 31 | - containerPort: 80 32 | --- 33 | apiVersion: v1 34 | kind: Service 35 | metadata: 36 | name: windows-example 37 | spec: 38 | type: LoadBalancer 39 | ports: 40 | - protocol: TCP 41 | port: 80 42 | selector: 43 | app: windows-example -------------------------------------------------------------------------------- /Chapter05/01_clusterip-service-example/nginx-clusterip-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: nginx-deployment-example 6 | spec: 7 | replicas: 3 8 | selector: 9 | matchLabels: 10 | environment: test 11 | template: 12 | metadata: 13 | labels: 14 | environment: test 15 | spec: 16 | containers: 17 | - name: nginx 18 | image: nginx:1.17 19 | ports: 20 | - containerPort: 80 21 | --- 22 | apiVersion: v1 23 | kind: Service 24 | metadata: 25 | name: nginx-deployment-example-clusterip 26 | spec: 27 | selector: 28 | environment: test 29 | type: ClusterIP 30 | ports: 31 | - port: 8080 32 | protocol: TCP 33 | targetPort: 80 -------------------------------------------------------------------------------- /Chapter05/02_nodeport-service-example/nginx-nodeport-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: nginx-deployment-example 6 | spec: 7 | replicas: 3 8 | selector: 9 | matchLabels: 10 | environment: test 11 | template: 12 | metadata: 13 | labels: 14 | environment: test 15 | spec: 16 | containers: 17 | - name: nginx 18 | image: nginx:1.17 19 | ports: 20 | - containerPort: 80 21 | --- 22 | apiVersion: v1 23 | kind: Service 24 | metadata: 25 | name: nginx-deployment-example-nodeport 26 | spec: 27 | selector: 28 | environment: test 29 | type: NodePort 30 | ports: 31 | - port: 8080 32 | nodePort: 31001 33 | protocol: TCP 34 | targetPort: 80 -------------------------------------------------------------------------------- /Chapter05/03_loadbalancer-service-example/nginx-loadbalancer-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: nginx-deployment-example 6 | spec: 7 | replicas: 3 8 | selector: 9 | matchLabels: 10 | environment: test 11 | template: 12 | metadata: 13 | labels: 14 | environment: test 15 | spec: 16 | containers: 17 | - name: nginx 18 | image: nginx:1.17 19 | ports: 20 | - containerPort: 80 21 | --- 22 | apiVersion: v1 23 | kind: Service 24 | metadata: 25 | name: nginx-deployment-example-lb 26 | spec: 27 | selector: 28 | environment: test 29 | type: LoadBalancer 30 | ports: 31 | - port: 8080 32 | protocol: TCP 33 | targetPort: 80 -------------------------------------------------------------------------------- /Chapter05/04_externalname-service-example/externalname-service-example.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: externalname-example-service 5 | spec: 6 | type: ExternalName 7 | externalName: cloud.database.example.com -------------------------------------------------------------------------------- /Chapter06/01_deployment-example/nginx-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: nginx-deployment-example 5 | spec: 6 | replicas: 3 7 | selector: 8 | matchLabels: 9 | environment: test 10 | template: 11 | metadata: 12 | labels: 13 | environment: test 14 | spec: 15 | containers: 16 | - name: nginx 17 | image: nginx:1.17 18 | ports: 19 | - containerPort: 80 -------------------------------------------------------------------------------- /Chapter06/02_patch-example/linux-node-selector.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | template: 3 | spec: 4 | nodeSelector: 5 | beta.kubernetes.io/os: linux -------------------------------------------------------------------------------- /Chapter07/01a_hyperv-ubuntu-netplan-dynamic/01-netcfg.yaml: -------------------------------------------------------------------------------- 1 | network: 2 | ethernets: 3 | eth0: 4 | dhcp4: yes 5 | dhcp-identifier: mac 6 | version: 2 -------------------------------------------------------------------------------- /Chapter07/01b_hyperv-ubuntu-netplan-static/01-netcfg.yaml: -------------------------------------------------------------------------------- 1 | network: 2 | ethernets: 3 | eth0: 4 | dhcp4: no 5 | addresses: [10.0.0.2/8] 6 | gateway4: 10.0.0.1 7 | nameservers: 8 | addresses: [8.8.8.8,8.8.4.4] 9 | version: 2 -------------------------------------------------------------------------------- /Chapter07/03_ubuntu-install-kubeadm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Must be run as root or with sudo 3 | 4 | curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - 5 | cat << EOF >/etc/apt/sources.list.d/kubernetes.list 6 | deb https://apt.kubernetes.io/ kubernetes-xenial main 7 | EOF 8 | 9 | apt-get update 10 | apt-get install -y kubelet kubeadm kubectl 11 | apt-mark hold kubelet kubeadm kubectl 12 | -------------------------------------------------------------------------------- /Chapter07/04_ubuntu-initialize-master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo kubeadm init --service-cidr "10.96.0.0/12" --pod-network-cidr "10.244.0.0/16" 4 | 5 | mkdir -p $HOME/.kube 6 | sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config 7 | sudo chown $(id -u):$(id -g) $HOME/.kube/config 8 | 9 | kubectl taint nodes --all node-role.kubernetes.io/master- 10 | 11 | kubeadm token create --print-join-command -------------------------------------------------------------------------------- /Chapter07/06_ubuntu-install-pod-network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | kubectl apply -f https://raw.githubusercontent.com/PacktPublishing/Hands-On-Kubernetes-on-Windows/master/Chapter07/05_pod-network/kube-flannel-host-gw.yaml -------------------------------------------------------------------------------- /Chapter07/08_run-powershell-pod.ps1: -------------------------------------------------------------------------------- 1 | kubectl run ` 2 | --generator=run-pod/v1 powershell-debug ` 3 | -i --tty ` 4 | --image=mcr.microsoft.com/powershell:nanoserver-1809 ` 5 | --restart=Never ` 6 | --overrides='{\"apiVersion\": \"v1\", \"spec\": {\"nodeSelector\": { \"beta.kubernetes.io/os\": \"windows\" }}}' -------------------------------------------------------------------------------- /Chapter09/01_declarative-management/windows-example-deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: windows-example 6 | labels: 7 | app: sample 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: windows-example 13 | template: 14 | metadata: 15 | name: windows-example 16 | labels: 17 | app: windows-example 18 | spec: 19 | nodeSelector: 20 | "beta.kubernetes.io/os": windows 21 | containers: 22 | - name: windows-example 23 | image: mcr.microsoft.com/dotnet/core/samples:aspnetapp-nanoserver-1809 24 | ports: 25 | - containerPort: 80 26 | -------------------------------------------------------------------------------- /Chapter09/01_declarative-management/windows-example-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: windows-example 6 | spec: 7 | type: LoadBalancer 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 80 12 | selector: 13 | app: windows-example 14 | -------------------------------------------------------------------------------- /Chapter09/02_windows-taint-toleration/windows-example-deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: windows-example 6 | labels: 7 | app: sample 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: windows-example 13 | template: 14 | metadata: 15 | name: windows-example 16 | labels: 17 | app: windows-example 18 | spec: 19 | nodeSelector: 20 | "beta.kubernetes.io/os": windows 21 | tolerations: 22 | - key: "os" 23 | operator: "Equal" 24 | value: "Win1809" 25 | effect: "NoSchedule" 26 | containers: 27 | - name: windows-example 28 | image: mcr.microsoft.com/dotnet/core/samples:aspnetapp-nanoserver-1809 29 | ports: 30 | - containerPort: 80 31 | -------------------------------------------------------------------------------- /Chapter09/02_windows-taint-toleration/windows-example-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: windows-example 6 | spec: 7 | type: LoadBalancer 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 80 12 | selector: 13 | app: windows-example 14 | -------------------------------------------------------------------------------- /Chapter09/03_ingress-example/windows-example-deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: windows-example 6 | labels: 7 | app: sample 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: windows-example 13 | template: 14 | metadata: 15 | name: windows-example 16 | labels: 17 | app: windows-example 18 | spec: 19 | nodeSelector: 20 | "beta.kubernetes.io/os": windows 21 | containers: 22 | - name: windows-example 23 | image: mcr.microsoft.com/dotnet/core/samples:aspnetapp-nanoserver-1809 24 | ports: 25 | - containerPort: 80 26 | -------------------------------------------------------------------------------- /Chapter09/03_ingress-example/windows-example-ingress.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: networking.k8s.io/v1beta1 3 | kind: Ingress 4 | metadata: 5 | name: windows-example-ingress 6 | annotations: 7 | kubernetes.io/ingress.class: "nginx" 8 | nginx.ingress.kubernetes.io/rewrite-target: /$2 9 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 10 | spec: 11 | rules: 12 | - http: 13 | paths: 14 | - path: /windows-example(/|$)(.*) 15 | backend: 16 | serviceName: windows-example 17 | servicePort: 80 -------------------------------------------------------------------------------- /Chapter09/03_ingress-example/windows-example-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: windows-example 6 | spec: 7 | type: ClusterIP 8 | ports: 9 | - protocol: TCP 10 | port: 80 11 | selector: 12 | app: windows-example 13 | -------------------------------------------------------------------------------- /Chapter09/04_autoscaling/windows-example-deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: windows-example 6 | labels: 7 | app: sample 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: windows-example 13 | template: 14 | metadata: 15 | name: windows-example 16 | labels: 17 | app: windows-example 18 | spec: 19 | nodeSelector: 20 | "beta.kubernetes.io/os": windows 21 | containers: 22 | - name: windows-example 23 | image: mcr.microsoft.com/dotnet/core/samples:aspnetapp-nanoserver-1809 24 | ports: 25 | - containerPort: 80 26 | resources: 27 | limits: 28 | cpu: 100m 29 | requests: 30 | cpu: 100m 31 | -------------------------------------------------------------------------------- /Chapter09/04_autoscaling/windows-example-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: windows-example 6 | spec: 7 | type: LoadBalancer 8 | ports: 9 | - protocol: TCP 10 | port: 8080 11 | targetPort: 80 12 | selector: 13 | app: windows-example 14 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile* -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication 2 | { 3 | using System.Web.Mvc; 4 | 5 | using VotingApplication.Filters; 6 | 7 | public class FilterConfig 8 | { 9 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 10 | { 11 | filters.Add(new LogExceptionFilter()); 12 | filters.Add(new HandleErrorAttribute()); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication 2 | { 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | 6 | public class RouteConfig 7 | { 8 | public static void RegisterRoutes(RouteCollection routes) 9 | { 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 11 | 12 | routes.MapRoute( 13 | name: "Default", 14 | url: "{controller}/{action}/{id}", 15 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication 2 | { 3 | using System.Web.Http; 4 | 5 | public static class WebApiConfig 6 | { 7 | public static void Register(HttpConfiguration config) 8 | { 9 | // Web API configuration and services 10 | 11 | // Web API routes 12 | config.MapHttpAttributeRoutes(); 13 | 14 | config.Routes.MapHttpRoute( 15 | name: "DefaultApi", 16 | routeTemplate: "api/{controller}/{id}", 17 | defaults: new { id = RouteParameter.Optional }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Dockerfile: -------------------------------------------------------------------------------- 1 | #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed. 2 | #For more information, please see https://aka.ms/containercompat 3 | 4 | FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 5 | ARG source 6 | WORKDIR /inetpub/wwwroot 7 | COPY ${source:-obj/Docker/publish} . 8 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Filters/LogExceptionFilter.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication.Filters 2 | { 3 | using System.Web.Mvc; 4 | 5 | using Serilog; 6 | 7 | public class LogExceptionFilter : IExceptionFilter 8 | { 9 | public void OnException(ExceptionContext context) 10 | { 11 | Log.Logger.Fatal(context.Exception, "Unhandled exception occurred"); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="VotingApplication.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Global.asax.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication 2 | { 3 | using System.Web; 4 | using System.Web.Http; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | public class WebApiApplication : HttpApplication 10 | { 11 | protected void Application_Start() 12 | { 13 | AreaRegistration.RegisterAllAreas(); 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 16 | RouteConfig.RegisterRoutes(RouteTable.Routes); 17 | BundleConfig.RegisterBundles(BundleTable.Bundles); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Interfaces/IDateTimeProvider.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication.Interfaces 2 | { 3 | using System; 4 | 5 | public interface IDateTimeProvider 6 | { 7 | DateTimeOffset GetCurrentTime(); 8 | } 9 | } -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Models/Option.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication.Models 2 | { 3 | using System; 4 | using System.ComponentModel.DataAnnotations; 5 | 6 | public class Option 7 | { 8 | public int Id { get; set; } 9 | 10 | [Display(Name = "Create Date")] 11 | public DateTimeOffset CreateDate { get; set; } 12 | 13 | [Display(Name = "Option Name (Title)")] 14 | public string Name { get; set; } 15 | 16 | [Display(Name = "Which Survey?")] 17 | public virtual Survey Survey { get; set; } 18 | 19 | public int SurveyId { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /Chapter10/01_voting-application-src/Models/Survey.cs: -------------------------------------------------------------------------------- 1 | namespace VotingApplication.Models 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class Survey 8 | { 9 | public int Id { get; set; } 10 | 11 | [Display(Name = "Create Date")] 12 | public DateTimeOffset CreateDate { get; set; } 13 | 14 | [Display(Name = "Survey Name")] 15 | public string Name { get; set; } 16 | 17 | [Display(Name = "Is Survey Featured?")] 18 | public bool IsDefault { get; set; } 19 | 20 | public virtual ICollection