diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..4b95bc627 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +.dockerignore +.env +.git +.gitignore +.vs +.vscode +docker-compose.yml +docker-compose.*.yml +vsts-docs +test +ServiceFabric +readme +k8s +img +docs +deploy +Components +cli-windows +cli-mac +cli-linux +**/bin/ +**/obj/ +**/node_modules/ +**/bower_components/ +global.json \ No newline at end of file diff --git a/.env b/.env index d9482516b..28a94504c 100644 --- a/.env +++ b/.env @@ -5,4 +5,23 @@ # The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost -ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92 \ No newline at end of file +ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.162 + +#ESHOP_AZURE_REDIS_BASKET_DB= +#ESHOP_AZURE_STORAGE_CATALOG_URL= +#ESHOP_AZURE_STORAGE_MARKETING_URL= +#ESHOP_AZURE_SERVICE_BUS= +#ESHOP_AZURE_COSMOSDB= +#ESHOP_AZURE_CATALOG_DB= +#ESHOP_AZURE_IDENTITY_DB= +#ESHOP_AZURE_ORDERING_DB= +#ESHOP_AZURE_MARKETING_DB= +#ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI= +#ESHOP_AZURE_STORAGE_CATALOG_NAME= +#ESHOP_AZURE_STORAGE_CATALOG_KEY= +#ESHOP_AZURE_STORAGE_MARKETING_NAME= +#ESHOP_AZURE_STORAGE_MARKETING_KEY= +#ESHOP_SERVICE_BUS_USERNAME= +#ESHOP_SERVICE_BUS_PASSWORD= +#INSTRUMENTATION_KEY= +#USE_LOADTEST= \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 1ff0c4230..f2943e52e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ # Set default behavior to automatically normalize line endings. ############################################################################### * text=auto +*.sh text eol=lf ############################################################################### # Set default behavior for command prompt diff. @@ -61,3 +62,10 @@ #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain + + +############################################################################### +# Certificates are binary +############################################################################### +*.pfx binary + diff --git a/.gitignore b/.gitignore index 548ad2340..a8d5986bc 100644 --- a/.gitignore +++ b/.gitignore @@ -259,3 +259,4 @@ pub/ .eshopdocker_* /src/Web/WebMVC/wwwroot/lib /src/Web/WebMVC/wwwroot/css/site.min.css +**/.kube/** diff --git a/Local.testsettings b/Local.testsettings new file mode 100644 index 000000000..4e1e6ab7f --- /dev/null +++ b/Local.testsettings @@ -0,0 +1,13 @@ + + + These are default test settings for a local test run. + + + + + + + + + + \ No newline at end of file diff --git a/NuGet.config b/NuGet.config index ae7699939..da29646ef 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,5 +1,8 @@  + + + diff --git a/README.CICD.k8s.md b/README.CICD.k8s.md deleted file mode 100644 index 182880fc5..000000000 --- a/README.CICD.k8s.md +++ /dev/null @@ -1,48 +0,0 @@ -# Kubernetes CI/CD VSTS -For k8s CI/CD pipeline delivery a series of tasks must be created in VSTS to deploy k8s in Azure - -## Prerequisites -* A Kubernetes cluster. Follow Azure Container Service's [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough) to create one. -* A private Docker registry. Follow Azure Container Registry's [guide](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal) to create one. -* Optionally, previous steps can be skipped if you run gen-k8s-env.ps1 script to automatically create the azure environment needed for kubernetes deployment. Azure cli 2.0 must be previously installed [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). For example: ->``` ->./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -orchestratorName k8s-cluster -dnsName k8s-dns ->``` -* An `Azure Blob storage`. It is needed for storing the kubernetes config file used by the hosted agent to access to Kubernetes cluster. Example: - - - -* Upload the `kubernetes config file` to the blob storage previously created. Execute the following command which will download the config file into the directory `c:\Users\\.kube\` and then, upload it to your blob storage: ->``` ->https://eshopk8s.blob.core.windows.net/k8s-config/config ->``` -## Create the VSTS tasks -1. Create a `Download File` task to download the kubernetes binary `kubectl` to the hosted agent. For example: ->``` ->https://storage.googleapis.com/kubernetes-release/release/v0.0.1.7.0-alpha.0/bin/windows/386/kubectl.exe ->``` - - -2. Create a Download File task to download the kubernetes config file to the hosted agent. For example: ->``` ->https://eshopk8s.blob.core.windows.net/k8s-config/config ->``` - - -3. Create a powershell task to execute the k8s deployment script. For example: - -* Deployment script path ->``` ->$(System.DefaultWorkingDirectory)/All Microservices/docker-compose/deploy.ps1 ->``` - -* Deployment script path arguments. Where: - - userDockerHub: indicates if Docker Hub is used instead of ACR - - deployCI: indicates that it is a CI/CD deployment - - execPath: path where the k8s binary is stored - - kubeconfigPath: path where the k8s config file is stored ->``` ->-deployCI $true -useDockerHub $true -execPath '$(System.DefaultWorkingDirectory)/' -kubeconfigPath '$(System.DefaultWorkingDirectory)/' ->``` - - diff --git a/README.md b/README.md index cf389ec18..f7b8fc8b5 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,55 @@ # eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio 2017 and CLI environments compatible) Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.

+ +**NEWS / ANNOUNCEMENTS** +What to be up-to-date on .NET Architecture guidance and reference apps like eShopOnContainers? --> Subscribe by "WATCHING" this new GitHub repo: https://github.com/dotnet-architecture/News + +**Note Visual Studio 2017 version required**: Please, use VS 2017 15.5 or later. + **Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible. +## Updated for .NET Core 2.0 "wave" of technologies +NOTE: We have migrated the whole solution to .NET Core 2.0 "wave". Not just compilation but also new recommended code in EF Core 2.0, ASP.NET Core 2.0, and other new related versions. +For a list on the new .NET Core 2.0 related implemented features, see this [blog post](https://blogs.msdn.microsoft.com/dotnet/2017/08/02/microservices-and-docker-containers-architecture-patterns-and-development-guidance/). + +>**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy + > ### DISCLAIMER -> **IMPORTANT:** The current state of this sample application is **BETA**, consider it version a 0.1 foundational version, therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. **Feedback with improvements and pull requests from the community will be highly appreciated and accepted.** +> **IMPORTANT:** The current state of this sample application is **BETA**, because we are constantly evolving towards new released technologies. Therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted. > > This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. The chosen domain is an eShop/eCommerce but simply because it is a well-know domain by most people/developers. However, this sample application should not be considered as an "eCommerce reference model", at all. The implemented business domain might not be ideal from an eCommerce business point of view. It is neither trying to solve all the problems in a large, scalable and mission-critical distributed system. It is just a bootstrap for developers to easily get started in the world of Docker containers and microservices with .NET Core. ->

For example, the next step (still not covered in eShopOnContainers) after understanding Docker containers and microservices development with .NET Core, is to select a microservice cluster/orchestrator like Docker Swarm, Kubernetes or DC/OS (in Azure Container Service) or Azure Service Fabric which in most of the cases will require additional partial changes to your application's configuration (although the present architecture should work on most orchestrators with small changes). -> Additional steps would be to move your databases to HA cloud services, or to implement your EventBus with Azure Service Bus or any other production ready Service Bus in the market. ->

In the future we might fork this project and make multiple versions targeting specific microservice cluster/orchestrators plus using additional cloud infrastructure.

+>

For example, the next step after running the solution in the local dev PC and understanding Docker containers and microservices development with .NET Core, is to select a microservice cluster/orchestrator like Kubernetes in Azure or Azure Service Fabric, both environments tested and supported by this solution. +> Additional steps would be to move your databases to HA cloud services (like Azure SQL Database), or to implement your EventBus with Azure Service Bus or any other production ready Service Bus in the market. +>

> > Read the planned Roadmap and Milestones for future releases of eShopOnContainers within the Wiki for further info about possible new implementations and provide feedback at the ISSUES section if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue. -**Architecture overview**: This reference application is cross-platform either at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps. -The architecture proposes a simplified microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using Http as the current communication protocol. -

-It also supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus plus other features defined at the roadmap. +**Architecture overview**: This reference application is cross-platform at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps. +The architecture proposes a simplified microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using Http as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus (a light message broker, to choose between RabbitMQ or Azure Service Bus, underneath) plus other features defined at the roadmap.

-The microservices are different in type, meaning different internal architecture patterns approaches depending on it purpose, as shown in the image below. + +> ### Important Note on API Gateways and published APIs +> Note that the previous architecture diagram shows how you deploy eShopOnContainers in a local Docker development machine. For a production-ready architecture we recommend to keep evolving your architecture with additional features like API Gateways based on AzureAPI Management or any other approach for API Gateways explained in the related documentation/eBook, so you can filter APIs and apply security in a single tier while hiding/securing the internal microservices to the client apps or outside consumers. +

+ +

+ +> The sample code in this repo is NOT making use of Azure API Management in order to be able to provide an "F5 experience" in Visual Studio (or CLI) of the sample with no up-front dependencies in Azure. But you should evaluate API Gateways alternatives when building for production. + +The microservices are different in type, meaning different internal architecture pattern approaches depending on its purpose, as shown in the image below.

-Additional miroservice styles with other frameworks and No-SQL databases will be added, eventually. This is a great opportunity for pull requests from the community, like a new microservice using Nancy, or even other languages like Node, Go, Python or data containers with MongoDB with Azure DocDB compatibility, PostgreSQL, RavenDB, Event Store, MySql, etc. You name it! :) > ### Important Note on Database Servers/Containers -> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server for Linux container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or specific server. Each database could also be deployed as a single Docker container, but then you'd need more then 8GB or memory RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments. ->

A similar case is defined in regards Redis cache running as a container for the development environment. ->

However, in a real production environment it is recommended to have your databases (SQL Server and Redis, in this case) in HA (High Available) services like Azure SQL Database, Redis as a service or any other clustering system. If you want to change to a production configuration, you'll just need to change the connection strings once you have set up the servers in a HA cloud or on-premises. +> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server for Linux container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or specific server. Each database could also be deployed as a single Docker container, but then you'd need more than 8GB of RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments. +>

A similar case is defined in regard to Redis cache running as a container for the development environment. Or a No-SQL database (MongoDB) running as a container. +>

However, in a real production environment it is recommended to have your databases (SQL Server, Redis, and the NO-SQL database, in this case) in HA (High Available) services like Azure SQL Database, Redis as a service and Azure CosmosDB instead the MongoDB container (as both systems share the same access protocol). If you want to change to a production configuration, you'll just need to change the connection strings once you have set up the servers in a HA cloud or on-premises. ## Related documentation and guidance While developing this reference application, we've been creating a reference Guide/eBook focusing on architecting and developing containerized and microservice based .NET Applications (download link available below) which explains in detail how to develop this kind of architectural style (microservices, Docker containers, Domain-Driven Design for certain microservices) plus other simpler architectural styles, like monolithic apps that can also live as Docker containers. @@ -43,11 +61,13 @@ You can download them and start reviewing these Guides/eBooks here: | Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms | | ------------ | ------------| ------------| | | | | -| **Download** (First Edition) | **Download** (First Edition from late 2016) | **Download** (First Edition) | +| **Download .PDF** (2nd Edition) | **Download** (First Edition) | **Download** (First Edition) | + +Download in other formats (**eReaders** like **MOBI**, **EPUB**) and other eBooks at the [.NET Architecture center](dot.net/architecture). Send feedback to [dotnet-architecture-ebooks-feedback@service.microsoft.com](dotnet-architecture-ebooks-feedback@service.microsoft.com) -

-However, we encourage to download and review the "Architecting & Developing eBook" because the architectural styles and architectural patterns and technologies explained in the guidance are using this reference application when explaining many pattern implementations, so you'll understand much better the context, design and decisions taken in the current architecture and internal designs. + +However, we encourage to download and review the [Architecting and Developing Microservices eBook](https://aka.ms/microservicesebook) because the architectural styles and architectural patterns and technologies explained in the guidance are using this reference application when explaining many pattern implementations, so you'll understand much better the context, design and decisions taken in the current architecture and internal designs. ## Overview of the application code In this repo you can find a sample reference application that will help you to understand how to implement a microservice architecture based application using .NET Core and Docker. @@ -63,10 +83,10 @@ The screenshot below shows the VS Solution structure for those microservices/con Finally, those microservices are consumed by multiple client web and mobile apps, as described below.
-*MVC Application (ASP.NET Core)*: Its an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution. +*MVC Application (ASP.NET Core)*: It's an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
-*SPA (Single Page Application)*: Providing similar "eShop business functionality" but developed with Angular 2, Typescript and slightly using ASP.NET Core MVC. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet). +*SPA (Single Page Application)*: Providing similar "eShop business functionality" but developed with Angular, Typescript and slightly using ASP.NET Core MVC. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet).
*Xamarin Mobile App (For iOS, Android and Windows/UWP)*: It is a client mobile app supporting the most common mobile OS platforms (iOS, Android and Windows/UWP). In this case, the consumption of the microservices is done from C# but running on the client devices, so out of the Docker Host internal network (Like from your network or even the Internet). @@ -83,37 +103,14 @@ For those who prefer the CLI on Windows, using dotnet CLI, docker CLI and VS Cod https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code) ### CLI and Mac based -For those who prefer the CLI on a Mac, using dotnet CLI, docker CLI and VS Code for Mac -(Instructions still TBD, but similar to Windows CLI): -https://github.com/dotnet/eShopOnContainers/wiki/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code) - -> ### Note on tested Docker Containers/Images -> Most of the development and testing of this project was (as of early March 2017) done on Docker Linux containers running in development machines with "Docker for Windows" and the default Hyper-V Linux VM (MobiLinuxVM) installed by "Docker for Windows". -The Windows Containers scenario is currently being implemented/tested yet. The application should be able to run on Windows Nano Containers based on different Docker base images, as well, as the .NET Core services have also been tested running on plain Windows (with no Docker). -The app was also partially tested on "Docker for Mac" using a development MacOS machine with .NET Core and VS Code installed, which is still a scenario using Linux containers running on the VM setup in the Mac by the "Docker for Windows" setup. But further testing and feedback on Mac environments and Windows Containers, from the community, will be appreciated. - -## Kubernetes -The k8s directory contains Kubernetes configuration for the eShopOnContainers app and a PowerShell script to deploy it to a cluster. Each eShopOnContainers microservice has a deployment configuration in `deployments.yaml`, and is exposed to the cluster by a service in `services.yaml`. The microservices are exposed externally on individual routes (`/basket-api`, `/webmvc`, etc.) by an nginx reverse proxy specified in `frontend.yaml` and `nginx.conf`. - -### Prerequisites -* A Kubernetes cluster. Follow Azure Container Service's [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough) to create one. -* A private Docker registry. Follow Azure Container Registry's [guide](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal) to create one. -* A Docker development environment with `docker` and `docker-compose`. - * Visit [docker.com](https://docker.com) to download the tools and set up the environment. Docker's [installation guide](https://docs.docker.com/engine/getstarted/step_one/#step-3-verify-your-installation) covers verifying your Docker installation. -* The Kubernetes command line client, `kubectl`. - * This can be installed with the `az` tool as described in the Azure Container Service [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough). `az` is also helpful for getting the credentials `kubectl` needs to access your cluster. For other installation options, and information about configuring `kubectl` yourself, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/kubectl/install/). - -### Deploy the application with the deployment script -1. Open a PowerShell command line at the `k8s` directory of your local eShopOnContainers repository. -1. Ensure `docker`, `docker-compose`, and `kubectl` are on the path, and configured for your Docker machine and Kubernetes cluster. -1. Run `deploy.ps1` with your registry information. The Docker username and password are provided by Azure Container Registry, and can be retrieved from the Azure portal. For example: ->``` ->./deploy.ps1 -registry myregistry.azurecr.io -dockerUser User -dockerPassword SecretPassword ->``` -The script will build the code and corresponding Docker images, push the latter to your registry, and deploy the application to your cluster. You can watch the deployment unfold from the Kubernetes web interface: run `kubectl proxy` and open a browser to [http://localhost:8001/ui](http://localhost:8001/ui) +For those who prefer the CLI on a Mac, using dotnet CLI, docker CLI and VS Code for Mac: +https://github.com/dotnet-architecture/eShopOnContainers/wiki/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code) + +## Orchestrators: Kubernetes and Service Fabric +See at the [Wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki) the posts on setup/instructions about how to deploy to Kubernetes or Service Fabric in Azure (although you could also deploy to any other cloud or on-premises). ## Sending feedback and pull requests -As mentioned, we'd appreciate to your feedback, improvements and ideas. +As mentioned, we'd appreciate your feedback, improvements and ideas. You can create new issues at the issues section, do pull requests and/or send emails to **eshop_feedback@service.microsoft.com** ## Questions diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..bb1cf2743 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml new file mode 100644 index 000000000..8c2f16691 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + rabbitmq:3-management + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..5a4c2828d --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj new file mode 100644 index 000000000..0a56c800e --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj @@ -0,0 +1,46 @@ + + + + + f29e27c9-0d5e-4a57-adbf-dd651649d2a1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..fe031fe95 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml new file mode 100644 index 000000000..e7ecf592f --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + mongo:latest + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..8b48c39d1 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj new file mode 100644 index 000000000..f07ff03a9 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj @@ -0,0 +1,46 @@ + + + + + eb070036-ec60-49a6-88e1-562a2043c3d7 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..11bf47a6a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml new file mode 100644 index 000000000..cfcc10eca --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + redis:latest + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..951ce24db --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj new file mode 100644 index 000000000..5b28bfdba --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj @@ -0,0 +1,46 @@ + + + + + 17acd9ea-8f16-4091-aa29-c67002971eee + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..27fa4bfe2 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml new file mode 100644 index 000000000..97ff3ded2 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + microsoft/mssql-server-linux:2017-latest + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..3ad12232a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj new file mode 100644 index 000000000..48447811e --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj @@ -0,0 +1,46 @@ + + + + + 65a83188-79c1-47ad-931d-8e8a87247408 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..6cffab120 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..75aecd407 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + eshop/basket.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..bd30b4494 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + eshop/catalog.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5c19939a4 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + eshop/locations.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..defca436c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/marketing.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..035005544 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/ordering.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..88deeeade --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + eshop/payment.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..bf87a8296 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj b/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj new file mode 100644 index 000000000..405e7bb4c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj @@ -0,0 +1,55 @@ + + + + + 983eab84-65c5-4793-a300-08f97c791a15 + 1.6 + 1.5 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/packages.config b/ServiceFabric/Linux/eShopOnServiceFabric/packages.config new file mode 100644 index 000000000..c5f59e48e --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..638b70194 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..35bc15b68 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/identity.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..a1255b6c0 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj new file mode 100644 index 000000000..1d0d025a9 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj @@ -0,0 +1,46 @@ + + + + + 39b54901-d57d-416e-b51e-33c4017ca464 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..158c03905 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml new file mode 100644 index 000000000..7b6aa5565 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/webmvc:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..d99e1573a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj new file mode 100644 index 000000000..ff4ce2247 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj @@ -0,0 +1,46 @@ + + + + + 0cf895ff-3616-4d1f-8d2e-5d856cdf3612 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..7fca0294e --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml new file mode 100644 index 000000000..64d719c59 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/webspa:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..fdeb6fd88 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj new file mode 100644 index 000000000..05ed606be --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj @@ -0,0 +1,46 @@ + + + + + 1670de10-5626-429d-a74a-2dd8281cc0c9 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..da2d7de0b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml new file mode 100644 index 000000000..456c92ea1 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/webstatus:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..f49e04e6b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj new file mode 100644 index 000000000..1d4def7f2 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj @@ -0,0 +1,46 @@ + + + + + 25f73fd9-b32f-401a-80e8-17c72606a7e1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..bb1cf2743 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml new file mode 100644 index 000000000..9415f54f2 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + spring2/rabbitmq:3.6.10 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..5a4c2828d --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj new file mode 100644 index 000000000..0a56c800e --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj @@ -0,0 +1,46 @@ + + + + + f29e27c9-0d5e-4a57-adbf-dd651649d2a1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..fe031fe95 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml new file mode 100644 index 000000000..be47332ca --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + mongo:windowsservercore + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..8b48c39d1 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj new file mode 100644 index 000000000..f07ff03a9 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj @@ -0,0 +1,46 @@ + + + + + eb070036-ec60-49a6-88e1-562a2043c3d7 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..11bf47a6a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml new file mode 100644 index 000000000..ea9deb355 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + redis:nanoserver + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..951ce24db --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj new file mode 100644 index 000000000..5b28bfdba --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj @@ -0,0 +1,46 @@ + + + + + 17acd9ea-8f16-4091-aa29-c67002971eee + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..27fa4bfe2 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml new file mode 100644 index 000000000..252c74f21 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + microsoft/mssql-server-windows-developer:2017 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..3ad12232a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj new file mode 100644 index 000000000..48447811e --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj @@ -0,0 +1,46 @@ + + + + + 65a83188-79c1-47ad-931d-8e8a87247408 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..29679fbaa --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..d45768eba --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + eshop/basket.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5c14568eb --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + eshop/catalog.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..36a817d36 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/locations.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..2fa855974 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + eshop/marketing.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..3ef5408a5 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/ordering.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5d46ef47c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + eshop/payment.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..bf87a8296 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj new file mode 100644 index 000000000..405e7bb4c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj @@ -0,0 +1,55 @@ + + + + + 983eab84-65c5-4793-a300-08f97c791a15 + 1.6 + 1.5 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/packages.config b/ServiceFabric/Windows/eShopOnServiceFabric/packages.config new file mode 100644 index 000000000..c5f59e48e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..b39aef66a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..9650b783e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/identity.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..207735106 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj new file mode 100644 index 000000000..1d0d025a9 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj @@ -0,0 +1,46 @@ + + + + + 39b54901-d57d-416e-b51e-33c4017ca464 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..8282adb11 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml new file mode 100644 index 000000000..55828da3e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/webmvc-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..d99e1573a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj new file mode 100644 index 000000000..ff4ce2247 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj @@ -0,0 +1,46 @@ + + + + + 0cf895ff-3616-4d1f-8d2e-5d856cdf3612 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..e7479f239 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml new file mode 100644 index 000000000..a0bd28a94 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/webspa-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..fdeb6fd88 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj new file mode 100644 index 000000000..05ed606be --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj @@ -0,0 +1,46 @@ + + + + + 1670de10-5626-429d-a74a-2dd8281cc0c9 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..20fb0c3a9 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml new file mode 100644 index 000000000..58968f0e5 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/webstatus-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..f49e04e6b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj new file mode 100644 index 000000000..1d4def7f2 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj @@ -0,0 +1,46 @@ + + + + + 25f73fd9-b32f-401a-80e8-17c72606a7e1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/branch-guide.md b/branch-guide.md new file mode 100644 index 000000000..386e74ee5 --- /dev/null +++ b/branch-guide.md @@ -0,0 +1,10 @@ +# eShopOnContainers - BRANCH GUIDE + +Following are the most important branches: + +- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against `dev` branch to be considered**. This branch is developed using .NET Core 2.0 +- `master`: Synced time to time from dev. It contains "stable" code, although not the latest one. We plan to do periodic merges from `dev` to `master`, but we are not doing it right now. + +Any other branch is considered temporary and could be deleted at any time. Do not do any PR to them! + +Thanks! diff --git a/cli-linux/build-bits-linux.sh b/cli-linux/build-bits-linux.sh index cd8c7cc2e..ac68031e0 100755 --- a/cli-linux/build-bits-linux.sh +++ b/cli-linux/build-bits-linux.sh @@ -16,7 +16,6 @@ declare -a projectList=( "$path/Services/Location/Locations.API" "$path/Services/Marketing/Marketing.API" "$path/Services/Payment/Payment.API" - "$path/Services/GracePeriod/GracePeriodManager" "$path/Web/WebMVC" "$path/Web/WebStatus" ) @@ -31,10 +30,8 @@ do echo -e "\e[33m\tRemoving old publish output" pushd $path/$project rm -rf obj/Docker/publish - echo -e "\e[33m\tRestoring project $project" - dotnet restore echo -e "\e[33m\tBuilding and publishing $project" - dotnet publish -o obj/Docker/publish + dotnet publish -c Release -o obj/Docker/publish --verbosity quiet popd done @@ -50,3 +47,5 @@ done # No need to build the images, docker build or docker compose will # do that using the images and containers defined in the docker-compose.yml file. +# +# \ No newline at end of file diff --git a/cli-linux/docker-compose.local.build.yml b/cli-linux/docker-compose.local.build.yml index 539eca913..a05c09089 100644 --- a/cli-linux/docker-compose.local.build.yml +++ b/cli-linux/docker-compose.local.build.yml @@ -7,3 +7,4 @@ services: - .:/src working_dir: /src command: /bin/bash -c "chmod -x ./cli-linux/build-bits-linux.sh && ./cli-linux/build-bits-linux.sh" + \ No newline at end of file diff --git a/cli-linux/prepare-spa-app.sh b/cli-linux/prepare-spa-app.sh index 6fc15a0f0..422730116 100644 --- a/cli-linux/prepare-spa-app.sh +++ b/cli-linux/prepare-spa-app.sh @@ -1,7 +1,4 @@ - # Build SPA app pushd $(pwd)/src/Web/WebSPA npm rebuild node-sass #npm run build:prod - - diff --git a/cli-linux/run.sh b/cli-linux/run.sh index aaeb164fa..d46f0a049 100644 --- a/cli-linux/run.sh +++ b/cli-linux/run.sh @@ -4,4 +4,3 @@ docker rm $(docker ps -a -q) docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull export ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=$(curl ipinfo.io/ip) docker-compose -f docker-compose.images.yml -f docker-compose.prod.yml up -d --force-recreate - diff --git a/cli-mac/build-bits.sh b/cli-mac/build-bits.sh index 681c3605d..8b4917144 100755 --- a/cli-mac/build-bits.sh +++ b/cli-mac/build-bits.sh @@ -1,12 +1,17 @@ #!/bin/sh +# List of microservices here needs to be updated to include all the new microservices (Marketing, etc.) + projectList=( - "../src/Services/Catalog/Catalog.API" - "../src/Services/Basket/Basket.API" - "../src/Services/Ordering/Ordering.API" - "../src/Services/Identity/Identity.API" "../src/Web/WebMVC" "../src/Web/WebSPA" + "../src/Services/Identity/Identity.API" + "../src/Services/Catalog/Catalog.API" + "../src/Services/Ordering/Ordering.API" + "../src/Services/Basket/Basket.API" + "../src/Services/Location/Locations.API" + "../src/Services/Marketing/Marketing.API" + "../src/Services/Payment/Payment.API" "../src/Web/WebStatus" ) @@ -22,10 +27,8 @@ do echo -e "\e[33m\tRemoving old publish output" pushd $(pwd)/$project rm -rf obj/Docker/publish - echo -e "\e[33m\tRestoring project" - dotnet restore echo -e "\e[33m\tBuilding and publishing projects" - dotnet publish -o obj/Docker/publish + dotnet publish -o obj/Docker/publish -c Release popd done @@ -40,3 +43,5 @@ fi # No need to build the images, docker build or docker compose will # do that using the images and containers defined in the docker-compose.yml file. +# +# diff --git a/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 b/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 index 865f24067..271b6a77d 100644 --- a/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 +++ b/cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 @@ -21,6 +21,6 @@ try { Write-Host "Rule found" } catch [Exception] { - New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5105" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound - New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5105" -LocalAddress Any -LocalPort 5100-5110 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound + New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound + New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound } \ No newline at end of file diff --git a/cli-windows/build-bits-simple.ps1 b/cli-windows/build-bits-simple.ps1 index 461384cc2..008f4f599 100644 --- a/cli-windows/build-bits-simple.ps1 +++ b/cli-windows/build-bits-simple.ps1 @@ -13,7 +13,5 @@ Write-Host "Root path used is $rootPath" -ForegroundColor Yellow $SolutionFilePath = [IO.Path]::Combine($rootPath, "eShopOnContainers-ServicesAndWebApps.sln") -dotnet restore $SolutionFilePath - dotnet publish $SolutionFilePath -c Release -o .\obj\Docker\publish diff --git a/cli-windows/build-bits.ps1 b/cli-windows/build-bits.ps1 index 26651da5b..3b3d8da3f 100644 --- a/cli-windows/build-bits.ps1 +++ b/cli-windows/build-bits.ps1 @@ -8,28 +8,34 @@ if ([string]::IsNullOrEmpty($rootPath)) { } Write-Host "Root path used is $rootPath" -ForegroundColor Yellow +workflow BuildAndPublish { + param ([string] $rootPath + ) $projectPaths = @{Path="$rootPath\src\Web\WebMVC";Prj="WebMVC.csproj"}, @{Path="$rootPath\src\Web\WebSPA";Prj="WebSPA.csproj"}, @{Path="$rootPath\src\Services\Identity\Identity.API";Prj="Identity.API.csproj"}, @{Path="$rootPath\src\Services\Catalog\Catalog.API";Prj="Catalog.API.csproj"}, @{Path="$rootPath\src\Services\Ordering\Ordering.API";Prj="Ordering.API.csproj"}, - @{Path="$rootPath\src\Services\Basket\Basket.API";Prj="Basket.API.csproj"} + @{Path="$rootPath\src\Services\Basket\Basket.API";Prj="Basket.API.csproj"}, + @{Path="$rootPath\src\Services\Location\Locations.API";Prj="Locations.API.csproj"}, + @{Path="$rootPath\src\Services\Marketing\Marketing.API";Prj="Marketing.API.csproj"}, + @{Path="$rootPath\src\Services\Payment\Payment.API";Prj="Payment.API.csproj"}, @{Path="$rootPath\src\Web\WebStatus";Prj="WebStatus.csproj"} -$projectPaths | foreach { - $projectPath = $_.Path - $projectFile = $_.Prj - $outPath = $_.Path + "\obj\Docker\publish" - $projectPathAndFile = "$projectPath\$projectFile" - Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow - remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue - Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow - dotnet restore $projectPathAndFile - dotnet build $projectPathAndFile - dotnet publish $projectPathAndFile -o $outPath + foreach -parallel ($item in $projectPaths) { + $projectPath = $item.Path + $projectFile = $item.Prj + $outPath = $item.Path + "\obj\Docker\publish" + $projectPathAndFile = "$projectPath\$projectFile" + #Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow + remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue + #Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow + dotnet publish $projectPathAndFile -o $outPath -c Release + } } +BuildAndPublish $rootPath ######################################################################################## # Delete old eShop Docker images diff --git a/cli-windows/delete-vs-and-eshop-images.ps1 b/cli-windows/delete-vs-and-eshop-images.ps1 new file mode 100644 index 000000000..f37dc6ea4 --- /dev/null +++ b/cli-windows/delete-vs-and-eshop-images.ps1 @@ -0,0 +1,46 @@ + # Delete all containers + Write-Host "Deleting all running containers in the local Docker Host" + docker rm $(docker ps -a -q) -f + +$eShopImagesToDelete = docker images --filter=reference="eshop/*" -q +If (-Not $eShopImagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."} +Else +{ + # Delete all eshop images + Write-Host "Deleting eShop images in local Docker repo" + Write-Host $eShopImagesToDelete + docker rmi $(docker images --filter=reference="eshop/*" -q) -f +} + +$VSImagesToDelete = docker images --filter=reference="catalog.api:dev" -q +If (-Not $VSImagesToDelete) {Write-Host "Not deleting VS images as there are no VS images in the current local Docker repo."} +Else +{ + # Delete all eshop images + Write-Host "Deleting images created by VS in local Docker repo" + Write-Host $VSImagesToDelete + docker rmi $(docker images --filter=reference="*:dev" -q) -f + + #docker rmi $(docker images --filter=reference="eshop/payment.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webspa:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webmvc:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/catalog.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/marketing.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/ordering.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/basket.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/identity.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/locations.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webstatus:dev" -q) -f +} + +# DELETE ALL IMAGES AND CONTAINERS + +# Delete all containers +# docker rm $(docker ps -a -q) -f + +# Delete all images +# docker rmi $(docker images -q) + +#Filter by image name (Has to be complete, cannot be a wildcard) +#docker ps -q --filter=ancestor=eshop/identity.api:dev + diff --git a/cli-windows/start-windows-containers.ps1 b/cli-windows/start-windows-containers.ps1 index 300c63568..91d8eb7f7 100644 --- a/cli-windows/start-windows-containers.ps1 +++ b/cli-windows/start-windows-containers.ps1 @@ -1,9 +1,32 @@ -Param([string] $rootPath) +# rootPath: Root path of the repo (where docker-compose*.yml are). If not passed ../cli-windows/ is assumed +# buildBits: If the projects must be built before. Default value: $true +# customEventBusLoginPassword: If a custom RabbitMQ image is used that do not use the default user login/pwd. Default: $false (means assume use default spring2/rabbitmq image) + +Param( + [parameter(Mandatory=$false)][string] $rootPath, + [parameter(Mandatory=$false)][bool] $customEventBusLoginPassword=$false, + [parameter(Mandatory=$false)][bool]$buildBits=$true +) + $scriptPath = Split-Path $script:MyInvocation.MyCommand.Path if ([string]::IsNullOrEmpty($rootPath)) { $rootPath = "$scriptPath\.." } Write-Host "Root path used is $rootPath" -ForegroundColor Yellow -& .\build-bits.ps1 -rootPath $rootPath -docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose-windows.override.yml" up + +if ($buildBits) { + & $scriptPath\build-bits.ps1 -rootPath $rootPath +} + + +$env:ESHOP_EXTERNAL_DNS_NAME_OR_IP = "10.0.75.1" +$env:ESHOP_AZURE_STORAGE_CATALOG_URL ="http://10.0.75.1:5101/api/v1/catalog/items/[0]/pic/" +$env:ESHOP_AZURE_STORAGE_MARKETING_URL ="http://10.0.75.1:5110/api/v1/campaigns/[0]/pic/" + +if (-Not $customEventBusLoginPassword) { + docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.override.windows.yml" up +} +else { + docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" up +} diff --git a/cli-windows/vsts/build-bits-no-parallel.ps1 b/cli-windows/vsts/build-bits-no-parallel.ps1 new file mode 100644 index 000000000..4344bdcc8 --- /dev/null +++ b/cli-windows/vsts/build-bits-no-parallel.ps1 @@ -0,0 +1,56 @@ +Param([string] $rootPath) +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +if ([string]::IsNullOrEmpty($rootPath)) { + $rootPath = "$scriptPath\..\.." +} +Write-Host "Root path used is $rootPath" -ForegroundColor Yellow + + +$projectPaths = + @{Path="$rootPath\src\Web\WebMVC";Prj="WebMVC.csproj"}, + @{Path="$rootPath\src\Web\WebSPA";Prj="WebSPA.csproj"}, + @{Path="$rootPath\src\Services\Identity\Identity.API";Prj="Identity.API.csproj"}, + @{Path="$rootPath\src\Services\Catalog\Catalog.API";Prj="Catalog.API.csproj"}, + @{Path="$rootPath\src\Services\Ordering\Ordering.API";Prj="Ordering.API.csproj"}, + @{Path="$rootPath\src\Services\Basket\Basket.API";Prj="Basket.API.csproj"}, + @{Path="$rootPath\src\Services\Location\Locations.API";Prj="Locations.API.csproj"}, + @{Path="$rootPath\src\Services\Marketing\Marketing.API";Prj="Marketing.API.csproj"}, + @{Path="$rootPath\src\Services\Payment\Payment.API";Prj="Payment.API.csproj"}, + @{Path="$rootPath\src\Web\WebStatus";Prj="WebStatus.csproj"} + +$projectPaths | foreach { + $projectPath = $_.Path + $projectFile = $_.Prj + $outPath = $_.Path + "\obj\Docker\publish" + $projectPathAndFile = "$projectPath\$projectFile" + Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow + remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue + Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow + dotnet restore $projectPathAndFile + dotnet build $projectPathAndFile + dotnet publish $projectPathAndFile -o $outPath + } + +######################################################################################## +# Delete old eShop Docker images +######################################################################################## + +$imagesToDelete = docker images --filter=reference="eshop/*" -q + +If (-Not $imagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."} +Else +{ + # Delete all containers + Write-Host "Deleting all containers in local Docker Host" + docker rm $(docker ps -a -q) -f + + # Delete all eshop images + Write-Host "Deleting eShop images in local Docker repo" + Write-Host $imagesToDelete + docker rmi $(docker images --filter=reference="eshop/*" -q) -f +} + +# WE DON'T NEED DOCKER BUILD AS WE CAN RUN "DOCKER-COMPOSE BUILD" OR "DOCKER-COMPOSE UP" AND IT WILL BUILD ALL THE IMAGES IN THE .YML FOR US diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.json b/deploy/az/azurefunctions/azurefunctionsdeploy.json new file mode 100644 index 000000000..29625302b --- /dev/null +++ b/deploy/az/azurefunctions/azurefunctionsdeploy.json @@ -0,0 +1,209 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "SitesEshopfunctionsName": { + "type": "string", + "metadata": { + "description": "Name of the Azure Functions namespace" + }, + "defaultValue": "mktfunctionsdemo" + } + }, + "variables": { + "SitesEshopfunctionsName": "[parameters('SitesEshopfunctionsName')]", + "WebConfigName": "[concat(variables('SitesEshopfunctionsName'), '/web')]", + "Location": "[resourceGroup().location]", + "ServerFarmPlan": "[concat(trim(variables('location')), 'Plan')]", + "StorageAccounts": "[concat(variables('SitesEshopfunctionsName'), 'st')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "kind": "Storage", + "name": "[variables('StorageAccounts')]", + "apiVersion": "2016-01-01", + "location": "[variables('Location')]", + "tags": {}, + "scale": null, + "properties": {}, + "dependsOn": [] + }, + { + "type": "Microsoft.Web/serverfarms", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "kind": "functionapp", + "name": "[variables('ServerFarmPlan')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "name": "[variables('ServerFarmPlan')]", + "numberOfWorkers": 0 + }, + "dependsOn": [] + }, + { + "type": "Microsoft.Web/sites", + "kind": "functionapp", + "name": "[variables('SitesEshopfunctionsName')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "name": "[variables('SitesEshopfunctionsName')]", + "hostNames": [ + "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]" + ], + "enabledHostNames": [ + "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]", + "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]" + ], + "hostNameSslStates": [ + { + "name": "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]", + "sslState": 0, + "thumbprint": null, + "ipBasedSslState": 0 + }, + { + "name": "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]", + "sslState": 0, + "thumbprint": null, + "ipBasedSslState": 0 + } + ], + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]" + ] + }, + { + "type": "Microsoft.Web/sites/config", + "name": "[variables('WebConfigName')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "numberOfWorkers": 1, + "defaultDocuments": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html" + ], + "netFrameworkVersion": "v4.0", + "phpVersion": "5.6", + "pythonVersion": "", + "nodeVersion": "", + "linuxFxVersion": "", + "requestTracingEnabled": false, + "remoteDebuggingEnabled": false, + "remoteDebuggingVersion": null, + "httpLoggingEnabled": false, + "logsDirectorySizeLimit": 35, + "detailedErrorLoggingEnabled": false, + "publishingUsername": "$eshopfunctions", + "publishingPassword": null, + "appSettings": null, + "metadata": null, + "connectionStrings": null, + "machineKey": null, + "handlerMappings": null, + "documentRoot": null, + "scmType": "None", + "use32BitWorkerProcess": true, + "webSocketsEnabled": false, + "alwaysOn": false, + "javaVersion": null, + "javaContainer": null, + "javaContainerVersion": null, + "appCommandLine": "", + "managedPipelineMode": 0, + "virtualApplications": [ + { + "virtualPath": "/", + "physicalPath": "site\\wwwroot", + "preloadEnabled": false, + "virtualDirectories": null + } + ], + "winAuthAdminState": 0, + "winAuthTenantState": 0, + "customAppPoolIdentityAdminState": false, + "customAppPoolIdentityTenantState": false, + "runtimeADUser": null, + "runtimeADUserPassword": null, + "loadBalancing": 1, + "routingRules": [], + "experiments": { + "rampUpRules": [] + }, + "limits": null, + "autoHealEnabled": false, + "autoHealRules": { + "triggers": null, + "actions": null + }, + "tracingOptions": null, + "vnetName": "", + "siteAuthEnabled": false, + "siteAuthSettings": { + "enabled": null, + "unauthenticatedClientAction": null, + "tokenStoreEnabled": null, + "allowedExternalRedirectUrls": null, + "defaultProvider": null, + "clientId": null, + "clientSecret": null, + "issuer": null, + "allowedAudiences": null, + "additionalLoginParams": null, + "isAadAutoProvisioned": false, + "googleClientId": null, + "googleClientSecret": null, + "googleOAuthScopes": null, + "facebookAppId": null, + "facebookAppSecret": null, + "facebookOAuthScopes": null, + "twitterConsumerKey": null, + "twitterConsumerSecret": null, + "microsoftAccountClientId": null, + "microsoftAccountClientSecret": null, + "microsoftAccountOAuthScopes": null + }, + "cors": { + "allowedOrigins": [ + "https://functions.azure.com", + "https://functions-staging.azure.com", + "https://functions-next.azure.com" + ] + }, + "push": null, + "apiDefinition": null, + "autoSwapSlotName": null, + "localMySqlEnabled": false, + "ipSecurityRestrictions": null + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('SitesEshopfunctionsName'))]" + ] + } + ] +} \ No newline at end of file diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json new file mode 100644 index 000000000..9ef07000d --- /dev/null +++ b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "SitesEshopfunctionsName": { + "value": "eshopfunctionsapp" + } + } +} \ No newline at end of file diff --git a/deploy/az/azurefunctions/readme.md b/deploy/az/azurefunctions/readme.md new file mode 100644 index 000000000..6ce3630b2 --- /dev/null +++ b/deploy/az/azurefunctions/readme.md @@ -0,0 +1,39 @@ +# Deploying Azure Functions + +The ARM template `azurefunctionsdeploy.json` and its parameter file (`azurefunctionsdeploy.parameters.json`) are used to deploy Marketing azure functions. + +## Editing azurefunctionsdeploy.parameters.json file + +You can edit the `azurefunctionsdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter that can be set is: + +1. `SitesEshopfunctionsName` is a string that is used to create the Azure function app name. + +## Deploy the template + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +i. e. if you are in Windows, to deploy the Azure Functions environment in a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd azurefunctions\azurefunctionsdeploy newResourceGroup -c westus +``` +## Deploy Marketing azure function with Visual Studio. + +You need to deploy the Marketing azure function from Visual Studio 2017 15.3 from the the Marketing-functions project in the solution eShopOnContainers-AzureFunctions.sln (Visual Studio publish tool). + +## Setting Azure function configurations + +Once deployed, go to azure portal and set the connection string for the azure function under the name "SqlConnection". The value must be the connection string which points to MarketingDB. + +Example: + +"SqlConnection": "Server=tcp:eshopsql.database.windows.net,1433;Initial Catalog=marketingdb;" + +In appsettings section, add a new entry named "MarketingStorageUri". The value must be the uri of the blob storage where the campaign images are stored. + +Example: + +"MarketingStorageUri": "https://marketingcampaign.blob.core.windows.net/pics/" + + + diff --git a/deploy/az/cosmos/readme.md b/deploy/az/cosmos/readme.md new file mode 100644 index 000000000..ae040ae95 --- /dev/null +++ b/deploy/az/cosmos/readme.md @@ -0,0 +1,31 @@ +# Deploying Azure Cosmosdb + +The ARM template `deploycosmos.json` and its parameter file (`deploycosmos.parameters.json`) are used to deploy following resources: + +1. One Cosmosdb database + +## Editing deploycosmos.parameters.json file + +You can edit the `deploycosmos.parameters.json` file to set your values, but is not needed. The only parameter that can +be set is: + +1. `name` is a string that is used to create the database name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. + +## Deploy the template + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +i. e. if you are in windows, to deploy a Cosmosdb database in a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd cosmos\deploycosmos newResourceGroup -c westus +``` + + + + + + + + + diff --git a/deploy/az/createresources.sh b/deploy/az/createresources.sh new file mode 100644 index 000000000..3a71ca8fd --- /dev/null +++ b/deploy/az/createresources.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +CreateGroup() +{ + echo Creating resource group $resource_group in '$location' + az group create --name $resource_group --location $location +} # end of CreateGroup() + + + +deployresources() +{ + echo Deploying ARM template '$path_and_filename.json' in resource group $resource_group + az group deployment create --resource-group $resource_group --parameters @$path_and_filename.parameters.json --template-file $path_and_filename.json +} # end of deployresources + +Error_Usage() +{ + echo "" + echo Usage: + echo create-resources arm-file resource-group-name [-c location] + echo arm-file: Path to ARM template WITHOUT .json extension. An parameter file with same name plus '.parameters' MUST exist in same folder + echo resource-grop-name: Name of the resource group to use or create + echo -c: If appears means that resource group must be created. If -c is specified, must use enter location + echo "" + echo Examples: + echo "1 create-resources path_and_filename testgroup (Deploys path_and_filename.json with parameters specified in path_and_filename.parameters.json file)." + echo "2 create-resources path_and_filename newgroup -c westus (Deploys path_and_filename.json (with parameters specified in path_and_filename.parameters.json file) in a NEW resource group named newgroup in the westus location)" +} + + + +if [ $# -le 1 ]; then + Error_Usage + exit 1 +fi +if [ "$1" == "" ]; then + echo "path_and_filename is empty" + Error_Usage + exit 1 +fi + +if [ "$2" == "" ]; then + echo "Resource Group is empty" + Error_Usage + exit 1 +fi + +if [ ! -f "$1.json" ]; then + echo "$1.json doesn't exist" + exit 1 +fi + +if [ ! -f "$2.parameters.json" ]; then + echo "$2.parameters.json doesn't exist" + exit 1 +fi + + +path_and_filename=$1 +resource_group=$2 + + +if [ "$3" == "-c" ]; then + echo "Resource Group needs to be created" + if [ "$4" == "" ]; then + echo "but Resource Group name is missing" + Error_Usage + exit 1 + else + location=$4 + CreateGroup + fi + +fi +deployresources + +echo "all resources finished successfully" diff --git a/deploy/az/readme.md b/deploy/az/readme.md index cee4581cb..7b07ea69c 100644 --- a/deploy/az/readme.md +++ b/deploy/az/readme.md @@ -1,17 +1,37 @@ + # Deploying resources using create-resources script -The `create-resources` script is a basic script to allow easy deployment of one ARM template in one resource group. You can deploy to an existing resource group or to create one. +The `create-resources.cmd ` script is a basic script to allow easy deployment of one ARM template in one resource group. You can deploy to an existing resource group or to create one. + +**NOTE**: Alternatively, you can also use the `createresources.sh` bash script which can be used as a second option, convenient if you are using the Azure Cloud Bash Shell, a Mac or Linux machine, or simply, bash on Windows, instead of CMD/CommandPrompt in a local Windows + +## Deploying to a existing resource group - Windows CMD + +Just type `create-resources [pathfile-to-arm-template] resourcegroup` from command-prompt. Called this way the script will: + +1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files +2. If they exist, will deploy them in the `resourcegroup` specified (that resource group in Azure has to exist). + +## Deploying to a new resource group - Windows CMD + +Just type `create-resources [pathfile-to-arm-template] resourcegroup -c location`. Called this way the script will: + +1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files +2. If they exist, will create the `resourcegroup` specified in the `location` specified. +3. Finally will deploy `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files in the `resourcegroup` + + -## Deploying to a existing resource group +## Deploying to a existing resource group - Bash shell -Just type `create-resources path-to-arm-template resourcegroup`. Called this way the script will: +Just type `createresources.sh [pathfile-to-arm-template] resourcegroup` from command-prompt. Called this way the script will: 1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files -2. If they exist, will deploy them in the `resourcegroup` specified (that has to exist). +2. If they exist, will deploy them in the `resourcegroup` specified (that resource group in Azure has to exist). -## Deploying to a new resource group +## Deploying to a new resource group - Bash shell -Just type `create-resources path-to-arm-template resourcegroup -c location`. Called this way the script will: +Just type `createresources.sh [pathfile-to-arm-template] resourcegroup -c location`. Called this way the script will: 1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files 2. If they exist, will create the `resourcegroup` specified in the `location` specified. diff --git a/deploy/az/redis/readme.md b/deploy/az/redis/readme.md index 093a9af14..61be1f6f9 100644 --- a/deploy/az/redis/readme.md +++ b/deploy/az/redis/readme.md @@ -15,7 +15,7 @@ be set is: Once parameter file is edited you can deploy it using [create-resources script](../readme.md). -i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type: +i. e. if you are in windows, to deploy a Redis cache in a new Azure Resource Group located in westus, go to `deploy\az` folder and type: ``` create-resources.cmd redis\redisdeploy newResourceGroup -c westus diff --git a/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 b/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 new file mode 100644 index 000000000..c6fc34013 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 @@ -0,0 +1,53 @@ +Param( + [parameter(Mandatory=$true)][string]$vaultName, + [parameter(Mandatory=$true)][string]$certName, + [parameter(Mandatory=$true)][string]$certPwd, + [parameter(Mandatory=$true)][string]$subjectName, + [parameter(Mandatory=$false)][string]$ValidityInMonths=12, + [parameter(Mandatory=$true)][string]$saveDir +) + + +#Log in Azure Account +Login-AzureRmAccount + + +# Create Cert in KeyVault +Write-Host "Creating certificate in Azure KeyVault..." -ForegroundColor Yellow +$policy = New-AzureKeyVaultCertificatePolicy -SubjectName $subjectName -IssuerName Self -ValidityInMonths $ValidityInMonths +Add-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificatePolicy $policy + +# Downloading Certificate +Write-Host "Downloading Certificate from KeyVault..." -ForegroundColor Yellow + +$Stoploop = $false +$Retrycount = 0 + +do { + try { + + $kvSecret = Get-AzureKeyVaultSecret -VaultName $vaultName -Name $certName -ErrorAction SilentlyContinue + $kvSecretBytes = [System.Convert]::FromBase64String($kvSecret.SecretValueText) + $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection + $certCollection.Import($kvSecretBytes,$null,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) + $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $certPwd) + [System.IO.File]::WriteAllBytes($saveDir + "\" + $certName + ".pfx", $protectedCertificateBytes) + + $Stoploop = $true + Write-Host "Finished!" -ForegroundColor Yellow + } + catch { + if ($Retrycount -gt 5){ + $Stoploop = $true + Write-Host "Not possible to retrieve the certificate!" -ForegroundColor Yellow + } + else { + Start-Sleep -Seconds 20 + $Retrycount = $Retrycount + 1 + } + } +} +While ($Stoploop -eq $false) + +# Show Certificate Values +Get-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/readme.md b/deploy/az/servicefabric/LinuxContainers/readme.md new file mode 100644 index 000000000..98d097b10 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/readme.md @@ -0,0 +1,134 @@ +# Deploying a Service Fabric cluster based on Linux nodes + +## A. Unsecured cluster (SF Linux cluster) +For a secured cluster, see option B. below. + +You can always deploy a SF cluster through the Azure portal, as explained in this article: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-azure-cluster + +However, when creating a cluster, there are quite a few configurations to take into account, like enabling the internal DNS service or Reverse Proxy service, choosing between Linux/Windows, open/publish your application ports in the load-balancer and most of all (the most complex setup) how to create a secure cluster. + +Because of those reasons, we have created a set of ARM templates and scripts so you can create, re-create and configure the SF clusters much faster, as explained below: + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Linux Containers. + +## Edit the servicefabricdeploy.parameters.json file + +Edit the following params in `servicefabricdeploy.parameters.json` file to set your values: + +- clusterName: Name of your SF cluster +- clusterLocation: Datacenter location, like westus or westeurope +- computeLocation: Datacenter location, like westus or westeurope +- adminUserName: user-name for VMs administration +- adminPassword: user-password for VMs administration +- dnsName: Name assigned to your SF dns + +Optionally, you could modify which ports are opened in the LoadBalancer for the multiple eShopOnContainer apps and API services. +By default, they are setup as: +- webMvcHttpPort: 5100 +- webSpaHttpPort: 5104 +- webStatusHttpPort: 5107 +- IdSrvHttpRule: 5105 +- BasketApiHttpRule: 5103 +- CatalogApiHttpRule: 5101 +- OrderingApiHttpRule: 5102 +- MarketingApiHttpRule: 5110 +- LocationsApiHttpRule: 5109 + +## Deploy the Service Fabric cluster using the script and ARM templates + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +For example, to deploy the cluster to a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploy qa-eshop-sflinux-resgrp -c westus +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31638180-15da9f84-b287-11e7-9d4e-604f33690198.png) + +Now, if you go to your subscription in Azure, you should be able to see the SF cluster already created and available, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31638398-3fc08ad8-b288-11e7-879b-fc4df0daad2b.png) + +In this case, this is an unsecured SF cluster with a single Linux node, good for initial tests and getting started with SF. + +## B. Secured cluster (SF Linux cluster) + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Linux Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE). + +The ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) are used to create a service fabric cluster environment for linux containers secured with a certificate. + +## Create Azure Keyvault service +Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. + +![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png) + +## Generate a certificate in Azure Keyvault +In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers). + +**Select your Azure subscription** You might have [several Azure subscriptions](https://docs.microsoft.com/en-us/cli/azure/account#set) as shown if you type the following. + + >``` + >az account list + >``` + If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following: + >``` + >az account set --subscription "Your Azure Subscription Name or ID" + >``` + +Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault. + +``` +.\gen-keyvaultcert.ps1 -vaultName -certName -certPwd -subjectName CN=.westeurope.cloudapp.azure.com -saveDir C:\Users\\Downloads + +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png) + +IMPORTANT: At this point, copy/cut the .PFX certificate file saved in the downloads forlder and save it in a secure place. + +## Install the certificate +Install the certificate (by double-clicking on the .PFX file) under 'Current User' store location (by default location) and check it as exportable. + + + +Also, install the same certificate as CA (Certificate Authority) under Current User, too. + +![image](https://user-images.githubusercontent.com/1712635/31642795-c6ffa434-b2a1-11e7-8ff8-2a63549a780e.png) + +## Editing servicefabricdeploysecured.parameters.json file + +Edit the parameters in `servicefabricdeploysecured.parameters.json` in a similar way you can do with the unsecured .json file shown above (clusterName, dnsName, etc.), plus edit the following values: + +- sourceVaultValue: Your Azure Keyvault's RESOURCE ID (check Azure keyvault properties, similar to: /subscriptions/e1234ac1-c09c-3jaf-6767-98b3c5f1f246/resourceGroups/eshop-global-resgrp/providers/Microsoft.KeyVault/vaults/eshopkeyvault") + +- certificateUrlValue: Your certificate Secret Identifier (check Azure Keyvault secret certificate properties, should be in the format of https://.vault.azure.net:443/secrets/, similar to: +https://eshopkeyvault.vault.azure.net/secrets/pro-eshop-sflinux-cluster-cert/fd47684442c04cdj83b3hfe4h8e08123) + +- certificateThumbprint: certificate thumbprint (check azure Keyvault certificate thumbprint, something like 69JK453486D55A6818577Z0699100365HDK70FCE) + +## Deploy the secured SF Linux cluster + +Once parameters file is edited you can deploy it using [create-resources script](../readme.md). +Use a command prompt window positioned into the deploy\az folder. + +``` +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploysecured pro-eshop-sflinux-resgrp -c westus +``` +The execution should be something like the following: +![image](https://user-images.githubusercontent.com/1712635/31642529-54479704-b2a0-11e7-90ee-2abf32c92205.png) + +Once the cluster is created you can explore it with Azure's portal, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31642956-b7cfc8d0-b2a2-11e7-8ede-a141ec190eb4.png) + +## Deploy eShopOnServiceFabric with Visual Studio. + +Modify the cloud.xml file of each Service Fabric application in PublishProfile directory and set your certificate settings to be able to deploy eshopOnContainers in the secured cluster: + + + + + diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json new file mode 100644 index 000000000..fb28174db --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json @@ -0,0 +1,751 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "Microsoft.Azure.ServiceFabric" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "UbuntuServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "16.04" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "6.0.12" + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D1_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "wadlogs": "", + "wadperfcounters1": "", + "wadperfcounters2": "", + "wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounters1'),variables('wadperfcounters2'),'')]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "wadmetricsresourceid0": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name ,'/providers/','Microsoft.Compute/virtualMachineScaleSets/', parameters('vmNodeType0Name'))]" + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "22", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricLinuxNode')]", + "properties": { + "type": "ServiceFabricLinuxNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]" + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "LinuxDiagnostic", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.OSTCExtensions", + "settings": { + "xmlCfg": "[base64(concat(variables('wadcfgxstart'),variables('wadmetricsresourceid0'),variables('wadcfgxend')))]", + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "2.3" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" + } + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "6.0.120.1", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [], + "managementEndpoint": "[concat('http://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "None", + "upgradeMode": "Manual", + "vmImage": "Linux" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json new file mode 100644 index 000000000..0e37d24ec --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "qa-eshop-sflinux-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshoponsflin" + }, + "publicIPAddressName": { + "value": "eshoponsflin-PubIP" + }, + "dnsName": { + "value": "qa-eshop-sflinux-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshoponsflin" + }, + "lbName": { + "value": "LB-eshoponsflin" + }, + "lbIPName": { + "value": "LBIP-eshoponsflin" + }, + "vmImageSku": { + "value": "16.04-LTS" + }, + "vmImageVersion": { + "value": "latest" + }, + "vmImagePublisher": { + "value": "Canonical" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json new file mode 100644 index 000000000..0d6620f32 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json @@ -0,0 +1,821 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "Microsoft.Azure.ServiceFabric" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "UbuntuServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "16.04" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "6.0.12" + }, + "clusterProtectionLevel": { + "type": "string", + "allowedValues": [ + "None", + "Sign", + "EncryptAndSign" + ], + "defaultValue": "EncryptAndSign", + "metadata": { + "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to" + } + }, + "certificateStoreValue": { + "type": "string", + "allowedValues": [ + "My" + ], + "defaultValue": "My", + "metadata": { + "description": "The store name where the cert will be deployed in the virtual machine" + } + }, + "certificateThumbprint": { + "type": "string", + "metadata": { + "description": "Certificate Thumbprint" + } + }, + "sourceVaultValue": { + "type": "string", + "metadata": { + "description": "Resource Id of the key vault, is should be in the format of /subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" + } + }, + "certificateUrlValue": { + "type": "string", + "metadata": { + "description": "Refers to the location URL in your key vault where the certificate was uploaded, it is should be in the format of https://.vault.azure.net:443/secrets/" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 5, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D1_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "wadlogs": "", + "wadperfcounters1": "", + "wadperfcounters2": "", + "wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounters1'),variables('wadperfcounters2'),'')]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "wadmetricsresourceid0": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name ,'/providers/','Microsoft.Compute/virtualMachineScaleSets/', parameters('vmNodeType0Name'))]" + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "22", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricLinuxNode')]", + "properties": { + "type": "ServiceFabricLinuxNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]", + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + } + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "LinuxDiagnostic", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.OSTCExtensions", + "settings": { + "xmlCfg": "[base64(concat(variables('wadcfgxstart'),variables('wadmetricsresourceid0'),variables('wadcfgxend')))]", + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "2.3" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]", + "secrets": [ + { + "sourceVault": { + "id": "[parameters('sourceVaultValue')]" + }, + "vaultCertificates": [ + { + "certificateUrl": "[parameters('certificateUrlValue')]" + } + ] + } + ] + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" + } + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + }, + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "6.0.120.1", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [ + { + "parameters": [ + { + "name": "ClusterProtectionLevel", + "value": "[parameters('clusterProtectionLevel')]" + } + ], + "name": "Security" + } + ], + "managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "Silver", + "upgradeMode": "Manual", + "vmImage": "Linux" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json new file mode 100644 index 000000000..65875cb31 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "pro-eshop-sflinux-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsflinsec" + }, + "publicIPAddressName": { + "value": "eshopsflinsec-PubIP" + }, + "dnsName": { + "value": "pro-eshop-sflinux-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsflin" + }, + "lbName": { + "value": "LB-eshopsflin" + }, + "lbIPName": { + "value": "LBIP-eshopsflin" + }, + "sourceVaultValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateUrlValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateThumbprint": { + "value": "your-value-check-keyvault-at-azure" + }, + "vmImageSku": { + "value": "16.04-LTS" + }, + "vmImageVersion": { + "value": "latest" + }, + "vmImagePublisher": { + "value": "Canonical" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 b/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 new file mode 100644 index 000000000..c6fc34013 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 @@ -0,0 +1,53 @@ +Param( + [parameter(Mandatory=$true)][string]$vaultName, + [parameter(Mandatory=$true)][string]$certName, + [parameter(Mandatory=$true)][string]$certPwd, + [parameter(Mandatory=$true)][string]$subjectName, + [parameter(Mandatory=$false)][string]$ValidityInMonths=12, + [parameter(Mandatory=$true)][string]$saveDir +) + + +#Log in Azure Account +Login-AzureRmAccount + + +# Create Cert in KeyVault +Write-Host "Creating certificate in Azure KeyVault..." -ForegroundColor Yellow +$policy = New-AzureKeyVaultCertificatePolicy -SubjectName $subjectName -IssuerName Self -ValidityInMonths $ValidityInMonths +Add-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificatePolicy $policy + +# Downloading Certificate +Write-Host "Downloading Certificate from KeyVault..." -ForegroundColor Yellow + +$Stoploop = $false +$Retrycount = 0 + +do { + try { + + $kvSecret = Get-AzureKeyVaultSecret -VaultName $vaultName -Name $certName -ErrorAction SilentlyContinue + $kvSecretBytes = [System.Convert]::FromBase64String($kvSecret.SecretValueText) + $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection + $certCollection.Import($kvSecretBytes,$null,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) + $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $certPwd) + [System.IO.File]::WriteAllBytes($saveDir + "\" + $certName + ".pfx", $protectedCertificateBytes) + + $Stoploop = $true + Write-Host "Finished!" -ForegroundColor Yellow + } + catch { + if ($Retrycount -gt 5){ + $Stoploop = $true + Write-Host "Not possible to retrieve the certificate!" -ForegroundColor Yellow + } + else { + Start-Sleep -Seconds 20 + $Retrycount = $Retrycount + 1 + } + } +} +While ($Stoploop -eq $false) + +# Show Certificate Values +Get-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/readme.md b/deploy/az/servicefabric/WindowsContainers/readme.md new file mode 100644 index 000000000..18aa8ad78 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/readme.md @@ -0,0 +1,138 @@ +# Deploying a Service Fabric cluster based on Windows nodes + +## A. Unsecured cluster (SF Windows cluster) +For a secured cluster, see option B. below. + +You can always deploy a SF cluster through the Azure portal, as explained in this article: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-azure-cluster + +However, when creating a cluster, there are quite a few configurations to take into account, like enabling the internal DNS service or Reverse Proxy service, choosing between Linux/Windows, open/publish your application ports in the load-balancer and most of all (the most complex setup) how to create a secure cluster. + +Because of those reasons, we have created a set of ARM templates and scripts so you can create, re-create and configure the SF clusters much faster, as explained below: + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Windows Containers (NOT SECURED CLUSTER). + +## Edit the servicefabricdeploy.parameters.json file + +Edit the following params in `servicefabricdeploy.parameters.json` file to set your values: + +- clusterName: Name of your SF cluster +- clusterLocation: Datacenter location, like westus or westeurope +- computeLocation: Datacenter location, like westus or westeurope +- adminUserName: user-name for VMs administration +- adminPassword: user-password for VMs administration +- dnsName: Name assigned to your SF dns + +Optionally, you could modify which ports are opened in the LoadBalancer for the multiple eShopOnContainer apps and API services. +By default, they are setup as: +- webMvcHttpPort: 5100 +- webSpaHttpPort: 5104 +- webStatusHttpPort: 5107 +- IdSrvHttpRule: 5105 +- BasketApiHttpRule: 5103 +- CatalogApiHttpRule: 5101 +- OrderingApiHttpRule: 5102 +- MarketingApiHttpRule: 5110 +- LocationsApiHttpRule: 5109 + +## Deploy the Service Fabric cluster using the script and ARM templates + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +For example, to deploy the cluster to a new resourcegroup located in westus, using the Command Prompt, go to `deploy\az` folder and type: +``` +create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploy qa-eshop-sfwin-resgrp -c westus +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31638979-4881d7aa-b28b-11e7-873c-e1185043a9eb.png) + +Now, if you go to your subscription in Azure, you should be able to see the SF cluster already created and available, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31639043-9b26c786-b28b-11e7-8d59-eeea97f74176.png) + +In this case, this is an unsecured SF cluster with a single Windows node, good for initial tests and getting started with SF. + + +## B. Secured cluster (SF Windows cluster) + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Windows Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE). + +## Create Azure Keyvault service +Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. + +![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png) + +## Generate a certificate in Azure Keyvault +In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers). + +**Select your Azure subscription** You might have [several Azure subscriptions](https://docs.microsoft.com/en-us/cli/azure/account#set) as shown if you type the following. + + >``` + >az account list + >``` + If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following: + >``` + >az account set --subscription "Your Azure Subscription Name or ID" + >``` + +**Execute the gen-keyvaultcert.ps1 script** to generate and download a certificate from Keyvault. +Make sure you're going to run it against the Azure subscription you mean it. + +You might need to authenticate from the browser when running this PowerShell script. + +``` +.\gen-keyvaultcert.ps1 -vaultName -certName -certPwd -subjectName CN=.westus.cloudapp.azure.com -saveDir C:\Users\\Downloads + +``` +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png) + +IMPORTANT: At this point, copy/cut the .PFX certificate file saved in the downloads forlder and save it in a secure place. + +## Install the certificate +Install the certificate (by double-clicking on the .PFX file) under 'Current User' store location (by default location) and check it as exportable. + + + +Also, install the same certificate as CA (Certificate Authority) under Current User, too. + +![image](https://user-images.githubusercontent.com/1712635/31642795-c6ffa434-b2a1-11e7-8ff8-2a63549a780e.png) + +## Editing servicefabricdeploysecured.parameters.json file + +Edit the parameters in `servicefabricdeploysecured.parameters.json` in a similar way you can do with the unsecured .json file shown above (clusterName, dnsName, etc.), plus edit the following values: + +- sourceVaultValue: Your Azure Keyvault's RESOURCE ID (check Azure keyvault properties, similar to: /subscriptions/e1234ac1-c09c-3jaf-6767-98b3c5f1f246/resourceGroups/eshop-global-resgrp/providers/Microsoft.KeyVault/vaults/eshopkeyvault") + +- certificateUrlValue: Your certificate Secret Identifier (check Azure Keyvault secret certificate properties, should be in the format of https://.vault.azure.net:443/secrets/, similar to: +https://eshopkeyvault.vault.azure.net/secrets/pro-eshop-sfwin-cluster-cert/w647684642cGE2sj83b3hfe4h8e08963) + +- certificateThumbprint: certificate thumbprint (check azure Keyvault certificate thumbprint, something like 88JK453486D55A6818573G0DW9100365HDK70HDK) + +## Deploy the secured SF cluster (Windows nodes) + +Once parameters file is edited you can deploy it using [create-resources script](../readme.md). + +Use a command prompt window positioned into the deploy\az folder. + +``` +create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploysecured pro-eshop-sfwin-resgrp -c westus +``` +The execution should be something like the following: + +![image](https://user-images.githubusercontent.com/1712635/31641955-0bc9d59e-b29d-11e7-9230-5ba02843d98a.png) + +Once the cluster is created you can explore it with Azure's portal, like in the following image: +![image](https://user-images.githubusercontent.com/1712635/31642431-bf1c409e-b29f-11e7-980f-a7685a45108c.png) + +In this case, the ARM template is creating a 5 node cluster when creating a SECURE cluster for "production". + + +# Deploy eShopOnServiceFabric with Visual Studio. + +Modify the cloud.xml file of each Service Fabric application in PublishProfile directory and set your certificate settings to be able to deploy eshopOnContainers in the secured cluster: + + + + + diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json new file mode 100644 index 000000000..073dc9653 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json @@ -0,0 +1,853 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "nt0reverseProxyEndpointPort": { + "type": "int", + "defaultValue": 19081 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "2012-R2-Datacenter" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D2_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "uniqueStringArray0": [ + "[concat(variables('vmStorageAccountName0'), '0')]", + "[concat(variables('vmStorageAccountName0'), '1')]", + "[concat(variables('vmStorageAccountName0'), '2')]", + "[concat(variables('vmStorageAccountName0'), '3')]", + "[concat(variables('vmStorageAccountName0'), '4')]" + ] + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "ReverseProxyHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "3389", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('uniqueStringArray0')[copyIndex()]]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "copy": { + "name": "storageLoop", + "count": 5 + }, + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]", + "properties": { + "type": "ServiceFabricNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "dataPath": "D:\\\\SvcFab", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]" + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "IaaSDiagnostics", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.Azure.Diagnostics", + "settings": { + "WadCfg": { + "DiagnosticMonitorConfiguration": { + "overallQuotaInMB": "50000", + "EtwProviders": { + "EtwEventSourceProviderConfiguration": [ + { + "provider": "Microsoft-ServiceFabric-Actors", + "scheduledTransferKeywordFilter": "1", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableActorEventTable" + } + }, + { + "provider": "Microsoft-ServiceFabric-Services", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableServiceEventTable" + } + } + ], + "EtwManifestProviderConfiguration": [ + { + "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8", + "scheduledTransferLogLevelFilter": "Information", + "scheduledTransferKeywordFilter": "4611686018427387904", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricSystemEventTable" + } + } + ] + } + } + }, + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "1.5" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "vhdContainers": [ + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]" + ], + "name": "vmssosdisk" + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "5.7.207.9494", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [], + "managementEndpoint": "[concat('http://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "reverseProxyEndpointPort": "[parameters('nt0reverseProxyEndpointPort')]", + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "None", + "upgradeMode": "Manual", + "vmImage": "Windows" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json new file mode 100644 index 000000000..2c214b754 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "qa-eshop-sfwin-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsfwin" + }, + "publicIPAddressName": { + "value": "eshopsfwin-PubIP" + }, + "dnsName": { + "value": "qa-eshop-sfwin-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsfwin" + }, + "lbName": { + "value": "LB-eshopsfwin" + }, + "lbIPName": { + "value": "LBIP-eshopsfwin" + }, + "applicationDiagnosticsStorageAccountName": { + "value": "sfdgqaeshopsfwin" + }, + "supportLogStorageAccountName": { + "value": "sflogsqaeshopsfwin" + }, + "vmImageSku": { + "value": "2016-Datacenter-with-Containers" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "nt0reverseProxyEndpointPort": { + "value": 19081 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} + diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json new file mode 100644 index 000000000..843f5c0d1 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json @@ -0,0 +1,924 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "nt0reverseProxyEndpointPort": { + "type": "int", + "defaultValue": 19081 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "2012-R2-Datacenter" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "clusterProtectionLevel": { + "type": "string", + "allowedValues": [ + "None", + "Sign", + "EncryptAndSign" + ], + "defaultValue": "EncryptAndSign", + "metadata": { + "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to" + } + }, + "certificateStoreValue": { + "type": "string", + "allowedValues": [ + "My" + ], + "defaultValue": "My", + "metadata": { + "description": "The store name where the cert will be deployed in the virtual machine" + } + }, + "certificateThumbprint": { + "type": "string", + "metadata": { + "description": "Certificate Thumbprint" + } + }, + "sourceVaultValue": { + "type": "string", + "metadata": { + "description": "Resource Id of the key vault, is should be in the format of /subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" + } + }, + "certificateUrlValue": { + "type": "string", + "metadata": { + "description": "Refers to the location URL in your key vault where the certificate was uploaded, it is should be in the format of https://.vault.azure.net:443/secrets/" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 5, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D2_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "uniqueStringArray0": [ + "[concat(variables('vmStorageAccountName0'), '0')]", + "[concat(variables('vmStorageAccountName0'), '1')]", + "[concat(variables('vmStorageAccountName0'), '2')]", + "[concat(variables('vmStorageAccountName0'), '3')]", + "[concat(variables('vmStorageAccountName0'), '4')]" + ] + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "ReverseProxyHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "3389", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('uniqueStringArray0')[copyIndex()]]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "copy": { + "name": "storageLoop", + "count": 5 + }, + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]", + "properties": { + "type": "ServiceFabricNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "dataPath": "D:\\\\SvcFab", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]", + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + } + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "IaaSDiagnostics", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.Azure.Diagnostics", + "settings": { + "WadCfg": { + "DiagnosticMonitorConfiguration": { + "overallQuotaInMB": "50000", + "EtwProviders": { + "EtwEventSourceProviderConfiguration": [ + { + "provider": "Microsoft-ServiceFabric-Actors", + "scheduledTransferKeywordFilter": "1", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableActorEventTable" + } + }, + { + "provider": "Microsoft-ServiceFabric-Services", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableServiceEventTable" + } + } + ], + "EtwManifestProviderConfiguration": [ + { + "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8", + "scheduledTransferLogLevelFilter": "Information", + "scheduledTransferKeywordFilter": "4611686018427387904", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricSystemEventTable" + } + } + ] + } + } + }, + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "1.5" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]", + "secrets": [ + { + "sourceVault": { + "id": "[parameters('sourceVaultValue')]" + }, + "vaultCertificates": [ + { + "certificateStore": "[parameters('certificateStoreValue')]", + "certificateUrl": "[parameters('certificateUrlValue')]" + } + ] + } + ] + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "vhdContainers": [ + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]" + ], + "name": "vmssosdisk" + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + }, + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "5.7.207.9494", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [ + { + "parameters": [ + { + "name": "ClusterProtectionLevel", + "value": "[parameters('clusterProtectionLevel')]" + } + ], + "name": "Security" + } + ], + "managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "reverseProxyEndpointPort": "[parameters('nt0reverseProxyEndpointPort')]", + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "Silver", + "upgradeMode": "Manual", + "vmImage": "Windows" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json new file mode 100644 index 000000000..bbc8eb663 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "pro-eshop-sfwin-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsfwin" + }, + "publicIPAddressName": { + "value": "eshopsfwin-PubIP" + }, + "dnsName": { + "value": "pro-eshop-sfwin-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsfwin" + }, + "lbName": { + "value": "LB-eshopsfwin" + }, + "lbIPName": { + "value": "LBIP-eshopsfwin" + }, + "applicationDiagnosticsStorageAccountName": { + "value": "sfdgqaeshopsfwinsec" + }, + "supportLogStorageAccountName": { + "value": "sflogsqaeshopsfwinsec" + }, + "sourceVaultValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateUrlValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateThumbprint": { + "value": "your-value-check-keyvault-at-azure" + }, + "vmImageSku": { + "value": "2016-Datacenter-with-Containers" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "nt0reverseProxyEndpointPort": { + "value": 19081 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} + diff --git a/deploy/az/storage/deploystorage.json b/deploy/az/storage/catalog/deploystorage.json similarity index 95% rename from deploy/az/storage/deploystorage.json rename to deploy/az/storage/catalog/deploystorage.json index e3fced6b2..2e2ed1b4b 100644 --- a/deploy/az/storage/deploystorage.json +++ b/deploy/az/storage/catalog/deploystorage.json @@ -7,11 +7,14 @@ }, "profileName" : { "type": "string" + }, + "endpointName" : { + "type": "string" } }, "variables": { "catalogstorage": "[concat(parameters('catalogstorage'), uniqueString(resourceGroup().id))]", - "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]", + "endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]", "profileName": "[parameters('profileName')]" }, "resources": [ diff --git a/deploy/az/storage/deploystorage.parameters.json b/deploy/az/storage/catalog/deploystorage.parameters.json similarity index 81% rename from deploy/az/storage/deploystorage.parameters.json rename to deploy/az/storage/catalog/deploystorage.parameters.json index 2c5256a09..b54e546fe 100644 --- a/deploy/az/storage/deploystorage.parameters.json +++ b/deploy/az/storage/catalog/deploystorage.parameters.json @@ -7,6 +7,9 @@ }, "profileName":{ "value": "eshopcatalog" + }, + "endpointName":{ + "value": "catalog-endpoint" } } } \ No newline at end of file diff --git a/deploy/az/storage/catalog/readme.md b/deploy/az/storage/catalog/readme.md new file mode 100644 index 000000000..f3ece6fed --- /dev/null +++ b/deploy/az/storage/catalog/readme.md @@ -0,0 +1,37 @@ +# Deploying Catalog Storage + +The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources: + +1. One Storage Account +2. One CDN profile +3. One Endpoint + +## Editing deploystorage.parameters.json file + +You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can +be set are: + +1. `catalogstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. + +2. `profileName` is a string that is used to create the CDN profile name. + +3. `endpointName` is a string that is used to create the storage endpoint name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. + +## Deploy the template + +Once parameter file is edited you can deploy it using [create-resources script](../../readme.md). + +i. e. if you are in windows, to deploy a Storage Account in a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd catalog\deploystorage newResourceGroup -c westus +``` + + + + + + + + + diff --git a/deploy/az/storage/marketing/deploystorage.json b/deploy/az/storage/marketing/deploystorage.json new file mode 100644 index 000000000..632e0d09a --- /dev/null +++ b/deploy/az/storage/marketing/deploystorage.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "marketingstorage": { + "type": "string" + }, + "profileName" : { + "type": "string" + }, + "endpointName" : { + "type": "string" + } + }, + "variables": { + "marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]", + "endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]", + "profileName": "[parameters('profileName')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('marketingstorage')]", + "apiVersion": "2016-01-01", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "[variables('marketingstorage')]" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage" + }, + { + "name": "[variables('profileName')]", + "type": "Microsoft.Cdn/profiles", + "location": "[resourceGroup().location]", + "apiVersion": "2016-04-02", + "tags": { + "displayName": "[variables('profileName')]" + }, + "sku": { + "name": "Standard_Verizon" + }, + "resources": [ + { + "apiVersion": "2016-04-02", + "name": "[variables('endpointName')]", + "type": "endpoints", + "dependsOn": [ + "[variables('profileName')]", + "[variables('marketingstorage')]" + ], + "location": "[resourceGroup().location]", + "tags": { + "displayName": "[variables('endpointName')]" + }, + "properties": { + "originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]", + "isHttpAllowed": true, + "isHttpsAllowed": true, + "queryStringCachingBehavior": "IgnoreQueryString", + "contentTypesToCompress": [ + "text/plain", + "text/html", + "text/css", + "application/x-javascript", + "text/javascript" + ], + "isCompressionEnabled": "True", + "origins": [ + { + "name": "origin1", + "properties": { + "hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]" + } + } + ] + } + } + ] + } + ], + "outputs": { + "hostName": { + "type": "string", + "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]" + }, + "originHostHeader": { + "type": "string", + "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]" + } + } +} \ No newline at end of file diff --git a/deploy/az/storage/marketing/deploystorage.parameters.json b/deploy/az/storage/marketing/deploystorage.parameters.json new file mode 100644 index 000000000..40f7b3a1b --- /dev/null +++ b/deploy/az/storage/marketing/deploystorage.parameters.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "marketingstorage": { + "value": "marketing" + }, + "profileName":{ + "value": "eshopmarketing" + }, + "endpointName":{ + "value": "marketing-endpoint" + } + } +} \ No newline at end of file diff --git a/deploy/az/storage/marketing/readme.md b/deploy/az/storage/marketing/readme.md new file mode 100644 index 000000000..2b457b608 --- /dev/null +++ b/deploy/az/storage/marketing/readme.md @@ -0,0 +1,37 @@ +# Deploying Marketing Storage + +The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources: + +1. One Storage Account +2. One CDN profile +3. One Endpoint + +## Editing deploystorage.parameters.json file + +You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can +be set are: + +1. `marketingstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. + +2. `profileName` is a string that is used to create the CDN profile name. + +3. `endpointName` is a string that is used to create the storage endpoint name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value. + +## Deploy the template + +Once parameter file is edited you can deploy it using [create-resources script](../../readme.md). + +i. e. if you are in windows, to deploy a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd marketing\deploystorage newResourceGroup -c westus +``` + + + + + + + + + diff --git a/deploy/readme.md b/deploy/readme.md index 7d760c6bd..27b168713 100644 --- a/deploy/readme.md +++ b/deploy/readme.md @@ -20,6 +20,10 @@ Using `docker-machine` is the recommended way to create a VM with docker install 1. [Deploying SQL Server and databases](az/sql/readme.md) 2. [Deploying Azure Service Bus](az/servicebus/readme.md) 3. [Deploying Redis Cache](az/redis/readme.md) +4. [Deploying Cosmosdb](az/cosmos/readme.md) +5. [Deploying Catalog Storage](az/storage/catalog/readme.md) +6. [Deploying Marketing Storage](az/storage/marketing/readme.md) +7. [Deploying Marketing Azure functions](az/azurefunctions/readme.md) diff --git a/docker-compose-external.override.yml b/docker-compose-external.override.yml index f20440ad7..e20d2d949 100644 --- a/docker-compose-external.override.yml +++ b/docker-compose-external.override.yml @@ -1,9 +1,14 @@ -version: '2' +version: '3' services: sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y + - MSSQL_PID=Developer ports: - - "5433:1433" \ No newline at end of file + - "5433:1433" + + nosql.data: + ports: + - "27017:27017" \ No newline at end of file diff --git a/docker-compose-external.yml b/docker-compose-external.yml index 8d8d61add..9570696d2 100644 --- a/docker-compose-external.yml +++ b/docker-compose-external.yml @@ -1,8 +1,8 @@ -version: '2.1' +version: '3' services: sql.data: - image: microsoft/mssql-server-linux + image: microsoft/mssql-server-linux:2017-latest basket.data: image: redis @@ -13,3 +13,6 @@ services: image: rabbitmq ports: - "5672:5672" + + nosql.data: + image: mongo diff --git a/docker-compose-windows.override.yml b/docker-compose-windows.override.yml deleted file mode 100644 index 738549e7e..000000000 --- a/docker-compose-windows.override.yml +++ /dev/null @@ -1,110 +0,0 @@ -version: '2.1' - -# The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine. -# The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: -# ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost -# but values present in the environment vars at runtime will always override those defined inside the .env file -# An external IP or DNS name has to be used (instead localhost and the 10.0.75.1 IP) when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. - -services: - - basket.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=basket.data - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - EventBusConnection=rabbitmq - ports: - - "5103:80" - - catalog.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word - - ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - EventBusConnection=rabbitmq - ports: - - "5101:80" - - identity.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 - - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word - - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105. - ports: - - "5105:80" - - ordering.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - EventBusConnection=rabbitmq - ports: - - "5102:80" - - webspa: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 - - OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 - - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - - CatalogUrlHC=http://catalog.api/hc - - OrderingUrlHC=http://ordering.api/hc - - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - - BasketUrlHC=http://basket.api/hc - ports: - - "5104:80" - - webmvc: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - CatalogUrl=http://catalog.api - - OrderingUrl=http://ordering.api - - BasketUrl=http://basket.api - - IdentityUrl=http://10.0.75.1:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. - #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. - ports: - - "5100:80" - - sql.data: - environment: - - SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - ports: - - "5433:1433" - - nosql.data: - ports: - - "27017:27017" - - locations.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=mongodb://nosql.data - - Database=LocationsDb - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - EventBusConnection=rabbitmq - ports: - - "5109:80" - - marketing.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word - - EventBusConnection=rabbitmq - - MongoConnectionString=mongodb://nosql.data - - MongoDatabase=MarketingDb - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - ports: - - "5110:80" \ No newline at end of file diff --git a/docker-compose-windows.prod.yml b/docker-compose-windows.prod.yml index 4767bba70..0e7602e8f 100644 --- a/docker-compose-windows.prod.yml +++ b/docker-compose-windows.prod.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The Production docker-compose file has to have the external/real IPs or DNS names for the services # The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -17,8 +17,11 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=basket.data - - identityUrl=http://identity.api #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - AzureServiceBusEnabled=False ports: - "5103:5103" @@ -26,8 +29,14 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word - - ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False ports: - "5101:80" @@ -36,8 +45,14 @@ services: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104 - - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word - - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105. + - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback + - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. + - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 + - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 + - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 + - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 + - UseCustomizationData=True ports: - "5105:80" @@ -45,8 +60,12 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - UseCustomizationData=True + - AzureServiceBusEnabled=False ports: - "5102:80" @@ -56,12 +75,15 @@ services: - ASPNETCORE_URLS=http://0.0.0.0 - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 - - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. - - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 + - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5110. + - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 + - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 - CatalogUrlHC=http://catalog.api/hc - OrderingUrlHC=http://ordering.api/hc - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - - BasketUrlHC=http://basket.api/hc + - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - UseCustomizationData=True ports: - "5104:80" @@ -73,6 +95,8 @@ services: - OrderingUrl=http://ordering.api - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrl=http://basket.api + - MarketingUrl=http://marketing.api + - UseCustomizationData=True #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. ports: - "5100:80" @@ -80,17 +104,66 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word - - EventBusConnection=rabbitmq - - MongoConnectionString=mongodb://nosql.data + - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} + - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - MongoDatabase=MarketingDb - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/campaigns/[0]/pic/} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False ports: - "5110:80" - + sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y ports: - - "5433:1433" \ No newline at end of file + - "5433:1433" + + nosql.data: + ports: + - "27017:27017" + + webstatus: + environment: + - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_URLS=http://0.0.0.0:80 + - CatalogUrl=http://catalog.api/hc + - OrderingUrl=http://ordering.api/hc + - BasketUrl=http://basket.api/hc + - IdentityUrl=http://identity.api/hc + - LocationsUrl=http://locations.api/hc + - MarketingUrl=http://marketing.api/hc + - mvc=http://webmvc/hc + - spa=http://webspa/hc + + ports: + - "5107:80" + + payment.api: + environment: + - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_URLS=http://0.0.0.0:5108 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - AzureServiceBusEnabled=False + ports: + - "5108:80" + + locations.api: + environment: + - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} + - Database=LocationsDb + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - AzureServiceBusEnabled=False + ports: + - "5109:80" \ No newline at end of file diff --git a/docker-compose-windows.yml b/docker-compose-windows.yml index 5a7e3ff16..f71be6069 100644 --- a/docker-compose-windows.yml +++ b/docker-compose-windows.yml @@ -1,77 +1,98 @@ -version: '2.1' +version: '3' services: basket.api: image: eshop/basket.api-win:${TAG:-latest} build: - context: ./src/Services/Basket/Basket.API - dockerfile: Dockerfile.nanowin + context: . + dockerfile: ./src/Services/Basket/Basket.API/Dockerfile depends_on: - basket.data - identity.api + - rabbitmq catalog.api: image: eshop/catalog.api-win:${TAG:-latest} build: - context: ./src/Services/Catalog/Catalog.API - dockerfile: Dockerfile.nanowin + context: . + dockerfile: ./src/Services/Catalog/Catalog.API/Dockerfile depends_on: - sql.data + - rabbitmq identity.api: image: eshop/identity.api-win:${TAG:-latest} build: - context: ./src/Services/Identity/Identity.API - dockerfile: Dockerfile.nanowin + context: . + dockerfile: ./src/Services/Identity/Identity.API/Dockerfile depends_on: - sql.data ordering.api: image: eshop/ordering.api-win:${TAG:-latest} build: - context: ./src/Services/Ordering/Ordering.API - dockerfile: Dockerfile.nanowin + context: . + dockerfile: ./src/Services/Ordering/Ordering.API/Dockerfile depends_on: - sql.data + - rabbitmq + + marketing.api: + image: eshop/marketing.api-win:${TAG:-latest} + build: + context: . + dockerfile: ./src/Services/Marketing/Marketing.API/Dockerfile + depends_on: + - sql.data + - nosql.data + - identity.api + - rabbitmq webspa: image: eshop/webspa-win:${TAG:-latest} build: - context: ./src/Web/WebSPA - dockerfile: Dockerfile.nanowin + context: . + dockerfile: ./src/Web/WebSPA/Dockerfile depends_on: + - catalog.api + - ordering.api - identity.api - basket.api + - marketing.api webmvc: image: eshop/webmvc-win:${TAG:-latest} build: context: ./src/Web/WebMVC - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - catalog.api - ordering.api - identity.api - basket.api + - marketing.api - locations.api: - image: eshop/locations.api:${TAG:-latest} + webstatus: + image: eshop/webstatus-win:${TAG:-latest} build: - context: ./src/Services/Location/Locations.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Web/WebStatus/Dockerfile + + payment.api: + image: eshop/payment.api-win:${TAG:-latest} + build: + context: . + dockerfile: ./src/Services/Payment/Payment.API/Dockerfile depends_on: - - nosql.data - rabbitmq - marketing.api: - image: eshop/marketing.api:${TAG:-latest} + locations.api: + image: eshop/locations.api-win:${TAG:-latest} build: - context: ./src/Services/Marketing/Marketing.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Location/Locations.API/Dockerfile depends_on: - - sql.data - nosql.data - - identity.api - rabbitmq sql.data: @@ -82,20 +103,15 @@ services: basket.data: image: redis:nanoserver -# build: -# context: ./_docker/redis -# dockerfile: Dockerfile.nanowin ports: - "6379:6379" rabbitmq: image: spring2/rabbitmq -# build: -# context: ./_docker/rabbitmq -# dockerfile: Dockerfile.nanowin ports: - - "5672:5672" - + - "15672:15672" + - "5672:5672" + networks: default: external: diff --git a/docker-compose.ci.build.yml b/docker-compose.ci.build.yml index db2ef5390..ebee57db1 100644 --- a/docker-compose.ci.build.yml +++ b/docker-compose.ci.build.yml @@ -1,14 +1,18 @@ -version: '2.1' +version: '3' services: ci-build: - image: microsoft/aspnetcore-build:1.1.2 + image: microsoft/aspnetcore-build:2.0.2 #Depending on the bug below, you can also try this other SDK image: microsoft/aspnetcore-build:1.0-2.0-2017-10 or microsoft/aspnetcore-build:1.0-2.0 volumes: - .:/src - ./cli-linux:/cli-linux working_dir: /src -# DO NOT USE the sln file to compile because msbuild issue (https://github.com/Microsoft/msbuild/issues/2153) -# command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish" -# NOTE: Using build-bits-linux.sh triggers the same MSBUILD error :( (but at least, less frequently) - command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src" + +# Next line is using the .sln file to compile all the projects. +# Sometime there is an issue in msbuild exits the process before finishing building the bits: (https://github.com/Microsoft/msbuild/issues/2153) +# Random error: error MSB4017: The build stopped unexpectedly be cause of an unexpected logger failure. + command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish" + +# NOTE: Using build-bits-linux.sh from Linux build container exits before ending. + #command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src" \ No newline at end of file diff --git a/docker-compose.dcproj b/docker-compose.dcproj index f7f04c5b4..ccdc2195a 100644 --- a/docker-compose.dcproj +++ b/docker-compose.dcproj @@ -5,8 +5,11 @@ True http://localhost:5100 webmvc + Linux + 2.0 + docker-compose.yml @@ -14,12 +17,6 @@ docker-compose.yml - - docker-compose.yml - - - docker-compose.yml - \ No newline at end of file diff --git a/docker-compose.nobuild.yml b/docker-compose.nobuild.yml index 0905f9799..4f301cd3c 100644 --- a/docker-compose.nobuild.yml +++ b/docker-compose.nobuild.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: basket.api: @@ -23,12 +23,24 @@ services: image: eshop/ordering.api depends_on: - sql.data + - rabbitmq + + marketing.api: + image: eshop/marketing.api + depends_on: + - sql.data + - nosql.data + - identity.api + - rabbitmq webspa: image: eshop/webspa depends_on: + - catalog.api + - ordering.api - identity.api - basket.api + - marketing.api webmvc: image: eshop/webmvc @@ -37,20 +49,35 @@ services: - ordering.api - identity.api - basket.api + - marketing.api - sql.data: - image: microsoft/mssql-server-linux + webstatus: + image: eshop/webstatus + + payment.api: + image: eshop/payment.api + depends_on: + - rabbitmq + + locations.api: + image: eshop/locations.api + depends_on: + - nosql.data + - rabbitmq + sql.data: + image: microsoft/mssql-server-linux:2017-latest + + nosql.data: + image: mongo + basket.data: image: redis ports: - "6379:6379" rabbitmq: - image: rabbitmq + image: rabbitmq:3-management ports: - "5672:5672" - webstatus: - image: eshop/webstatus - \ No newline at end of file diff --git a/docker-compose.override.windows.yml b/docker-compose.override.windows.yml new file mode 100644 index 000000000..537b3b098 --- /dev/null +++ b/docker-compose.override.windows.yml @@ -0,0 +1,53 @@ +version: '3' + +# ONLY NEEDED WHEN RUNNING WINDOWS CONTAINERS +# +# This file sets the containers' environment variables: +# +# - EventBusUerName +# - EventBusPassword +# +# To the default username & password used in the spring2/rabbitmq image. +# +# If you are using any other rabbitmq image with any other username/pwd then you can: +# +# Set your shell environment variables: +# - ESHOP_SERVICE_BUS_USERNAME +# - ESHOP_SERVICE_BUS_PASSWORD +# +# With the appropiate values (note that you can use .env file also) AND DO NOT USE THIS FILE when launching windows container: +# +# docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml up +# INSTEAD OF +# docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.override.windows.yml up + +services: + basket.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + catalog.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + ordering.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + marketing.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + payment.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + locations.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml index eddfdf7e1..370aeed11 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine. # The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -7,18 +7,22 @@ version: '2.1' # An external IP or DNS name has to be used (instead localhost and the 10.0.75.1 IP) when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. services: - graceperiodmanager: - environment: - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - - EventBusConnection=rabbitmq basket.api: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_REDIS:-basket.data} - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: - "5103:80" @@ -26,10 +30,18 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word - - PicBaseUrl=${ESHOP_AZURE_STORAGE_ACCOUNT:-http://localhost:5101/api/v1/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} - UseCustomizationData=True + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5101:80" @@ -39,9 +51,15 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always - - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word - - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105. - - UseCustomizationData=True + - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. + - LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 + - MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 + - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 + - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5105:80" @@ -49,10 +67,19 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - UseCustomizationData=True + - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - GracePeriodTime=1 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5102:80" @@ -60,12 +87,23 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word - - MongoConnectionString=mongodb://nosql.data + - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} + - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - MongoDatabase=MarketingDb - - EventBusConnection=rabbitmq - - ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5110:80" @@ -78,11 +116,16 @@ services: - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 + - LocationsUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 - CatalogUrlHC=http://catalog.api/hc - OrderingUrlHC=http://ordering.api/hc - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5104:80" @@ -93,24 +136,22 @@ services: - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - BasketUrl=http://basket.api + - LocationsUrl=http://locations.api - IdentityUrl=http://10.0.75.1:5105 - - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. - #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - CatalogUrlHC=http://catalog.api/hc + - OrderingUrlHC=http://ordering.api/hc + - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. + - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5100:80" - sql.data: - environment: - - SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - ports: - - "5433:1433" - - nosql.data: - ports: - - "27017:27017" - webstatus: environment: - ASPNETCORE_ENVIRONMENT=Development @@ -119,16 +160,26 @@ services: - OrderingUrl=http://ordering.api/hc - BasketUrl=http://basket.api/hc - IdentityUrl=http://identity.api/hc + - LocationsUrl=http://locations.api/hc + - MarketingUrl=http://marketing.api/hc + - PaymentUrl=http://payment.api/hc - mvc=http://webmvc/hc - spa=http://webspa/hc + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5107:80" payment.api: environment: - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:5108 - - EventBusConnection=rabbitmq + - ASPNETCORE_URLS=http://0.0.0.0:80 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5108:80" @@ -136,9 +187,37 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=mongodb://nosql.data + - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - Database=LocationsDb - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - EventBusConnection=rabbitmq + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5109:80" + + sql.data: + environment: + - MSSQL_SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + - MSSQL_PID=Developer + ports: + - "5433:1433" + + nosql.data: + ports: + - "27017:27017" + + basket.data: + ports: + - "6379:6379" + + rabbitmq: + ports: + - "15672:15672" + - "5672:5672" \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 1fac4f5e6..7ba049015 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The Production docker-compose file has to have the external/real IPs or DNS names for the services # The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -6,109 +6,225 @@ version: '2.1' # but values present in the environment vars at runtime will always override those defined inside the .env file # An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. # -# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing. +# IMPORTANT: Note that this compose file uses ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP instead of ESHOP_EXTERNAL_DNS_NAME_OR_IP + +# Set ASPNETCORE_ENVIRONMENT= Development or Production, depending if you want to show up errors while testing. # # You need to start it with the following CLI command: # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d services: - + basket.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_REDIS:-basket.data} - - identityUrl=http://identity.api #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: - "5103:80" catalog.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word - - ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5101:80" identity.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104 - - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word - - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105. - - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback + - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always + - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. + - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 + - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 + - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 + - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5105:80" ordering.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - - identityUrl=http://identity.api #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - GracePeriodTime=1 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5102:80" marketing.api: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word - - MongoConnectionString=mongodb://nosql.data + - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} + - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - MongoDatabase=MarketingDb - - EventBusConnection=rabbitmq - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5110:80" webspa: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 - - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103 + - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110 + - LocationsUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109 - CatalogUrlHC=http://catalog.api/hc - OrderingUrlHC=http://ordering.api/hc - - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. + - IdentityUrlHC=http://identity.api/hc - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5104:80" webmvc: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrl=http://basket.api + - LocationsUrl=http://locations.api + - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - MarketingUrl=http://marketing.api + - CatalogUrlHC=http://catalog.api/hc + - OrderingUrlHC=http://ordering.api/hc + - IdentityUrlHC=http://identity.api/hc + - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5100:80" - sql.data: - environment: - - SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - ports: - - "5433:1433" - webstatus: environment: - - ASPNETCORE_ENVIRONMENT=Production + - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - CatalogUrl=http://catalog.api/hc - OrderingUrl=http://ordering.api/hc - BasketUrl=http://basket.api/hc - - IdentityUrl=http://identity.api/hc + - IdentityUrl=http://identity.api/hc + - LocationsUrl=http://locations.api/hc + - MarketingUrl=http://marketing.api/hc + - PaymentUrl=http://payment.api/hc - mvc=http://webmvc/hc - spa=http://webspa/hc + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5107:80" + + payment.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5108:80" + + locations.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} + - Database=LocationsDb + - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. + - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5109:80" + + sql.data: + environment: + - MSSQL_SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + - MSSQL_PID=Developer + ports: + - "5433:1433" + + nosql.data: + ports: + - "27017:27017" + + basket.data: + ports: + - "6379:6379" + rabbitmq: ports: - - "5107:80" \ No newline at end of file + - "15672:15672" + - "5672:5672" \ No newline at end of file diff --git a/docker-compose.vs.debug.yml b/docker-compose.vs.debug.yml deleted file mode 100644 index 9c4879f61..000000000 --- a/docker-compose.vs.debug.yml +++ /dev/null @@ -1,166 +0,0 @@ -version: '2.1' - -services: - basket.api: - image: eshop/basket.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Basket/Basket.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - catalog.api: - image: eshop/catalog.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Catalog/Catalog.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - identity.api: - image: eshop/identity.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Identity/Identity.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - ordering.api: - image: eshop/ordering.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Ordering/Ordering.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - marketing.api: - image: eshop/marketing.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Marketing/Marketing.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - - webspa: - image: eshop/webspa:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Web/WebSPA:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - webmvc: - image: eshop/webmvc:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Web/WebMVC:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - webstatus: - image: eshop/webstatus:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Web/WebStatus:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - payment.api: - image: eshop/payment.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Payment/Payment.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - graceperiodmanager: - image: eshop/graceperiodmanager:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ./src/Services/GracePeriod/GracePeriodManager:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - locations.api: - image: eshop/locations.api:dev - build: - args: - source: ${DOCKER_BUILD_SOURCE} - environment: - - DOTNET_USE_POLLING_FILE_WATCHER=1 - volumes: - - ./src/Services/Location/Locations.API:/app - - ~/.nuget/packages:/root/.nuget/packages:ro - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" diff --git a/docker-compose.vs.release.yml b/docker-compose.vs.release.yml deleted file mode 100644 index 92be2557b..000000000 --- a/docker-compose.vs.release.yml +++ /dev/null @@ -1,112 +0,0 @@ -version: '2.1' - -services: - basket.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - catalog.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - identity.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - ordering.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - marketing.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - webspa: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - webmvc: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - webstatus: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - payment.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - graceperiodmanager: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" - - locations.api: - build: - args: - source: ${DOCKER_BUILD_SOURCE} - volumes: - - ~/clrdbg:/clrdbg:ro - entrypoint: tail -f /dev/null - labels: - - "com.microsoft.visualstudio.targetoperatingsystem=linux" diff --git a/docker-compose.yml b/docker-compose.yml index 699415dff..e51772dcb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,29 +1,22 @@ -version: '2.1' +version: '3' services: - graceperiodmanager: - image: eshop/graceperiodmanager:${TAG:-latest} - build: - context: ./src/Services/GracePeriod/GracePeriodManager - dockerfile: Dockerfile - depends_on: - - sql.data - - rabbitmq basket.api: image: eshop/basket.api:${TAG:-latest} build: - context: ./src/Services/Basket/Basket.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Basket/Basket.API/Dockerfile depends_on: - basket.data - identity.api + - rabbitmq catalog.api: image: eshop/catalog.api:${TAG:-latest} build: - context: ./src/Services/Catalog/Catalog.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Catalog/Catalog.API/Dockerfile depends_on: - sql.data - rabbitmq @@ -31,16 +24,16 @@ services: identity.api: image: eshop/identity.api:${TAG:-latest} build: - context: ./src/Services/Identity/Identity.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Identity/Identity.API/Dockerfile depends_on: - sql.data ordering.api: image: eshop/ordering.api:${TAG:-latest} build: - context: ./src/Services/Ordering/Ordering.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Ordering/Ordering.API/Dockerfile depends_on: - sql.data - rabbitmq @@ -48,8 +41,8 @@ services: marketing.api: image: eshop/marketing.api:${TAG:-latest} build: - context: ./src/Services/Marketing/Marketing.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Marketing/Marketing.API/Dockerfile depends_on: - sql.data - nosql.data @@ -59,17 +52,20 @@ services: webspa: image: eshop/webspa:${TAG:-latest} build: - context: ./src/Web/WebSPA - dockerfile: Dockerfile + context: . + dockerfile: ./src/Web/WebSPA/Dockerfile depends_on: + - catalog.api + - ordering.api - identity.api - basket.api + - marketing.api webmvc: image: eshop/webmvc:${TAG:-latest} build: - context: ./src/Web/WebMVC - dockerfile: Dockerfile + context: . + dockerfile: ./src/Web/WebMVC/Dockerfile depends_on: - catalog.api - ordering.api @@ -77,41 +73,37 @@ services: - basket.api - marketing.api - sql.data: - image: microsoft/mssql-server-linux - - nosql.data: - image: mongo - - basket.data: - image: redis - ports: - - "6379:6379" - - rabbitmq: - image: rabbitmq - ports: - - "5672:5672" - webstatus: image: eshop/webstatus:${TAG:-latest} build: - context: ./src/Web/WebStatus - dockerfile: Dockerfile + context: . + dockerfile: ./src/Web/WebStatus/Dockerfile payment.api: image: eshop/payment.api:${TAG:-latest} build: - context: ./src/Services/Payment/Payment.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Payment/Payment.API/Dockerfile depends_on: - rabbitmq locations.api: image: eshop/locations.api:${TAG:-latest} build: - context: ./src/Services/Location/Locations.API - dockerfile: Dockerfile + context: . + dockerfile: ./src/Services/Location/Locations.API/Dockerfile depends_on: - nosql.data - rabbitmq + + sql.data: + image: microsoft/mssql-server-linux:2017-latest + + nosql.data: + image: mongo + + basket.data: + image: redis:alpine + + rabbitmq: + image: rabbitmq:3-management-alpine diff --git a/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf b/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf new file mode 100644 index 000000000..118c4509e Binary files /dev/null and b/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf differ diff --git a/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1.pdf b/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1.pdf new file mode 100644 index 000000000..12649c446 Binary files /dev/null and b/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1.pdf differ diff --git a/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1_Deprecated.pdf b/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1_Deprecated.pdf new file mode 100644 index 000000000..de441b906 Binary files /dev/null and b/docs/Containerized-Docker-Application-Lifecycle-with-Microsoft-Platform-and-Tools-(eBook)_v1.1_Deprecated.pdf differ diff --git a/docs/Enterprise-Application-Patterns-using-XamarinForms.pdf b/docs/Enterprise-Application-Patterns-using-XamarinForms.pdf index 7184e3042..cdce68944 100644 Binary files a/docs/Enterprise-Application-Patterns-using-XamarinForms.pdf and b/docs/Enterprise-Application-Patterns-using-XamarinForms.pdf differ diff --git a/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-v1.pdf b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-v1.pdf new file mode 100644 index 000000000..7f5d6885d Binary files /dev/null and b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-v1.pdf differ diff --git a/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-zh-CN.pdf b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-zh-CN.pdf new file mode 100644 index 000000000..239a814d7 Binary files /dev/null and b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook)-zh-CN.pdf differ diff --git a/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf index 7f5d6885d..4636e3cf4 100644 Binary files a/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf and b/docs/NET-Microservices-Architecture-for-Containerized-NET-Applications-(Microsoft-eBook).pdf differ diff --git a/eShopOnContainers-Android.sln b/eShopOnContainers-Android.sln index f1f10b26f..b3324f540 100644 --- a/eShopOnContainers-Android.sln +++ b/eShopOnContainers-Android.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject diff --git a/eShopOnContainers-AzureFunctions.sln b/eShopOnContainers-AzureFunctions.sln new file mode 100644 index 000000000..d129fc0fe --- /dev/null +++ b/eShopOnContainers-AzureFunctions.sln @@ -0,0 +1,96 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.8 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{5B1011EC-CEE5-47AA-B336-99381D573679}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureFunctions", "AzureFunctions", "{106B787C-2CFF-4484-8C07-D14589859E94}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "marketing-functions", "src\Services\Marketing\Infrastructure\AzureFunctions\marketing-functions.csproj", "{B363EF31-DD1A-46C8-ADDF-CD30A756E97B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Ad-Hoc|Any CPU = Ad-Hoc|Any CPU + Ad-Hoc|ARM = Ad-Hoc|ARM + Ad-Hoc|iPhone = Ad-Hoc|iPhone + Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator + Ad-Hoc|x64 = Ad-Hoc|x64 + Ad-Hoc|x86 = Ad-Hoc|x86 + AppStore|Any CPU = AppStore|Any CPU + AppStore|ARM = AppStore|ARM + AppStore|iPhone = AppStore|iPhone + AppStore|iPhoneSimulator = AppStore|iPhoneSimulator + AppStore|x64 = AppStore|x64 + AppStore|x86 = AppStore|x86 + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|iPhone = Debug|iPhone + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|ARM.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x64.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x64.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x86.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x86.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|ARM.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhone.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x64.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x64.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x86.ActiveCfg = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x86.Build.0 = Debug|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|Any CPU.Build.0 = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|ARM.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|ARM.Build.0 = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhone.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhone.Build.0 = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x64.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x64.Build.0 = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x86.ActiveCfg = Release|Any CPU + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {106B787C-2CFF-4484-8C07-D14589859E94} = {5B1011EC-CEE5-47AA-B336-99381D573679} + {B363EF31-DD1A-46C8-ADDF-CD30A756E97B} = {106B787C-2CFF-4484-8C07-D14589859E94} + EndGlobalSection +EndGlobal diff --git a/eShopOnContainers-MobileApps.sln b/eShopOnContainers-MobileApps.sln index f70efddf1..74c882912 100755 --- a/eShopOnContainers-MobileApps.sln +++ b/eShopOnContainers-MobileApps.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject @@ -16,7 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A857AD10-40FF-4303-BEC2-FF1C58D5735E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{BA96A12C-4EE3-46C4-BB3F-F811B554CD01}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.Droid\eShopOnContainers.Droid.csproj", "{62DBB163-9CA9-4818-B48B-13233DF37C24}" EndProject @@ -30,7 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{9CC7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{B7B1D395-4E06-4036-BE86-C216756B9367}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{6E4285E7-7611-4440-A1B5-3513EBB13807}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}" EndProject @@ -66,54 +66,54 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x64.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x64.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|ARM.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhone.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x64.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x64.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x86.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x86.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x86.Build.0 = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU @@ -283,54 +283,54 @@ Global {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.ActiveCfg = Release|x86 {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Build.0 = Release|x86 {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Deploy.0 = Release|x86 - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|ARM.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|ARM.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhone.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x64.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x64.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x86.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x86.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x86.Build.0 = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU @@ -473,6 +473,8 @@ Global {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x86.Build.0 = Release|x86 {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x86.Deploy.0 = Release|x86 {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.ActiveCfg = Debug|x86 + {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.Build.0 = Debug|x86 + {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.Deploy.0 = Debug|x86 {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.ActiveCfg = Debug|ARM {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.Build.0 = Debug|ARM {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.Deploy.0 = Debug|ARM @@ -504,16 +506,19 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {F61357CE-1CC2-410E-8776-B16EEBC98EB8} = {932D8224-11F6-4D07-B109-DA28AD288A63} - {67F9D3A8-F71E-4428-913F-C37AE82CDB24} = {778289CA-31F7-4464-8C2A-612EE846F8A7} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} = {778289CA-31F7-4464-8C2A-612EE846F8A7} {62DBB163-9CA9-4818-B48B-13233DF37C24} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {6EEB23DC-7063-4444-9AF8-90DF24F549C0} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {778289CA-31F7-4464-8C2A-612EE846F8A7} = {F61357CE-1CC2-410E-8776-B16EEBC98EB8} {9CC7814B-72A6-465B-A61C-57B512DEE303} = {F61357CE-1CC2-410E-8776-B16EEBC98EB8} {B7B1D395-4E06-4036-BE86-C216756B9367} = {A857AD10-40FF-4303-BEC2-FF1C58D5735E} - {F7B6A162-BC4D-4924-B16A-713F9B0344E7} = {B7B1D395-4E06-4036-BE86-C216756B9367} + {6E4285E7-7611-4440-A1B5-3513EBB13807} = {B7B1D395-4E06-4036-BE86-C216756B9367} {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1} = {B7B1D395-4E06-4036-BE86-C216756B9367} {B68C2B56-7581-46AE-B55D-D25DDFD3BFE3} = {B7B1D395-4E06-4036-BE86-C216756B9367} {A7337243-33B8-463A-87AD-944B75EFD820} = {B7B1D395-4E06-4036-BE86-C216756B9367} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8A9E878A-C296-4615-97AB-7A4505148872} + EndGlobalSection EndGlobal diff --git a/eShopOnContainers-ServicesAndWebApps.sln b/eShopOnContainers-ServicesAndWebApps.sln index c2de71c31..e4ddff1c2 100644 --- a/eShopOnContainers-ServicesAndWebApps.sln +++ b/eShopOnContainers-ServicesAndWebApps.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.13 +VisualStudioVersion = 15.0.27004.2009 MinimumVisualStudioVersion = 10.0.40219.1 Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}" EndProject @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject + Local.testsettings = Local.testsettings NuGet.config = NuGet.config EndProjectSection EndProject @@ -58,45 +59,43 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus", "src\BuildingBlo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusRabbitMQ", "src\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj", "{8088F3FC-6787-45FA-A924-816EC81CBFAC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationEventLogEF", "src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj", "{9EE28E45-1533-472B-8267-56C48855BA0E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationEventLogEF", "src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj", "{9EE28E45-1533-472B-8267-56C48855BA0E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HealthChecks", "HealthChecks", "{A81ECBC2-6B00-4DCD-8388-469174033379}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks\Microsoft.Extensions.HealthChecks.csproj", "{942ED6E8-0050-495F-A0EA-01E97F63760C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebStatus", "src\Web\WebStatus\WebStatus.csproj", "{C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebStatus\WebStatus.csproj", "{C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resilience", "Resilience", "{FBF43D93-F2E7-4FF8-B4AB-186895949B88}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resilience.Http", "src\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj", "{D1C47FF1-91F1-4CAF-9ABB-AD642B821502}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resilience.Http", "src\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj", "{D1C47FF1-91F1-4CAF-9ABB-AD642B821502}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{022E145D-1593-47EE-9608-8E323D3C63F5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{1A01AF82-6FCB-464C-B39C-F127AEBD315D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{1A01AF82-6FCB-464C-B39C-F127AEBD315D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HealthChecks", "src\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj", "{22A0F9C1-2D4A-4107-95B7-8459E6688BC5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{4BD76717-3102-4969-8C2C-BAAA3F0263B6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{4A980AC4-7205-46BF-8CCB-09E44D700FD4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GracePeriod", "GracePeriod", "{F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{41139F64-4046-4F16-96B7-D941D96FA9C6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GracePeriodManager", "src\Services\GracePeriod\GracePeriodManager\GracePeriodManager.csproj", "{F6E0F0DD-1400-43C3-B5E0-7CC325728C47}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{41139F64-4046-4F16-96B7-D941D96FA9C6}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{A5260DE0-1FDD-467E-9CC1-A028AB081CEE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "src\Services\Marketing\Marketing.API\Marketing.API.csproj", "{DF395F85-B010-465D-857A-7EBCC512C0C2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataProtection", "DataProtection", "{88B22DBB-AA8F-4290-A454-2C109352C345}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusServiceBus", "src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj", "{69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataProtection", "src\BuildingBlocks\DataProtection\DataProtection\DataProtection.csproj", "{23A33F9B-7672-426D-ACF9-FF8436ADC81A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.AzureStorage", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.AzureStorage\Microsoft.Extensions.HealthChecks.AzureStorage.csproj", "{768C887F-C229-4B94-ACD8-0C7F65686524}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{A5260DE0-1FDD-467E-9CC1-A028AB081CEE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadTest", "test\Services\LoadTest\LoadTest.csproj", "{969E793C-C413-490E-9C9D-B2B46DA5AF32}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "src\Services\Marketing\Marketing.API\Marketing.API.csproj", "{DF395F85-B010-465D-857A-7EBCC512C0C2}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{1815B651-941C-466B-AE33-D1D7EEB8F77F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBusServiceBus", "src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj", "{69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{15F4B3AA-89B6-4A0D-9051-414305974781}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -126,6 +125,54 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU + {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU {2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU {2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU @@ -400,54 +447,6 @@ Global {A579E108-5445-403D-A407-339AC4D1611B}.Release|x64.Build.0 = Release|Any CPU {A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.ActiveCfg = Release|Any CPU {A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU - {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU {F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1024,102 +1023,6 @@ Global {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x64.Build.0 = Release|Any CPU {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x86.ActiveCfg = Release|Any CPU {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x86.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|Any CPU.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|ARM.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|ARM.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhone.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhone.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x64.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x64.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x86.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x86.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|Any CPU.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|ARM.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|ARM.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhone.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhone.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x64.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x64.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x86.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x86.Build.0 = Release|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1168,54 +1071,6 @@ Global {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x64.Build.0 = Release|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x86.ActiveCfg = Release|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Release|x86.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|ARM.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|iPhone.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|x64.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|x64.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|x86.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.AppStore|x86.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|ARM.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|iPhone.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|x64.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|x64.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|x86.ActiveCfg = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Debug|x86.Build.0 = Debug|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|Any CPU.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|ARM.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|ARM.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|iPhone.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|iPhone.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|x64.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|x64.Build.0 = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|x86.ActiveCfg = Release|Any CPU - {23A33F9B-7672-426D-ACF9-FF8436ADC81A}.Release|x86.Build.0 = Release|Any CPU {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {DF395F85-B010-465D-857A-7EBCC512C0C2}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1312,6 +1167,150 @@ Global {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x64.Build.0 = Release|Any CPU {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x86.ActiveCfg = Release|Any CPU {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x86.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|ARM.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhone.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x64.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x64.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x86.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x86.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|Any CPU.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|ARM.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|ARM.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhone.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x64.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x64.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x86.ActiveCfg = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x86.Build.0 = Debug|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|Any CPU.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|Any CPU.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|ARM.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|ARM.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhone.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhone.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x64.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x64.Build.0 = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x86.ActiveCfg = Release|Any CPU + {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|Any CPU.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|ARM.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|ARM.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhone.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhone.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1349,15 +1348,17 @@ Global {1A01AF82-6FCB-464C-B39C-F127AEBD315D} = {022E145D-1593-47EE-9608-8E323D3C63F5} {22A0F9C1-2D4A-4107-95B7-8459E6688BC5} = {A81ECBC2-6B00-4DCD-8388-469174033379} {4BD76717-3102-4969-8C2C-BAAA3F0263B6} = {A81ECBC2-6B00-4DCD-8388-469174033379} - {4A980AC4-7205-46BF-8CCB-09E44D700FD4} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} - {F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47} = {F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E} {41139F64-4046-4F16-96B7-D941D96FA9C6} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {E7581357-FC34-474C-B8F5-307EE3CE05EF} = {41139F64-4046-4F16-96B7-D941D96FA9C6} - {88B22DBB-AA8F-4290-A454-2C109352C345} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} - {23A33F9B-7672-426D-ACF9-FF8436ADC81A} = {88B22DBB-AA8F-4290-A454-2C109352C345} {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {DF395F85-B010-465D-857A-7EBCC512C0C2} = {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} + {768C887F-C229-4B94-ACD8-0C7F65686524} = {A81ECBC2-6B00-4DCD-8388-469174033379} + {969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870} + {1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} + {15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9} EndGlobalSection EndGlobal diff --git a/eShopOnContainers-iOS.sln b/eShopOnContainers-iOS.sln index a6e889786..e220e7c4e 100644 --- a/eShopOnContainers-iOS.sln +++ b/eShopOnContainers-iOS.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject diff --git a/eShopOnContainers.sln b/eShopOnContainers.sln index 67c8993d6..1230adc43 100644 --- a/eShopOnContainers.sln +++ b/eShopOnContainers.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.13 +VisualStudioVersion = 15.0.27130.2003 MinimumVisualStudioVersion = 10.0.40219.1 Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}" ProjectSection(ProjectDependencies) = postProject @@ -40,6 +40,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A857AD10-40FF-4303-BEC2-FF1C58D5735E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{EF0337F2-ED00-4643-89FD-EE10863F1870}" + ProjectSection(SolutionItems) = preProject + test\Services\LoadTest\LoadTest.csproj = test\Services\LoadTest\LoadTest.csproj + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebMVC", "src\Web\WebMVC\WebMVC.csproj", "{F0333D8E-0B27-42B7-B2C6-78F3657624E2}" EndProject @@ -57,7 +60,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "src\Web\WebSPA\We EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{B7B1D395-4E06-4036-BE86-C216756B9367}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}" EndProject @@ -73,7 +76,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\Se EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UITests", "src\Mobile\eShopOnContainers\eShopOnContainers.UITests\eShopOnContainers.UITests.csproj", "{E3B18084-842C-4B80-8E4A-A7E588EC3137}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\UnitTest\UnitTest.csproj", "{7796F5D8-31FC-45A4-B673-19DE5BA194CF}" EndProject @@ -105,6 +108,28 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebSta EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{0CF40BE0-A463-4E4F-A29C-C7427D04DC4F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{72704C77-5C90-4705-B2A4-7A6E3B02FF08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "src\Services\Marketing\Marketing.API\Marketing.API.csproj", "{5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusServiceBus", "src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj", "{26906157-98E3-4DF8-80F6-866B9686887C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{8AE2AAA3-4507-4BEE-9250-4D16F87015B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.AzureStorage", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.AzureStorage\Microsoft.Extensions.HealthChecks.AzureStorage.csproj", "{1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{D5D3841D-F282-4E60-B9CB-267A1BF2D893}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{2A795FEA-2EB7-45F5-9B30-35E0810CB238}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{3E51A82A-5DE1-482E-BA46-F4FF3138B41A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1466,6 +1491,342 @@ Global {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x64.Build.0 = Release|Any CPU {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.ActiveCfg = Release|Any CPU {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|ARM.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|x64.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|x64.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|x86.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.AppStore|x86.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|ARM.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|iPhone.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|x64.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|x64.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|x86.ActiveCfg = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Debug|x86.Build.0 = Debug|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|Any CPU.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|ARM.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|ARM.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|iPhone.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|iPhone.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|x64.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|x64.Build.0 = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|x86.ActiveCfg = Release|Any CPU + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Release|x86.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|ARM.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|iPhone.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|x64.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|x64.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|x86.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.AppStore|x86.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|ARM.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|iPhone.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|x64.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|x64.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|x86.ActiveCfg = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Debug|x86.Build.0 = Debug|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|Any CPU.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|ARM.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|ARM.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|iPhone.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|iPhone.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|x64.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|x64.Build.0 = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|x86.ActiveCfg = Release|Any CPU + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5}.Release|x86.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|ARM.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|iPhone.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|x64.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|x64.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|x86.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.AppStore|x86.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|ARM.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|iPhone.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|x64.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|x64.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|x86.ActiveCfg = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Debug|x86.Build.0 = Debug|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|Any CPU.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|ARM.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|ARM.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|iPhone.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|iPhone.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|x64.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|x64.Build.0 = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|x86.ActiveCfg = Release|Any CPU + {26906157-98E3-4DF8-80F6-866B9686887C}.Release|x86.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|ARM.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|iPhone.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|x64.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|x64.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|x86.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.AppStore|x86.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|ARM.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|iPhone.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|x64.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|x64.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|x86.ActiveCfg = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Debug|x86.Build.0 = Debug|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|Any CPU.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|ARM.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|ARM.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|iPhone.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|iPhone.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|x64.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|x64.Build.0 = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|x86.ActiveCfg = Release|Any CPU + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4}.Release|x86.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|ARM.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|iPhone.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|x64.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|x64.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|x86.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.AppStore|x86.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|ARM.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|ARM.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|iPhone.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|x64.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|x86.ActiveCfg = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Debug|x86.Build.0 = Debug|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|Any CPU.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|ARM.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|ARM.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|iPhone.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|iPhone.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x64.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x64.Build.0 = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x86.ActiveCfg = Release|Any CPU + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x86.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|ARM.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|iPhone.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|x64.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|x64.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|x86.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.AppStore|x86.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|ARM.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|ARM.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|iPhone.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|x64.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|x64.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Debug|x86.Build.0 = Debug|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|Any CPU.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|ARM.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|ARM.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|iPhone.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|iPhone.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x64.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x64.Build.0 = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x86.ActiveCfg = Release|Any CPU + {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x86.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|Any CPU.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|ARM.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|ARM.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhone.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhone.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x64.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x64.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x86.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1514,5 +1875,19 @@ Global {D92EB452-7A72-4B26-A8ED-0204CD376BC4} = {D13768ED-5AF1-4E09-96DD-FF6E7A2E5E06} {23FB706A-2701-41E9-8BF9-28936001CA41} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04} {6CCC4F1B-602D-4FAD-91A7-002CC86C7612} = {96CE8CE7-BC97-4A53-899F-5EB63D7BBF7B} + {0CF40BE0-A463-4E4F-A29C-C7427D04DC4F} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} + {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800} = {0CF40BE0-A463-4E4F-A29C-C7427D04DC4F} + {72704C77-5C90-4705-B2A4-7A6E3B02FF08} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} + {5E319B6A-9F04-4113-ABF9-AB8CD1F7A0B5} = {72704C77-5C90-4705-B2A4-7A6E3B02FF08} + {26906157-98E3-4DF8-80F6-866B9686887C} = {B473B70F-0796-4862-B1AD-BB742D93B868} + {8AE2AAA3-4507-4BEE-9250-4D16F87015B4} = {B473B70F-0796-4862-B1AD-BB742D93B868} + {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD} = {96CE8CE7-BC97-4A53-899F-5EB63D7BBF7B} + {D5D3841D-F282-4E60-B9CB-267A1BF2D893} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} + {2A795FEA-2EB7-45F5-9B30-35E0810CB238} = {D5D3841D-F282-4E60-B9CB-267A1BF2D893} + {3E51A82A-5DE1-482E-BA46-F4FF3138B41A} = {1EF3AC0F-F27C-46DD-AC53-D762D2C11C45} + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98} = {3E51A82A-5DE1-482E-BA46-F4FF3138B41A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A6439048-F270-4A9E-A350-63C7BE2BB322} EndGlobalSection EndGlobal diff --git a/global.json b/global.json index 38fed7db6..2ab18dceb 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version":"1.0.4" + "version":"2.1.2" } } \ No newline at end of file diff --git a/img/appinsights/appinsights-loggerfactory.PNG b/img/appinsights/appinsights-loggerfactory.PNG new file mode 100644 index 000000000..151b6f812 Binary files /dev/null and b/img/appinsights/appinsights-loggerfactory.PNG differ diff --git a/img/appinsights/appinsights-register.PNG b/img/appinsights/appinsights-register.PNG new file mode 100644 index 000000000..6092680eb Binary files /dev/null and b/img/appinsights/appinsights-register.PNG differ diff --git a/img/appinsights/appinsights-screenshot.PNG b/img/appinsights/appinsights-screenshot.PNG new file mode 100644 index 000000000..0d4bb8798 Binary files /dev/null and b/img/appinsights/appinsights-screenshot.PNG differ diff --git a/img/appinsights/create-insights.PNG b/img/appinsights/create-insights.PNG new file mode 100644 index 000000000..535ae4b98 Binary files /dev/null and b/img/appinsights/create-insights.PNG differ diff --git a/img/appinsights/settings-insights.PNG b/img/appinsights/settings-insights.PNG new file mode 100644 index 000000000..16e6323d3 Binary files /dev/null and b/img/appinsights/settings-insights.PNG differ diff --git a/img/appinsights/useappinsights-program.PNG b/img/appinsights/useappinsights-program.PNG new file mode 100644 index 000000000..f0ec24e54 Binary files /dev/null and b/img/appinsights/useappinsights-program.PNG differ diff --git a/img/eShopOnContainers-Architecture-With-Azure-API-Management.png b/img/eShopOnContainers-Architecture-With-Azure-API-Management.png new file mode 100644 index 000000000..434740d60 Binary files /dev/null and b/img/eShopOnContainers-Architecture-With-Azure-API-Management.png differ diff --git a/img/eShopOnContainers_Architecture_Diagram - Old2.png b/img/eShopOnContainers_Architecture_Diagram - Old2.png new file mode 100644 index 000000000..ca9e986b5 Binary files /dev/null and b/img/eShopOnContainers_Architecture_Diagram - Old2.png differ diff --git a/img/eShopOnContainers_Architecture_Diagram - Old3.png b/img/eShopOnContainers_Architecture_Diagram - Old3.png new file mode 100644 index 000000000..91609b987 Binary files /dev/null and b/img/eShopOnContainers_Architecture_Diagram - Old3.png differ diff --git a/img/eShopOnContainers_Architecture_Diagram.png b/img/eShopOnContainers_Architecture_Diagram.png index ca9e986b5..991691e4a 100644 Binary files a/img/eShopOnContainers_Architecture_Diagram.png and b/img/eShopOnContainers_Architecture_Diagram.png differ diff --git a/img/ebook_arch_dev_microservices_containers_cover.png b/img/ebook_arch_dev_microservices_containers_cover.png index 3677dafd2..261aa566c 100644 Binary files a/img/ebook_arch_dev_microservices_containers_cover.png and b/img/ebook_arch_dev_microservices_containers_cover.png differ diff --git a/img/ebook_arch_dev_microservices_containers_cover_V1.png b/img/ebook_arch_dev_microservices_containers_cover_V1.png new file mode 100644 index 000000000..3677dafd2 Binary files /dev/null and b/img/ebook_arch_dev_microservices_containers_cover_V1.png differ diff --git a/img/exploring-to-production-ready.png b/img/exploring-to-production-ready.png index f6d1dd672..b2fedbdfc 100644 Binary files a/img/exploring-to-production-ready.png and b/img/exploring-to-production-ready.png differ diff --git a/img/k8s/deploy_script_task.png b/img/k8s/deploy_script_task.png deleted file mode 100644 index 917625f3e..000000000 Binary files a/img/k8s/deploy_script_task.png and /dev/null differ diff --git a/img/loadtests/k8ssettings.PNG b/img/loadtests/k8ssettings.PNG new file mode 100644 index 000000000..6bd6cb058 Binary files /dev/null and b/img/loadtests/k8ssettings.PNG differ diff --git a/img/loadtests/loadtestproj_dir.PNG b/img/loadtests/loadtestproj_dir.PNG new file mode 100644 index 000000000..d880e9ecc Binary files /dev/null and b/img/loadtests/loadtestproj_dir.PNG differ diff --git a/img/loadtests/runloadtest.PNG b/img/loadtests/runloadtest.PNG new file mode 100644 index 000000000..8c2cbdec2 Binary files /dev/null and b/img/loadtests/runloadtest.PNG differ diff --git a/img/loadtests/sfmanifestsettings.PNG b/img/loadtests/sfmanifestsettings.PNG new file mode 100644 index 000000000..b360fef63 Binary files /dev/null and b/img/loadtests/sfmanifestsettings.PNG differ diff --git a/img/sf/cloud-config-idsrv.PNG b/img/sf/cloud-config-idsrv.PNG new file mode 100644 index 000000000..86fbe6637 Binary files /dev/null and b/img/sf/cloud-config-idsrv.PNG differ diff --git a/img/sf/cloud-config-mvc.PNG b/img/sf/cloud-config-mvc.PNG new file mode 100644 index 000000000..def121836 Binary files /dev/null and b/img/sf/cloud-config-mvc.PNG differ diff --git a/img/sf/cloud-config-spa.PNG b/img/sf/cloud-config-spa.PNG new file mode 100644 index 000000000..17809ea2d Binary files /dev/null and b/img/sf/cloud-config-spa.PNG differ diff --git a/img/sf/cloud-config.PNG b/img/sf/cloud-config.PNG new file mode 100644 index 000000000..420b95e1c Binary files /dev/null and b/img/sf/cloud-config.PNG differ diff --git a/img/sf/cloud_publishProfile.PNG b/img/sf/cloud_publishProfile.PNG new file mode 100644 index 000000000..edd5c53e5 Binary files /dev/null and b/img/sf/cloud_publishProfile.PNG differ diff --git a/img/sf/create-kv.PNG b/img/sf/create-kv.PNG new file mode 100644 index 000000000..f2c5f91c3 Binary files /dev/null and b/img/sf/create-kv.PNG differ diff --git a/img/sf/explorer-apps-status.PNG b/img/sf/explorer-apps-status.PNG new file mode 100644 index 000000000..f748cbaab Binary files /dev/null and b/img/sf/explorer-apps-status.PNG differ diff --git a/img/sf/explorer-deployment-status.PNG b/img/sf/explorer-deployment-status.PNG new file mode 100644 index 000000000..2697a6374 Binary files /dev/null and b/img/sf/explorer-deployment-status.PNG differ diff --git a/img/sf/install-cert.PNG b/img/sf/install-cert.PNG new file mode 100644 index 000000000..f5c798199 Binary files /dev/null and b/img/sf/install-cert.PNG differ diff --git a/img/sf/publish-button.PNG b/img/sf/publish-button.PNG new file mode 100644 index 000000000..8f84091bc Binary files /dev/null and b/img/sf/publish-button.PNG differ diff --git a/img/sf/publish-window.PNG b/img/sf/publish-window.PNG new file mode 100644 index 000000000..4c27b8e29 Binary files /dev/null and b/img/sf/publish-window.PNG differ diff --git a/img/sf/set-instrumentationkey.PNG b/img/sf/set-instrumentationkey.PNG new file mode 100644 index 000000000..1d7105a30 Binary files /dev/null and b/img/sf/set-instrumentationkey.PNG differ diff --git a/img/sf/sf-directory.PNG b/img/sf/sf-directory.PNG new file mode 100644 index 000000000..f6b518a5d Binary files /dev/null and b/img/sf/sf-directory.PNG differ diff --git a/k8s/.kube/schema/v1.5.3/api/v1/schema.json b/k8s/.kube/schema/v1.6.6/api/v1/schema.json similarity index 88% rename from k8s/.kube/schema/v1.5.3/api/v1/schema.json rename to k8s/.kube/schema/v1.6.6/api/v1/schema.json index 2143db573..1fb315f47 100644 --- a/k8s/.kube/schema/v1.5.3/api/v1/schema.json +++ b/k8s/.kube/schema/v1.6.6/api/v1/schema.json @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "v1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/api/v1", "info": { "title": "", @@ -107,7 +107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -231,7 +231,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -318,7 +318,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ConfigMap", "nickname": "deletecollectionNamespacedConfigMap", @@ -359,7 +359,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -384,7 +384,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -403,7 +403,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchNamespacedConfigMapList", @@ -444,7 +444,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -469,7 +469,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -515,7 +515,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -622,7 +622,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -665,7 +665,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ConfigMap", "nickname": "deleteNamespacedConfigMap", @@ -698,7 +698,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -723,7 +731,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -742,7 +750,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ConfigMap", "nickname": "watchNamespacedConfigMap", @@ -783,7 +791,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -816,7 +824,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -878,7 +886,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -916,7 +924,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchConfigMapListForAllNamespaces", @@ -957,7 +965,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -974,7 +982,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1036,7 +1044,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1123,7 +1131,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Endpoints", "nickname": "deletecollectionNamespacedEndpoints", @@ -1164,7 +1172,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1189,7 +1197,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1208,7 +1216,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchNamespacedEndpointsList", @@ -1249,7 +1257,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1274,7 +1282,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1320,7 +1328,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1427,7 +1435,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1470,7 +1478,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete Endpoints", "nickname": "deleteNamespacedEndpoints", @@ -1503,7 +1511,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1528,7 +1544,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1547,7 +1563,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Endpoints", "nickname": "watchNamespacedEndpoints", @@ -1588,7 +1604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1621,7 +1637,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1683,7 +1699,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1721,7 +1737,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchEndpointsListForAllNamespaces", @@ -1762,7 +1778,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1779,7 +1795,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1841,7 +1857,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1928,7 +1944,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Event", "nickname": "deletecollectionNamespacedEvent", @@ -1969,7 +1985,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1994,7 +2010,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2013,7 +2029,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchNamespacedEventList", @@ -2054,7 +2070,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2079,7 +2095,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2125,7 +2141,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2232,7 +2248,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2275,7 +2291,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete an Event", "nickname": "deleteNamespacedEvent", @@ -2308,7 +2324,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2333,7 +2357,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2352,7 +2376,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Event", "nickname": "watchNamespacedEvent", @@ -2393,7 +2417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2426,7 +2450,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2488,7 +2512,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2526,7 +2550,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchEventListForAllNamespaces", @@ -2567,7 +2591,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2584,7 +2608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2646,7 +2670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2733,7 +2757,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of LimitRange", "nickname": "deletecollectionNamespacedLimitRange", @@ -2774,7 +2798,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2799,7 +2823,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2818,7 +2842,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchNamespacedLimitRangeList", @@ -2859,7 +2883,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2930,7 +2954,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3037,7 +3061,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3080,7 +3104,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a LimitRange", "nickname": "deleteNamespacedLimitRange", @@ -3113,7 +3137,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3138,7 +3170,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3157,7 +3189,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind LimitRange", "nickname": "watchNamespacedLimitRange", @@ -3198,7 +3230,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3231,7 +3263,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3293,7 +3325,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3331,7 +3363,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchLimitRangeListForAllNamespaces", @@ -3372,7 +3404,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3389,7 +3421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3451,7 +3483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3520,77 +3552,6 @@ "consumes": [ "*/*" ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Namespace", - "nickname": "deletecollectionNamespace", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] } ] }, @@ -3599,7 +3560,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Namespace", "nickname": "watchNamespaceList", @@ -3640,7 +3601,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3657,7 +3618,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3703,7 +3664,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3794,7 +3755,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3829,7 +3790,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Namespace", "nickname": "deleteNamespace", @@ -3862,7 +3823,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3879,7 +3848,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3898,7 +3867,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Namespace", "nickname": "watchNamespace", @@ -3939,7 +3908,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3964,7 +3933,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4138,7 +4107,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4220,7 +4189,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4291,7 +4260,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Node", "nickname": "deletecollectionNode", @@ -4332,7 +4301,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4349,7 +4318,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4368,7 +4337,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Node", "nickname": "watchNodeList", @@ -4409,7 +4378,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4426,7 +4395,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4472,7 +4441,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -4563,7 +4532,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4598,7 +4567,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Node", "nickname": "deleteNode", @@ -4631,7 +4600,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -4648,7 +4625,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4667,7 +4644,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Node", "nickname": "watchNode", @@ -4708,7 +4685,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4733,7 +4710,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4843,6 +4820,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNodeWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5005,6 +5012,28 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNode", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5598,7 +5627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -5680,7 +5709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5767,7 +5796,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolumeClaim", "nickname": "deletecollectionNamespacedPersistentVolumeClaim", @@ -5808,7 +5837,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5833,7 +5862,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5852,7 +5881,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaimList", @@ -5893,7 +5922,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5918,7 +5947,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5964,7 +5993,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6071,7 +6100,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6114,7 +6143,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolumeClaim", "nickname": "deleteNamespacedPersistentVolumeClaim", @@ -6147,7 +6176,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6172,7 +6209,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6191,7 +6228,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaim", @@ -6232,7 +6269,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6265,7 +6302,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6327,7 +6364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6365,7 +6402,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchPersistentVolumeClaimListForAllNamespaces", @@ -6406,7 +6443,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6423,7 +6460,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6560,7 +6597,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6650,7 +6687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6721,7 +6758,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolume", "nickname": "deletecollectionPersistentVolume", @@ -6762,7 +6799,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6779,7 +6816,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6798,7 +6835,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolume", "nickname": "watchPersistentVolumeList", @@ -6839,7 +6876,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6856,7 +6893,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6902,7 +6939,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6993,7 +7030,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7028,7 +7065,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolume", "nickname": "deletePersistentVolume", @@ -7061,7 +7098,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7078,7 +7123,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7097,7 +7142,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolume", "nickname": "watchPersistentVolume", @@ -7138,7 +7183,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7163,7 +7208,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7284,7 +7329,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7366,7 +7411,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7453,7 +7498,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Pod", "nickname": "deletecollectionNamespacedPod", @@ -7494,7 +7539,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7519,7 +7564,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7538,7 +7583,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchNamespacedPodList", @@ -7579,7 +7624,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7604,7 +7649,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7650,7 +7695,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7757,7 +7802,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7800,7 +7845,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Pod", "nickname": "deleteNamespacedPod", @@ -7833,7 +7878,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7858,7 +7911,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7877,7 +7930,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Pod", "nickname": "watchNamespacedPod", @@ -7918,7 +7971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7951,7 +8004,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -8085,6 +8138,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPodWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8295,6 +8386,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPod", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8433,7 +8554,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8471,7 +8592,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchPodListForAllNamespaces", @@ -8512,7 +8633,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8529,7 +8650,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -9025,14 +9146,6 @@ "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "query", - "name": "sinceTime", - "description": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "required": false, - "allowMultiple": false - }, { "type": "boolean", "paramType": "query", @@ -9103,6 +9216,14 @@ "summary": "connect GET requests to portforward of Pod", "nickname": "connectGetNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9133,6 +9254,14 @@ "summary": "connect POST requests to portforward of Pod", "nickname": "connectPostNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9796,7 +9925,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -9886,7 +10015,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -9973,7 +10102,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PodTemplate", "nickname": "deletecollectionNamespacedPodTemplate", @@ -10014,7 +10143,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10039,7 +10168,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10058,7 +10187,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchNamespacedPodTemplateList", @@ -10099,7 +10228,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10124,7 +10253,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10170,7 +10299,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -10277,7 +10406,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -10320,7 +10449,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PodTemplate", "nickname": "deleteNamespacedPodTemplate", @@ -10353,7 +10482,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -10378,7 +10515,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10397,7 +10534,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PodTemplate", "nickname": "watchNamespacedPodTemplate", @@ -10438,7 +10575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10471,7 +10608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10533,7 +10670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10571,7 +10708,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchPodTemplateListForAllNamespaces", @@ -10612,7 +10749,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10629,7 +10766,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10691,7 +10828,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10778,7 +10915,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicationController", "nickname": "deletecollectionNamespacedReplicationController", @@ -10819,7 +10956,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10844,7 +10981,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10863,7 +11000,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchNamespacedReplicationControllerList", @@ -10904,7 +11041,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10929,7 +11066,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10975,7 +11112,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -11082,7 +11219,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11125,7 +11262,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicationController", "nickname": "deleteNamespacedReplicationController", @@ -11158,7 +11295,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -11183,7 +11328,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11202,7 +11347,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicationController", "nickname": "watchNamespacedReplicationController", @@ -11243,7 +11388,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11276,7 +11421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11338,7 +11483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11376,7 +11521,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchReplicationControllerListForAllNamespaces", @@ -11417,7 +11562,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11434,7 +11579,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11571,7 +11716,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11736,7 +11881,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11826,7 +11971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11913,7 +12058,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ResourceQuota", "nickname": "deletecollectionNamespacedResourceQuota", @@ -11954,7 +12099,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11979,7 +12124,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11998,7 +12143,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchNamespacedResourceQuotaList", @@ -12039,7 +12184,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12064,7 +12209,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12110,7 +12255,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -12217,7 +12362,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12260,7 +12405,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ResourceQuota", "nickname": "deleteNamespacedResourceQuota", @@ -12293,7 +12438,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -12318,7 +12471,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12337,7 +12490,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ResourceQuota", "nickname": "watchNamespacedResourceQuota", @@ -12378,7 +12531,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12411,7 +12564,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12473,7 +12626,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12511,7 +12664,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchResourceQuotaListForAllNamespaces", @@ -12552,7 +12705,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12569,7 +12722,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12706,7 +12859,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12796,7 +12949,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12883,7 +13036,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Secret", "nickname": "deletecollectionNamespacedSecret", @@ -12924,7 +13077,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12949,7 +13102,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12968,7 +13121,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchNamespacedSecretList", @@ -13009,7 +13162,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13034,7 +13187,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13080,7 +13233,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13187,7 +13340,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -13230,7 +13383,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Secret", "nickname": "deleteNamespacedSecret", @@ -13263,7 +13416,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -13288,7 +13449,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13307,7 +13468,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Secret", "nickname": "watchNamespacedSecret", @@ -13348,7 +13509,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13381,7 +13542,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13443,7 +13604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13481,7 +13642,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchSecretListForAllNamespaces", @@ -13522,7 +13683,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13539,7 +13700,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13601,7 +13762,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13688,7 +13849,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ServiceAccount", "nickname": "deletecollectionNamespacedServiceAccount", @@ -13729,7 +13890,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13754,7 +13915,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13773,7 +13934,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchNamespacedServiceAccountList", @@ -13814,7 +13975,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13839,7 +14000,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13885,7 +14046,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13992,7 +14153,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14035,7 +14196,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ServiceAccount", "nickname": "deleteNamespacedServiceAccount", @@ -14068,7 +14229,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -14093,7 +14262,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14112,7 +14281,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ServiceAccount", "nickname": "watchNamespacedServiceAccount", @@ -14153,7 +14322,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14186,7 +14355,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14248,7 +14417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14286,7 +14455,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchServiceAccountListForAllNamespaces", @@ -14327,7 +14496,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14344,7 +14513,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14406,7 +14575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14499,7 +14668,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchNamespacedServiceList", @@ -14540,7 +14709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14565,7 +14734,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14611,7 +14780,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -14718,7 +14887,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14761,7 +14930,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Service", "nickname": "deleteNamespacedService", @@ -14795,7 +14964,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14814,7 +14983,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Service", "nickname": "watchNamespacedService", @@ -14855,7 +15024,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14888,7 +15057,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -15022,6 +15191,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedServiceWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15232,6 +15439,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedService", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15370,7 +15607,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15408,7 +15645,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchServiceListForAllNamespaces", @@ -15449,7 +15686,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15466,7 +15703,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -16119,7 +16356,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -16168,7 +16405,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -16248,12 +16485,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -16318,6 +16553,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -16371,7 +16610,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16383,8 +16622,8 @@ } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -16464,7 +16703,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -16498,8 +16737,8 @@ } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -16511,7 +16750,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -16527,7 +16766,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -16537,8 +16776,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -16556,7 +16795,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -16567,8 +16806,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -16585,8 +16824,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -16600,14 +16839,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -16628,7 +16867,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -16646,6 +16889,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1.EndpointsList": { "id": "v1.EndpointsList", "description": "EndpointsList is a list of endpoints.", @@ -16662,7 +16909,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16792,7 +17039,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16842,12 +17089,10 @@ }, "firstTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)" }, "lastTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the most recent occurrence of this event was recorded." }, "count": { @@ -16891,7 +17136,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16987,7 +17232,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17068,7 +17313,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17124,7 +17369,40 @@ }, "unschedulable": { "type": "boolean", - "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"" + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" + }, + "taints": { + "type": "array", + "items": { + "$ref": "v1.Taint" + }, + "description": "If specified, the node's taints." + } + } + }, + "v1.Taint": { + "id": "v1.Taint", + "description": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "required": [ + "key", + "effect" + ], + "properties": { + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "value": { + "type": "string", + "description": "Required. The taint value corresponding to the taint key." + }, + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "timeAdded": { + "type": "string", + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints." } } }, @@ -17207,12 +17485,10 @@ }, "lastHeartbeatTime": { "type": "string", - "format": "date-time", "description": "Last time we got an update on a given condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transit from one status to another." }, "reason": { @@ -17384,7 +17660,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17434,7 +17710,7 @@ "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "A label query over volumes to consider for binding." }, "resources": { @@ -17444,6 +17720,10 @@ "volumeName": { "type": "string", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim." + }, + "storageClassName": { + "type": "string", + "description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1" } } }, @@ -17451,8 +17731,8 @@ "id": "v1.PersistentVolumeAccessMode", "properties": {} }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -17462,14 +17742,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -17544,7 +17824,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17658,6 +17938,14 @@ "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + }, "accessModes": { "type": "array", "items": { @@ -17672,6 +17960,10 @@ "persistentVolumeReclaimPolicy": { "type": "string", "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy" + }, + "storageClassName": { + "type": "string", + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass." } } }, @@ -17872,6 +18164,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -18125,6 +18424,78 @@ } } }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.PersistentVolumeStatus": { "id": "v1.PersistentVolumeStatus", "description": "PersistentVolumeStatus is the current status of a persistent volume.", @@ -18159,7 +18530,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -18211,6 +18582,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -18234,7 +18612,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -18248,6 +18626,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -18282,6 +18664,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -18387,6 +18784,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -18434,12 +18843,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -18578,12 +18991,110 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -18627,6 +19138,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -18659,7 +19177,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -18714,6 +19236,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -18771,6 +19339,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -18788,6 +19360,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -19076,6 +19652,224 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, "v1.PodStatus": { "id": "v1.PodStatus", "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", @@ -19109,15 +19903,25 @@ }, "startTime": { "type": "string", - "format": "date-time", "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod." }, + "initContainerStatuses": { + "type": "array", + "items": { + "$ref": "v1.ContainerStatus" + }, + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, "containerStatuses": { "type": "array", "items": { "$ref": "v1.ContainerStatus" }, "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, + "qosClass": { + "type": "string", + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md" } } }, @@ -19139,12 +19943,10 @@ }, "lastProbeTime": { "type": "string", - "format": "date-time", "description": "Last time we probed the condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -19241,7 +20043,6 @@ "properties": { "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container was last (re-)started" } } @@ -19273,12 +20074,10 @@ }, "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which previous execution of the container started" }, "finishedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container last terminated" }, "containerID": { @@ -19325,7 +20124,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19389,7 +20188,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19510,7 +20309,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -19594,7 +20392,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19683,7 +20481,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19741,7 +20539,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19782,6 +20580,10 @@ "$ref": "v1.LocalObjectReference" }, "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret" + }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level." } } }, @@ -19801,7 +20603,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19842,9 +20644,6 @@ "v1.ServiceSpec": { "id": "v1.ServiceSpec", "description": "ServiceSpec describes the attributes that a user creates on a service.", - "required": [ - "ports" - ], "properties": { "ports": { "type": "array", @@ -19968,8 +20767,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -19991,19 +20790,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -20017,6 +20817,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json b/k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json similarity index 83% rename from k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json rename to k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json index 7f07b38b6..a112d2e67 100644 --- a/k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json +++ b/k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "extensions/v1beta1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/apis/extensions/v1beta1", "info": { "title": "", @@ -54,7 +54,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -141,7 +141,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of DaemonSet", "nickname": "deletecollectionNamespacedDaemonSet", @@ -182,7 +182,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -207,7 +207,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -226,7 +226,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchNamespacedDaemonSetList", @@ -267,7 +267,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -292,7 +292,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -338,7 +338,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -445,7 +445,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -488,7 +488,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a DaemonSet", "nickname": "deleteNamespacedDaemonSet", @@ -521,7 +521,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -546,7 +554,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -565,7 +573,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind DaemonSet", "nickname": "watchNamespacedDaemonSet", @@ -606,7 +614,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -639,7 +647,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -701,7 +709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -739,7 +747,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchDaemonSetListForAllNamespaces", @@ -780,7 +788,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -797,7 +805,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -934,7 +942,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1024,7 +1032,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1111,7 +1119,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Deployment", "nickname": "deletecollectionNamespacedDeployment", @@ -1152,7 +1160,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1177,7 +1185,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1196,7 +1204,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchNamespacedDeploymentList", @@ -1237,7 +1245,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1262,7 +1270,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1308,7 +1316,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1415,7 +1423,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1458,7 +1466,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Deployment", "nickname": "deleteNamespacedDeployment", @@ -1491,7 +1499,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1516,7 +1532,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1535,7 +1551,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Deployment", "nickname": "watchNamespacedDeployment", @@ -1576,7 +1592,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1609,7 +1625,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1671,7 +1687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1709,7 +1725,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchDeploymentListForAllNamespaces", @@ -1750,7 +1766,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1767,7 +1783,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1965,7 +1981,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2130,7 +2146,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2175,14 +2191,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listNamespacedHorizontalPodAutoscaler", + "summary": "list or watch objects of kind Ingress", + "nickname": "listNamespacedIngress", "parameters": [ { "type": "string", @@ -2220,7 +2236,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2245,7 +2261,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2260,10 +2276,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "POST", - "summary": "create a HorizontalPodAutoscaler", - "nickname": "createNamespacedHorizontalPodAutoscaler", + "summary": "create an Ingress", + "nickname": "createNamespacedIngress", "parameters": [ { "type": "string", @@ -2274,7 +2290,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2294,7 +2310,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2307,10 +2323,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of HorizontalPodAutoscaler", - "nickname": "deletecollectionNamespacedHorizontalPodAutoscaler", + "summary": "delete collection of Ingress", + "nickname": "deletecollectionNamespacedIngress", "parameters": [ { "type": "string", @@ -2348,7 +2364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2373,7 +2389,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2388,14 +2404,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscalerList", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchNamespacedIngressList", "parameters": [ { "type": "string", @@ -2433,7 +2449,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2458,7 +2474,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2475,14 +2491,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscaler", + "summary": "read the specified Ingress", + "nickname": "readNamespacedIngress", "parameters": [ { "type": "string", @@ -2504,7 +2520,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2520,7 +2536,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2529,7 +2545,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2542,10 +2558,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscaler", + "summary": "replace the specified Ingress", + "nickname": "replaceNamespacedIngress", "parameters": [ { "type": "string", @@ -2556,7 +2572,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2575,7 +2591,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2584,7 +2600,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2597,10 +2613,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscaler", + "summary": "partially update the specified Ingress", + "nickname": "patchNamespacedIngress", "parameters": [ { "type": "string", @@ -2611,7 +2627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2630,7 +2646,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2639,7 +2655,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2654,10 +2670,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete a HorizontalPodAutoscaler", - "nickname": "deleteNamespacedHorizontalPodAutoscaler", + "summary": "delete an Ingress", + "nickname": "deleteNamespacedIngress", "parameters": [ { "type": "string", @@ -2687,7 +2703,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2703,7 +2727,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2712,7 +2736,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2727,14 +2751,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscaler", + "summary": "watch changes to an object of kind Ingress", + "nickname": "watchNamespacedIngress", "parameters": [ { "type": "string", @@ -2772,7 +2796,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2796,7 +2820,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2805,7 +2829,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2822,14 +2846,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listHorizontalPodAutoscalerForAllNamespaces", + "summary": "list or watch objects of kind Ingress", + "nickname": "listIngressForAllNamespaces", "parameters": [ { "type": "string", @@ -2867,7 +2891,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2901,14 +2925,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchHorizontalPodAutoscalerListForAllNamespaces", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchIngressListForAllNamespaces", "parameters": [ { "type": "string", @@ -2946,7 +2970,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2963,7 +2987,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2980,14 +3004,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read status of the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscalerStatus", + "summary": "read status of the specified Ingress", + "nickname": "readNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3009,7 +3033,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3018,7 +3042,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3031,10 +3055,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace status of the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscalerStatus", + "summary": "replace status of the specified Ingress", + "nickname": "replaceNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3045,7 +3069,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -3064,7 +3088,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3073,7 +3097,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3086,10 +3110,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update status of the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscalerStatus", + "summary": "partially update status of the specified Ingress", + "nickname": "patchNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3100,7 +3124,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3119,7 +3143,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3128,7 +3152,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3145,14 +3169,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listNamespacedIngress", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3190,7 +3214,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3215,7 +3239,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3230,10 +3254,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "POST", - "summary": "create an Ingress", - "nickname": "createNamespacedIngress", + "summary": "create a NetworkPolicy", + "nickname": "createNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3244,7 +3268,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3264,7 +3288,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3277,10 +3301,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of Ingress", - "nickname": "deletecollectionNamespacedIngress", + "summary": "delete collection of NetworkPolicy", + "nickname": "deletecollectionNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3318,7 +3342,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3343,7 +3367,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3358,14 +3382,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchNamespacedIngressList", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicyList", "parameters": [ { "type": "string", @@ -3403,7 +3427,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3428,7 +3452,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3445,14 +3469,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "GET", - "summary": "read the specified Ingress", - "nickname": "readNamespacedIngress", + "summary": "read the specified NetworkPolicy", + "nickname": "readNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3474,7 +3498,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3490,7 +3514,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3499,7 +3523,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3512,10 +3536,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PUT", - "summary": "replace the specified Ingress", - "nickname": "replaceNamespacedIngress", + "summary": "replace the specified NetworkPolicy", + "nickname": "replaceNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3526,7 +3550,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3545,7 +3569,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3554,7 +3578,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3567,10 +3591,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PATCH", - "summary": "partially update the specified Ingress", - "nickname": "patchNamespacedIngress", + "summary": "partially update the specified NetworkPolicy", + "nickname": "patchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3581,7 +3605,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3600,7 +3624,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3609,7 +3633,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3624,10 +3648,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete an Ingress", - "nickname": "deleteNamespacedIngress", + "summary": "delete a NetworkPolicy", + "nickname": "deleteNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3657,7 +3681,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3673,7 +3705,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3682,7 +3714,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3697,14 +3729,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind Ingress", - "nickname": "watchNamespacedIngress", + "summary": "watch changes to an object of kind NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3742,7 +3774,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3766,7 +3798,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3775,7 +3807,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3792,14 +3824,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/ingresses", + "path": "/apis/extensions/v1beta1/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listIngressForAllNamespaces", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNetworkPolicyForAllNamespaces", "parameters": [ { "type": "string", @@ -3837,7 +3869,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3854,7 +3886,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3871,14 +3903,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/ingresses", + "path": "/apis/extensions/v1beta1/watch/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchIngressListForAllNamespaces", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNetworkPolicyListForAllNamespaces", "parameters": [ { "type": "string", @@ -3916,7 +3948,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3933,7 +3965,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3950,14 +3982,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", + "path": "/apis/extensions/v1beta1/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicyList", "method": "GET", - "summary": "read status of the specified Ingress", - "nickname": "readNamespacedIngressStatus", + "summary": "list or watch objects of kind PodSecurityPolicy", + "nickname": "listPodSecurityPolicy", "parameters": [ { "type": "string", @@ -3969,18 +4001,42 @@ }, { "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, "allowMultiple": false }, { "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, "allowMultiple": false } ], @@ -3988,23 +4044,25 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicyList" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "consumes": [ "*/*" ] }, { - "type": "v1beta1.Ingress", - "method": "PUT", - "summary": "replace status of the specified Ingress", - "nickname": "replaceNamespacedIngressStatus", + "type": "v1beta1.PodSecurityPolicy", + "method": "POST", + "summary": "create a PodSecurityPolicy", + "nickname": "createPodSecurityPolicy", "parameters": [ { "type": "string", @@ -4015,35 +4073,19 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -4056,1171 +4098,10 @@ ] }, { - "type": "v1beta1.Ingress", - "method": "PATCH", - "summary": "partially update status of the specified Ingress", - "nickname": "patchNamespacedIngressStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Ingress" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "POST", - "summary": "create a Job", - "nickname": "createNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Job", - "nickname": "deletecollectionNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchNamespacedJobList", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read the specified Job", - "nickname": "readNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "export", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace the specified Job", - "nickname": "replaceNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update the specified Job", - "nickname": "patchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a Job", - "nickname": "deleteNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1.DeleteOptions", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind Job", - "nickname": "watchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listJobForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchJobListForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}/status", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read status of the specified Job", - "nickname": "readNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace status of the specified Job", - "nickname": "replaceNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update status of the specified Job", - "nickname": "patchNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.NetworkPolicy", - "method": "POST", - "summary": "create a NetworkPolicy", - "nickname": "createNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.NetworkPolicy", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of NetworkPolicy", - "nickname": "deletecollectionNamespacedNetworkPolicy", + "summary": "delete collection of PodSecurityPolicy", + "nickname": "deletecollectionPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5258,7 +4139,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5269,21 +4150,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5298,14 +4171,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicyList", + "summary": "watch individual changes to a list of PodSecurityPolicy", + "nickname": "watchPodSecurityPolicyList", "parameters": [ { "type": "string", @@ -5343,7 +4216,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5354,21 +4227,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5385,14 +4250,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", + "path": "/apis/extensions/v1beta1/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "GET", - "summary": "read the specified NetworkPolicy", - "nickname": "readNamespacedNetworkPolicy", + "summary": "read the specified PodSecurityPolicy", + "nickname": "readPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5414,23 +4279,15 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5439,7 +4296,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5452,10 +4309,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PUT", - "summary": "replace the specified NetworkPolicy", - "nickname": "replaceNamespacedNetworkPolicy", + "summary": "replace the specified PodSecurityPolicy", + "nickname": "replacePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5466,26 +4323,18 @@ "allowMultiple": false }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5494,7 +4343,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5507,67 +4356,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PATCH", - "summary": "partially update the specified NetworkPolicy", - "nickname": "patchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a NetworkPolicy", - "nickname": "deleteNamespacedNetworkPolicy", + "summary": "partially update the specified PodSecurityPolicy", + "nickname": "patchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5578,127 +4370,10 @@ "allowMultiple": false }, { - "type": "v1.DeleteOptions", + "type": "v1.Patch", "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", + "name": "body", + "description": "", "required": true, "allowMultiple": false }, @@ -5706,7 +4381,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5715,31 +4390,25 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ + }, { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNetworkPolicyForAllNamespaces", + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a PodSecurityPolicy", + "nickname": "deletePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5750,43 +4419,43 @@ "allowMultiple": false }, { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, "allowMultiple": false }, { - "type": "string", + "type": "integer", "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "required": false, "allowMultiple": false }, { "type": "boolean", "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "orphanDependents", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "required": false, "allowMultiple": false }, { "type": "string", "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, "allowMultiple": false } ], @@ -5794,15 +4463,13 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" + "responseModel": "v1.Status" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ "*/*" @@ -5811,14 +4478,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNetworkPolicyListForAllNamespaces", + "summary": "watch changes to an object of kind PodSecurityPolicy", + "nickname": "watchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5856,7 +4523,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5867,13 +4534,21 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5935,7 +4610,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6022,7 +4697,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicaSet", "nickname": "deletecollectionNamespacedReplicaSet", @@ -6063,7 +4738,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6088,7 +4763,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6107,7 +4782,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchNamespacedReplicaSetList", @@ -6148,7 +4823,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6173,7 +4848,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6219,7 +4894,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6326,7 +5001,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6369,7 +5044,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicaSet", "nickname": "deleteNamespacedReplicaSet", @@ -6402,7 +5077,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6427,7 +5110,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6446,7 +5129,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicaSet", "nickname": "watchNamespacedReplicaSet", @@ -6487,7 +5170,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6520,7 +5203,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6582,7 +5265,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6620,7 +5303,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchReplicaSetListForAllNamespaces", @@ -6661,7 +5344,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6678,7 +5361,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6815,7 +5498,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6980,7 +5663,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7145,7 +5828,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7235,7 +5918,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7306,7 +5989,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ThirdPartyResource", "nickname": "deletecollectionThirdPartyResource", @@ -7347,7 +6030,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7364,7 +6047,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7383,7 +6066,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ThirdPartyResource", "nickname": "watchThirdPartyResourceList", @@ -7424,7 +6107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7441,7 +6124,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7487,7 +6170,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7578,7 +6261,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7613,7 +6296,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ThirdPartyResource", "nickname": "deleteThirdPartyResource", @@ -7646,7 +6329,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7663,7 +6354,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7682,7 +6373,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ThirdPartyResource", "nickname": "watchThirdPartyResource", @@ -7723,7 +6414,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7748,7 +6439,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7769,7 +6460,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -7805,7 +6496,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -7813,12 +6504,12 @@ "items": { "$ref": "v1beta1.DaemonSet" }, - "description": "Items is a list of daemon sets." + "description": "A list of daemon sets." } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -7849,11 +6540,11 @@ }, "spec": { "$ref": "v1beta1.DaemonSetSpec", - "description": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" }, "status": { "$ref": "v1beta1.DaemonSetStatus", - "description": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" } } }, @@ -7892,12 +6583,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -7962,6 +6651,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -7973,17 +6666,31 @@ ], "properties": { "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" + "$ref": "v1.LabelSelector", + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + }, + "updateStrategy": { + "$ref": "v1beta1.DaemonSetUpdateStrategy", + "description": "An update strategy to replace existing DaemonSet pods with new pods." + }, + "minReadySeconds": { + "type": "integer", + "format": "int32", + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)." + }, + "templateGeneration": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation." } } }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -7993,14 +6700,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -8052,6 +6759,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -8075,7 +6789,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -8089,6 +6803,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -8123,6 +6841,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -8228,6 +6961,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -8340,12 +7085,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -8427,6 +7176,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -8771,12 +7527,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -8878,6 +7638,172 @@ } } }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.Container": { "id": "v1.Container", "description": "A single application container that you want to run within a pod.", @@ -8918,6 +7844,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -8950,7 +7883,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -9005,6 +7942,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -9062,6 +8045,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -9079,6 +8066,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -9381,6 +8372,247 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, + "v1beta1.DaemonSetUpdateStrategy": { + "id": "v1beta1.DaemonSetUpdateStrategy", + "properties": { + "type": { + "type": "string", + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete." + }, + "rollingUpdate": { + "$ref": "v1beta1.RollingUpdateDaemonSet", + "description": "Rolling update config params. Present only if type = \"RollingUpdate\"." + } + } + }, + "v1beta1.RollingUpdateDaemonSet": { + "id": "v1beta1.RollingUpdateDaemonSet", + "description": "Spec to control the desired behavior of daemon set rolling update.", + "properties": { + "maxUnavailable": { + "type": "string", + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." + } + } + }, "v1beta1.DaemonSetStatus": { "id": "v1beta1.DaemonSetStatus", "description": "DaemonSetStatus represents the current status of a daemon set.", @@ -9394,27 +8626,47 @@ "currentNumberScheduled": { "type": "integer", "format": "int32", - "description": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberMisscheduled": { "type": "integer", "format": "int32", - "description": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "desiredNumberScheduled": { "type": "integer", "format": "int32", - "description": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberReady": { "type": "integer", "format": "int32", - "description": "NumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + }, + "observedGeneration": { + "type": "integer", + "format": "int64", + "description": "The most recent generation observed by the daemon set controller." + }, + "updatedNumberScheduled": { + "type": "integer", + "format": "int32", + "description": "The total number of nodes that are running updated daemon pod" + }, + "numberAvailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)" + }, + "numberUnavailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)" } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -9426,7 +8678,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -9442,7 +8694,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -9452,8 +8704,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -9471,7 +8723,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -9482,8 +8734,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -9500,8 +8752,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -9515,14 +8767,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -9543,7 +8795,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -9561,6 +8817,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1beta1.DeploymentList": { "id": "v1beta1.DeploymentList", "description": "DeploymentList is a list of Deployments.", @@ -9577,7 +8837,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -9628,7 +8888,7 @@ "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1." }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment." }, "template": { @@ -9684,7 +8944,7 @@ "properties": { "maxUnavailable": { "type": "string", - "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." }, "maxSurge": { "type": "string", @@ -9721,6 +8981,11 @@ "format": "int32", "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec." }, + "readyReplicas": { + "type": "integer", + "format": "int32", + "description": "Total number of ready pods targeted by this deployment." + }, "availableReplicas": { "type": "integer", "format": "int32", @@ -9758,12 +9023,10 @@ }, "lastUpdateTime": { "type": "string", - "format": "date-time", "description": "The last time this condition was updated." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -9850,170 +9113,18 @@ "replicas" ], "properties": { - "replicas": { - "type": "integer", - "format": "int32", - "description": "actual number of observed instances of the scaled object." - }, - "selector": { - "type": "object", - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "targetSelector": { - "type": "string", - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - } - } - }, - "v1beta1.HorizontalPodAutoscalerList": { - "id": "v1beta1.HorizontalPodAutoscalerList", - "description": "list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata." - }, - "items": { - "type": "array", - "items": { - "$ref": "v1beta1.HorizontalPodAutoscaler" - }, - "description": "list of horizontal pod autoscaler objects." - } - } - }, - "v1beta1.HorizontalPodAutoscaler": { - "id": "v1beta1.HorizontalPodAutoscaler", - "description": "configuration of a horizontal pod autoscaler.", - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ObjectMeta", - "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" - }, - "spec": { - "$ref": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status." - }, - "status": { - "$ref": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current information about the autoscaler." - } - } - }, - "v1beta1.HorizontalPodAutoscalerSpec": { - "id": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "specification of a horizontal pod autoscaler.", - "required": [ - "scaleRef", - "maxReplicas" - ], - "properties": { - "scaleRef": { - "$ref": "v1beta1.SubresourceReference", - "description": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec." - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "description": "lower limit for the number of pods that can be set by the autoscaler, default 1." - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas." - }, - "cpuUtilization": { - "$ref": "v1beta1.CPUTargetUtilization", - "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources." - } - } - }, - "v1beta1.SubresourceReference": { - "id": "v1beta1.SubresourceReference", - "description": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", - "properties": { - "kind": { - "type": "string", - "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "name": { - "type": "string", - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" - }, - "apiVersion": { - "type": "string", - "description": "API version of the referent" - }, - "subresource": { - "type": "string", - "description": "Subresource name of the referent" - } - } - }, - "v1beta1.CPUTargetUtilization": { - "id": "v1beta1.CPUTargetUtilization", - "required": [ - "targetPercentage" - ], - "properties": { - "targetPercentage": { - "type": "integer", - "format": "int32", - "description": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use." - } - } - }, - "v1beta1.HorizontalPodAutoscalerStatus": { - "id": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current status of a horizontal pod autoscaler", - "required": [ - "currentReplicas", - "desiredReplicas" - ], - "properties": { - "observedGeneration": { - "type": "integer", - "format": "int64", - "description": "most recent generation observed by this autoscaler." - }, - "lastScaleTime": { - "type": "string", - "format": "date-time", - "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed." - }, - "currentReplicas": { + "replicas": { "type": "integer", "format": "int32", - "description": "current number of replicas of pods managed by this autoscaler." + "description": "actual number of observed instances of the scaled object." }, - "desiredReplicas": { - "type": "integer", - "format": "int32", - "description": "desired number of replicas of pods managed by this autoscaler." + "selector": { + "type": "object", + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, - "currentCPUUtilizationPercentage": { - "type": "integer", - "format": "int32", - "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU." + "targetSelector": { + "type": "string", + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" } } }, @@ -10033,7 +9144,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -10213,9 +9324,9 @@ } } }, - "v1beta1.JobList": { - "id": "v1beta1.JobList", - "description": "JobList is a collection of jobs. DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead.", + "v1beta1.NetworkPolicyList": { + "id": "v1beta1.NetworkPolicyList", + "description": "Network Policy List is a list of NetworkPolicy objects.", "required": [ "items" ], @@ -10229,21 +9340,20 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.Job" + "$ref": "v1beta1.NetworkPolicy" }, - "description": "Items is the list of Job." + "description": "Items is a list of schema objects." } } }, - "v1beta1.Job": { - "id": "v1beta1.Job", - "description": "Job represents the configuration of a single job. DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead.", + "v1beta1.NetworkPolicy": { + "id": "v1beta1.NetworkPolicy", "properties": { "kind": { "type": "string", @@ -10258,128 +9368,83 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.JobSpec", - "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "v1beta1.JobStatus", - "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "$ref": "v1beta1.NetworkPolicySpec", + "description": "Specification of the desired behavior for this NetworkPolicy." } } }, - "v1beta1.JobSpec": { - "id": "v1beta1.JobSpec", - "description": "JobSpec describes how the job execution will look like.", + "v1beta1.NetworkPolicySpec": { + "id": "v1beta1.NetworkPolicySpec", "required": [ - "template" + "podSelector" ], "properties": { - "parallelism": { - "type": "integer", - "format": "int32", - "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "completions": { - "type": "integer", - "format": "int32", - "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "activeDeadlineSeconds": { - "type": "integer", - "format": "int64", - "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer" - }, - "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "autoSelector": { - "type": "boolean", - "description": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md" + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "template": { - "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs" + "ingress": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyIngressRule" + }, + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." } } }, - "v1beta1.JobStatus": { - "id": "v1beta1.JobStatus", - "description": "JobStatus represents the current state of a Job.", + "v1beta1.NetworkPolicyIngressRule": { + "id": "v1beta1.NetworkPolicyIngressRule", + "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "properties": { - "conditions": { + "ports": { "type": "array", "items": { - "$ref": "v1beta1.JobCondition" + "$ref": "v1beta1.NetworkPolicyPort" }, - "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "completionTime": { - "type": "string", - "format": "date-time", - "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "active": { - "type": "integer", - "format": "int32", - "description": "Active is the number of actively running pods." - }, - "succeeded": { - "type": "integer", - "format": "int32", - "description": "Succeeded is the number of pods which reached Phase Succeeded." + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." }, - "failed": { - "type": "integer", - "format": "int32", - "description": "Failed is the number of pods which reached Phase Failed." + "from": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyPeer" + }, + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." } } }, - "v1beta1.JobCondition": { - "id": "v1beta1.JobCondition", - "description": "JobCondition describes current state of a job.", - "required": [ - "type", - "status" - ], + "v1beta1.NetworkPolicyPort": { + "id": "v1beta1.NetworkPolicyPort", "properties": { - "type": { - "type": "string", - "description": "Type of job condition, Complete or Failed." - }, - "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." - }, - "lastProbeTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition was checked." - }, - "lastTransitionTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition transit from one status to another." + "protocol": { + "$ref": "v1.Protocol", + "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." }, - "reason": { + "port": { "type": "string", - "description": "(brief) reason for the condition's last transition." + "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + } + } + }, + "v1.Protocol": { + "id": "v1.Protocol", + "properties": {} + }, + "v1beta1.NetworkPolicyPeer": { + "id": "v1beta1.NetworkPolicyPeer", + "properties": { + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." }, - "message": { - "type": "string", - "description": "Human readable message indicating details about last transition." + "namespaceSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." } } }, - "v1beta1.NetworkPolicyList": { - "id": "v1beta1.NetworkPolicyList", - "description": "Network Policy List is a list of NetworkPolicy objects.", + "v1beta1.PodSecurityPolicyList": { + "id": "v1beta1.PodSecurityPolicyList", + "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", "required": [ "items" ], @@ -10393,20 +9458,21 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicy" + "$ref": "v1beta1.PodSecurityPolicy" }, "description": "Items is a list of schema objects." } } }, - "v1beta1.NetworkPolicy": { - "id": "v1beta1.NetworkPolicy", + "v1beta1.PodSecurityPolicy": { + "id": "v1beta1.PodSecurityPolicy", + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", "properties": { "kind": { "type": "string", @@ -10421,77 +9487,206 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.NetworkPolicySpec", - "description": "Specification of the desired behavior for this NetworkPolicy." + "$ref": "v1beta1.PodSecurityPolicySpec", + "description": "spec defines the policy enforced." } } }, - "v1beta1.NetworkPolicySpec": { - "id": "v1beta1.NetworkPolicySpec", + "v1beta1.PodSecurityPolicySpec": { + "id": "v1beta1.PodSecurityPolicySpec", + "description": "Pod Security Policy Spec defines the policy enforced.", "required": [ - "podSelector" + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "privileged": { + "type": "boolean", + "description": "privileged determines if a pod can request to be run as privileged." }, - "ingress": { + "defaultAddCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyIngressRule" + "$ref": "v1.Capability" }, - "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." - } - } - }, - "v1beta1.NetworkPolicyIngressRule": { - "id": "v1beta1.NetworkPolicyIngressRule", - "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - "properties": { - "ports": { + "description": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities." + }, + "requiredDropCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPort" + "$ref": "v1.Capability" }, - "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." + "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added." }, - "from": { + "allowedCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPeer" + "$ref": "v1.Capability" }, - "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." + "description": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities." + }, + "volumes": { + "type": "array", + "items": { + "$ref": "v1beta1.FSType" + }, + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used." + }, + "hostNetwork": { + "type": "boolean", + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec." + }, + "hostPorts": { + "type": "array", + "items": { + "$ref": "v1beta1.HostPortRange" + }, + "description": "hostPorts determines which host port ranges are allowed to be exposed." + }, + "hostPID": { + "type": "boolean", + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec." + }, + "hostIPC": { + "type": "boolean", + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec." + }, + "seLinux": { + "$ref": "v1beta1.SELinuxStrategyOptions", + "description": "seLinux is the strategy that will dictate the allowable labels that may be set." + }, + "runAsUser": { + "$ref": "v1beta1.RunAsUserStrategyOptions", + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "supplementalGroups": { + "$ref": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext." + }, + "fsGroup": { + "$ref": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext." + }, + "readOnlyRootFilesystem": { + "type": "boolean", + "description": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to." } } }, - "v1beta1.NetworkPolicyPort": { - "id": "v1beta1.NetworkPolicyPort", + "v1beta1.FSType": { + "id": "v1beta1.FSType", + "properties": {} + }, + "v1beta1.HostPortRange": { + "id": "v1beta1.HostPortRange", + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], "properties": { - "protocol": { - "$ref": "v1.Protocol", - "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." + "min": { + "type": "integer", + "format": "int32", + "description": "min is the start of the range, inclusive." }, - "port": { + "max": { + "type": "integer", + "format": "int32", + "description": "max is the end of the range, inclusive." + } + } + }, + "v1beta1.SELinuxStrategyOptions": { + "id": "v1beta1.SELinuxStrategyOptions", + "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { "type": "string", - "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "description": "type is the strategy that will dictate the allowable labels that may be set." + }, + "seLinuxOptions": { + "$ref": "v1.SELinuxOptions", + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context" } } }, - "v1.Protocol": { - "id": "v1.Protocol", - "properties": {} + "v1beta1.RunAsUserStrategyOptions": { + "id": "v1beta1.RunAsUserStrategyOptions", + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of uids that may be used." + } + } }, - "v1beta1.NetworkPolicyPeer": { - "id": "v1beta1.NetworkPolicyPeer", + "v1beta1.IDRange": { + "id": "v1beta1.IDRange", + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." + "min": { + "type": "integer", + "format": "int64", + "description": "Min is the start of the range, inclusive." }, - "namespaceSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." + "max": { + "type": "integer", + "format": "int64", + "description": "Max is the end of the range, inclusive." + } + } + }, + "v1beta1.SupplementalGroupsStrategyOptions": { + "id": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end." + } + } + }, + "v1beta1.FSGroupStrategyOptions": { + "id": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end." } } }, @@ -10511,7 +9706,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -10564,7 +9759,7 @@ "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { @@ -10632,7 +9827,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -10661,7 +9855,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -10712,8 +9906,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -10735,19 +9929,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -10761,6 +9956,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/schema392735526 b/k8s/.kube/schema/v1.6.6/schema566625515 similarity index 83% rename from k8s/.kube/schema/v1.5.3/schema392735526 rename to k8s/.kube/schema/v1.6.6/schema566625515 index 7f07b38b6..a112d2e67 100644 --- a/k8s/.kube/schema/v1.5.3/schema392735526 +++ b/k8s/.kube/schema/v1.6.6/schema566625515 @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "extensions/v1beta1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/apis/extensions/v1beta1", "info": { "title": "", @@ -54,7 +54,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -141,7 +141,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of DaemonSet", "nickname": "deletecollectionNamespacedDaemonSet", @@ -182,7 +182,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -207,7 +207,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -226,7 +226,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchNamespacedDaemonSetList", @@ -267,7 +267,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -292,7 +292,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -338,7 +338,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -445,7 +445,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -488,7 +488,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a DaemonSet", "nickname": "deleteNamespacedDaemonSet", @@ -521,7 +521,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -546,7 +554,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -565,7 +573,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind DaemonSet", "nickname": "watchNamespacedDaemonSet", @@ -606,7 +614,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -639,7 +647,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -701,7 +709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -739,7 +747,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchDaemonSetListForAllNamespaces", @@ -780,7 +788,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -797,7 +805,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -934,7 +942,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1024,7 +1032,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1111,7 +1119,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Deployment", "nickname": "deletecollectionNamespacedDeployment", @@ -1152,7 +1160,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1177,7 +1185,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1196,7 +1204,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchNamespacedDeploymentList", @@ -1237,7 +1245,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1262,7 +1270,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1308,7 +1316,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1415,7 +1423,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1458,7 +1466,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Deployment", "nickname": "deleteNamespacedDeployment", @@ -1491,7 +1499,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1516,7 +1532,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1535,7 +1551,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Deployment", "nickname": "watchNamespacedDeployment", @@ -1576,7 +1592,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1609,7 +1625,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1671,7 +1687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1709,7 +1725,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchDeploymentListForAllNamespaces", @@ -1750,7 +1766,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1767,7 +1783,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1965,7 +1981,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2130,7 +2146,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2175,14 +2191,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listNamespacedHorizontalPodAutoscaler", + "summary": "list or watch objects of kind Ingress", + "nickname": "listNamespacedIngress", "parameters": [ { "type": "string", @@ -2220,7 +2236,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2245,7 +2261,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2260,10 +2276,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "POST", - "summary": "create a HorizontalPodAutoscaler", - "nickname": "createNamespacedHorizontalPodAutoscaler", + "summary": "create an Ingress", + "nickname": "createNamespacedIngress", "parameters": [ { "type": "string", @@ -2274,7 +2290,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2294,7 +2310,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2307,10 +2323,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of HorizontalPodAutoscaler", - "nickname": "deletecollectionNamespacedHorizontalPodAutoscaler", + "summary": "delete collection of Ingress", + "nickname": "deletecollectionNamespacedIngress", "parameters": [ { "type": "string", @@ -2348,7 +2364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2373,7 +2389,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2388,14 +2404,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscalerList", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchNamespacedIngressList", "parameters": [ { "type": "string", @@ -2433,7 +2449,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2458,7 +2474,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2475,14 +2491,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscaler", + "summary": "read the specified Ingress", + "nickname": "readNamespacedIngress", "parameters": [ { "type": "string", @@ -2504,7 +2520,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2520,7 +2536,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2529,7 +2545,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2542,10 +2558,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscaler", + "summary": "replace the specified Ingress", + "nickname": "replaceNamespacedIngress", "parameters": [ { "type": "string", @@ -2556,7 +2572,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2575,7 +2591,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2584,7 +2600,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2597,10 +2613,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscaler", + "summary": "partially update the specified Ingress", + "nickname": "patchNamespacedIngress", "parameters": [ { "type": "string", @@ -2611,7 +2627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2630,7 +2646,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2639,7 +2655,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2654,10 +2670,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete a HorizontalPodAutoscaler", - "nickname": "deleteNamespacedHorizontalPodAutoscaler", + "summary": "delete an Ingress", + "nickname": "deleteNamespacedIngress", "parameters": [ { "type": "string", @@ -2687,7 +2703,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2703,7 +2727,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2712,7 +2736,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2727,14 +2751,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscaler", + "summary": "watch changes to an object of kind Ingress", + "nickname": "watchNamespacedIngress", "parameters": [ { "type": "string", @@ -2772,7 +2796,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2796,7 +2820,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2805,7 +2829,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2822,14 +2846,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listHorizontalPodAutoscalerForAllNamespaces", + "summary": "list or watch objects of kind Ingress", + "nickname": "listIngressForAllNamespaces", "parameters": [ { "type": "string", @@ -2867,7 +2891,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2901,14 +2925,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchHorizontalPodAutoscalerListForAllNamespaces", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchIngressListForAllNamespaces", "parameters": [ { "type": "string", @@ -2946,7 +2970,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2963,7 +2987,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2980,14 +3004,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read status of the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscalerStatus", + "summary": "read status of the specified Ingress", + "nickname": "readNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3009,7 +3033,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3018,7 +3042,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3031,10 +3055,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace status of the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscalerStatus", + "summary": "replace status of the specified Ingress", + "nickname": "replaceNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3045,7 +3069,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -3064,7 +3088,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3073,7 +3097,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3086,10 +3110,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update status of the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscalerStatus", + "summary": "partially update status of the specified Ingress", + "nickname": "patchNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3100,7 +3124,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3119,7 +3143,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3128,7 +3152,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3145,14 +3169,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listNamespacedIngress", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3190,7 +3214,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3215,7 +3239,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3230,10 +3254,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "POST", - "summary": "create an Ingress", - "nickname": "createNamespacedIngress", + "summary": "create a NetworkPolicy", + "nickname": "createNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3244,7 +3268,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3264,7 +3288,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3277,10 +3301,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of Ingress", - "nickname": "deletecollectionNamespacedIngress", + "summary": "delete collection of NetworkPolicy", + "nickname": "deletecollectionNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3318,7 +3342,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3343,7 +3367,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3358,14 +3382,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchNamespacedIngressList", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicyList", "parameters": [ { "type": "string", @@ -3403,7 +3427,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3428,7 +3452,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3445,14 +3469,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "GET", - "summary": "read the specified Ingress", - "nickname": "readNamespacedIngress", + "summary": "read the specified NetworkPolicy", + "nickname": "readNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3474,7 +3498,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3490,7 +3514,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3499,7 +3523,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3512,10 +3536,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PUT", - "summary": "replace the specified Ingress", - "nickname": "replaceNamespacedIngress", + "summary": "replace the specified NetworkPolicy", + "nickname": "replaceNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3526,7 +3550,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3545,7 +3569,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3554,7 +3578,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3567,10 +3591,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PATCH", - "summary": "partially update the specified Ingress", - "nickname": "patchNamespacedIngress", + "summary": "partially update the specified NetworkPolicy", + "nickname": "patchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3581,7 +3605,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3600,7 +3624,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3609,7 +3633,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3624,10 +3648,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete an Ingress", - "nickname": "deleteNamespacedIngress", + "summary": "delete a NetworkPolicy", + "nickname": "deleteNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3657,7 +3681,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3673,7 +3705,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3682,7 +3714,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3697,14 +3729,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind Ingress", - "nickname": "watchNamespacedIngress", + "summary": "watch changes to an object of kind NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3742,7 +3774,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3766,7 +3798,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3775,7 +3807,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3792,14 +3824,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/ingresses", + "path": "/apis/extensions/v1beta1/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listIngressForAllNamespaces", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNetworkPolicyForAllNamespaces", "parameters": [ { "type": "string", @@ -3837,7 +3869,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3854,7 +3886,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3871,14 +3903,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/ingresses", + "path": "/apis/extensions/v1beta1/watch/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchIngressListForAllNamespaces", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNetworkPolicyListForAllNamespaces", "parameters": [ { "type": "string", @@ -3916,7 +3948,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3933,7 +3965,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3950,14 +3982,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", + "path": "/apis/extensions/v1beta1/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicyList", "method": "GET", - "summary": "read status of the specified Ingress", - "nickname": "readNamespacedIngressStatus", + "summary": "list or watch objects of kind PodSecurityPolicy", + "nickname": "listPodSecurityPolicy", "parameters": [ { "type": "string", @@ -3969,18 +4001,42 @@ }, { "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, "allowMultiple": false }, { "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, "allowMultiple": false } ], @@ -3988,23 +4044,25 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicyList" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "consumes": [ "*/*" ] }, { - "type": "v1beta1.Ingress", - "method": "PUT", - "summary": "replace status of the specified Ingress", - "nickname": "replaceNamespacedIngressStatus", + "type": "v1beta1.PodSecurityPolicy", + "method": "POST", + "summary": "create a PodSecurityPolicy", + "nickname": "createPodSecurityPolicy", "parameters": [ { "type": "string", @@ -4015,35 +4073,19 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -4056,1171 +4098,10 @@ ] }, { - "type": "v1beta1.Ingress", - "method": "PATCH", - "summary": "partially update status of the specified Ingress", - "nickname": "patchNamespacedIngressStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Ingress" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "POST", - "summary": "create a Job", - "nickname": "createNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Job", - "nickname": "deletecollectionNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchNamespacedJobList", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read the specified Job", - "nickname": "readNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "export", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace the specified Job", - "nickname": "replaceNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update the specified Job", - "nickname": "patchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a Job", - "nickname": "deleteNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1.DeleteOptions", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind Job", - "nickname": "watchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listJobForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchJobListForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}/status", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read status of the specified Job", - "nickname": "readNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace status of the specified Job", - "nickname": "replaceNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update status of the specified Job", - "nickname": "patchNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.NetworkPolicy", - "method": "POST", - "summary": "create a NetworkPolicy", - "nickname": "createNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.NetworkPolicy", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of NetworkPolicy", - "nickname": "deletecollectionNamespacedNetworkPolicy", + "summary": "delete collection of PodSecurityPolicy", + "nickname": "deletecollectionPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5258,7 +4139,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5269,21 +4150,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5298,14 +4171,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicyList", + "summary": "watch individual changes to a list of PodSecurityPolicy", + "nickname": "watchPodSecurityPolicyList", "parameters": [ { "type": "string", @@ -5343,7 +4216,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5354,21 +4227,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5385,14 +4250,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", + "path": "/apis/extensions/v1beta1/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "GET", - "summary": "read the specified NetworkPolicy", - "nickname": "readNamespacedNetworkPolicy", + "summary": "read the specified PodSecurityPolicy", + "nickname": "readPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5414,23 +4279,15 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5439,7 +4296,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5452,10 +4309,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PUT", - "summary": "replace the specified NetworkPolicy", - "nickname": "replaceNamespacedNetworkPolicy", + "summary": "replace the specified PodSecurityPolicy", + "nickname": "replacePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5466,26 +4323,18 @@ "allowMultiple": false }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5494,7 +4343,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5507,67 +4356,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PATCH", - "summary": "partially update the specified NetworkPolicy", - "nickname": "patchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a NetworkPolicy", - "nickname": "deleteNamespacedNetworkPolicy", + "summary": "partially update the specified PodSecurityPolicy", + "nickname": "patchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5578,127 +4370,10 @@ "allowMultiple": false }, { - "type": "v1.DeleteOptions", + "type": "v1.Patch", "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", + "name": "body", + "description": "", "required": true, "allowMultiple": false }, @@ -5706,7 +4381,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5715,31 +4390,25 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ + }, { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNetworkPolicyForAllNamespaces", + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a PodSecurityPolicy", + "nickname": "deletePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5750,43 +4419,43 @@ "allowMultiple": false }, { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, "allowMultiple": false }, { - "type": "string", + "type": "integer", "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "required": false, "allowMultiple": false }, { "type": "boolean", "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "orphanDependents", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "required": false, "allowMultiple": false }, { "type": "string", "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, "allowMultiple": false } ], @@ -5794,15 +4463,13 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" + "responseModel": "v1.Status" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ "*/*" @@ -5811,14 +4478,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNetworkPolicyListForAllNamespaces", + "summary": "watch changes to an object of kind PodSecurityPolicy", + "nickname": "watchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5856,7 +4523,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5867,13 +4534,21 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5935,7 +4610,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6022,7 +4697,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicaSet", "nickname": "deletecollectionNamespacedReplicaSet", @@ -6063,7 +4738,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6088,7 +4763,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6107,7 +4782,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchNamespacedReplicaSetList", @@ -6148,7 +4823,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6173,7 +4848,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6219,7 +4894,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6326,7 +5001,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6369,7 +5044,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicaSet", "nickname": "deleteNamespacedReplicaSet", @@ -6402,7 +5077,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6427,7 +5110,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6446,7 +5129,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicaSet", "nickname": "watchNamespacedReplicaSet", @@ -6487,7 +5170,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6520,7 +5203,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6582,7 +5265,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6620,7 +5303,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchReplicaSetListForAllNamespaces", @@ -6661,7 +5344,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6678,7 +5361,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6815,7 +5498,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6980,7 +5663,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7145,7 +5828,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7235,7 +5918,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7306,7 +5989,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ThirdPartyResource", "nickname": "deletecollectionThirdPartyResource", @@ -7347,7 +6030,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7364,7 +6047,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7383,7 +6066,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ThirdPartyResource", "nickname": "watchThirdPartyResourceList", @@ -7424,7 +6107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7441,7 +6124,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7487,7 +6170,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7578,7 +6261,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7613,7 +6296,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ThirdPartyResource", "nickname": "deleteThirdPartyResource", @@ -7646,7 +6329,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7663,7 +6354,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7682,7 +6373,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ThirdPartyResource", "nickname": "watchThirdPartyResource", @@ -7723,7 +6414,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7748,7 +6439,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7769,7 +6460,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -7805,7 +6496,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -7813,12 +6504,12 @@ "items": { "$ref": "v1beta1.DaemonSet" }, - "description": "Items is a list of daemon sets." + "description": "A list of daemon sets." } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -7849,11 +6540,11 @@ }, "spec": { "$ref": "v1beta1.DaemonSetSpec", - "description": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" }, "status": { "$ref": "v1beta1.DaemonSetStatus", - "description": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" } } }, @@ -7892,12 +6583,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -7962,6 +6651,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -7973,17 +6666,31 @@ ], "properties": { "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" + "$ref": "v1.LabelSelector", + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + }, + "updateStrategy": { + "$ref": "v1beta1.DaemonSetUpdateStrategy", + "description": "An update strategy to replace existing DaemonSet pods with new pods." + }, + "minReadySeconds": { + "type": "integer", + "format": "int32", + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)." + }, + "templateGeneration": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation." } } }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -7993,14 +6700,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -8052,6 +6759,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -8075,7 +6789,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -8089,6 +6803,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -8123,6 +6841,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -8228,6 +6961,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -8340,12 +7085,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -8427,6 +7176,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -8771,12 +7527,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -8878,6 +7638,172 @@ } } }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.Container": { "id": "v1.Container", "description": "A single application container that you want to run within a pod.", @@ -8918,6 +7844,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -8950,7 +7883,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -9005,6 +7942,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -9062,6 +8045,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -9079,6 +8066,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -9381,6 +8372,247 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, + "v1beta1.DaemonSetUpdateStrategy": { + "id": "v1beta1.DaemonSetUpdateStrategy", + "properties": { + "type": { + "type": "string", + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete." + }, + "rollingUpdate": { + "$ref": "v1beta1.RollingUpdateDaemonSet", + "description": "Rolling update config params. Present only if type = \"RollingUpdate\"." + } + } + }, + "v1beta1.RollingUpdateDaemonSet": { + "id": "v1beta1.RollingUpdateDaemonSet", + "description": "Spec to control the desired behavior of daemon set rolling update.", + "properties": { + "maxUnavailable": { + "type": "string", + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." + } + } + }, "v1beta1.DaemonSetStatus": { "id": "v1beta1.DaemonSetStatus", "description": "DaemonSetStatus represents the current status of a daemon set.", @@ -9394,27 +8626,47 @@ "currentNumberScheduled": { "type": "integer", "format": "int32", - "description": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberMisscheduled": { "type": "integer", "format": "int32", - "description": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "desiredNumberScheduled": { "type": "integer", "format": "int32", - "description": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberReady": { "type": "integer", "format": "int32", - "description": "NumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + }, + "observedGeneration": { + "type": "integer", + "format": "int64", + "description": "The most recent generation observed by the daemon set controller." + }, + "updatedNumberScheduled": { + "type": "integer", + "format": "int32", + "description": "The total number of nodes that are running updated daemon pod" + }, + "numberAvailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)" + }, + "numberUnavailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)" } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -9426,7 +8678,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -9442,7 +8694,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -9452,8 +8704,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -9471,7 +8723,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -9482,8 +8734,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -9500,8 +8752,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -9515,14 +8767,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -9543,7 +8795,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -9561,6 +8817,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1beta1.DeploymentList": { "id": "v1beta1.DeploymentList", "description": "DeploymentList is a list of Deployments.", @@ -9577,7 +8837,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -9628,7 +8888,7 @@ "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1." }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment." }, "template": { @@ -9684,7 +8944,7 @@ "properties": { "maxUnavailable": { "type": "string", - "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." }, "maxSurge": { "type": "string", @@ -9721,6 +8981,11 @@ "format": "int32", "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec." }, + "readyReplicas": { + "type": "integer", + "format": "int32", + "description": "Total number of ready pods targeted by this deployment." + }, "availableReplicas": { "type": "integer", "format": "int32", @@ -9758,12 +9023,10 @@ }, "lastUpdateTime": { "type": "string", - "format": "date-time", "description": "The last time this condition was updated." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -9850,170 +9113,18 @@ "replicas" ], "properties": { - "replicas": { - "type": "integer", - "format": "int32", - "description": "actual number of observed instances of the scaled object." - }, - "selector": { - "type": "object", - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "targetSelector": { - "type": "string", - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - } - } - }, - "v1beta1.HorizontalPodAutoscalerList": { - "id": "v1beta1.HorizontalPodAutoscalerList", - "description": "list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata." - }, - "items": { - "type": "array", - "items": { - "$ref": "v1beta1.HorizontalPodAutoscaler" - }, - "description": "list of horizontal pod autoscaler objects." - } - } - }, - "v1beta1.HorizontalPodAutoscaler": { - "id": "v1beta1.HorizontalPodAutoscaler", - "description": "configuration of a horizontal pod autoscaler.", - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ObjectMeta", - "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" - }, - "spec": { - "$ref": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status." - }, - "status": { - "$ref": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current information about the autoscaler." - } - } - }, - "v1beta1.HorizontalPodAutoscalerSpec": { - "id": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "specification of a horizontal pod autoscaler.", - "required": [ - "scaleRef", - "maxReplicas" - ], - "properties": { - "scaleRef": { - "$ref": "v1beta1.SubresourceReference", - "description": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec." - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "description": "lower limit for the number of pods that can be set by the autoscaler, default 1." - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas." - }, - "cpuUtilization": { - "$ref": "v1beta1.CPUTargetUtilization", - "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources." - } - } - }, - "v1beta1.SubresourceReference": { - "id": "v1beta1.SubresourceReference", - "description": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", - "properties": { - "kind": { - "type": "string", - "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "name": { - "type": "string", - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" - }, - "apiVersion": { - "type": "string", - "description": "API version of the referent" - }, - "subresource": { - "type": "string", - "description": "Subresource name of the referent" - } - } - }, - "v1beta1.CPUTargetUtilization": { - "id": "v1beta1.CPUTargetUtilization", - "required": [ - "targetPercentage" - ], - "properties": { - "targetPercentage": { - "type": "integer", - "format": "int32", - "description": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use." - } - } - }, - "v1beta1.HorizontalPodAutoscalerStatus": { - "id": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current status of a horizontal pod autoscaler", - "required": [ - "currentReplicas", - "desiredReplicas" - ], - "properties": { - "observedGeneration": { - "type": "integer", - "format": "int64", - "description": "most recent generation observed by this autoscaler." - }, - "lastScaleTime": { - "type": "string", - "format": "date-time", - "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed." - }, - "currentReplicas": { + "replicas": { "type": "integer", "format": "int32", - "description": "current number of replicas of pods managed by this autoscaler." + "description": "actual number of observed instances of the scaled object." }, - "desiredReplicas": { - "type": "integer", - "format": "int32", - "description": "desired number of replicas of pods managed by this autoscaler." + "selector": { + "type": "object", + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, - "currentCPUUtilizationPercentage": { - "type": "integer", - "format": "int32", - "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU." + "targetSelector": { + "type": "string", + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" } } }, @@ -10033,7 +9144,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -10213,9 +9324,9 @@ } } }, - "v1beta1.JobList": { - "id": "v1beta1.JobList", - "description": "JobList is a collection of jobs. DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead.", + "v1beta1.NetworkPolicyList": { + "id": "v1beta1.NetworkPolicyList", + "description": "Network Policy List is a list of NetworkPolicy objects.", "required": [ "items" ], @@ -10229,21 +9340,20 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.Job" + "$ref": "v1beta1.NetworkPolicy" }, - "description": "Items is the list of Job." + "description": "Items is a list of schema objects." } } }, - "v1beta1.Job": { - "id": "v1beta1.Job", - "description": "Job represents the configuration of a single job. DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead.", + "v1beta1.NetworkPolicy": { + "id": "v1beta1.NetworkPolicy", "properties": { "kind": { "type": "string", @@ -10258,128 +9368,83 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.JobSpec", - "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "v1beta1.JobStatus", - "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "$ref": "v1beta1.NetworkPolicySpec", + "description": "Specification of the desired behavior for this NetworkPolicy." } } }, - "v1beta1.JobSpec": { - "id": "v1beta1.JobSpec", - "description": "JobSpec describes how the job execution will look like.", + "v1beta1.NetworkPolicySpec": { + "id": "v1beta1.NetworkPolicySpec", "required": [ - "template" + "podSelector" ], "properties": { - "parallelism": { - "type": "integer", - "format": "int32", - "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "completions": { - "type": "integer", - "format": "int32", - "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "activeDeadlineSeconds": { - "type": "integer", - "format": "int64", - "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer" - }, - "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "autoSelector": { - "type": "boolean", - "description": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md" + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "template": { - "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs" + "ingress": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyIngressRule" + }, + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." } } }, - "v1beta1.JobStatus": { - "id": "v1beta1.JobStatus", - "description": "JobStatus represents the current state of a Job.", + "v1beta1.NetworkPolicyIngressRule": { + "id": "v1beta1.NetworkPolicyIngressRule", + "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "properties": { - "conditions": { + "ports": { "type": "array", "items": { - "$ref": "v1beta1.JobCondition" + "$ref": "v1beta1.NetworkPolicyPort" }, - "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "completionTime": { - "type": "string", - "format": "date-time", - "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "active": { - "type": "integer", - "format": "int32", - "description": "Active is the number of actively running pods." - }, - "succeeded": { - "type": "integer", - "format": "int32", - "description": "Succeeded is the number of pods which reached Phase Succeeded." + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." }, - "failed": { - "type": "integer", - "format": "int32", - "description": "Failed is the number of pods which reached Phase Failed." + "from": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyPeer" + }, + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." } } }, - "v1beta1.JobCondition": { - "id": "v1beta1.JobCondition", - "description": "JobCondition describes current state of a job.", - "required": [ - "type", - "status" - ], + "v1beta1.NetworkPolicyPort": { + "id": "v1beta1.NetworkPolicyPort", "properties": { - "type": { - "type": "string", - "description": "Type of job condition, Complete or Failed." - }, - "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." - }, - "lastProbeTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition was checked." - }, - "lastTransitionTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition transit from one status to another." + "protocol": { + "$ref": "v1.Protocol", + "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." }, - "reason": { + "port": { "type": "string", - "description": "(brief) reason for the condition's last transition." + "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + } + } + }, + "v1.Protocol": { + "id": "v1.Protocol", + "properties": {} + }, + "v1beta1.NetworkPolicyPeer": { + "id": "v1beta1.NetworkPolicyPeer", + "properties": { + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." }, - "message": { - "type": "string", - "description": "Human readable message indicating details about last transition." + "namespaceSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." } } }, - "v1beta1.NetworkPolicyList": { - "id": "v1beta1.NetworkPolicyList", - "description": "Network Policy List is a list of NetworkPolicy objects.", + "v1beta1.PodSecurityPolicyList": { + "id": "v1beta1.PodSecurityPolicyList", + "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", "required": [ "items" ], @@ -10393,20 +9458,21 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicy" + "$ref": "v1beta1.PodSecurityPolicy" }, "description": "Items is a list of schema objects." } } }, - "v1beta1.NetworkPolicy": { - "id": "v1beta1.NetworkPolicy", + "v1beta1.PodSecurityPolicy": { + "id": "v1beta1.PodSecurityPolicy", + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", "properties": { "kind": { "type": "string", @@ -10421,77 +9487,206 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.NetworkPolicySpec", - "description": "Specification of the desired behavior for this NetworkPolicy." + "$ref": "v1beta1.PodSecurityPolicySpec", + "description": "spec defines the policy enforced." } } }, - "v1beta1.NetworkPolicySpec": { - "id": "v1beta1.NetworkPolicySpec", + "v1beta1.PodSecurityPolicySpec": { + "id": "v1beta1.PodSecurityPolicySpec", + "description": "Pod Security Policy Spec defines the policy enforced.", "required": [ - "podSelector" + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "privileged": { + "type": "boolean", + "description": "privileged determines if a pod can request to be run as privileged." }, - "ingress": { + "defaultAddCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyIngressRule" + "$ref": "v1.Capability" }, - "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." - } - } - }, - "v1beta1.NetworkPolicyIngressRule": { - "id": "v1beta1.NetworkPolicyIngressRule", - "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - "properties": { - "ports": { + "description": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities." + }, + "requiredDropCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPort" + "$ref": "v1.Capability" }, - "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." + "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added." }, - "from": { + "allowedCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPeer" + "$ref": "v1.Capability" }, - "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." + "description": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities." + }, + "volumes": { + "type": "array", + "items": { + "$ref": "v1beta1.FSType" + }, + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used." + }, + "hostNetwork": { + "type": "boolean", + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec." + }, + "hostPorts": { + "type": "array", + "items": { + "$ref": "v1beta1.HostPortRange" + }, + "description": "hostPorts determines which host port ranges are allowed to be exposed." + }, + "hostPID": { + "type": "boolean", + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec." + }, + "hostIPC": { + "type": "boolean", + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec." + }, + "seLinux": { + "$ref": "v1beta1.SELinuxStrategyOptions", + "description": "seLinux is the strategy that will dictate the allowable labels that may be set." + }, + "runAsUser": { + "$ref": "v1beta1.RunAsUserStrategyOptions", + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "supplementalGroups": { + "$ref": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext." + }, + "fsGroup": { + "$ref": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext." + }, + "readOnlyRootFilesystem": { + "type": "boolean", + "description": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to." } } }, - "v1beta1.NetworkPolicyPort": { - "id": "v1beta1.NetworkPolicyPort", + "v1beta1.FSType": { + "id": "v1beta1.FSType", + "properties": {} + }, + "v1beta1.HostPortRange": { + "id": "v1beta1.HostPortRange", + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], "properties": { - "protocol": { - "$ref": "v1.Protocol", - "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." + "min": { + "type": "integer", + "format": "int32", + "description": "min is the start of the range, inclusive." }, - "port": { + "max": { + "type": "integer", + "format": "int32", + "description": "max is the end of the range, inclusive." + } + } + }, + "v1beta1.SELinuxStrategyOptions": { + "id": "v1beta1.SELinuxStrategyOptions", + "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { "type": "string", - "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "description": "type is the strategy that will dictate the allowable labels that may be set." + }, + "seLinuxOptions": { + "$ref": "v1.SELinuxOptions", + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context" } } }, - "v1.Protocol": { - "id": "v1.Protocol", - "properties": {} + "v1beta1.RunAsUserStrategyOptions": { + "id": "v1beta1.RunAsUserStrategyOptions", + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of uids that may be used." + } + } }, - "v1beta1.NetworkPolicyPeer": { - "id": "v1beta1.NetworkPolicyPeer", + "v1beta1.IDRange": { + "id": "v1beta1.IDRange", + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." + "min": { + "type": "integer", + "format": "int64", + "description": "Min is the start of the range, inclusive." }, - "namespaceSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." + "max": { + "type": "integer", + "format": "int64", + "description": "Max is the end of the range, inclusive." + } + } + }, + "v1beta1.SupplementalGroupsStrategyOptions": { + "id": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end." + } + } + }, + "v1beta1.FSGroupStrategyOptions": { + "id": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end." } } }, @@ -10511,7 +9706,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -10564,7 +9759,7 @@ "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { @@ -10632,7 +9827,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -10661,7 +9855,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -10712,8 +9906,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -10735,19 +9929,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -10761,6 +9956,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/schema095733259 b/k8s/.kube/schema/v1.6.6/schema629255130 similarity index 88% rename from k8s/.kube/schema/v1.5.3/schema095733259 rename to k8s/.kube/schema/v1.6.6/schema629255130 index 2143db573..1fb315f47 100644 --- a/k8s/.kube/schema/v1.5.3/schema095733259 +++ b/k8s/.kube/schema/v1.6.6/schema629255130 @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "v1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/api/v1", "info": { "title": "", @@ -107,7 +107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -231,7 +231,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -318,7 +318,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ConfigMap", "nickname": "deletecollectionNamespacedConfigMap", @@ -359,7 +359,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -384,7 +384,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -403,7 +403,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchNamespacedConfigMapList", @@ -444,7 +444,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -469,7 +469,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -515,7 +515,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -622,7 +622,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -665,7 +665,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ConfigMap", "nickname": "deleteNamespacedConfigMap", @@ -698,7 +698,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -723,7 +731,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -742,7 +750,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ConfigMap", "nickname": "watchNamespacedConfigMap", @@ -783,7 +791,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -816,7 +824,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -878,7 +886,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -916,7 +924,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchConfigMapListForAllNamespaces", @@ -957,7 +965,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -974,7 +982,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1036,7 +1044,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1123,7 +1131,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Endpoints", "nickname": "deletecollectionNamespacedEndpoints", @@ -1164,7 +1172,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1189,7 +1197,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1208,7 +1216,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchNamespacedEndpointsList", @@ -1249,7 +1257,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1274,7 +1282,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1320,7 +1328,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1427,7 +1435,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1470,7 +1478,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete Endpoints", "nickname": "deleteNamespacedEndpoints", @@ -1503,7 +1511,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1528,7 +1544,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1547,7 +1563,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Endpoints", "nickname": "watchNamespacedEndpoints", @@ -1588,7 +1604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1621,7 +1637,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1683,7 +1699,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1721,7 +1737,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchEndpointsListForAllNamespaces", @@ -1762,7 +1778,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1779,7 +1795,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1841,7 +1857,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1928,7 +1944,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Event", "nickname": "deletecollectionNamespacedEvent", @@ -1969,7 +1985,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1994,7 +2010,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2013,7 +2029,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchNamespacedEventList", @@ -2054,7 +2070,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2079,7 +2095,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2125,7 +2141,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2232,7 +2248,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2275,7 +2291,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete an Event", "nickname": "deleteNamespacedEvent", @@ -2308,7 +2324,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2333,7 +2357,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2352,7 +2376,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Event", "nickname": "watchNamespacedEvent", @@ -2393,7 +2417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2426,7 +2450,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2488,7 +2512,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2526,7 +2550,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchEventListForAllNamespaces", @@ -2567,7 +2591,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2584,7 +2608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2646,7 +2670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2733,7 +2757,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of LimitRange", "nickname": "deletecollectionNamespacedLimitRange", @@ -2774,7 +2798,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2799,7 +2823,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2818,7 +2842,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchNamespacedLimitRangeList", @@ -2859,7 +2883,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2930,7 +2954,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3037,7 +3061,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3080,7 +3104,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a LimitRange", "nickname": "deleteNamespacedLimitRange", @@ -3113,7 +3137,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3138,7 +3170,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3157,7 +3189,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind LimitRange", "nickname": "watchNamespacedLimitRange", @@ -3198,7 +3230,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3231,7 +3263,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3293,7 +3325,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3331,7 +3363,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchLimitRangeListForAllNamespaces", @@ -3372,7 +3404,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3389,7 +3421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3451,7 +3483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3520,77 +3552,6 @@ "consumes": [ "*/*" ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Namespace", - "nickname": "deletecollectionNamespace", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] } ] }, @@ -3599,7 +3560,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Namespace", "nickname": "watchNamespaceList", @@ -3640,7 +3601,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3657,7 +3618,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3703,7 +3664,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3794,7 +3755,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3829,7 +3790,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Namespace", "nickname": "deleteNamespace", @@ -3862,7 +3823,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3879,7 +3848,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3898,7 +3867,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Namespace", "nickname": "watchNamespace", @@ -3939,7 +3908,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3964,7 +3933,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4138,7 +4107,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4220,7 +4189,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4291,7 +4260,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Node", "nickname": "deletecollectionNode", @@ -4332,7 +4301,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4349,7 +4318,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4368,7 +4337,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Node", "nickname": "watchNodeList", @@ -4409,7 +4378,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4426,7 +4395,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4472,7 +4441,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -4563,7 +4532,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4598,7 +4567,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Node", "nickname": "deleteNode", @@ -4631,7 +4600,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -4648,7 +4625,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4667,7 +4644,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Node", "nickname": "watchNode", @@ -4708,7 +4685,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4733,7 +4710,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4843,6 +4820,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNodeWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5005,6 +5012,28 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNode", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5598,7 +5627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -5680,7 +5709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5767,7 +5796,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolumeClaim", "nickname": "deletecollectionNamespacedPersistentVolumeClaim", @@ -5808,7 +5837,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5833,7 +5862,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5852,7 +5881,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaimList", @@ -5893,7 +5922,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5918,7 +5947,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5964,7 +5993,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6071,7 +6100,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6114,7 +6143,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolumeClaim", "nickname": "deleteNamespacedPersistentVolumeClaim", @@ -6147,7 +6176,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6172,7 +6209,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6191,7 +6228,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaim", @@ -6232,7 +6269,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6265,7 +6302,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6327,7 +6364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6365,7 +6402,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchPersistentVolumeClaimListForAllNamespaces", @@ -6406,7 +6443,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6423,7 +6460,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6560,7 +6597,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6650,7 +6687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6721,7 +6758,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolume", "nickname": "deletecollectionPersistentVolume", @@ -6762,7 +6799,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6779,7 +6816,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6798,7 +6835,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolume", "nickname": "watchPersistentVolumeList", @@ -6839,7 +6876,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6856,7 +6893,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6902,7 +6939,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6993,7 +7030,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7028,7 +7065,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolume", "nickname": "deletePersistentVolume", @@ -7061,7 +7098,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7078,7 +7123,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7097,7 +7142,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolume", "nickname": "watchPersistentVolume", @@ -7138,7 +7183,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7163,7 +7208,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7284,7 +7329,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7366,7 +7411,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7453,7 +7498,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Pod", "nickname": "deletecollectionNamespacedPod", @@ -7494,7 +7539,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7519,7 +7564,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7538,7 +7583,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchNamespacedPodList", @@ -7579,7 +7624,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7604,7 +7649,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7650,7 +7695,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7757,7 +7802,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7800,7 +7845,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Pod", "nickname": "deleteNamespacedPod", @@ -7833,7 +7878,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7858,7 +7911,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7877,7 +7930,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Pod", "nickname": "watchNamespacedPod", @@ -7918,7 +7971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7951,7 +8004,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -8085,6 +8138,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPodWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8295,6 +8386,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPod", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8433,7 +8554,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8471,7 +8592,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchPodListForAllNamespaces", @@ -8512,7 +8633,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8529,7 +8650,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -9025,14 +9146,6 @@ "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "query", - "name": "sinceTime", - "description": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "required": false, - "allowMultiple": false - }, { "type": "boolean", "paramType": "query", @@ -9103,6 +9216,14 @@ "summary": "connect GET requests to portforward of Pod", "nickname": "connectGetNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9133,6 +9254,14 @@ "summary": "connect POST requests to portforward of Pod", "nickname": "connectPostNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9796,7 +9925,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -9886,7 +10015,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -9973,7 +10102,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PodTemplate", "nickname": "deletecollectionNamespacedPodTemplate", @@ -10014,7 +10143,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10039,7 +10168,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10058,7 +10187,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchNamespacedPodTemplateList", @@ -10099,7 +10228,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10124,7 +10253,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10170,7 +10299,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -10277,7 +10406,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -10320,7 +10449,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PodTemplate", "nickname": "deleteNamespacedPodTemplate", @@ -10353,7 +10482,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -10378,7 +10515,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10397,7 +10534,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PodTemplate", "nickname": "watchNamespacedPodTemplate", @@ -10438,7 +10575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10471,7 +10608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10533,7 +10670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10571,7 +10708,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchPodTemplateListForAllNamespaces", @@ -10612,7 +10749,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10629,7 +10766,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10691,7 +10828,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10778,7 +10915,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicationController", "nickname": "deletecollectionNamespacedReplicationController", @@ -10819,7 +10956,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10844,7 +10981,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10863,7 +11000,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchNamespacedReplicationControllerList", @@ -10904,7 +11041,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10929,7 +11066,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10975,7 +11112,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -11082,7 +11219,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11125,7 +11262,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicationController", "nickname": "deleteNamespacedReplicationController", @@ -11158,7 +11295,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -11183,7 +11328,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11202,7 +11347,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicationController", "nickname": "watchNamespacedReplicationController", @@ -11243,7 +11388,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11276,7 +11421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11338,7 +11483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11376,7 +11521,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchReplicationControllerListForAllNamespaces", @@ -11417,7 +11562,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11434,7 +11579,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11571,7 +11716,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11736,7 +11881,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11826,7 +11971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11913,7 +12058,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ResourceQuota", "nickname": "deletecollectionNamespacedResourceQuota", @@ -11954,7 +12099,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11979,7 +12124,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11998,7 +12143,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchNamespacedResourceQuotaList", @@ -12039,7 +12184,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12064,7 +12209,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12110,7 +12255,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -12217,7 +12362,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12260,7 +12405,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ResourceQuota", "nickname": "deleteNamespacedResourceQuota", @@ -12293,7 +12438,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -12318,7 +12471,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12337,7 +12490,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ResourceQuota", "nickname": "watchNamespacedResourceQuota", @@ -12378,7 +12531,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12411,7 +12564,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12473,7 +12626,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12511,7 +12664,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchResourceQuotaListForAllNamespaces", @@ -12552,7 +12705,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12569,7 +12722,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12706,7 +12859,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12796,7 +12949,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12883,7 +13036,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Secret", "nickname": "deletecollectionNamespacedSecret", @@ -12924,7 +13077,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12949,7 +13102,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12968,7 +13121,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchNamespacedSecretList", @@ -13009,7 +13162,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13034,7 +13187,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13080,7 +13233,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13187,7 +13340,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -13230,7 +13383,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Secret", "nickname": "deleteNamespacedSecret", @@ -13263,7 +13416,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -13288,7 +13449,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13307,7 +13468,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Secret", "nickname": "watchNamespacedSecret", @@ -13348,7 +13509,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13381,7 +13542,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13443,7 +13604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13481,7 +13642,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchSecretListForAllNamespaces", @@ -13522,7 +13683,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13539,7 +13700,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13601,7 +13762,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13688,7 +13849,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ServiceAccount", "nickname": "deletecollectionNamespacedServiceAccount", @@ -13729,7 +13890,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13754,7 +13915,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13773,7 +13934,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchNamespacedServiceAccountList", @@ -13814,7 +13975,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13839,7 +14000,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13885,7 +14046,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13992,7 +14153,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14035,7 +14196,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ServiceAccount", "nickname": "deleteNamespacedServiceAccount", @@ -14068,7 +14229,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -14093,7 +14262,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14112,7 +14281,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ServiceAccount", "nickname": "watchNamespacedServiceAccount", @@ -14153,7 +14322,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14186,7 +14355,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14248,7 +14417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14286,7 +14455,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchServiceAccountListForAllNamespaces", @@ -14327,7 +14496,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14344,7 +14513,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14406,7 +14575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14499,7 +14668,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchNamespacedServiceList", @@ -14540,7 +14709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14565,7 +14734,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14611,7 +14780,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -14718,7 +14887,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14761,7 +14930,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Service", "nickname": "deleteNamespacedService", @@ -14795,7 +14964,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14814,7 +14983,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Service", "nickname": "watchNamespacedService", @@ -14855,7 +15024,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14888,7 +15057,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -15022,6 +15191,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedServiceWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15232,6 +15439,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedService", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15370,7 +15607,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15408,7 +15645,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchServiceListForAllNamespaces", @@ -15449,7 +15686,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15466,7 +15703,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -16119,7 +16356,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -16168,7 +16405,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -16248,12 +16485,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -16318,6 +16553,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -16371,7 +16610,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16383,8 +16622,8 @@ } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -16464,7 +16703,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -16498,8 +16737,8 @@ } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -16511,7 +16750,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -16527,7 +16766,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -16537,8 +16776,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -16556,7 +16795,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -16567,8 +16806,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -16585,8 +16824,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -16600,14 +16839,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -16628,7 +16867,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -16646,6 +16889,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1.EndpointsList": { "id": "v1.EndpointsList", "description": "EndpointsList is a list of endpoints.", @@ -16662,7 +16909,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16792,7 +17039,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16842,12 +17089,10 @@ }, "firstTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)" }, "lastTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the most recent occurrence of this event was recorded." }, "count": { @@ -16891,7 +17136,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16987,7 +17232,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17068,7 +17313,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17124,7 +17369,40 @@ }, "unschedulable": { "type": "boolean", - "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"" + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" + }, + "taints": { + "type": "array", + "items": { + "$ref": "v1.Taint" + }, + "description": "If specified, the node's taints." + } + } + }, + "v1.Taint": { + "id": "v1.Taint", + "description": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "required": [ + "key", + "effect" + ], + "properties": { + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "value": { + "type": "string", + "description": "Required. The taint value corresponding to the taint key." + }, + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "timeAdded": { + "type": "string", + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints." } } }, @@ -17207,12 +17485,10 @@ }, "lastHeartbeatTime": { "type": "string", - "format": "date-time", "description": "Last time we got an update on a given condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transit from one status to another." }, "reason": { @@ -17384,7 +17660,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17434,7 +17710,7 @@ "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "A label query over volumes to consider for binding." }, "resources": { @@ -17444,6 +17720,10 @@ "volumeName": { "type": "string", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim." + }, + "storageClassName": { + "type": "string", + "description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1" } } }, @@ -17451,8 +17731,8 @@ "id": "v1.PersistentVolumeAccessMode", "properties": {} }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -17462,14 +17742,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -17544,7 +17824,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17658,6 +17938,14 @@ "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + }, "accessModes": { "type": "array", "items": { @@ -17672,6 +17960,10 @@ "persistentVolumeReclaimPolicy": { "type": "string", "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy" + }, + "storageClassName": { + "type": "string", + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass." } } }, @@ -17872,6 +18164,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -18125,6 +18424,78 @@ } } }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.PersistentVolumeStatus": { "id": "v1.PersistentVolumeStatus", "description": "PersistentVolumeStatus is the current status of a persistent volume.", @@ -18159,7 +18530,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -18211,6 +18582,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -18234,7 +18612,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -18248,6 +18626,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -18282,6 +18664,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -18387,6 +18784,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -18434,12 +18843,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -18578,12 +18991,110 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -18627,6 +19138,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -18659,7 +19177,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -18714,6 +19236,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -18771,6 +19339,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -18788,6 +19360,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -19076,6 +19652,224 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, "v1.PodStatus": { "id": "v1.PodStatus", "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", @@ -19109,15 +19903,25 @@ }, "startTime": { "type": "string", - "format": "date-time", "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod." }, + "initContainerStatuses": { + "type": "array", + "items": { + "$ref": "v1.ContainerStatus" + }, + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, "containerStatuses": { "type": "array", "items": { "$ref": "v1.ContainerStatus" }, "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, + "qosClass": { + "type": "string", + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md" } } }, @@ -19139,12 +19943,10 @@ }, "lastProbeTime": { "type": "string", - "format": "date-time", "description": "Last time we probed the condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -19241,7 +20043,6 @@ "properties": { "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container was last (re-)started" } } @@ -19273,12 +20074,10 @@ }, "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which previous execution of the container started" }, "finishedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container last terminated" }, "containerID": { @@ -19325,7 +20124,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19389,7 +20188,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19510,7 +20309,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -19594,7 +20392,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19683,7 +20481,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19741,7 +20539,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19782,6 +20580,10 @@ "$ref": "v1.LocalObjectReference" }, "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret" + }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level." } } }, @@ -19801,7 +20603,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19842,9 +20644,6 @@ "v1.ServiceSpec": { "id": "v1.ServiceSpec", "description": "ServiceSpec describes the attributes that a user creates on a service.", - "required": [ - "ports" - ], "properties": { "ports": { "type": "array", @@ -19968,8 +20767,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -19991,19 +20790,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -20017,6 +20817,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/README.CICD.k8s.md b/k8s/README.CICD.k8s.md new file mode 100644 index 000000000..3a83accc9 --- /dev/null +++ b/k8s/README.CICD.k8s.md @@ -0,0 +1,66 @@ +# Kubernetes CI/CD VSTS +For k8s CI/CD pipeline delivery a series of tasks must be created in VSTS to deploy k8s in Azure + +## Prerequisites +* A Kubernetes cluster. Follow Azure Container Service's [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough) to create one. +* A private Docker registry. Follow Azure Container Registry's [guide](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal) to create one. +* Optionally, previous steps can be skipped if you run gen-k8s-env.ps1 (or gen-k8s-env-aks.ps1 if you would like to use AKS instead of ACS) script to automatically create the azure environment needed for kubernetes deployment. Azure cli 2.0 must be previously installed [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). For example: + +>``` +>./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -orchestratorName k8s-cluster -dnsName k8s-dns +>``` +or using AKS instead of ACS +>``` +>./gen-k8s-env-aks -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -dnsName k8s-dns -serviceName k8s-cluster -createAcr true -nodeCount 3 -nodeVMSize Standard_D2_v2 +>``` +* An `Azure Blob storage`. It is needed for storing the kubernetes config file used by the hosted agent to access to Kubernetes cluster. Example: + + + +* Upload the `kubernetes config file` to the blob storage previously created. Execute the following command which will download the config file into the directory `c:\Users\\.kube\` and then, upload it to your blob storage: + +>``` +>https://eshopk8s.blob.core.windows.net/k8s-config/config +>``` + +## Create the VSTS tasks +1. Create a `Download File` task to download the kubernetes binary `kubectl` to the hosted agent. For example: + +>``` +>https://storage.googleapis.com/kubernetes-release/release/v1.8.5/bin/windows/386/kubectl.exe +>``` + + + +2. Create a Download File task to download the kubernetes config file to the hosted agent. For example: + +>``` +>https://eshopk8s.blob.core.windows.net/k8s-config/config +>``` + + +3. Create a powershell task to execute the k8s deployment script. For example: + +* Deployment script path + +>``` +>$(System.DefaultWorkingDirectory)/All Microservices/docker-compose/deploy.ps1 +>``` + +* Deployment script path arguments. Use value: + +>``` +>-deployCI $true -execPath '$(System.DefaultWorkingDirectory)/' -kubeconfigPath '$(System.DefaultWorkingDirectory)/' -deployInfrastructure $true -imageTag dev -configFile '$(System.DefaultWorkingDirectory)/$(Build.DefinitionName)/docker-compose/conf_local.yml' +>``` + + +- deployCI: Must be set to `$true`. This avoids create images (always are pulled from registry) and compile bits. +- deployInfrastructure: Can be set to `$false` if don't want to deploy infrastructure containers (like Redis, rabbit, SQL,...). +- imageTag: Image tag to pull from k8s. +- configFile: Configuration file (refer to [README.k8s.md](./README.k8s.md) for more info). This file is part of the VSTS build output. +- execPath: path where the k8s binary is stored +- kubeconfigPath: path where the k8s config file is stored + + You can use additional parameters (i.e. pass registry and user/password to use custom registry instead of DockerHub. Plase, refer to [README.k8s.md](./README.k8s.md) for more info. + + diff --git a/README.k8s.md b/k8s/README.k8s.md similarity index 85% rename from README.k8s.md rename to k8s/README.k8s.md index 37592ce2c..85bcdec6c 100644 --- a/README.k8s.md +++ b/k8s/README.k8s.md @@ -4,10 +4,18 @@ The k8s directory contains Kubernetes configuration for the eShopOnContainers ap ## Prerequisites * A Kubernetes cluster. Follow Azure Container Service's [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough) to create one. * A private Docker registry. Follow Azure Container Registry's [guide](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal) to create one. -* Optionally, previous steps can be skipped if you run gen-k8s-env.ps1 script to automatically create the azure environment needed for kubernetes deployment. Azure cli 2.0 must be previously installed [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). For example: +* Optionally, previous steps can be skipped if you run gen-k8s-env.ps1 (or gen-k8s-env-aks.ps1 if you would like to use AKS instead of ACS) script to automatically create the azure environment needed for kubernetes deployment. Azure cli 2.0 must be previously installed [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). For example: + + **Important**: Note the parameter "-createAcr true". If you are creating the K8s cluster but you want to re-use and existing ACR, say "-createAcr false". + +>``` +>./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -createAcr true -orchestratorName k8s-cluster -dnsName k8s-dns >``` ->./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -orchestratorName k8s-cluster -dnsName k8s-dns +or using AKS instead of ACS >``` +>./gen-k8s-env-aks -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -dnsName k8s-dns -serviceName k8s-cluster -createAcr true -nodeCount 3 -nodeVMSize Standard_D2_v2 +>``` + * A Docker development environment with `docker` and `docker-compose`. * Visit [docker.com](https://docker.com) to download the tools and set up the environment. Docker's [installation guide](https://docs.docker.com/engine/getstarted/step_one/#step-3-verify-your-installation) covers verifying your Docker installation. * The Kubernetes command line client, `kubectl`. @@ -17,11 +25,13 @@ The k8s directory contains Kubernetes configuration for the eShopOnContainers ap 1. Open a PowerShell command line at the `k8s` directory of your local eShopOnContainers repository. 1. Ensure `docker`, `docker-compose`, and `kubectl` are on the path, and configured for your Docker machine and Kubernetes cluster. 1. Run `deploy.ps1` with your registry information. The Docker username and password are provided by Azure Container Registry, and can be retrieved from the Azure portal. Optionally, ACR credentials can be obtained by running the following command: + >``` >az acr credential show -n eshopregistry >``` Once the user and password are retrieved, run the following script for deployment. For example: + >``` >./deploy.ps1 -registry myregistry.azurecr.io -dockerUser User -dockerPassword SecretPassword -configFile file_with_config.json >``` @@ -54,6 +64,12 @@ The script accepts following parameters: + `deployInfrastructure`: If `true` infrastructure containers (rabbitmq, mongo, redis, sql) will be deployed in k8s. If `false` those containers (and its related deployments and services in k8s) won't be deployed. + `dockerOrg`: Name of the organization in the registry where the images are (or will be pushed). Default value is `eshop` (which has images provided by Microsoft) +**Important:** If you **don't pass the `-buildBits $true` the script won't build and publish the projects** to their `obj/Docker/publish` folder. If any project is not published, you'll be receiving errors like: + +``` +ERROR: Service 'xxxxxxx' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder123456789/obj/Docker/publish: no such file or directory +``` + ### Typical usages of the script: Build all projects, and deploy all them in k8s including infrastructure containers in a organization called `foo` in Docker Hub. Images will be tagged with my current git branch and containers will use the configuration set in `conf_local.yml` file: @@ -72,4 +88,4 @@ Deploy k8s using public images that Microsoft provides: ``` ./deploy.ps1 -buildImages $false -configFile conf_local.yml -imageTag master -``` \ No newline at end of file +``` diff --git a/k8s/basket-data.yaml b/k8s/basket-data.yaml index b4f84f188..b48e73fed 100644 --- a/k8s/basket-data.yaml +++ b/k8s/basket-data.yaml @@ -25,5 +25,5 @@ spec: spec: containers: - name: basket-data - image: redis:3.2-alpine + image: redis diff --git a/k8s/conf-files.md b/k8s/conf-files.md new file mode 100644 index 000000000..3a74a86bd --- /dev/null +++ b/k8s/conf-files.md @@ -0,0 +1,17 @@ +# YAML files used to deploy to k8s + +This is just a brief enumeration of the configuration files used to create the k8s objects. Use as reference to find where specific object is. + +- `deployments.yaml` Contains the definition of all deployments of the eShopOnContainers. Do not contain any infrastructure deployment (so no SQL, Redis, ...). +- `services.yaml` Contains the definition of all services of the eShopOnContainers. Do not contain any infrastructure service (so no SQL, Redis, ...). +- `basket-data.yaml` Contains the definition of the Redis (used by basket.api) deployment and service +- `nosql-data.yaml` Contains the definition of the Mongodb (used by locations and marketing) deployment and service +- `sql-data.yaml` Contains the definition of the SQL server deployment and service +- `rabbitmq.yaml` Contains the definition of the RabbitMQ deployment and service +- `keystore-data.yaml` Contains the deployment and service definition of the Redis used to mantain coherence between all the ASP.NET Identity keystores. +- `conf_local.yaml` Contains the configuration map that configures all the Pods to use "local" containers (that is all containers in k8s) +- `conf_cloud.yaml` Contains the configuration map that configures all the Pods to use "cloud" resources (that is use Azure resources instead infrastructure containers). This file is provided with no valid values, just for example. +- `frontend.yaml` Contains the deployment and service definition of the NGINX frontend used as reverse-proxy + +- For more information what kubernetes deployments are, read [Kubernetes help](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) +- For more information what kubernetes services are, read [Kubernetes help](https://kubernetes.io/docs/concepts/services-networking/service/) diff --git a/k8s/conf_cloud.yml b/k8s/conf_cloud.yml index a7f855095..0f079fd3f 100644 --- a/k8s/conf_cloud.yml +++ b/k8s/conf_cloud.yml @@ -25,11 +25,10 @@ data: # Ordering.API entries OrderingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure) OrderingSqlDb: Ordering SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....) + GracePeriodManager_GracePeriodTime: "1" + GracePeriodManager_CheckUpdateTime: "15000" # Payment.API entries PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure) -# GracePeriodManager entries - GracePeriodTime: "5" # Grace period duration (time when you can cancel order) in minutes - GracePeriodCheckUpdateTime: "60000" # Interval time to check new Order status (in milliseconds) # Global entries UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ) keystore: REDIS CONNECTION STRING FOR KEYSTORE \ No newline at end of file diff --git a/k8s/conf_local.yml b/k8s/conf_local.yml index 1193fc36d..9a2059e63 100644 --- a/k8s/conf_local.yml +++ b/k8s/conf_local.yml @@ -21,7 +21,12 @@ data: OrderingBus: rabbitmq OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word; PaymentBus: rabbitmq - GracePeriodTime: "1" - GracePeriodCheckUpdateTime: "60000" UseAzureServiceBus: "False" + EnableLoadTest: "False" keystore: keystore-data + GracePeriodManager_GracePeriodTime: "1" + GracePeriodManager_CheckUpdateTime: "15000" + Instrumentation_Key: "" + + + diff --git a/k8s/deploy.ps1 b/k8s/deploy.ps1 index 70a8ad817..bcb2d7393 100644 --- a/k8s/deploy.ps1 +++ b/k8s/deploy.ps1 @@ -54,7 +54,6 @@ Write-Host "Docker image Tag: $imageTag" -ForegroundColor Yellow # building and publishing docker images if needed if($buildBits) { Write-Host "Building and publishing eShopOnContainers..." -ForegroundColor Yellow - dotnet restore ../eShopOnContainers-ServicesAndWebApps.sln dotnet publish -c Release -o obj/Docker/publish ../eShopOnContainers-ServicesAndWebApps.sln } if ($buildImages) { @@ -105,16 +104,16 @@ ExecKube -cmd 'delete configmap config-files' ExecKube -cmd 'delete configmap urls' ExecKube -cmd 'delete configmap externalcfg' -# start sql, rabbitmq, frontend deploymentsExecKube -cmd 'delete configmap config-files' +# start sql, rabbitmq, frontend deployments ExecKube -cmd 'create configmap config-files --from-file=nginx-conf=nginx.conf' ExecKube -cmd 'label configmap config-files app=eshop' if ($deployInfrastructure) { - Write-Host 'Deploying infrastructure deployments (databases, redis, ...)' -ForegroundColor Yellow + Write-Host 'Deploying infrastructure deployments (databases, redis, RabbitMQ...)' -ForegroundColor Yellow ExecKube -cmd 'create -f sql-data.yaml -f basket-data.yaml -f keystore-data.yaml -f rabbitmq.yaml -f nosql-data.yaml' } -Write-Host 'Deploying code deployments (databases, redis, ...)' -ForegroundColor Yellow +Write-Host 'Deploying code deployments (Web APIs, Web apps, ...)' -ForegroundColor Yellow ExecKube -cmd 'create -f services.yaml -f frontend.yaml' if ([string]::IsNullOrEmpty($externalDns)) { @@ -136,7 +135,8 @@ ExecKube -cmd 'create configmap urls ` --from-literal=BasketHealthCheckUrl=http://basket/hc ` --from-literal=CatalogUrl=http://$($externalDns)/catalog-api ` --from-literal=CatalogHealthCheckUrl=http://catalog/hc ` - --from-literal=PicBaseUrl=http://$($externalDns)/catalog-api/api/v1/pic/ ` + --from-literal=PicBaseUrl=http://$($externalDns)/catalog-api/api/v1/catalog/items/[0]/pic/ ` + --from-literal=Marketing_PicBaseUrl=http://$($externalDns)/marketing-api/api/v1/campaigns/[0]/pic/ ` --from-literal=IdentityUrl=http://$($externalDns)/identity ` --from-literal=IdentityHealthCheckUrl=http://identity/hc ` --from-literal=OrderingUrl=http://ordering ` @@ -146,13 +146,25 @@ ExecKube -cmd 'create configmap urls ` --from-literal=MvcClientOrderingUrl=http://ordering ` --from-literal=MvcClientCatalogUrl=http://catalog ` --from-literal=MvcClientBasketUrl=http://basket ` + --from-literal=MvcClientMarketingUrl=http://marketing ` + --from-literal=MvcClientLocationsUrl=http://locations ` + --from-literal=MarketingHealthCheckUrl=http://marketing/hc ` --from-literal=WebSpaHealthCheckUrl=http://webspa/hc ` + --from-literal=SpaClientMarketingExternalUrl=http://$($externalDns)/marketing-api ` --from-literal=SpaClientOrderingExternalUrl=http://$($externalDns)/ordering-api ` --from-literal=SpaClientCatalogExternalUrl=http://$($externalDns)/catalog-api ` --from-literal=SpaClientBasketExternalUrl=http://$($externalDns)/basket-api ` --from-literal=SpaClientIdentityExternalUrl=http://$($externalDns)/identity ` - --from-literal=SpaClientExternalUrl=http://$($externalDns)' - + --from-literal=SpaClientLocationsUrl=http://$($externalDns)/locations-api ` + --from-literal=LocationsHealthCheckUrl=http://locations/hc ` + --from-literal=SpaClientExternalUrl=http://$($externalDns) ` + --from-literal=LocationApiClient=http://$($externalDns)/locations-api ` + --from-literal=MarketingApiClient=http://$($externalDns)/marketing-api ` + --from-literal=BasketApiClient=http://$($externalDns)/basket-api ` + --from-literal=OrderingApiClient=http://$($externalDns)/ordering-api ` + --from-literal=PaymentHealthCheckUrl=http://payment/hc' + + ExecKube -cmd 'label configmap urls app=eshop' Write-Host "Deploying configuration from $configFile" -ForegroundColor Yellow diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml index 6eec27278..9935b83d7 100644 --- a/k8s/deployments.yaml +++ b/k8s/deployments.yaml @@ -15,8 +15,8 @@ spec: image: eshop/basket.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/basket-api + - name: PATH_BASE + value: /basket-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -32,13 +32,39 @@ spec: configMapKeyRef: name: externalcfg key: UseAzureServiceBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key - name: IdentityUrl valueFrom: configMapKeyRef: name: urls key: IdentityUrl + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - - containerPort: 80 + - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -59,8 +85,8 @@ spec: image: eshop/catalog.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/catalog-api + - name: PATH_BASE + value: /catalog-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -74,15 +100,36 @@ spec: - name: AzureStorageEnabled valueFrom: configMapKeyRef: - name: urls + name: externalcfg key: CatalogAzureStorageEnabled - name: EventBusConnection valueFrom: configMapKeyRef: name: externalcfg key: CatalogBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -103,9 +150,9 @@ spec: image: eshop/identity.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/identity - - name: ConnectionStrings__DefaultConnection + - name: PATH_BASE + value: /identity + - name: ConnectionString valueFrom: configMapKeyRef: name: externalcfg @@ -127,8 +174,49 @@ spec: configMapKeyRef: name: urls key: SpaClientExternalUrl + - name: LocationApiClient + valueFrom: + configMapKeyRef: + name: urls + key: LocationApiClient + - name: MarketingApiClient + valueFrom: + configMapKeyRef: + name: urls + key: MarketingApiClient + - name: BasketApiClient + valueFrom: + configMapKeyRef: + name: urls + key: BasketApiClient + - name: OrderingApiClient + valueFrom: + configMapKeyRef: + name: urls + key: OrderingApiClient + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -149,8 +237,8 @@ spec: image: eshop/ordering.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/ordering-api + - name: PATH_BASE + value: /ordering-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -171,55 +259,44 @@ spec: configMapKeyRef: name: urls key: IdentityUrl - ports: - - containerPort: 80 - imagePullSecrets: - - name: registry-key ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: graceperiodmanager -spec: - paused: true - template: - metadata: - labels: - app: graceperiodmanager - component: ordering - spec: - containers: - - name: graceperiodmanager - image: eshop/graceperiodmanager - imagePullPolicy: Always - env: - - name: ConnectionString - valueFrom: - configMapKeyRef: - name: externalcfg - key: OrderingSqlDb - - name: EventBusConnection + - name: CheckUpdateTime valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodManagerBus + key: GracePeriodManager_CheckUpdateTime - name: GracePeriodTime valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodTime - - name: CheckUpdateTime + key: GracePeriodManager_GracePeriodTime + - name: ApplicationInsights__InstrumentationKey valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodCheckUpdateTime - - name: AzureServiceBusEnabled + key: Instrumentation_Key + - name: UseLoadTest valueFrom: configMapKeyRef: name: externalcfg - key: UseAzureServiceBus + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -240,8 +317,8 @@ spec: image: eshop/locations.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/locations-api + - name: PATH_BASE + value: /locations-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -267,8 +344,39 @@ spec: configMapKeyRef: name: urls key: IdentityUrl + - name: IdentityUrlExternal + valueFrom: + configMapKeyRef: + name: urls + key: IdentityUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -289,8 +397,8 @@ spec: image: eshop/marketing.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/marketing-api + - name: PATH_BASE + value: /marketing-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -321,8 +429,44 @@ spec: configMapKeyRef: name: urls key: IdentityUrl + - name: IdentityUrlExternal + valueFrom: + configMapKeyRef: + name: urls + key: IdentityUrl + - name: PicBaseUrl + valueFrom: + configMapKeyRef: + name: urls + key: Marketing_PicBaseUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -343,8 +487,8 @@ spec: image: eshop/payment.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/payment-api + - name: PATH_BASE + value: /payment-api - name: AzureServiceBusEnabled valueFrom: configMapKeyRef: @@ -355,8 +499,29 @@ spec: configMapKeyRef: name: externalcfg key: PaymentBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -377,8 +542,8 @@ spec: image: eshop/webmvc imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/webmvc + - name: PATH_BASE + value: /webmvc - name: DPConnectionString valueFrom: configMapKeyRef: @@ -396,6 +561,11 @@ spec: configMapKeyRef: name: urls key: MvcClientExternalUrl + - name: LocationsUrl + valueFrom: + configMapKeyRef: + name: urls + key: MvcClientLocationsUrl - name: CatalogUrl valueFrom: configMapKeyRef: @@ -411,8 +581,69 @@ spec: configMapKeyRef: name: urls key: MvcClientOrderingUrl + - name: MarketingUrl + valueFrom: + configMapKeyRef: + name: urls + key: MvcClientMarketingUrl + - name: BasketUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: BasketHealthCheckUrl + - name: CatalogUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: CatalogHealthCheckUrl + - name: IdentityUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: IdentityHealthCheckUrl + - name: OrderingUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: OrderingHealthCheckUrl + - name: MarketingUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: MarketingHealthCheckUrl + - name: PaymentUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -433,8 +664,8 @@ spec: image: eshop/webstatus imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/webstatus + - name: PATH_BASE + value: /webstatus - name: BasketUrl valueFrom: configMapKeyRef: @@ -455,6 +686,16 @@ spec: configMapKeyRef: name: urls key: OrderingHealthCheckUrl + - name: LocationsUrl + valueFrom: + configMapKeyRef: + name: urls + key: LocationsHealthCheckUrl + - name: MarketingUrl + valueFrom: + configMapKeyRef: + name: urls + key: MarketingHealthCheckUrl - name: mvc valueFrom: configMapKeyRef: @@ -464,7 +705,19 @@ spec: valueFrom: configMapKeyRef: name: urls - key: WebSpaHealthCheckUrl + key: WebSpaHealthCheckUrl + - name: PaymentUrl + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 imagePullSecrets: @@ -521,6 +774,16 @@ spec: configMapKeyRef: name: urls key: SpaClientOrderingExternalUrl + - name: MarketingUrl + valueFrom: + configMapKeyRef: + name: urls + key: SpaClientMarketingExternalUrl + - name: LocationsUrl + valueFrom: + configMapKeyRef: + name: urls + key: SpaClientLocationsUrl - name: BasketUrlHC valueFrom: configMapKeyRef: @@ -541,7 +804,38 @@ spec: configMapKeyRef: name: urls key: OrderingHealthCheckUrl + - name: MarketingUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: MarketingHealthCheckUrl + - name: PaymentUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key diff --git a/k8s/gen-k8s-env-aks.ps1 b/k8s/gen-k8s-env-aks.ps1 new file mode 100644 index 000000000..6b8449565 --- /dev/null +++ b/k8s/gen-k8s-env-aks.ps1 @@ -0,0 +1,32 @@ +Param( + [parameter(Mandatory=$true)][string]$resourceGroupName, + [parameter(Mandatory=$true)][string]$location, + [parameter(Mandatory=$false)][string]$registryName, + [parameter(Mandatory=$true)][string]$serviceName, + [parameter(Mandatory=$true)][string]$dnsName, + [parameter(Mandatory=$true)][string]$createAcr=$true, + [parameter(Mandatory=$false)][int]$nodeCount=2, + [parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2" +) + +# Create resource group +Write-Host "Creating resource group..." -ForegroundColor Yellow +az group create --name=$resourceGroupName --location=$location + +if ($createAcr -eq $true) { + # Create Azure Container Registry + Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow + az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic +} + +# Create kubernetes orchestrator +Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow +az aks create --resource-group=$resourceGroupName --name=$serviceName --dns-name-prefix=$dnsName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize + +# Retrieve kubernetes cluster configuration and save it under ~/.kube/config +az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName + +if ($createAcr -eq $true) { + # Show ACR credentials + az acr credential show -n $registryName +} \ No newline at end of file diff --git a/k8s/gen-k8s-env.ps1 b/k8s/gen-k8s-env.ps1 index c3b82469c..fffe1546f 100644 --- a/k8s/gen-k8s-env.ps1 +++ b/k8s/gen-k8s-env.ps1 @@ -1,17 +1,20 @@ Param( [parameter(Mandatory=$true)][string]$resourceGroupName, [parameter(Mandatory=$true)][string]$location, - [parameter(Mandatory=$true)][string]$registryName, + [parameter(Mandatory=$false)][string]$registryName, [parameter(Mandatory=$true)][string]$orchestratorName, [parameter(Mandatory=$true)][string]$dnsName, - [parameter(Mandatory=$true)][string]$createAcr=$true + [parameter(Mandatory=$true)][string]$createAcr=$true, + [parameter(Mandatory=$false)][int]$agentCount=2, + [parameter(Mandatory=$false)][string]$agentVMSize="Standard_D2_v2", + [parameter(Mandatory=$false)][int]$masterCount=1 ) # Create resource group Write-Host "Creating resource group..." -ForegroundColor Yellow az group create --name=$resourceGroupName --location=$location -if ($createAcr) { +if ($createAcr -eq $true) { # Create Azure Container Registry Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic @@ -19,10 +22,12 @@ if ($createAcr) { # Create kubernetes orchestrator Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow -az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName --name=$orchestratorName --dns-prefix=$dnsName --generate-ssh-keys +az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName --name=$orchestratorName --dns-prefix=$dnsName --generate-ssh-keys --agent-count=$agentCount --agent-vm-size=$agentVMSize --master-count=$masterCount # Retrieve kubernetes cluster configuration and save it under ~/.kube/config az acs kubernetes get-credentials --resource-group=$resourceGroupName --name=$orchestratorName -# Show ACR credentials -az acr credential show -n $registryName \ No newline at end of file +if ($createAcr -eq $true) { + # Show ACR credentials + az acr credential show -n $registryName +} \ No newline at end of file diff --git a/img/k8s/blob_creation.png b/k8s/img/blob_creation.png similarity index 99% rename from img/k8s/blob_creation.png rename to k8s/img/blob_creation.png index a9e386ead..1b391e72c 100644 Binary files a/img/k8s/blob_creation.png and b/k8s/img/blob_creation.png differ diff --git a/k8s/img/deploy_script_task.png b/k8s/img/deploy_script_task.png new file mode 100644 index 000000000..2e5e1e4ac Binary files /dev/null and b/k8s/img/deploy_script_task.png differ diff --git a/img/k8s/get_kubectlbin_task.png b/k8s/img/get_kubectlbin_task.png similarity index 99% rename from img/k8s/get_kubectlbin_task.png rename to k8s/img/get_kubectlbin_task.png index 423aceca8..7d999579d 100644 Binary files a/img/k8s/get_kubectlbin_task.png and b/k8s/img/get_kubectlbin_task.png differ diff --git a/img/k8s/get_kubectlconfig_task.png b/k8s/img/get_kubectlconfig_task.png similarity index 99% rename from img/k8s/get_kubectlconfig_task.png rename to k8s/img/get_kubectlconfig_task.png index 594e68ba7..e9585ae81 100644 Binary files a/img/k8s/get_kubectlconfig_task.png and b/k8s/img/get_kubectlconfig_task.png differ diff --git a/k8s/keystore-data.yaml b/k8s/keystore-data.yaml index 3340cce35..0e2dfa9b9 100644 --- a/k8s/keystore-data.yaml +++ b/k8s/keystore-data.yaml @@ -25,5 +25,5 @@ spec: spec: containers: - name: keystore-data - image: redis:3.2-alpine + image: redis diff --git a/k8s/rabbitmq.yaml b/k8s/rabbitmq.yaml index a0d87549c..d2a7de906 100644 --- a/k8s/rabbitmq.yaml +++ b/k8s/rabbitmq.yaml @@ -25,6 +25,6 @@ spec: spec: containers: - name: rabbitmq - image: rabbitmq:3.6.9-alpine + image: rabbitmq:3-management ports: - containerPort: 5672 diff --git a/k8s/readme.md b/k8s/readme.md new file mode 100644 index 000000000..43534d32e --- /dev/null +++ b/k8s/readme.md @@ -0,0 +1,12 @@ +# Kubernetes (k8s) deploy information + +This folder contains files needed to **create** a ACS with Kubernetes in Azure and to **deploy** eShopServices in a existing Kubernetes: + +- `gen-k8s-env.ps1` Script to create a ACS with Kubernetes in Azure +- `deploy.ps1` Script to deploy eShopOnContainers in a existing k8s + +Refer to file [README.k8s.md](./README.k8s.md) for detailed information + +Refer to file [README.CICD.k8s.md](./README.CICD.k8s.md) for information about how to set a VSTS build for deploying on k8s + +Refer to file [conf-files.md](./conf-files.md) for a brief description of every YAML file in this folder \ No newline at end of file diff --git a/k8s/services.yaml b/k8s/services.yaml index d88604e88..02b73448a 100644 --- a/k8s/services.yaml +++ b/k8s/services.yaml @@ -56,20 +56,6 @@ spec: --- apiVersion: v1 kind: Service -metadata: - labels: - app: eshop - component: graceperiodmanager - name: graceperiodmanager -spec: - ports: - - port: 80 - selector: - app: eshop - component: graceperiodmanager ---- -apiVersion: v1 -kind: Service metadata: labels: app: eshop diff --git a/k8s/sql-data.yaml b/k8s/sql-data.yaml index 6edcd21bc..245622e83 100644 --- a/k8s/sql-data.yaml +++ b/k8s/sql-data.yaml @@ -25,9 +25,11 @@ spec: spec: containers: - name: sql-data - image: microsoft/mssql-server-linux:ctp1-3 + image: microsoft/mssql-server-linux:2017-latest env: - name: ACCEPT_EULA value: "Y" - - name: SA_PASSWORD + - name: MSSQL_PID + value: Developer + - name: MSSQL_SA_PASSWORD value: Pass@word diff --git a/readme/README.ENV.md b/readme/README.ENV.md new file mode 100644 index 000000000..bdb436a1a --- /dev/null +++ b/readme/README.ENV.md @@ -0,0 +1,67 @@ +**Note**: It is very important to disable any ESHOP_AZURE variables from .env file when the local storage or container services is set. Remember you can disable any variable from .env file putting '#' character before the variable declaration and you can run and test separately any Azure services. + +With the steps explained in the next section, you will be able to run the application with Azure Redis Cache instead of the container of Redis service. + +# Azure Redis Cache service +To enable the Redis Cache of Azure in eShop it is necessary to have previously configured the Azure Redis service through ARM file or manually through Azure portal. You can use the [ARM files](deploy/az/redis/readme.md) already created in eShop. Once the Redis Cache service is created, it is necessary to get the Primary connection string from information service in the Azure portal and modify the port value from 6380 to 6379 and the ssl value from True to False to establish a without ssl connection with the cache server. This Primary connection must be declared on .env file located in the solution root folder with `ESHOP_AZURE_REDIS_BASKET_DB` variable name. + +For example: +>ESHOP_AZURE_REDIS_BASKET_DB=yourredisservice.redis.cache.windows.net:6379,password=yourredisservicepassword,ssl=False,abortConnect=False + +With the steps explained in the next section, you will be able to run the application with Azure Service Bus instead of the container of RabbitMQ service. + +# Azure Service Bus service +To enable the service bus of Azure in eShop solution it is necessary having created previously the service bus service through ARM file or manually through Azure portal. You can use the [ARM files](deploy/az/servicebus/readme.md) already created in eShop. Finally, it is necessary to get the Shared access policy named "Root" (if you generated the service through ARM file) from eshop_event_bus topic. This policy must be declared on .env file located in the solution root folder with `ESHOP_AZURE_SERVICE_BUS` name. + +For example: +>ESHOP_AZURE_SERVICE_BUS=Endpoint=sb://yourservicebusservice.servicebus.windows.net/;SharedAccessKeyName=Root;SharedAccessKey=yourtopicpolicykey=;EntityPath=eshop_event_bus + +Once the service bus service is created, it is necessary to set to true the "AzureServiceBusEnabled" environment variable from `settings.json` file on Catalog.API, Ordering.API, Basket.API, Payment.API, GracePeriodManager, Marketing.API and Locations.API. + +With the steps explained in the next section, you will be able to run the application with Azure Storage Account instead of the local container storage. + +# Azure Storage Account service +To enable Azure storage of Azure in eShopOnAzure solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue.Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `settings.json` in Catalog.API and Marketing.API.Finally, it is necessary to get the container endpoint url from information service in the Azure portal, This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content and `ESHOP_AZURE_STORAGE_MARKETING` for the Marketing.API content. + +Do not forget to put a slash character '/' in the end of the url. + +For example: +>ESHOP_AZURE_STORAGE_CATALOG=https://yourcatalogstorageaccountservice.blob.core.windows.net/yourcontainername/ +>ESHOP_AZURE_STORAGE_MARKETING=https://yourmarketingstorageaccountservice.blob.core.windows.net/yourcontainername/ + + +## Check status of Azure Storage Account with Health Checks +It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog and/or Marketing section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account. + +For example: +>ESHOP_AZURE_STORAGE_CATALOG_NAME=storageaccountname +>ESHOP_AZURE_STORAGE_CATALOG_KEY=storageaccountkey +>ESHOP_AZURE_STORAGE_MARKETING_NAME=storageaccountname +>ESHOP_AZURE_STORAGE_MARKETING_KEY=storageaccountkey + +With the steps explained in the next section, you will be able to run the application with Azure SQL Database instead of local storage. + +# Azure SQL Database +To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, Catalaog.API and Marketing.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file. + +For example: +>ESHOP_AZURE_CATALOG_DB=catalogazureconnectionstring +>ESHOP_AZURE_IDENTITY_DB=identityazureconnectionstring +>ESHOP_AZURE_ORDERING_DB=orderingazureconnectionstring +>ESHOP_AZURE_MARKETING_DB=marketingazureconnectionstring + +With the steps explained in the next section, you will be able to run the application with Azure Cosmos DB Database instead of local storage. + +# Azure Cosmos DB +To enable Azure Cosmos DB in eShop is required to have the connection string. If you do not have an Azure Cosmos DB created you can use the ARM files under **deploy/az/cosmos** folder available in eShop or do it manually. Once the connection string is availabe it is necessary to add it in the .env file in the `ESHOP_AZURE_COSMOSDB`variable. + +For example: +>ESHOP_AZURE_COSMOSDB=cosmosconnectionstring + +# Azure Functions +To enable the Azure Functions in eShop you can add the URI where the functions have been deployed. You can use the ARM files under **deploy/az/azurefunctions** to create the resources in Azure. Once created and available, it is necessary to add to the .env file the `ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI` variable. + +For example: + >ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=https://marketing-functions.azurewebsites.net/api/MarketingDetailsHttpTrigger?code=AzureFunctioncode + +See Azure Functions deployment Files and Readme for more details [ARM files](deploy/az/azurefunctions/readme.md) \ No newline at end of file diff --git a/readme/readme-docker-compose.md b/readme/readme-docker-compose.md new file mode 100644 index 000000000..69735a9f4 --- /dev/null +++ b/readme/readme-docker-compose.md @@ -0,0 +1,79 @@ +# Docker-compose yaml files + +In the root folder of the repo are all docker-compose files (`docker-compose*.yml`). Here is a list of all of them and what is their purpose: + +## Container build + +* `docker-compose.ci.build.yml`: This file is for starting the build container to build the project using a container that has all needed prerequisites. Refer to [corresponding wiki section](https://github.com/dotnet-architecture/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code)#build-the-bits-through-the-build-container-image) for more information. + +## Files needed to run eShopOnContainers locally + +* `docker-compose.yml`: This file contains **the definition of all images needed for running eShopOnContainers**. +* `docker-compose.override.yml`: This file contains the base configuration for all images of the previous file + +Usually these two files are using together. The standard way to start eShopOnContainers from CLI is: + +``` +docker-compose -f docker-compose.yml -f docker-compose.override.yml +``` + +This will start eShopOnContainers with all containers running locally, and it is the default development environment. + +## Files needed to run eShopOnContainers on a remote docker host + +* `docker-compose.prod.yml`: This file is a replacement of the `docker-compose.override.yml` but contains some configurations more suitable for a "production" environment or when you need to run the services using an external docker host. + +``` +docker-compose -f docker-compose.yml -f docker-compose.prod.yml +``` + +When using this file the following environments variables must be set: + +* `ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP` with the IP or DNS name of the docker host that runs the services (can use `localhost` if needed). +* `ESHOP_AZURE_STORAGE_CATALOG` with the URL of the Azure Storage that will host the catalog images +* `ESHOP_AZURE_STORAGE_MARKETING` with the URL of the Azure Storage that will host the marketing campaign images + +You might wonder why an external image resource (storage) is needed when using `docker-compose.prod.yml` instead of `docker-compose.override.yml`. Answer to this is related to a limitation of Docker Compose file format. This is how we set the environment configuration of Catalog microservice in `docker-compose.override.yml`: + +``` +PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} +``` + +The `PicBaseUrl` variable is set to the value of `ESHOP_AZURE_STORAGE_CATALOG` if this variable is set to any value other than blank string. If not, the value is set to `http://localhost:5101/api/v1/catalog/items/[0]/pic/`. That works perfectly in a local environment where you run all your services in `localhost` and setting `ESHOP_AZURE_STORAGE_CATALOG` you can use or not Azure Storage for the images (if you don't use Azure Storage images are served locally by catalog servide). But when you run the services in a external docker host, specified in `ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP`, the configuration should be as follows: + +``` +PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101/api/v1/catalog/items/[0]/pic/} +``` + +So, use `ESHOP_AZURE_STORAGE_CATALOG` if set, and if not use `http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101/api/v1/catalog/items/[0]/pic/}`. Unfortunately seems that docker-compose do not substitute variables inside variables, so the value that `PicBaseUrl` gets if `ESHOP_AZURE_STORAGE_CATALOG` is not set is literally `http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101/api/v1/catalog/items/[0]/pic/}` without any substitution. + +**For more information** about docker-compose variable substitution read the [compose docs](https://docs.docker.com/compose/compose-file/#variable-substitution). + +## Other files + +* `docker-compose.nobuild.yml`: This file contains the definition of all images needed to run the eShopOnContainers. Contains **the same images that `docker-compose.yml`** but without any `build` instruction. If you use this file instead of `docker-compose.yml` when launching the project and you don't have the images built locally, **the images will be pulled from dockerhub**. This file is not intended for development usage, but for some CI/CD scenarios. +* `docker-compose.vs.debug.yml`: This file is used by Docker Tools of VS2017, and should not be used directly. +* `docker-compose.vs.release.yml`: This file is used by Docker Tools of VS2017, and should not be used directly. + +**Note**: The reason why we need the `docker-compose.nobuild.yml` is that [docker-compose issue #3391](https://github.com/docker/compose/issues/3391). Once solved, parameter `--no-build` of docker-compose could be used safely in a CI/CD environments and the need for this file will disappear. + + +## Windows container files + +All `docker-compose-windows*.yml` files have a 1:1 relationship with the same file without the `-windows` in its name. Those files are used to run Windows Containers instead of Linux Containers. + +* `docker-compose-windows.yml`: Contains the definitions of all containers that are needed to run eShopOnContainers using windows containers (equivalent to `docker-compose.yml`). +* `docker-compose-windows.override.yml`: Contains the base configuration for all windows containers + +**Note** We plan **to remove** the `docker-compose-windows.override.yml` file, because it is **exactly the same** as the `docker-compose.override.yml`. The reason of its existence is historical, but is no longer needed. You can use `docker-compose.override.yml` instead. + +* `docker-compose-windows.prod.yml` is the equivalent of `docker-compose.prod.yml` for containers windows. As happens with `docker-compose-windows.override.yml` this file will be deleted in a near future, so you should use `docker-compose.prod.yml` instead. + +## "External container" files + +These files were intended to provide a fast way to start only "infrastructure" containers (SQL Server, Redis, etc). *This files are deprecated and will be deleted in a near future**: + +* `docker-compose-external.override.yml` +* `docker-compose-external.yml` + +If you want to start only certain containers use `docker-compose -f ... -f ... up container1 contaner2 containerN` as specified in [compose doc](https://docs.docker.com/compose/reference/up/) \ No newline at end of file diff --git a/readme/readme.md b/readme/readme.md new file mode 100644 index 000000000..b6280f56d --- /dev/null +++ b/readme/readme.md @@ -0,0 +1,19 @@ +# Documentation index + +This file contains links to the documentation of the project. + +* **Wiki**: The wiki contains detailed step-by-step information about how to set up the project. Read it at: [https://github.com/dotnet-architecture/eShopOnContainers/wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki) + +## Documentation included in files + +* [Branch Guide](../branch-guide.md): List of branches used and their purpose. +* [vsts-docs folder](../vsts-docs/readme.md): Information about how to setup a CI/CD procedure using VSTS +* [Kubernetes](../k8s/readme.md): Information about how to deploy eShopOnContainers in a kubernetes cluster, and how to setup a CI/CD for k8s using VSTS +* [deploy](../deploy/readme.md): Information about how deploy Azure resources using the Azure CLI 2.0. +* [.env file](./README.ENV.md): What is the `.env` file and how to use it to configure eShopOnContainers to use external resources (like Azure) +* [docker-compose files](./readme-docker-compose.md): What are all these `docker-compose-*.yml` files + +## Docs folder + +The `/docs` folder contains the pdfs versions of the books + diff --git a/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj b/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj deleted file mode 100644 index bfe61a85a..000000000 --- a/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netcoreapp1.1 - Microsoft.eShopOnContainers.BuildingBlocks - - - - - - - - \ No newline at end of file diff --git a/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs b/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs deleted file mode 100644 index 3db776b9a..000000000 --- a/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs +++ /dev/null @@ -1,95 +0,0 @@ -namespace Microsoft.eShopOnContainers.BuildingBlocks -{ - using Microsoft.AspNetCore.DataProtection; - using Microsoft.AspNetCore.DataProtection.Repositories; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.Logging; - using System; - using System.Linq; - using System.Net; - - ///

- /// Extension methods for for configuring - /// data protection options. - /// - public static class DataProtectionBuilderExtensions - { - /// - /// Sets up data protection to persist session keys in Redis. - /// - /// The used to set up data protection options. - /// The connection string specifying the Redis instance and database for key storage. - /// - /// The for continued configuration. - /// - /// - /// Thrown if or is . - /// - /// - /// Thrown if is empty. - /// - public static IDataProtectionBuilder PersistKeysToRedis(this IDataProtectionBuilder builder, string redisConnectionString) - { - if (builder == null) - { - throw new ArgumentNullException(nameof(builder)); - } - - if (redisConnectionString == null) - { - throw new ArgumentNullException(nameof(redisConnectionString)); - } - - if (redisConnectionString.Length == 0) - { - throw new ArgumentException("Redis connection string may not be empty.", nameof(redisConnectionString)); - } - - var ips = Dns.GetHostAddressesAsync(redisConnectionString).Result; - - return builder.Use(ServiceDescriptor.Singleton(services => - new RedisXmlRepository(ips.First().ToString(), services.GetRequiredService>()))); - } - - /// - /// Updates an to use the service of - /// a specific type, removing all other services of that type. - /// - /// The that should use the specified service. - /// The with the service the should use. - /// - /// The for continued configuration. - /// - /// - /// Thrown if or is . - /// - public static IDataProtectionBuilder Use(this IDataProtectionBuilder builder, ServiceDescriptor descriptor) - { - // This algorithm of removing all other services of a specific type - // before adding the new/replacement service is how the base ASP.NET - // DataProtection bits work. Due to some of the differences in how - // that base set of bits handles DI, it's better to follow suit - // and work in the same way than to try and debug weird issues. - if (builder == null) - { - throw new ArgumentNullException(nameof(builder)); - } - - if (descriptor == null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - for (int i = builder.Services.Count - 1; i >= 0; i--) - { - if (builder.Services[i]?.ServiceType == descriptor.ServiceType) - { - builder.Services.RemoveAt(i); - } - } - - builder.Services.Add(descriptor); - return builder; - } - } -} diff --git a/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs b/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs deleted file mode 100644 index f5a903b65..000000000 --- a/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs +++ /dev/null @@ -1,210 +0,0 @@ -namespace Microsoft.eShopOnContainers.BuildingBlocks -{ - using Microsoft.AspNetCore.DataProtection.Repositories; - using Microsoft.Extensions.Logging; - using StackExchange.Redis; - using System; - using System.Collections.Generic; - using System.Text.RegularExpressions; - using System.Xml.Linq; - - /// - /// Key repository that stores XML encrypted keys in a Redis distributed cache. - /// - /// - /// - /// The values stored in Redis are XML documents that contain encrypted session - /// keys used for the protection of things like session state. The document contents - /// are double-encrypted - first with a changing session key; then by a master key. - /// As such, there's no risk in storing the keys in Redis - even if someone can crack - /// the master key, they still need to also crack the session key. (Other solutions - /// for sharing keys across a farm environment include writing them to files - /// on a file share.) - /// - /// - /// While the repository uses a hash to keep the set of encrypted keys separate, you - /// can further separate these items from other items in Redis by specifying a unique - /// database in the connection string. - /// - /// - /// Consumers of the repository are responsible for caching the XML items as needed. - /// Typically repositories are consumed by things like - /// which generates - /// values that get cached. The mechanism is already optimized for caching so there's - /// no need to create a redundant cache. - /// - /// - /// - /// - public class RedisXmlRepository : IXmlRepository, IDisposable - { - /// - /// The root cache key for XML items stored in Redis - /// - public static readonly string RedisHashKey = "DataProtectionXmlRepository"; - - /// - /// The connection to the Redis backing store. - /// - private IConnectionMultiplexer _connection; - - /// - /// Flag indicating whether the object has been disposed. - /// - private bool _disposed = false; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Redis connection string. - /// - /// - /// The used to log diagnostic messages. - /// - /// - /// Thrown if or is . - /// - public RedisXmlRepository(string connectionString, ILogger logger) - : this(ConnectionMultiplexer.Connect(connectionString), logger) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Redis database connection. - /// - /// - /// The used to log diagnostic messages. - /// - /// - /// Thrown if or is . - /// - public RedisXmlRepository(IConnectionMultiplexer connection, ILogger logger) - { - if (connection == null) - { - throw new ArgumentNullException(nameof(connection)); - } - - if (logger == null) - { - throw new ArgumentNullException(nameof(logger)); - } - - this._connection = connection; - this.Logger = logger; - - // Mask the password so it doesn't get logged. - var configuration = Regex.Replace(this._connection.Configuration, @"password\s*=\s*[^,]*", "password=****", RegexOptions.IgnoreCase); - this.Logger.LogDebug("Storing data protection keys in Redis: {RedisConfiguration}", configuration); - } - - /// - /// Gets the logger. - /// - /// - /// The used to log diagnostic messages. - /// - public ILogger Logger { get; private set; } - - /// - /// Performs application-defined tasks associated with freeing, releasing, - /// or resetting unmanaged resources. - /// - public void Dispose() - { - this.Dispose(true); - } - - /// - /// Gets all top-level XML elements in the repository. - /// - /// - /// An with the set of elements - /// stored in the repository. - /// - public IReadOnlyCollection GetAllElements() - { - var database = this._connection.GetDatabase(); - var hash = database.HashGetAll(RedisHashKey); - var elements = new List(); - - if (hash == null || hash.Length == 0) - { - return elements.AsReadOnly(); - } - - foreach (var item in hash.ToStringDictionary()) - { - elements.Add(XElement.Parse(item.Value)); - } - - this.Logger.LogDebug("Read {XmlElementCount} XML elements from Redis.", elements.Count); - return elements.AsReadOnly(); - } - - /// - /// Adds a top-level XML element to the repository. - /// - /// The element to add. - /// - /// An optional name to be associated with the XML element. - /// For instance, if this repository stores XML files on disk, the friendly name may - /// be used as part of the file name. Repository implementations are not required to - /// observe this parameter even if it has been provided by the caller. - /// - /// - /// The parameter must be unique if specified. - /// For instance, it could be the ID of the key being stored. - /// - /// - /// Thrown if is . - /// - public void StoreElement(XElement element, string friendlyName) - { - if (element == null) - { - throw new ArgumentNullException(nameof(element)); - } - - if (string.IsNullOrEmpty(friendlyName)) - { - // The framework always passes in a name, but - // the contract indicates this may be null or empty. - friendlyName = Guid.NewGuid().ToString(); - } - - this.Logger.LogDebug("Storing XML element with friendly name {XmlElementFriendlyName}.", friendlyName); - - this._connection.GetDatabase().HashSet(RedisHashKey, friendlyName, element.ToString()); - } - - /// - /// Releases unmanaged and - optionally - managed resources. - /// - /// - /// to release both managed and unmanaged resources; - /// to release only unmanaged resources. - /// - protected virtual void Dispose(bool disposing) - { - if (!this._disposed) - { - if (disposing) - { - if (this._connection != null) - { - this._connection.Close(); - this._connection.Dispose(); - } - } - - this._connection = null; - this._disposed = true; - } - } - } -} diff --git a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj index 1387a74dd..ce65f7da8 100644 --- a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj +++ b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj @@ -1,13 +1,13 @@  - netcoreapp1.1 + netstandard2.0 - - - + + + diff --git a/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs index 21436d3cd..dde05e1e3 100644 --- a/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs @@ -5,9 +5,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions { public interface IEventBus { + void Publish(IntegrationEvent @event); + void Subscribe() where T : IntegrationEvent where TH : IIntegrationEventHandler; + void SubscribeDynamic(string eventName) where TH : IDynamicIntegrationEventHandler; @@ -17,7 +20,5 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions void Unsubscribe() where TH : IIntegrationEventHandler where T : IntegrationEvent; - - void Publish(IntegrationEvent @event); } } diff --git a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj index fe7e35d98..ac2d3783e 100644 --- a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj @@ -1,17 +1,12 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBus - - - - - - + \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/CommandBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/CommandBusRabbitMQ.cs deleted file mode 100644 index 27e67d9ca..000000000 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/CommandBusRabbitMQ.cs +++ /dev/null @@ -1,145 +0,0 @@ -//using Microsoft.eShopOnContainers.BuildingBlocks.CommandBus; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using Polly; -using Polly.Retry; -using RabbitMQ.Client; -using RabbitMQ.Client.Events; -using RabbitMQ.Client.Exceptions; -using System; -using System.Collections.Generic; -using System.Net.Sockets; -using System.Text; -using System.Threading.Tasks; - -/* -namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ -{ - public class CommandBusRabbitMQ : ICommandBus, IDisposable - { - const string BROKER_NAME = "eshop_command_bus"; - - private readonly IRabbitMQPersistentConnection _persistentConnection; - private readonly ILogger _logger; - - private IModel _consumerChannel; - private string _queueName; - - private readonly Dictionary _handlers; - private readonly Dictionary _typeMappings; - - public CommandBusRabbitMQ(IRabbitMQPersistentConnection persistentConnection, - ILogger logger) - { - _logger = logger; - _persistentConnection = persistentConnection; - _handlers = new Dictionary(); - _typeMappings = new Dictionary(); - } - - public void Send(string name, T data) - { - Send(new IntegrationCommand(name, data)); - } - - public void Handle(string name, IIntegrationCommandHandler handler) - { - _handlers.Add(name, handler); - _typeMappings.Add(name, typeof(TC)); - } - - public void Handle(string name, IIntegrationCommandHandler handler) - { - _handlers.Add(name, handler); - } - public void Handle(TI handler) where TI : IIntegrationCommandHandler - { - var name = typeof(TI).Name; - _handlers.Add(name, handler); - _typeMappings.Add(name, typeof(TC)); - } - - private void Send(IntegrationCommand command) - { - if (!_persistentConnection.IsConnected) - { - _persistentConnection.TryConnect(); - } - - var policy = RetryPolicy.Handle() - .Or() - .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => - { - _logger.LogWarning(ex.ToString()); - }); - - using (var channel = _persistentConnection.CreateModel()) - { - var commandName = command.Name; - channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); - var message = JsonConvert.SerializeObject(command); - var body = Encoding.UTF8.GetBytes(message); - policy.Execute(() => - { - channel.BasicPublish(exchange: BROKER_NAME, - routingKey: commandName, - basicProperties: null, - body: body); - }); - } - } - - private IModel CreateConsumerChannel() - { - if (!_persistentConnection.IsConnected) - { - _persistentConnection.TryConnect(); - } - - var channel = _persistentConnection.CreateModel(); - - channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); - _queueName = channel.QueueDeclare().QueueName; - var consumer = new EventingBasicConsumer(channel); - consumer.Received += async (model, ea) => - { - var commandName = ea.RoutingKey; - var message = Encoding.UTF8.GetString(ea.Body); - await InvokeHandler(commandName, message); - }; - - channel.BasicConsume(queue: _queueName, - noAck: true, - consumer: consumer); - - channel.CallbackException += (sender, ea) => - { - _consumerChannel.Dispose(); - _consumerChannel = CreateConsumerChannel(); - }; - - return channel; - } - - private Task InvokeHandler(string commandName, string message) - { - if (_handlers.ContainsKey(commandName)) - { - - } - - } - - public void Dispose() - { - if (_consumerChannel != null) - { - _consumerChannel.Dispose(); - } - } - - - - } -} -*/ \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs index 0aafaf90a..2e0555e61 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs @@ -15,16 +15,17 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { private readonly IConnectionFactory _connectionFactory; private readonly ILogger _logger; - + private readonly int _retryCount; IConnection _connection; bool _disposed; object sync_root = new object(); - public DefaultRabbitMQPersistentConnection(IConnectionFactory connectionFactory,ILogger logger) + public DefaultRabbitMQPersistentConnection(IConnectionFactory connectionFactory, ILogger logger, int retryCount = 5) { _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + _retryCount = retryCount; } public bool IsConnected @@ -69,7 +70,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { var policy = RetryPolicy.Handle() .Or() - .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => + .WaitAndRetry(_retryCount, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => { _logger.LogWarning(ex.ToString()); } @@ -88,7 +89,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ _connection.ConnectionBlocked += OnConnectionBlocked; _logger.LogInformation($"RabbitMQ persistent connection acquired a connection {_connection.Endpoint.HostName} and is subscribed to failure events"); - + return true; } else diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 07a130f22..f2129be69 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -11,10 +11,7 @@ using RabbitMQ.Client; using RabbitMQ.Client.Events; using RabbitMQ.Client.Exceptions; using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Sockets; -using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -29,19 +26,21 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ private readonly IEventBusSubscriptionsManager _subsManager; private readonly ILifetimeScope _autofac; private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; + private readonly int _retryCount; private IModel _consumerChannel; private string _queueName; public EventBusRabbitMQ(IRabbitMQPersistentConnection persistentConnection, ILogger logger, - ILifetimeScope autofac, IEventBusSubscriptionsManager subsManager) + ILifetimeScope autofac, IEventBusSubscriptionsManager subsManager, string queueName = null, int retryCount = 5) { _persistentConnection = persistentConnection ?? throw new ArgumentNullException(nameof(persistentConnection)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _subsManager = subsManager ?? new InMemoryEventBusSubscriptionsManager(); + _queueName = queueName; _consumerChannel = CreateConsumerChannel(); _autofac = autofac; - + _retryCount = retryCount; _subsManager.OnEventRemoved += SubsManager_OnEventRemoved; } @@ -75,7 +74,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ var policy = RetryPolicy.Handle() .Or() - .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => + .WaitAndRetry(_retryCount, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => { _logger.LogWarning(ex.ToString()); }); @@ -149,7 +148,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ _subsManager.RemoveDynamicSubscription(eventName); } - public void Dispose() { if (_consumerChannel != null) @@ -172,7 +170,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); - _queueName = channel.QueueDeclare().QueueName; + channel.QueueDeclare(queue: _queueName, + durable: true, + exclusive: false, + autoDelete: false, + arguments: null); + var consumer = new EventingBasicConsumer(channel); consumer.Received += async (model, ea) => @@ -184,7 +187,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ }; channel.BasicConsume(queue: _queueName, - noAck: true, + autoAck: false, consumer: consumer); channel.CallbackException += (sender, ea) => @@ -198,8 +201,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ private async Task ProcessEvent(string eventName, string message) { - - if (_subsManager.HasSubscriptionsForEvent(eventName)) { using (var scope = _autofac.BeginLifetimeScope(AUTOFAC_SCOPE_NAME)) diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj index d7e3a58d8..a7e31fcd7 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj @@ -1,17 +1,17 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ - - - - - - + + + + + + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs index db1b6b390..a3f563c2f 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs @@ -1,7 +1,6 @@ using Microsoft.Azure.ServiceBus; using Microsoft.Extensions.Logging; using System; -using System.IO; namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus { diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index 24c5fba39..03a3d1139 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -1,18 +1,16 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus { - using System; + using Autofac; + using Microsoft.Azure.ServiceBus; + using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.Extensions.Logging; - using Microsoft.Azure.ServiceBus; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; using System.Text; using System.Threading.Tasks; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; - using System.Reflection; - using Microsoft.Azure.ServiceBus.Filters; - using Autofac; - using Newtonsoft.Json.Linq; public class EventBusServiceBus : IEventBus { @@ -22,6 +20,7 @@ private readonly SubscriptionClient _subscriptionClient; private readonly ILifetimeScope _autofac; private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; + private const string INTEGRATION_EVENT_SUFIX = "IntegrationEvent"; public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConnection, ILogger logger, IEventBusSubscriptionsManager subsManager, string subscriptionClientName, @@ -41,7 +40,7 @@ public void Publish(IntegrationEvent @event) { - var eventName = @event.GetType().Name; + var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFIX, ""); var jsonMessage = JsonConvert.SerializeObject(@event); var body = Encoding.UTF8.GetBytes(jsonMessage); @@ -69,7 +68,8 @@ where T : IntegrationEvent where TH : IIntegrationEventHandler { - var eventName = typeof(T).Name; + var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFIX, ""); + var containsKey = _subsManager.HasSubscriptionsForEvent(); if (!containsKey) { @@ -94,7 +94,7 @@ where T : IntegrationEvent where TH : IIntegrationEventHandler { - var eventName = typeof(T).Name; + var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFIX, ""); try { @@ -127,11 +127,25 @@ _subscriptionClient.RegisterMessageHandler( async (message, token) => { - var eventName = message.Label; + var eventName = $"{message.Label}{INTEGRATION_EVENT_SUFIX}"; var messageData = Encoding.UTF8.GetString(message.Body); await ProcessEvent(eventName, messageData); + + // Complete the message so that it is not received again. + await _subscriptionClient.CompleteAsync(message.SystemProperties.LockToken); }, - new MessageHandlerOptions() { MaxConcurrentCalls = 10, AutoComplete = true }); + new MessageHandlerOptions(ExceptionReceivedHandler) { MaxConcurrentCalls = 10, AutoComplete = false }); + } + + private Task ExceptionReceivedHandler(ExceptionReceivedEventArgs exceptionReceivedEventArgs) + { + Console.WriteLine($"Message handler encountered an exception {exceptionReceivedEventArgs.Exception}."); + var context = exceptionReceivedEventArgs.ExceptionReceivedContext; + Console.WriteLine("Exception context for troubleshooting:"); + Console.WriteLine($"- Endpoint: {context.Endpoint}"); + Console.WriteLine($"- Entity Path: {context.EntityPath}"); + Console.WriteLine($"- Executing Action: {context.Action}"); + return Task.CompletedTask; } private async Task ProcessEvent(string eventName, string message) @@ -167,13 +181,13 @@ try { _subscriptionClient - .RemoveRuleAsync(SubscriptionClient.DefaultRule) + .RemoveRuleAsync(RuleDescription.DefaultRuleName) .GetAwaiter() .GetResult(); } catch (MessagingEntityNotFoundException) { - _logger.LogInformation($"The messaging entity {SubscriptionClient.DefaultRule} Could not be found."); + _logger.LogInformation($"The messaging entity { RuleDescription.DefaultRuleName } Could not be found."); } } } diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj index 5be30800e..17076b2f5 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj @@ -1,13 +1,14 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus - - + + + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs index 283031247..52737cef7 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs @@ -1,7 +1,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus { - using System; using Microsoft.Azure.ServiceBus; + using System; public interface IServiceBusPersisterConnection : IDisposable { diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj index cc3d51f6a..7e9b67fc0 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj @@ -1,22 +1,21 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF - - - - - - - + + + + + + - + diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs index bef74b452..5ac8bb862 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs @@ -6,6 +6,7 @@ using System.Data.Common; using System.Linq; using System.Threading.Tasks; using System; +using Microsoft.EntityFrameworkCore.Diagnostics; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services { diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj index 023554e60..5018e198c 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj @@ -1,7 +1,7 @@  - netstandard1.3 + netstandard2.0 @@ -9,8 +9,11 @@ - + + + + \ No newline at end of file diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs new file mode 100644 index 000000000..5a06a3ba2 --- /dev/null +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs @@ -0,0 +1,175 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.Extensions.HealthChecks +{ + // REVIEW: Do we want these to continue to use default parameters? + // REVIEW: What are the appropriate guards for these functions? + + public static class AzureHealthCheckBuilderExtensions + { + public static HealthCheckBuilder AddAzureBlobStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string containerName = null, TimeSpan? cacheDuration = null) + { + var credentials = new StorageCredentials(accountName, accountKey); + var storageAccount = new CloudStorageAccount(credentials, true); + return AddAzureBlobStorageCheck(builder, storageAccount, containerName, cacheDuration); + } + + public static HealthCheckBuilder AddAzureBlobStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string containerName = null, TimeSpan? cacheDuration = null) + { + builder.AddCheck($"AzureBlobStorageCheck {storageAccount.BlobStorageUri} {containerName}", async () => + { + bool result; + try + { + var blobClient = storageAccount.CreateCloudBlobClient(); + + var properties = await blobClient.GetServicePropertiesAsync().ConfigureAwait(false); + + if (!String.IsNullOrWhiteSpace(containerName)) + { + var container = blobClient.GetContainerReference(containerName); + + result = await container.ExistsAsync(); + } + + result = true; + } + catch (Exception) + { + result = false; + } + + return result + ? HealthCheckResult.Healthy($"AzureBlobStorage {storageAccount.BlobStorageUri} is available") + : HealthCheckResult.Unhealthy($"AzureBlobStorage {storageAccount.BlobStorageUri} is unavailable"); + }, cacheDuration ?? builder.DefaultCacheDuration); + + return builder; + } + + public static HealthCheckBuilder AddAzureTableStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string tableName = null, TimeSpan? cacheDuration = null) + { + var credentials = new StorageCredentials(accountName, accountKey); + var storageAccount = new CloudStorageAccount(credentials, true); + return AddAzureTableStorageCheck(builder, storageAccount, tableName, cacheDuration); + } + + public static HealthCheckBuilder AddAzureTableStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string tableName = null, TimeSpan? cacheDuration = null) + { + builder.AddCheck($"AzureTableStorageCheck {storageAccount.TableStorageUri} {tableName}", async () => + { + bool result; + try + { + var tableClient = storageAccount.CreateCloudTableClient(); + + var properties = await tableClient.GetServicePropertiesAsync().ConfigureAwait(false); + + if (!String.IsNullOrWhiteSpace(tableName)) + { + var table = tableClient.GetTableReference(tableName); + + result = await table.ExistsAsync(); + } + result = true; + } + catch (Exception) + { + result = false; + } + + return result + ? HealthCheckResult.Healthy($"AzureTableStorage {storageAccount.BlobStorageUri} is available") + : HealthCheckResult.Unhealthy($"AzureTableStorage {storageAccount.BlobStorageUri} is unavailable"); + + }, cacheDuration ?? builder.DefaultCacheDuration); + + return builder; + } + + public static HealthCheckBuilder AddAzureFileStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string shareName = null, TimeSpan? cacheDuration = null) + { + var credentials = new StorageCredentials(accountName, accountKey); + var storageAccount = new CloudStorageAccount(credentials, true); + return AddAzureFileStorageCheck(builder, storageAccount, shareName, cacheDuration); + } + + public static HealthCheckBuilder AddAzureFileStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string shareName = null, TimeSpan? cacheDuration = null) + { + builder.AddCheck($"AzureFileStorageCheck {storageAccount.FileStorageUri} {shareName}", async () => + { + bool result; + try + { + var fileClient = storageAccount.CreateCloudFileClient(); + + var properties = await fileClient.GetServicePropertiesAsync().ConfigureAwait(false); + + if (!String.IsNullOrWhiteSpace(shareName)) + { + var share = fileClient.GetShareReference(shareName); + + result = await share.ExistsAsync(); + } + + result = true; + } + catch (Exception) + { + result = false; + } + + return result + ? HealthCheckResult.Healthy($"AzureFileStorage {storageAccount.BlobStorageUri} is available") + : HealthCheckResult.Unhealthy($"AzureFileStorage {storageAccount.BlobStorageUri} is unavailable"); + }, cacheDuration ?? builder.DefaultCacheDuration); + + return builder; + } + + public static HealthCheckBuilder AddAzureQueueStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string queueName = null, TimeSpan? cacheDuration = null) + { + var credentials = new StorageCredentials(accountName, accountKey); + var storageAccount = new CloudStorageAccount(credentials, true); + return AddAzureQueueStorageCheck(builder, storageAccount, queueName, cacheDuration); + } + + public static HealthCheckBuilder AddAzureQueueStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string queueName = null, TimeSpan? cacheDuration = null) + { + builder.AddCheck($"AzureQueueStorageCheck {storageAccount.QueueStorageUri} {queueName}", async () => + { + bool result; + try + { + var queueClient = storageAccount.CreateCloudQueueClient(); + + var properties = await queueClient.GetServicePropertiesAsync().ConfigureAwait(false); + + if (!String.IsNullOrWhiteSpace(queueName)) + { + var queue = queueClient.GetQueueReference(queueName); + + result = await queue.ExistsAsync(); + } + result = true; + } + catch (Exception) + { + result = false; + } + + return result + ? HealthCheckResult.Healthy($"AzureFileStorage {storageAccount.BlobStorageUri} is available") + : HealthCheckResult.Unhealthy($"AzureFileStorage {storageAccount.BlobStorageUri} is unavailable"); + + }, cacheDuration ?? builder.DefaultCacheDuration); + + return builder; + } + } +} diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj new file mode 100644 index 000000000..2e0703387 --- /dev/null +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj @@ -0,0 +1,26 @@ + + + + netstandard2.0 + false + false + false + + + + + + + + + + + + + + + + + + + diff --git a/src/Services/Ordering/Ordering.Infrastructure/Properties/AssemblyInfo.cs b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs similarity index 69% rename from src/Services/Ordering/Ordering.Infrastructure/Properties/AssemblyInfo.cs rename to src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs index 00732b2ad..ef88235f5 100644 --- a/src/Services/Ordering/Ordering.Infrastructure/Properties/AssemblyInfo.cs +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ -using System.Reflection; +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -7,7 +10,7 @@ using System.Runtime.InteropServices; // associated with an assembly. [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Ordering.Infrastructure")] +[assembly: AssemblyProduct("HealthChecks.Azure")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible @@ -16,4 +19,4 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("95f1f07c-4d92-4742-bd07-e5b805aab651")] +[assembly: Guid("0c4158b7-7153-4d2e-abfa-4ce07d44f75f")] diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj index 35aacef13..0aef3c907 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj @@ -1,7 +1,7 @@  - netstandard1.3 + netstandard2.0 @@ -9,7 +9,7 @@ - + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj index c0a9c571a..1b642d062 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj @@ -1,7 +1,7 @@  - netstandard1.3 + netstandard2.0 @@ -9,12 +9,12 @@ - - + + - + diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj b/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj index e472bb7a5..b166812cb 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj +++ b/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj @@ -1,14 +1,15 @@  - netstandard1.4 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http - - - + + + + \ No newline at end of file diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs index 0798f85e3..18051a501 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs +++ b/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs @@ -10,6 +10,7 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { @@ -24,13 +25,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http private readonly ILogger _logger; private readonly Func> _policyCreator; private ConcurrentDictionary _policyWrappers; + private readonly IHttpContextAccessor _httpContextAccessor; - public ResilientHttpClient(Func> policyCreator, ILogger logger) + public ResilientHttpClient(Func> policyCreator, ILogger logger, IHttpContextAccessor httpContextAccessor) { _client = new HttpClient(); _logger = logger; _policyCreator = policyCreator; _policyWrappers = new ConcurrentDictionary(); + _httpContextAccessor = httpContextAccessor; } @@ -52,10 +55,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } + } if (requestId != null) { @@ -65,6 +70,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http return await _client.SendAsync(requestMessage); }); } + public Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") { @@ -74,6 +80,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -81,6 +89,14 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http var response = await _client.SendAsync(requestMessage); + // raise exception if HttpResponseCode 500 + // needed for circuit breaker to track fails + + if (response.StatusCode == HttpStatusCode.InternalServerError) + { + throw new HttpRequestException(); + } + return await response.Content.ReadAsStringAsync(); }); } @@ -100,6 +116,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(method, uri); + SetAuthorizationHeader(requestMessage); + requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); if (authorizationToken != null) @@ -154,6 +172,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http var origin = $"{url.Scheme}://{url.DnsSafeHost}:{url.Port}"; return origin; - } + } + + private void SetAuthorizationHeader(HttpRequestMessage requestMessage) + { + var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; + if (!string.IsNullOrEmpty(authorizationHeader)) + { + requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); + } + } } } diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs index 3d5217064..a5f6a63c4 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs +++ b/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs @@ -1,6 +1,8 @@ -using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System; +using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -12,17 +14,21 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { private HttpClient _client; private ILogger _logger; + private readonly IHttpContextAccessor _httpContextAccessor; - public StandardHttpClient(ILogger logger) + public StandardHttpClient(ILogger logger, IHttpContextAccessor httpContextAccessor) { _client = new HttpClient(); _logger = logger; + _httpContextAccessor = httpContextAccessor; } public async Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") { var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -40,10 +46,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http throw new ArgumentException("Value must be either post or put.", nameof(method)); } - // a new StringContent must be created for each retry + // a new StringContent must be created for each retry // as it is disposed after each call - var requestMessage = new HttpRequestMessage(HttpMethod.Post, uri); + var requestMessage = new HttpRequestMessage(method, uri); + + SetAuthorizationHeader(requestMessage); requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); @@ -59,7 +67,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http var response = await _client.SendAsync(requestMessage); - // raise exception if HttpResponseCode 500 + // raise exception if HttpResponseCode 500 // needed for circuit breaker to track fails if (response.StatusCode == HttpStatusCode.InternalServerError) @@ -73,17 +81,19 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http public async Task PostAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") { - return await DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationToken); + return await DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationMethod); } public async Task PutAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") { - return await DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationToken); + return await DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationMethod); } public async Task DeleteAsync(string uri, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") { var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -96,6 +106,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http return await _client.SendAsync(requestMessage); } + + private void SetAuthorizationHeader(HttpRequestMessage requestMessage) + { + var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; + if (!string.IsNullOrEmpty(authorizationHeader)) + { + requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); + } + } } } diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj new file mode 100644 index 000000000..c1240c521 --- /dev/null +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp2.0 + + + + + + + + diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs new file mode 100644 index 000000000..858506e46 --- /dev/null +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs @@ -0,0 +1,59 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Polly; +using Polly.Retry; +using System; +using System.Data.SqlClient; + +namespace Microsoft.AspNetCore.Hosting +{ + public static class IWebHostExtensions + { + public static IWebHost MigrateDbContext(this IWebHost webHost, Action seeder) where TContext : DbContext + { + using (var scope = webHost.Services.CreateScope()) + { + var services = scope.ServiceProvider; + + var logger = services.GetRequiredService>(); + + var context = services.GetService(); + + try + { + logger.LogInformation($"Migrating database associated with context {typeof(TContext).Name}"); + + var retry = Policy.Handle() + .WaitAndRetry(new TimeSpan[] + { + TimeSpan.FromSeconds(5), + TimeSpan.FromSeconds(10), + TimeSpan.FromSeconds(15), + }); + + retry.Execute(() => + { + //if the sql server container is not created on run docker compose this + //migration can't fail for network related exception. The retry options for DbContext only + //apply to transient exceptions. + + context.Database + .Migrate(); + + seeder(context, services); + }); + + + logger.LogInformation($"Migrated database associated with context {typeof(TContext).Name}"); + } + catch (Exception ex) + { + logger.LogError(ex, $"An error occurred while migrating the database used on context {typeof(TContext).Name}"); + } + } + + return webHost; + } + } +} diff --git a/src/Mobile/README.md b/src/Mobile/README.md index 632593518..4a12698b1 100644 --- a/src/Mobile/README.md +++ b/src/Mobile/README.md @@ -10,7 +10,7 @@ eShopOnContainers is a reference app whose imagined purpose is to serve the mobi 1. A Xamarin.Forms mobile app for iOS, Android and Windows. 2. Several .NET Web API microservices deployed as Docker containers. -##Xamarin.Forms App (eShopOnContainers) +### Xamarin.Forms App (eShopOnContainers) This project exercises the following platforms, frameworks or features: diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml index b8acbf952..481c5c100 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml @@ -1,12 +1,11 @@ - + - + #ffffff @@ -18,101 +17,168 @@ #00857D #e2e2e2 #ff5252 + #757575 + #FFFFFF + #979797 + #007aff + #CCCCCC + #C9C9C9 + Transparent + Transparent + #007aff + #FFFFFF + #007aff + Transparent + #FFFFFF + #1FAECE + Transparent + Transparent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - + true + @style/AppCompatDialogStyle + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj old mode 100755 new mode 100644 index 8443790d8..4af4a9a3f --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj @@ -1,5 +1,6 @@  + Debug AnyCPU @@ -16,8 +17,8 @@ Resources\Resource.Designer.cs Off Properties\AndroidManifest.xml - False - v6.0 + true + v8.0 armeabi,armeabi-v7a,x86 @@ -42,6 +43,7 @@ False 1G Xamarin + armeabi;armeabi-v7a;x86 pdbonly @@ -58,14 +60,6 @@ ..\..\..\..\packages\Acr.Support.2.1.0\lib\MonoAndroid10\Acr.Support.Android.dll True - - ..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\MonoAndroid10\Acr.UserDialogs.dll - True - - - ..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll - True - ..\..\..\..\packages\AndHUD.1.2.0\lib\MonoAndroid\AndHUD.dll True @@ -73,12 +67,6 @@ ..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\MonoAndroid10\FFImageLoading.dll - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.dll - - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll - ..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\MonoAndroid10\FFImageLoading.Platform.dll @@ -100,6 +88,21 @@ ..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll True + + ..\..\..\..\packages\PCLCrypto.2.0.147\lib\MonoAndroid23\PCLCrypto.dll + + + ..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll + + + ..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll + + + ..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll + + + ..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll + ..\..\..\..\packages\Plugin.CurrentActivity.1.0.1\lib\MonoAndroid10\Plugin.CurrentActivity.dll @@ -146,79 +149,93 @@ ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll True - - - ..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll - True + + ..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll - - ..\..\..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll - True + + + ..\..\..\..\packages\Autofac.4.5.0\lib\netstandard1.1\Autofac.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll - True + + ..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll - True + + ..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll - True + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\FormsViewGroup.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll - True + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Core.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll - True + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll - - ..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll - True + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Android.dll - True + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Base.dll - True + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Light.dll - True + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\FormsViewGroup.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Core.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + ..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Annotations.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll - - ..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Pages.dll + + ..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.CardView.dll - - - ..\..\..\..\packages\Autofac.4.5.0\lib\netstandard1.1\Autofac.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Design.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Transition.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Transition.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v4.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v4.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.Palette.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll - @@ -229,6 +246,9 @@ + + + @@ -255,6 +275,12 @@ Designer + + + + + + @@ -268,9 +294,6 @@ - - - @@ -280,15 +303,6 @@ - - - - - - - - - @@ -375,7 +389,7 @@ - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core @@ -389,14 +403,27 @@ - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config old mode 100755 new mode 100644 index 55c835f31..08c447821 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config @@ -1,7 +1,7 @@  - + @@ -14,6 +14,11 @@ + + + + + @@ -63,20 +68,26 @@ + - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/MainApplication.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/MainApplication.cs new file mode 100644 index 000000000..770fedc82 --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/MainApplication.cs @@ -0,0 +1,63 @@ +using System; + +using Android.App; +using Android.OS; +using Android.Runtime; +using Plugin.CurrentActivity; + +namespace eShopOnContainers.TestRunner.Droid +{ + //You can specify additional application information in this attribute + [Application] + public class MainApplication : Application, Application.IActivityLifecycleCallbacks + { + public MainApplication(IntPtr handle, JniHandleOwnership transer) + :base(handle, transer) + { + } + + public override void OnCreate() + { + base.OnCreate(); + RegisterActivityLifecycleCallbacks(this); + //A great place to initialize Xamarin.Insights and Dependency Services! + } + + public override void OnTerminate() + { + base.OnTerminate(); + UnregisterActivityLifecycleCallbacks(this); + } + + public void OnActivityCreated(Activity activity, Bundle savedInstanceState) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivityDestroyed(Activity activity) + { + } + + public void OnActivityPaused(Activity activity) + { + } + + public void OnActivityResumed(Activity activity) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivitySaveInstanceState(Activity activity, Bundle outState) + { + } + + public void OnActivityStarted(Activity activity) + { + CrossCurrentActivity.Current.Activity = activity; + } + + public void OnActivityStopped(Activity activity) + { + } + } +} \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs index b33abfa07..48bbb9b82 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs @@ -1,15 +1,15 @@ #pragma warning disable 1591 -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. +// +//------------------------------------------------------------------------------ -[assembly: Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)] +[assembly: global::Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)] namespace eShopOnContainers.TestRunner.Droid { @@ -26,7 +26,6 @@ namespace eShopOnContainers.TestRunner.Droid public static void UpdateIdValues() { - global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::eShopOnContainers.TestRunner.Droid.Resource.Attribute.actionBarSize; global::AndroidHUD.Resource.Attribute.ahBarColor = global::eShopOnContainers.TestRunner.Droid.Resource.Attribute.ahBarColor; global::AndroidHUD.Resource.Attribute.ahBarLength = global::eShopOnContainers.TestRunner.Droid.Resource.Attribute.ahBarLength; global::AndroidHUD.Resource.Attribute.ahBarWidth = global::eShopOnContainers.TestRunner.Droid.Resource.Attribute.ahBarWidth; @@ -64,8 +63,11 @@ namespace eShopOnContainers.TestRunner.Droid global::AndroidHUD.Resource.Styleable.ProgressWheel_ahText = global::eShopOnContainers.TestRunner.Droid.Resource.Styleable.ProgressWheel_ahText; global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextColor = global::eShopOnContainers.TestRunner.Droid.Resource.Styleable.ProgressWheel_ahTextColor; global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextSize = global::eShopOnContainers.TestRunner.Droid.Resource.Styleable.ProgressWheel_ahTextSize; - global::Splat.Resource.String.library_name = global::eShopOnContainers.TestRunner.Droid.Resource.String.library_name; global::ModernHttpClient.Resource.String.library_name = global::eShopOnContainers.TestRunner.Droid.Resource.String.library_name; + global::PCLCrypto.Resource.String.ApplicationName = global::eShopOnContainers.TestRunner.Droid.Resource.String.ApplicationName; + global::PCLCrypto.Resource.String.Hello = global::eShopOnContainers.TestRunner.Droid.Resource.String.Hello; + global::Splat.Resource.String.library_name = global::eShopOnContainers.TestRunner.Droid.Resource.String.library_name; + global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::eShopOnContainers.TestRunner.Droid.Resource.Attribute.actionBarSize; } public partial class Animation @@ -3036,11 +3038,11 @@ namespace eShopOnContainers.TestRunner.Droid public partial class String { - // aapt resource value: 0x7f080027 - public const int ApplicationName = 2131230759; + // aapt resource value: 0x7f080028 + public const int ApplicationName = 2131230760; - // aapt resource value: 0x7f080026 - public const int Hello = 2131230758; + // aapt resource value: 0x7f080027 + public const int Hello = 2131230759; // aapt resource value: 0x7f08000f public const int abc_action_bar_home_description = 2131230735; @@ -3108,8 +3110,8 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 0x7f080025 public const int character_counter_pattern = 2131230757; - // aapt resource value: 0x7f080028 - public const int library_name = 2131230760; + // aapt resource value: 0x7f080026 + public const int library_name = 2131230758; // aapt resource value: 0x7f080000 public const int mr_button_content_description = 2131230720; @@ -4295,8 +4297,7 @@ namespace eShopOnContainers.TestRunner.Droid public partial class Styleable { - public static int[] ActionBar = new int[] - { + public static int[] ActionBar = new int[] { 2130772007, 2130772009, 2130772010, @@ -4406,15 +4407,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 5 public const int ActionBar_titleTextStyle = 5; - public static int[] ActionBarLayout = new int[] - { + public static int[] ActionBarLayout = new int[] { 16842931}; // aapt resource value: 0 public const int ActionBarLayout_android_layout_gravity = 0; - public static int[] ActionMenuItemView = new int[] - { + public static int[] ActionMenuItemView = new int[] { 16843071}; // aapt resource value: 0 @@ -4422,8 +4421,7 @@ namespace eShopOnContainers.TestRunner.Droid public static int[] ActionMenuView; - public static int[] ActionMode = new int[] - { + public static int[] ActionMode = new int[] { 2130772007, 2130772013, 2130772014, @@ -4449,8 +4447,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int ActionMode_titleTextStyle = 1; - public static int[] ActivityChooserView = new int[] - { + public static int[] ActivityChooserView = new int[] { 2130772035, 2130772036}; @@ -4460,8 +4457,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 0 public const int ActivityChooserView_initialActivityCount = 0; - public static int[] AlertDialog = new int[] - { + public static int[] AlertDialog = new int[] { 16842994, 2130772037, 2130772038, @@ -4487,8 +4483,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int AlertDialog_singleChoiceItemLayout = 4; - public static int[] AppBarLayout = new int[] - { + public static int[] AppBarLayout = new int[] { 16842964, 2130772032, 2130772215}; @@ -4502,8 +4497,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int AppBarLayout_expanded = 2; - public static int[] AppBarLayout_LayoutParams = new int[] - { + public static int[] AppBarLayout_LayoutParams = new int[] { 2130772216, 2130772217}; @@ -4513,8 +4507,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1; - public static int[] AppCompatImageView = new int[] - { + public static int[] AppCompatImageView = new int[] { 16843033, 2130772042}; @@ -4524,8 +4517,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppCompatImageView_srcCompat = 1; - public static int[] AppCompatTextView = new int[] - { + public static int[] AppCompatTextView = new int[] { 16842804, 2130772043}; @@ -4535,8 +4527,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppCompatTextView_textAllCaps = 1; - public static int[] AppCompatTheme = new int[] - { + public static int[] AppCompatTheme = new int[] { 16842839, 16842926, 2130772044, @@ -4986,8 +4977,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int AppCompatTheme_windowNoTitle = 3; - public static int[] BottomSheetBehavior_Params = new int[] - { + public static int[] BottomSheetBehavior_Params = new int[] { 2130772218, 2130772219}; @@ -4997,15 +4987,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 0 public const int BottomSheetBehavior_Params_behavior_peekHeight = 0; - public static int[] ButtonBarLayout = new int[] - { + public static int[] ButtonBarLayout = new int[] { 2130772154}; // aapt resource value: 0 public const int ButtonBarLayout_allowStacking = 0; - public static int[] CardView = new int[] - { + public static int[] CardView = new int[] { 16843071, 16843072, 2130771995, @@ -5059,8 +5047,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 11 public const int CardView_contentPaddingTop = 11; - public static int[] CollapsingAppBarLayout_LayoutParams = new int[] - { + public static int[] CollapsingAppBarLayout_LayoutParams = new int[] { 2130772220, 2130772221}; @@ -5070,8 +5057,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1; - public static int[] CollapsingToolbarLayout = new int[] - { + public static int[] CollapsingToolbarLayout = new int[] { 2130772009, 2130772222, 2130772223, @@ -5129,8 +5115,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 10 public const int CollapsingToolbarLayout_toolbarId = 10; - public static int[] CompoundButton = new int[] - { + public static int[] CompoundButton = new int[] { 16843015, 2130772155, 2130772156}; @@ -5144,8 +5129,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int CompoundButton_buttonTintMode = 2; - public static int[] CoordinatorLayout = new int[] - { + public static int[] CoordinatorLayout = new int[] { 2130772235, 2130772236}; @@ -5155,8 +5139,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int CoordinatorLayout_statusBarBackground = 1; - public static int[] CoordinatorLayout_LayoutParams = new int[] - { + public static int[] CoordinatorLayout_LayoutParams = new int[] { 16842931, 2130772237, 2130772238, @@ -5178,8 +5161,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int CoordinatorLayout_LayoutParams_layout_keyline = 3; - public static int[] DesignTheme = new int[] - { + public static int[] DesignTheme = new int[] { 2130772241, 2130772242, 2130772243}; @@ -5193,8 +5175,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int DesignTheme_textColorError = 2; - public static int[] DrawerArrowToggle = new int[] - { + public static int[] DrawerArrowToggle = new int[] { 2130772157, 2130772158, 2130772159, @@ -5228,8 +5209,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int DrawerArrowToggle_thickness = 7; - public static int[] FloatingActionButton = new int[] - { + public static int[] FloatingActionButton = new int[] { 2130772032, 2130772213, 2130772214, @@ -5263,8 +5243,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int FloatingActionButton_useCompatPadding = 7; - public static int[] ForegroundLinearLayout = new int[] - { + public static int[] ForegroundLinearLayout = new int[] { 16843017, 16843264, 2130772249}; @@ -5278,8 +5257,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ForegroundLinearLayout_foregroundInsidePadding = 2; - public static int[] LinearLayoutCompat = new int[] - { + public static int[] LinearLayoutCompat = new int[] { 16842927, 16842948, 16843046, @@ -5317,8 +5295,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int LinearLayoutCompat_showDividers = 7; - public static int[] LinearLayoutCompat_Layout = new int[] - { + public static int[] LinearLayoutCompat_Layout = new int[] { 16842931, 16842996, 16842997, @@ -5336,8 +5313,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int LinearLayoutCompat_Layout_android_layout_width = 1; - public static int[] ListPopupWindow = new int[] - { + public static int[] ListPopupWindow = new int[] { 16843436, 16843437}; @@ -5347,8 +5323,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int ListPopupWindow_android_dropDownVerticalOffset = 1; - public static int[] MediaRouteButton = new int[] - { + public static int[] MediaRouteButton = new int[] { 16843071, 16843072, 2130771994}; @@ -5362,8 +5337,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int MediaRouteButton_externalRouteEnabledDrawable = 2; - public static int[] MenuGroup = new int[] - { + public static int[] MenuGroup = new int[] { 16842766, 16842960, 16843156, @@ -5389,8 +5363,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int MenuGroup_android_visible = 2; - public static int[] MenuItem = new int[] - { + public static int[] MenuItem = new int[] { 16842754, 16842766, 16842960, @@ -5460,8 +5433,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 13 public const int MenuItem_showAsAction = 13; - public static int[] MenuView = new int[] - { + public static int[] MenuView = new int[] { 16842926, 16843052, 16843053, @@ -5495,8 +5467,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int MenuView_preserveIconSpacing = 7; - public static int[] NavigationView = new int[] - { + public static int[] NavigationView = new int[] { 16842964, 16842973, 16843039, @@ -5538,8 +5509,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int NavigationView_menu = 4; - public static int[] PopupWindow = new int[] - { + public static int[] PopupWindow = new int[] { 16843126, 2130772173}; @@ -5549,15 +5519,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int PopupWindow_overlapAnchor = 1; - public static int[] PopupWindowBackgroundState = new int[] - { + public static int[] PopupWindowBackgroundState = new int[] { 2130772174}; // aapt resource value: 0 public const int PopupWindowBackgroundState_state_above_anchor = 0; - public static int[] ProgressWheel = new int[] - { + public static int[] ProgressWheel = new int[] { 2130772284, 2130772285, 2130772286, @@ -5607,8 +5575,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ProgressWheel_ahTextSize = 2; - public static int[] RecyclerView = new int[] - { + public static int[] RecyclerView = new int[] { 16842948, 2130771968, 2130771969, @@ -5630,22 +5597,19 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int RecyclerView_stackFromEnd = 4; - public static int[] ScrimInsetsFrameLayout = new int[] - { + public static int[] ScrimInsetsFrameLayout = new int[] { 2130772256}; // aapt resource value: 0 public const int ScrimInsetsFrameLayout_insetForeground = 0; - public static int[] ScrollingViewBehavior_Params = new int[] - { + public static int[] ScrollingViewBehavior_Params = new int[] { 2130772257}; // aapt resource value: 0 public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0; - public static int[] SearchView = new int[] - { + public static int[] SearchView = new int[] { 16842970, 16843039, 16843296, @@ -5715,8 +5679,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 12 public const int SearchView_voiceIcon = 12; - public static int[] SnackbarLayout = new int[] - { + public static int[] SnackbarLayout = new int[] { 16843039, 2130772032, 2130772258}; @@ -5730,8 +5693,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int SnackbarLayout_maxActionInlineWidth = 2; - public static int[] Spinner = new int[] - { + public static int[] Spinner = new int[] { 16842930, 16843126, 16843131, @@ -5753,8 +5715,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int Spinner_popupTheme = 4; - public static int[] SwitchCompat = new int[] - { + public static int[] SwitchCompat = new int[] { 16843044, 16843045, 16843074, @@ -5796,8 +5757,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int SwitchCompat_track = 3; - public static int[] TabItem = new int[] - { + public static int[] TabItem = new int[] { 16842754, 16842994, 16843087}; @@ -5811,8 +5771,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int TabItem_android_text = 2; - public static int[] TabLayout = new int[] - { + public static int[] TabLayout = new int[] { 2130772259, 2130772260, 2130772261, @@ -5878,8 +5837,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 9 public const int TabLayout_tabTextColor = 9; - public static int[] TextAppearance = new int[] - { + public static int[] TextAppearance = new int[] { 16842901, 16842902, 16842903, @@ -5917,8 +5875,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 8 public const int TextAppearance_textAllCaps = 8; - public static int[] TextInputLayout = new int[] - { + public static int[] TextInputLayout = new int[] { 16842906, 16843088, 2130772275, @@ -5964,8 +5921,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int TextInputLayout_hintTextAppearance = 2; - public static int[] Toolbar = new int[] - { + public static int[] Toolbar = new int[] { 16842927, 16843072, 2130772009, @@ -6067,8 +6023,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 23 public const int Toolbar_titleTextColor = 23; - public static int[] View = new int[] - { + public static int[] View = new int[] { 16842752, 16842970, 2130772210, @@ -6090,8 +6045,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int View_theme = 4; - public static int[] ViewBackgroundHelper = new int[] - { + public static int[] ViewBackgroundHelper = new int[] { 16842964, 2130772213, 2130772214}; @@ -6105,8 +6059,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ViewBackgroundHelper_backgroundTintMode = 2; - public static int[] ViewStubCompat = new int[] - { + public static int[] ViewStubCompat = new int[] { 16842960, 16842994, 16842995}; diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj old mode 100755 new mode 100644 index f1867bb67..9fc51542f --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj @@ -1,5 +1,6 @@  + Debug AnyCPU @@ -15,8 +16,8 @@ true Resources\Resource.Designer.cs Off - False - v6.0 + true + v8.0 Properties\AndroidManifest.xml @@ -46,67 +47,50 @@ False - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\FormsViewGroup.dll - - - - - ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Extensions.dll + + ..\..\..\..\packages\PCLCrypto.2.0.147\lib\MonoAndroid23\PCLCrypto.dll - - ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll + + ..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll - - - - ..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll - True + + ..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll - - ..\..\..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll - True + + ..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll - True + + ..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll - True + + ..\..\..\..\packages\Plugin.CurrentActivity.1.0.1\lib\MonoAndroid10\Plugin.CurrentActivity.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll - True + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\MonoAndroid10\Plugin.Geolocator.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll - True + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\MonoAndroid10\Plugin.Geolocator.Abstractions.dll - - ..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll - True + + ..\..\..\..\packages\Plugin.Permissions.1.1.7\lib\MonoAndroid10\Plugin.Permissions.dll - - ..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll - True + + ..\..\..\..\packages\Plugin.Permissions.1.1.7\lib\MonoAndroid10\Plugin.Permissions.Abstractions.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Core.dll - - - ..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Pages.dll - - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + + + ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Extensions.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + + + ..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll ..\..\..\..\packages\xunit.abstractions.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.abstractions.dll @@ -120,9 +104,6 @@ ..\..\..\..\packages\xunit.runner.utility.2.1.0\lib\dotnet\xunit.runner.utility.dotnet.dll - - ..\..\..\..\packages\xunit.runner.devices.2.1.0\lib\MonoAndroid\xunit.runner.devices.dll - ..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll @@ -155,12 +136,6 @@ ..\..\..\..\packages\Splat.1.6.2\lib\monoandroid\Splat.dll - - ..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\MonoAndroid10\Acr.UserDialogs.dll - - - ..\..\..\..\packages\Acr.UserDialogs.6.3.3\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll - ..\..\..\..\packages\IdentityModel.1.3.1\lib\portable-net45+wp80+win8+wpa81\IdentityModel.Portable.dll @@ -170,36 +145,102 @@ ..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\MonoAndroid10\FFImageLoading.Platform.dll - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.dll - - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll - ..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll ..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Android.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Annotations.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Base.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Light.dll + + ..\..\..\..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Transition.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Transition.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v4.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v4.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.CardView.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.Palette.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.Design.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Design.dll + + + ..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.dll + + + ..\..\..\..\packages\Acr.UserDialogs.6.3.8\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll + + + ..\..\..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll + + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\FormsViewGroup.dll + + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Core.dll + + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + + ..\..\..\..\packages\xunit.runner.devices.2.1.0\lib\MonoAndroid\xunit.runner.devices.dll + + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.dll + + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll + - + + Designer + @@ -219,27 +260,27 @@ - {f7b6a162-bc4d-4924-b16a-713f9b0344e7} + {6E4285E7-7611-4440-A1B5-3513EBB13807} eShopOnContainers.UnitTests - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config old mode 100755 new mode 100644 index 8262c106d..edb63a00d --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config @@ -1,7 +1,7 @@  - + @@ -13,6 +13,13 @@ + + + + + + + @@ -58,26 +65,33 @@ + + - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + - + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj index 61229f89a..2496f8b50 100755 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj @@ -11,7 +11,7 @@ eShopOnContainers.TestRunner.Windows en-US UAP - 10.0.14393.0 + 10.0.10586.0 10.0.10586.0 14 512 diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json old mode 100755 new mode 100644 index f32fb6319..a9e8dffca --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json @@ -1,11 +1,11 @@ { "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3", - "Xamarin.Forms": "2.3.4.231", + "Xamarin.Forms": "2.5.0.91635", "xunit.runner.devices": "2.1.0" }, "frameworks": { - "uap10.0": {} + "uap10.0.10586": {} }, "runtimes": { "win10-arm": {}, diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj old mode 100755 new mode 100644 index e0b9e0f24..a9f11f6b9 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj @@ -1,5 +1,6 @@  + Debug iPhoneSimulator @@ -22,16 +23,15 @@ 4 false x86_64 - SdkOnly + None True - 10.2 + + False False False False False - False - False True Default HttpClientHandler @@ -60,8 +60,9 @@ Entitlements.plist iPhone Developer true - 10.2 - SdkOnly + + + None none @@ -109,6 +110,21 @@ + + ..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll + + + ..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll + + + ..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll + + + ..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll + + + ..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll + ..\..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\Xamarin.iOS10\System.Net.Http.Extensions.dll @@ -118,20 +134,20 @@ - - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + + ..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll - - ..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Pages.dll + + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll @@ -205,14 +221,11 @@ ..\..\..\..\packages\modernhttpclient.2.4.2\lib\Xamarin.iOS10\ModernHttpClient.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Base.dll + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.Abstractions.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.iOS.dll - - - ..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Light.dll + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.dll @@ -225,13 +238,14 @@ + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + - - - + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config old mode 100755 new mode 100644 index a593d9c75..c578f779e --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config @@ -12,6 +12,11 @@ + + + + + @@ -57,14 +62,13 @@ + + - - - - + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/CatalogServiceTests.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/CatalogServiceTests.cs index bc3d2691b..75045d36b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/CatalogServiceTests.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/CatalogServiceTests.cs @@ -1,5 +1,4 @@ using eShopOnContainers.Core.Services.Catalog; -using eShopOnContainers.Core.Services.RequestProvider; using System.Threading.Tasks; using Xunit; @@ -16,16 +15,6 @@ namespace eShopOnContainers.UnitTests Assert.NotEqual(0, catalog.Count); } - [Fact] - public async Task GetCatalogTest() - { - var requestProvider = new RequestProvider(); - var catalogService = new CatalogService(requestProvider); - var catalog = await catalogService.GetCatalogAsync(); - - Assert.NotEqual(0, catalog.Count); - } - [Fact] public async Task GetFakeCatalogBrandTest() { @@ -35,16 +24,6 @@ namespace eShopOnContainers.UnitTests Assert.NotEqual(0, catalogBrand.Count); } - [Fact] - public async Task GetCatalogBrandTest() - { - var requestProvider = new RequestProvider(); - var catalogService = new CatalogService(requestProvider); - var catalogBrand = await catalogService.GetCatalogBrandAsync(); - - Assert.NotEqual(0, catalogBrand.Count); - } - [Fact] public async Task GetFakeCatalogTypeTest() { @@ -53,15 +32,5 @@ namespace eShopOnContainers.UnitTests Assert.NotEqual(0, catalogType.Count); } - - [Fact] - public async Task GetCatalogTypeTest() - { - var requestProvider = new RequestProvider(); - var catalogService = new CatalogService(requestProvider); - var catalogType = await catalogService.GetCatalogTypeAsync(); - - Assert.NotEqual(0, catalogType.Count); - } } } \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj index fd8c23eca..e69a6340b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj @@ -1,18 +1,14 @@ - - - + + - 10.0 Debug AnyCPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7} + {6E4285E7-7611-4440-A1B5-3513EBB13807} + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true Library - Properties eShopOnContainers.UnitTests eShopOnContainers.UnitTests - es-ES - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} v4.5 Profile111 @@ -20,52 +16,46 @@ true full false - bin\Debug\ - DEBUG;TRACE + bin\Debug + DEBUG; prompt 4 - pdbonly true - bin\Release\ - TRACE + bin\Release prompt 4 - - - - + + + + - + - + + + + + + - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core - - - \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/project.json b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/project.json index 7c3248428..6bd8da4a8 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/project.json +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/project.json @@ -1,6 +1,6 @@ { "dependencies": { - "Xamarin.Forms": "2.3.4.231", + "Xamarin.Forms": "2.5.0.91635", "xunit": "2.2.0", "xunit.runner.console": "2.2.0" }, diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png index 735f57adb..08838125d 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png index f6c02ce97..10deee109 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png index 7385b56c0..fb2f313c1 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png new file mode 100644 index 000000000..a4761bd04 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj index 342acf6b2..687999d99 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj @@ -141,6 +141,7 @@ + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json index 6acfea559..3c49f4852 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json @@ -4,17 +4,16 @@ "IdentityModel": "1.3.1", "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3", "Newtonsoft.Json": "9.0.1", + "PCLCrypto": "2.0.147", "SlideOverKit": "2.1.4", "Xam.Plugin.Geolocator": "3.0.4", "Xam.Plugins.Settings": "2.6.0.12-beta", "Xamarin.FFImageLoading": "2.2.9", "Xamarin.FFImageLoading.Forms": "2.2.9", - "Xamarin.Forms": "2.3.4.231", - "Xamarin.Forms.Theme.Base": "1.0.0.43-pre1", - "Xamarin.Forms.Theme.Light": "1.0.0.43-pre1" + "Xamarin.Forms": "2.5.0.91635" }, "frameworks": { - "uap10.0": {} + "uap10.0.10586": {} }, "runtimes": { "win10-arm": {}, diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs index 8afb683f2..617583a7d 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs @@ -4,29 +4,17 @@ using UIKit; namespace eShopOnContainers.iOS { - // The UIApplicationDelegate for the application. This class is responsible for launching the - // User Interface of the application, as well as listening (and optionally responding) to - // application events from iOS. [Register("AppDelegate")] public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { - // - // This method is invoked when the application has loaded and is ready to run. In this - // method you should instantiate the window, load the UI into it and then make the window - // visible. - // - // You have 17 seconds to return from this method, or iOS will terminate your application. - // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); + SlideOverKit.iOS.SlideOverKit.Init(); CachedImageRenderer.Init(); - var x = typeof(Xamarin.Forms.Themes.LightThemeResources); - x = typeof(Xamarin.Forms.Themes.iOS.UnderlineEffect); - return base.FinishedLaunching(app, options); } } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Effects/CircleEffect.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Effects/CircleEffect.cs new file mode 100644 index 000000000..307227e1c --- /dev/null +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Effects/CircleEffect.cs @@ -0,0 +1,53 @@ +using System; +using Xamarin.Forms; +using Xamarin.Forms.Platform.iOS; +using eShopOnContainers.iOS.Effects; +using CoreGraphics; +using CoreAnimation; + +[assembly: ExportEffect(typeof(CircleEffect), "CircleEffect")] +namespace eShopOnContainers.iOS.Effects +{ + public class CircleEffect : PlatformEffect + { + protected override void OnAttached() + { + UpdateCircle(); + } + + protected override void OnDetached() + { + Container.Layer.Mask = null; + } + + protected override void OnElementPropertyChanged(System.ComponentModel.PropertyChangedEventArgs args) + { + base.OnElementPropertyChanged(args); + + if (args.PropertyName == VisualElement.WidthProperty.PropertyName || + args.PropertyName == VisualElement.HeightProperty.PropertyName) + { + UpdateCircle(); + } + } + + private void UpdateCircle() + { + double width = ((VisualElement)Element).Width; + double height = ((VisualElement)Element).Height; + + if (width <= 0 || height <= 0) + { + return; + } + + double min = Math.Min(width, height); + var layerX = width > min ? (width - min) / 2 : 0; + var layerY = height > min ? (height - min) / 2 : 0; + + var mask = new CAShapeLayer(); + mask.Path = CGPath.EllipseFromRect(new CGRect(layerX, layerY, min, min)); + Container.Layer.Mask = mask; + } + } +} diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist index fb995405e..588aafed9 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist @@ -20,7 +20,7 @@ UIInterfaceOrientationLandscapeRight MinimumOSVersion - 6.0 + 9.0 CFBundleDisplayName eShopOnContainers CFBundleIdentifier diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt deleted file mode 100644 index 8a88b0862..000000000 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt +++ /dev/null @@ -1,24 +0,0 @@ -Connectivity Readme -Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins - -**IMPORTANT** -Android: -You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission - -iOS: -In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist. -See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8 - -Windows Phone: -You must set the ID_CAP_LOCATION permission. - -Getting Started: - -var locator = CrossGeolocator.Current; -locator.DesiredAccuracy = 50; - -var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000); - -Console.WriteLine ("Position Status: {0}", position.Timestamp); -Console.WriteLine ("Position Latitude: {0}", position.Latitude); -Console.WriteLine ("Position Longitude: {0}", position.Longitude); \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard index 2a0cc5633..b071203b7 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - - + + - + + @@ -16,12 +17,12 @@ - + - + @@ -34,22 +35,30 @@ + - - + + - + - - + - + + + + + + + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png new file mode 100644 index 000000000..1e21d4fd0 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png new file mode 100644 index 000000000..2f61741a8 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png new file mode 100644 index 000000000..2f37f30de Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj old mode 100755 new mode 100644 index ea52a9426..7887d6f2d --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj @@ -1,5 +1,6 @@  + Debug iPhoneSimulator @@ -25,16 +26,15 @@ 4 false i386, x86_64 - SdkOnly + None True - 10.2 + + False False False False False - False - False True Default HttpClientHandler @@ -63,6 +63,7 @@ iPhone Developer true Entitlements.plist + None none @@ -123,6 +124,10 @@ + + + + @@ -146,21 +151,9 @@ ..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\Xamarin.iOS10\FFImageLoading.dll - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Forms.dll - - - ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll - ..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Platform.dll - - ..\..\..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.dll - - - ..\..\..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.Abstractions.dll - ..\..\..\..\packages\IdentityModel.1.3.1\lib\portable-net45+wp80+win8+wpa81\IdentityModel.Portable.dll True @@ -173,6 +166,21 @@ ..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll True + + ..\..\..\..\packages\PCLCrypto.2.0.147\lib\xamarinios10\PCLCrypto.dll + + + ..\..\..\..\packages\PInvoke.BCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.BCrypt.dll + + + ..\..\..\..\packages\PInvoke.Kernel32.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Kernel32.dll + + + ..\..\..\..\packages\PInvoke.NCrypt.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.NCrypt.dll + + + ..\..\..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll + ..\..\..\..\packages\Xam.Plugins.Settings.2.6.0.12-beta\lib\Xamarin.iOS10\Plugin.Settings.dll True @@ -204,41 +212,41 @@ + + ..\..\..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll + ..\..\..\..\packages\WebP.Touch.1.0.3\lib\Xamarin.iOS10\WebP.Touch.dll - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Base.dll - True - - - ..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.iOS.dll - True - - - ..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Light.dll - True - ..\..\..\..\packages\Autofac.4.5.0\lib\netstandard1.1\Autofac.dll + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.Abstractions.dll + + + ..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.dll + - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll - ..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\..\..\..\packages\Xamarin.Forms.2.5.0.91635\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Forms.dll - - ..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Pages.dll + + ..\..\..\..\packages\Xamarin.FFImageLoading.Forms.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll @@ -419,7 +427,7 @@ - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core @@ -432,9 +440,6 @@ - - - @@ -443,5 +448,5 @@ - + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config old mode 100755 new mode 100644 index 5240be164..c8179599b --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config @@ -12,6 +12,11 @@ + + + + + @@ -57,13 +62,11 @@ + - + - - - - + \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/.dockerignore b/src/Services/Basket/Basket.API/.dockerignore deleted file mode 100644 index d8f8175f6..000000000 --- a/src/Services/Basket/Basket.API/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index 26dcd6529..ffefed367 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -1,10 +1,8 @@  - netcoreapp1.1 - 1.1.2 - Exe - $(PackageTargetFallback);netstandard1.6.1;dnxcore50;portable-net451+win8 + netcoreapp2.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj @@ -12,29 +10,16 @@ PreserveNewest - - PreserveNewest - - - - - - - - - - - - - - - - - - + + + + + + + @@ -45,10 +30,4 @@ - - - Always - - - diff --git a/src/Services/Basket/Basket.API/Controllers/BasketController.cs b/src/Services/Basket/Basket.API/Controllers/BasketController.cs index 1d00f5f00..11ecac7c2 100644 --- a/src/Services/Basket/Basket.API/Controllers/BasketController.cs +++ b/src/Services/Basket/Basket.API/Controllers/BasketController.cs @@ -1,19 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopOnContainers.Services.Basket.API.Model; +using Basket.API.IntegrationEvents.Events; +using Basket.API.Model; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Basket.API.IntegrationEvents.Events; +using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Basket.API.Services; -using Basket.API.Model; +using System; +using System.Net; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers { - [Route("/")] + [Route("api/v1/[controller]")] [Authorize] public class BasketController : Controller { @@ -21,7 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers private readonly IIdentityService _identitySvc; private readonly IEventBus _eventBus; - public BasketController(IBasketRepository repository, + public BasketController(IBasketRepository repository, IIdentityService identityService, IEventBus eventBus) { @@ -29,8 +27,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers _identitySvc = identityService; _eventBus = eventBus; } + // GET /id [HttpGet("{id}")] + [ProducesResponseType(typeof(CustomerBasket), (int)HttpStatusCode.OK)] public async Task Get(string id) { var basket = await _repository.GetBasketAsync(id); @@ -40,6 +40,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers // POST /value [HttpPost] + [ProducesResponseType(typeof(CustomerBasket), (int)HttpStatusCode.OK)] public async Task Post([FromBody]CustomerBasket value) { var basket = await _repository.UpdateBasketAsync(value); @@ -49,6 +50,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers [Route("checkout")] [HttpPost] + [ProducesResponseType((int)HttpStatusCode.Accepted)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] public async Task Checkout([FromBody]BasketCheckout basketCheckout, [FromHeader(Name = "x-requestid")] string requestId) { var userId = _identitySvc.GetUserIdentity(); @@ -56,6 +59,12 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers guid : basketCheckout.RequestId; var basket = await _repository.GetBasketAsync(userId); + + if (basket == null) + { + return BadRequest(); + } + var eventMessage = new UserCheckoutAcceptedIntegrationEvent(userId, basketCheckout.City, basketCheckout.Street, basketCheckout.State, basketCheckout.Country, basketCheckout.ZipCode, basketCheckout.CardNumber, basketCheckout.CardHolderName, basketCheckout.CardExpiration, basketCheckout.CardSecurityNumber, basketCheckout.CardTypeId, basketCheckout.Buyer, basketCheckout.RequestId, basket); @@ -63,12 +72,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers // Once basket is checkout, sends an integration event to // ordering.api to convert basket to order and proceeds with // order creation process - _eventBus.Publish(eventMessage); - - if (basket == null) - { - return BadRequest(); - } + _eventBus.Publish(eventMessage); return Accepted(); } diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index c81c776b0..b898cd7f0 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -1,6 +1,25 @@ -FROM microsoft/aspnetcore:1.1.2 -ARG source +FROM microsoft/aspnetcore:2.0.3 AS base WORKDIR /app EXPOSE 80 -COPY ${source:-obj/Docker/publish} . + +FROM microsoft/aspnetcore-build:2.0 AS build +WORKDIR /src +COPY eShopOnContainers-ServicesAndWebApps.sln ./ +COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ +COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/ +COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/ +COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/ +RUN dotnet restore +COPY . . +WORKDIR /src/src/Services/Basket/Basket.API +RUN dotnet build -c Release -o /app + +FROM build AS publish +RUN dotnet publish -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . ENTRYPOINT ["dotnet", "Basket.API.dll"] diff --git a/src/Services/Basket/Basket.API/Dockerfile.nanowin b/src/Services/Basket/Basket.API/Dockerfile.nanowin deleted file mode 100644 index 9c664f4e4..000000000 --- a/src/Services/Basket/Basket.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Basket.API.dll"] diff --git a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs index 199409ecc..e0f2df6fa 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Infrastructure.Exceptions { diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddlewareAppBuilderExtensions.cs b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs similarity index 82% rename from src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddlewareAppBuilderExtensions.cs rename to src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs index 15bf596cc..a09f32f76 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddlewareAppBuilderExtensions.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs @@ -1,10 +1,7 @@ using Microsoft.AspNetCore.Builder; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -namespace Ordering.API.Infrastructure.Middlewares +namespace Basket.API.Infrastructure.Middlewares { public static class FailingMiddlewareAppBuilderExtensions { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs new file mode 100644 index 000000000..7caa9740d --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Authorization; +using Swashbuckle.AspNetCore.Swagger; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Collections.Generic; +using System.Linq; + +namespace Basket.API.Infrastructure.Filters +{ + public class AuthorizeCheckOperationFilter : IOperationFilter + { + public void Apply(Operation operation, OperationFilterContext context) + { + // Check for authorize attribute + var hasAuthorize = context.ApiDescription.ControllerAttributes().OfType().Any() || + context.ApiDescription.ActionAttributes().OfType().Any(); + + if (hasAuthorize) + { + operation.Responses.Add("401", new Response { Description = "Unauthorized" }); + operation.Responses.Add("403", new Response { Description = "Forbidden" }); + + operation.Security = new List>>(); + operation.Security.Add(new Dictionary> + { + { "oauth2", new [] { "basketapi" } } + }); + } + } + } +} \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs index ab7989973..dab725915 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs @@ -8,7 +8,7 @@ using System.Net; namespace Basket.API.Infrastructure.Filters { - public class HttpGlobalExceptionFilter : IExceptionFilter + public partial class HttpGlobalExceptionFilter : IExceptionFilter { private readonly IHostingEnvironment env; private readonly ILogger logger; @@ -52,12 +52,5 @@ namespace Basket.API.Infrastructure.Filters } context.ExceptionHandled = true; } - - private class JsonErrorResponse - { - public string[] Messages { get; set; } - - public object DeveloperMessage { get; set; } - } } } diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs new file mode 100644 index 000000000..bcadc7358 --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs @@ -0,0 +1,9 @@ +namespace Basket.API.Infrastructure.Filters +{ + public class JsonErrorResponse + { + public string[] Messages { get; set; } + + public object DeveloperMessage { get; set; } + } +} diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs new file mode 100644 index 000000000..3e4c3e072 --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using System.Linq; + +namespace Basket.API.Infrastructure.Filters +{ + public class ValidateModelStateFilter : ActionFilterAttribute + { + public override void OnActionExecuting(ActionExecutingContext context) + { + if (context.ModelState.IsValid) + { + return; + } + + var validationErrors = context.ModelState + .Keys + .SelectMany(k => context.ModelState[k].Errors) + .Select(e => e.ErrorMessage) + .ToArray(); + + var json = new JsonErrorResponse + { + Messages = validationErrors + }; + + context.Result = new BadRequestObjectResult(json); + } + } +} diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs new file mode 100644 index 000000000..dfe690f6f --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -0,0 +1,79 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Primitives; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; + +namespace Basket.API.Infrastructure.Middlewares +{ + class ByPassAuthMiddleware + { + private readonly RequestDelegate _next; + private string _currentUserId; + public ByPassAuthMiddleware(RequestDelegate next) + { + _next = next; + _currentUserId = null; + } + + + public async Task Invoke(HttpContext context) + { + var path = context.Request.Path; + if (path == "/noauth") + { + var userid = context.Request.Query["userid"]; + if (!string.IsNullOrEmpty(userid)) + { + _currentUserId = userid; + } + context.Response.StatusCode = 200; + context.Response.ContentType = "text/string"; + await context.Response.WriteAsync($"User set to {_currentUserId}"); + } + + else if (path == "/noauth/reset") + { + _currentUserId = null; + context.Response.StatusCode = 200; + context.Response.ContentType = "text/string"; + await context.Response.WriteAsync($"User set to none. Token required for protected endpoints."); + } + else + { + var currentUserId = _currentUserId; + + var authHeader = context.Request.Headers["Authorization"]; + if (authHeader != StringValues.Empty) + { + var header = authHeader.FirstOrDefault(); + if (!string.IsNullOrEmpty(header) && header.StartsWith("Email ") && header.Length > "Email ".Length) + { + currentUserId = header.Substring("Email ".Length); + } + } + + + if (!string.IsNullOrEmpty(currentUserId)) + { + var user = new ClaimsIdentity(new[] { + new Claim("emails", currentUserId), + new Claim("name", "Test user"), + new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), + new Claim("sub", "1234"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} + , "ByPassAuth"); + + context.User = new ClaimsPrincipal(user); + } + + await _next.Invoke(context); + } + } + } +} diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs similarity index 87% rename from src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddleware.cs rename to src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs index 2c82547e2..875749b5f 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs @@ -1,10 +1,9 @@ using Microsoft.AspNetCore.Http; using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -namespace Ordering.API.Infrastructure.Middlewares +namespace Basket.API.Infrastructure.Middlewares { public class FailingMiddleware { @@ -26,8 +25,7 @@ namespace Ordering.API.Infrastructure.Middlewares return; } - - if (_mustFail) + if (MustFail(context)) { context.Response.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError; context.Response.ContentType = "text/plain"; @@ -42,7 +40,7 @@ namespace Ordering.API.Infrastructure.Middlewares private async Task ProcessConfigRequest(HttpContext context) { var enable = context.Request.Query.Keys.Any(k => k == "enable"); - var disable = context.Request.Query.Keys.Any(k => k == "disable"); + var disable = context.Request.Query.Keys.Any(k => k == "disable"); if (enable && disable) { @@ -74,5 +72,11 @@ namespace Ordering.API.Infrastructure.Middlewares await context.Response.WriteAsync(message); } + private bool MustFail(HttpContext context) + { + return _mustFail && + (_options.EndpointPaths.Any(x => x == context.Request.Path.Value) + || _options.EndpointPaths.Count == 0); + } } } diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs new file mode 100644 index 000000000..45989832c --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Basket.API.Infrastructure.Middlewares +{ + public class FailingOptions + { + public string ConfigPath = "/Failing"; + public List EndpointPaths { get; set; } = new List(); + } +} diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingStartupFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingStartupFilter.cs similarity index 57% rename from src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingStartupFilter.cs rename to src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingStartupFilter.cs index 028239f2d..7d3b2ce18 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingStartupFilter.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingStartupFilter.cs @@ -1,23 +1,22 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -namespace Ordering.API.Infrastructure.Middlewares +namespace Basket.API.Infrastructure.Middlewares { public class FailingStartupFilter : IStartupFilter { - public FailingStartupFilter() + private readonly Action _options; + public FailingStartupFilter(Action optionsAction) { + _options = optionsAction; } public Action Configure(Action next) { return app => { - app.UseFailingMiddleware(); + app.UseFailingMiddleware(_options); next(app); }; } diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs similarity index 66% rename from src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs rename to src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs index 1c4979fae..99be1b182 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs @@ -1,23 +1,18 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; -using Ordering.API.Infrastructure.Middlewares; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Hosting +namespace Basket.API.Infrastructure.Middlewares { public static class WebHostBuildertExtensions { - public static IWebHostBuilder UseFailing(this IWebHostBuilder builder, string path) + public static IWebHostBuilder UseFailing(this IWebHostBuilder builder, Action options) { builder.ConfigureServices(services => { - services.AddSingleton(new FailingStartupFilter()); + services.AddSingleton(new FailingStartupFilter(options)); }); return builder; } - } } diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs index f6e7de1b0..19ae1b594 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs @@ -1,6 +1,5 @@ using Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using System; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs index 88244404a..76a78bad7 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs @@ -18,7 +18,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even public async Task Handle(ProductPriceChangedIntegrationEvent @event) { - var userIds = await _repository.GetUsersAsync(); + var userIds = _repository.GetUsers(); foreach (var id in userIds) { diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs b/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs index 4c02612c5..e3665451c 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs @@ -1,9 +1,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.IntegrationEvents.Events { diff --git a/src/Services/Basket/Basket.API/Model/BasketCheckout.cs b/src/Services/Basket/Basket.API/Model/BasketCheckout.cs index 5241a3672..410700773 100644 --- a/src/Services/Basket/Basket.API/Model/BasketCheckout.cs +++ b/src/Services/Basket/Basket.API/Model/BasketCheckout.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Model { diff --git a/src/Services/Basket/Basket.API/Model/BasketItem.cs b/src/Services/Basket/Basket.API/Model/BasketItem.cs index 8b98befcc..a41945145 100644 --- a/src/Services/Basket/Basket.API/Model/BasketItem.cs +++ b/src/Services/Basket/Basket.API/Model/BasketItem.cs @@ -1,6 +1,9 @@ -namespace Microsoft.eShopOnContainers.Services.Basket.API.Model +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Microsoft.eShopOnContainers.Services.Basket.API.Model { - public class BasketItem + public class BasketItem : IValidatableObject { public string Id { get; set; } public string ProductId { get; set; } @@ -9,5 +12,16 @@ public decimal OldUnitPrice { get; set; } public int Quantity { get; set; } public string PictureUrl { get; set; } + public IEnumerable Validate(ValidationContext validationContext) + { + var results = new List(); + + if (Quantity < 1) + { + results.Add(new ValidationResult("Invalid number of units", new []{ "Quantity" })); + } + + return results; + } } } diff --git a/src/Services/Basket/Basket.API/Model/Basket.cs b/src/Services/Basket/Basket.API/Model/CustomerBasket.cs similarity index 100% rename from src/Services/Basket/Basket.API/Model/Basket.cs rename to src/Services/Basket/Basket.API/Model/CustomerBasket.cs diff --git a/src/Services/Basket/Basket.API/Model/IBasketRepository.cs b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs index fcdc69faa..850b5b637 100644 --- a/src/Services/Basket/Basket.API/Model/IBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs @@ -6,7 +6,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model public interface IBasketRepository { Task GetBasketAsync(string customerId); - Task> GetUsersAsync(); + IEnumerable GetUsers(); Task UpdateBasketAsync(CustomerBasket basket); Task DeleteBasketAsync(string id); } diff --git a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs index e896c0773..f748d2c25 100644 --- a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; using Newtonsoft.Json; using StackExchange.Redis; using System.Collections.Generic; @@ -10,40 +9,33 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model { public class RedisBasketRepository : IBasketRepository { - private ILogger _logger; - private BasketSettings _settings; + private readonly ILogger _logger; - private ConnectionMultiplexer _redis; + private readonly ConnectionMultiplexer _redis; + private readonly IDatabase _database; - public RedisBasketRepository(IOptionsSnapshot options, ILoggerFactory loggerFactory) + public RedisBasketRepository(ILoggerFactory loggerFactory, ConnectionMultiplexer redis) { - _settings = options.Value; _logger = loggerFactory.CreateLogger(); + _redis = redis; + _database = redis.GetDatabase(); } public async Task DeleteBasketAsync(string id) { - var database = await GetDatabase(); - return await database.KeyDeleteAsync(id.ToString()); + return await _database.KeyDeleteAsync(id); } - public async Task> GetUsersAsync() + public IEnumerable GetUsers() { - var server = await GetServer(); - - IEnumerable data = server.Keys(); - if (data == null) - { - return null; - } - return data.Select(k => k.ToString()); + var server = GetServer(); + var data = server.Keys(); + return data?.Select(k => k.ToString()); } public async Task GetBasketAsync(string customerId) { - var database = await GetDatabase(); - - var data = await database.StringGetAsync(customerId.ToString()); + var data = await _database.StringGetAsync(customerId); if (data.IsNullOrEmpty) { return null; @@ -54,9 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model public async Task UpdateBasketAsync(CustomerBasket basket) { - var database = await GetDatabase(); - - var created = await database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); + var created = await _database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); if (!created) { _logger.LogInformation("Problem occur persisting the item."); @@ -68,34 +58,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model return await GetBasketAsync(basket.BuyerId); } - private async Task GetDatabase() - { - if (_redis == null) - { - await ConnectToRedisAsync(); - } - - return _redis.GetDatabase(); - } - - private async Task GetServer() + private IServer GetServer() { - if (_redis == null) - { - await ConnectToRedisAsync(); - } var endpoint = _redis.GetEndPoints(); - return _redis.GetServer(endpoint.First()); } - - private async Task ConnectToRedisAsync() - { - var configuration = ConfigurationOptions.Parse(_settings.ConnectionString, true); - configuration.ResolveDns = true; - - _logger.LogInformation($"Connecting to database {configuration.SslHost}."); - _redis = await ConnectionMultiplexer.ConnectAsync(configuration); - } } } diff --git a/src/Services/Basket/Basket.API/Program.cs b/src/Services/Basket/Basket.API/Program.cs index 74ab84c18..19bbf2c24 100644 --- a/src/Services/Basket/Basket.API/Program.cs +++ b/src/Services/Basket/Basket.API/Program.cs @@ -1,5 +1,9 @@ -using Microsoft.AspNetCore.Builder; +using Basket.API.Infrastructure.Middlewares; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using System.IO; namespace Microsoft.eShopOnContainers.Services.Basket.API @@ -8,15 +12,29 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() + BuildWebHost(args).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseFailing(options => + { + options.ConfigPath = "/Failing"; + }) .UseHealthChecks("/hc") .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() .UseStartup() + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .UseApplicationInsights() .Build(); - - host.Run(); - } } } diff --git a/src/Services/Basket/Basket.API/Services/IIdentityService.cs b/src/Services/Basket/Basket.API/Services/IIdentityService.cs index 8cc7bd848..fe84e23d5 100644 --- a/src/Services/Basket/Basket.API/Services/IIdentityService.cs +++ b/src/Services/Basket/Basket.API/Services/IIdentityService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Basket.API.Services +namespace Microsoft.eShopOnContainers.Services.Basket.API.Services { public interface IIdentityService { diff --git a/src/Services/Basket/Basket.API/Services/IdentityService.cs b/src/Services/Basket/Basket.API/Services/IdentityService.cs index 08d1ffffa..d187be8d6 100644 --- a/src/Services/Basket/Basket.API/Services/IdentityService.cs +++ b/src/Services/Basket/Basket.API/Services/IdentityService.cs @@ -1,9 +1,6 @@  using Microsoft.AspNetCore.Http; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Basket.API.Services { diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 9ac2f9bd4..1b698a339 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -1,15 +1,20 @@ using Autofac; using Autofac.Extensions.DependencyInjection; using Basket.API.Infrastructure.Filters; +using Basket.API.Infrastructure.Middlewares; using Basket.API.IntegrationEvents.EventHandling; using Basket.API.IntegrationEvents.Events; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.ServiceFabric; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.Azure.ServiceBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; -using Microsoft.eShopOnContainers.Services.Basket.API.Auth.Server; +using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling; using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; @@ -21,46 +26,47 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using RabbitMQ.Client; using StackExchange.Redis; +using Swashbuckle.AspNetCore.Swagger; using System; -using System.Linq; -using System.Net; +using System.Collections.Generic; +using System.IdentityModel.Tokens.Jwt; using System.Threading.Tasks; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; -using Microsoft.Azure.ServiceBus; - namespace Microsoft.eShopOnContainers.Services.Basket.API { public class Startup { - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); + Configuration = configuration; } - public IConfigurationRoot Configuration { get; } + public IConfiguration Configuration { get; } + // This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) { - - services.AddHealthChecks(checks => - { - checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask(HealthCheckResult.Healthy("Ok"))); - }); + RegisterAppInsights(services); // Add framework services. services.AddMvc(options => { options.Filters.Add(typeof(HttpGlobalExceptionFilter)); + options.Filters.Add(typeof(ValidateModelStateFilter)); + }).AddControllersAsServices(); - services.Configure(Configuration); + ConfigureAuthService(services); + + services.AddHealthChecks(checks => + { + checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask(HealthCheckResult.Healthy("Ok")), + TimeSpan.Zero //No cache for this HealthCheck, better just for demos + ); + }); + + services.Configure(Configuration); //By connecting here we are making sure that our service //cannot start until redis is ready. This might slow down startup, @@ -71,7 +77,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API services.AddSingleton(sp => { var settings = sp.GetRequiredService>().Value; - ConfigurationOptions configuration = ConfigurationOptions.Parse(settings.ConnectionString, true); + var configuration = ConfigurationOptions.Parse(settings.ConnectionString, true); + configuration.ResolveDns = true; return ConnectionMultiplexer.Connect(configuration); @@ -82,10 +89,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { services.AddSingleton(sp => { - var settings = sp.GetRequiredService>().Value; var logger = sp.GetRequiredService>(); - var serviceBusConnection = new ServiceBusConnectionStringBuilder(settings.EventBusConnection); + var serviceBusConnectionString = Configuration["EventBusConnection"]; + var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString); return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger); }); @@ -94,28 +101,59 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { services.AddSingleton(sp => { - var settings = sp.GetRequiredService>().Value; var logger = sp.GetRequiredService>(); + var factory = new ConnectionFactory() { - HostName = settings.EventBusConnection + HostName = Configuration["EventBusConnection"] }; - return new DefaultRabbitMQPersistentConnection(factory, logger); + if (!string.IsNullOrEmpty(Configuration["EventBusUserName"])) + { + factory.UserName = Configuration["EventBusUserName"]; + } + + if (!string.IsNullOrEmpty(Configuration["EventBusPassword"])) + { + factory.Password = Configuration["EventBusPassword"]; + } + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new DefaultRabbitMQPersistentConnection(factory, logger, retryCount); }); } + RegisterEventBus(services); services.AddSwaggerGen(options => { options.DescribeAllEnumsAsStrings(); - options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info + options.SwaggerDoc("v1", new Info { Title = "Basket HTTP API", Version = "v1", Description = "The Basket Service HTTP API", TermsOfService = "Terms Of Service" }); + + options.AddSecurityDefinition("oauth2", new OAuth2Scheme + { + Type = "oauth2", + Flow = "implicit", + AuthorizationUrl = $"{Configuration.GetValue("IdentityUrlExternal")}/connect/authorize", + TokenUrl = $"{Configuration.GetValue("IdentityUrlExternal")}/connect/token", + Scopes = new Dictionary() + { + { "basket", "Basket API" } + } + }); + + options.OperationFilter(); }); services.AddCors(options => @@ -130,50 +168,28 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API services.AddTransient(); services.AddTransient(); - RegisterEventBus(services); services.AddOptions(); var container = new ContainerBuilder(); container.Populate(services); - return new AutofacServiceProvider(container.Build()); - } - private void RegisterEventBus(IServiceCollection services) - { - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var serviceBusPersisterConnection = sp.GetRequiredService(); - var iLifetimeScope = sp.GetRequiredService(); - var logger = sp.GetRequiredService>(); - var eventBusSubcriptionsManager = sp.GetRequiredService(); - var subscriptionClientName = Configuration["SubscriptionClientName"]; - - return new EventBusServiceBus(serviceBusPersisterConnection, logger, - eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); - }); - } - else - { - services.AddSingleton(); - } - - services.AddSingleton(); - - services.AddTransient(); - services.AddTransient(); + return new AutofacServiceProvider(container.Build()); } + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - app.UseStaticFiles(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); - // Use frameworks + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + app.UsePathBase(pathBase); + } + + app.UseStaticFiles(); app.UseCors("CorsPolicy"); ConfigureAuth(app); @@ -183,27 +199,108 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Basket.API V1"); + c.ConfigureOAuth2("basketswaggerui", "", "", "Basket Swagger UI"); }); ConfigureEventBus(app); } - protected virtual void ConfigureAuth(IApplicationBuilder app) + private void RegisterAppInsights(IServiceCollection services) + { + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); + + if (orchestratorType?.ToUpper() == "K8S") + { + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); + } + } + + private void ConfigureAuthService(IServiceCollection services) { - var identityUrl = Configuration.GetValue("IdentityUrl"); - app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions + // prevent from mapping "sub" claim to nameidentifier. + JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); + + var identityUrl = Configuration.GetValue("IdentityUrl"); + + services.AddAuthentication(options => { - Authority = identityUrl.ToString(), - ApiName = "basket", - RequireHttpsMetadata = false + options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; + + }).AddJwtBearer(options => + { + options.Authority = identityUrl; + options.RequireHttpsMetadata = false; + options.Audience = "basket"; }); } - protected virtual void ConfigureEventBus(IApplicationBuilder app) + protected virtual void ConfigureAuth(IApplicationBuilder app) + { + if (Configuration.GetValue("UseLoadTest")) + { + app.UseMiddleware(); + } + + app.UseAuthentication(); + } + + private void RegisterEventBus(IServiceCollection services) + { + var subscriptionClientName = Configuration["SubscriptionClientName"]; + + if (Configuration.GetValue("AzureServiceBusEnabled")) + { + services.AddSingleton(sp => + { + var serviceBusPersisterConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + return new EventBusServiceBus(serviceBusPersisterConnection, logger, + eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); + }); + } + else + { + services.AddSingleton(sp => + { + var rabbitMQPersistentConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, subscriptionClientName, retryCount); + }); + } + + services.AddSingleton(); + + services.AddTransient(); + services.AddTransient(); + } + + private void ConfigureEventBus(IApplicationBuilder app) { var eventBus = app.ApplicationServices.GetRequiredService(); + eventBus.Subscribe(); eventBus.Subscribe(); } diff --git a/src/Services/Basket/Basket.API/appsettings.json b/src/Services/Basket/Basket.API/appsettings.json index f062f76d7..16d56d94d 100644 --- a/src/Services/Basket/Basket.API/appsettings.json +++ b/src/Services/Basket/Basket.API/appsettings.json @@ -10,5 +10,9 @@ "IdentityUrl": "http://localhost:5105", "ConnectionString": "127.0.0.1", "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Basket" + "SubscriptionClientName": "Basket", + "ApplicationInsights": { + "InstrumentationKey": "" + }, + "EventBusRetryCount": 5 } \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/.dockerignore b/src/Services/Catalog/Catalog.API/.dockerignore deleted file mode 100644 index d8f8175f6..000000000 --- a/src/Services/Catalog/Catalog.API/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index 8521583f8..15c1f3a48 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -1,20 +1,20 @@  - netcoreapp1.1 + netcoreapp2.0 portable true Catalog.API - Exe Catalog.API aspnet-Catalog.API-20161122013618 - 1.1.2 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 ..\..\..\..\docker-compose.dcproj + + Always + PreserveNewest @@ -34,32 +34,18 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + @@ -67,15 +53,14 @@ + + - - Always - PreserveNewest diff --git a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs index ca1ef9e3b..1b53171d0 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Options; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers @@ -32,6 +33,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items([FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { @@ -54,6 +56,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers [HttpGet] [Route("items/{id:int}")] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType(typeof(CatalogItem),(int)HttpStatusCode.OK)] public async Task GetItemById(int id) { if (id <= 0) @@ -73,6 +77,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items/withname/samplename[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]/withname/{name:minlength(1)}")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items(string name, [FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { @@ -97,6 +102,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items/type/1/brand/null[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]/type/{catalogTypeId}/brand/{catalogBrandId}")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items(int? catalogTypeId, int? catalogBrandId, [FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { var root = (IQueryable)_catalogContext.CatalogItems; @@ -130,6 +136,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/CatalogTypes [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] public async Task CatalogTypes() { var items = await _catalogContext.CatalogTypes @@ -141,6 +148,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/CatalogBrands [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] public async Task CatalogBrands() { var items = await _catalogContext.CatalogBrands @@ -152,6 +160,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //PUT api/v1/[controller]/items [Route("items")] [HttpPut] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType((int)HttpStatusCode.Created)] public async Task UpdateProduct([FromBody]CatalogItem productToUpdate) { var catalogItem = await _catalogContext.CatalogItems @@ -170,7 +180,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers catalogItem = productToUpdate; _catalogContext.CatalogItems.Update(catalogItem); - if (raiseProductPriceChangedEvent) // Save and publish integration event if price has changed + if (raiseProductPriceChangedEvent) // Save product's data and publish integration event through the Event Bus if price has changed { //Create Integration Event to be published through the Event Bus var priceChangedEvent = new ProductPriceChangedIntegrationEvent(catalogItem.Id, productToUpdate.Price, oldPrice); @@ -181,7 +191,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // Publish through the Event Bus and mark the saved event as published await _catalogIntegrationEventService.PublishThroughEventBusAsync(priceChangedEvent); } - else // Save updated product + else // Just save the updated product because the Product's Price hasn't changed. { await _catalogContext.SaveChangesAsync(); } @@ -192,6 +202,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //POST api/v1/[controller]/items [Route("items")] [HttpPost] + [ProducesResponseType((int)HttpStatusCode.Created)] public async Task CreateProduct([FromBody]CatalogItem product) { var item = new CatalogItem @@ -213,6 +224,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //DELETE api/v1/[controller]/id [Route("{id}")] [HttpDelete] + [ProducesResponseType((int)HttpStatusCode.NoContent)] public async Task DeleteProduct(int id) { var product = _catalogContext.CatalogItems.SingleOrDefault(x => x.Id == id); @@ -232,13 +244,12 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers private List ChangeUriPlaceholder(List items) { var baseUri = _settings.PicBaseUrl; - + items.ForEach(catalogItem => { catalogItem.PictureUri = _settings.AzureStorageEnabled ? baseUri + catalogItem.PictureFileName - : baseUri + catalogItem.Id; - + : baseUri.Replace("[0]", catalogItem.Id.ToString()); }); return items; diff --git a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs index 75029dc95..f8e986e50 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs @@ -3,13 +3,13 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using System.IO; +using System.Net; using System.Threading.Tasks; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers { - [Route("api/v1/[controller]")] public class PicController : Controller { private readonly IHostingEnvironment _env; @@ -22,17 +22,20 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers _catalogContext = catalogContext; } - [HttpGet("{id}")] + [HttpGet] + [Route("api/v1/catalog/items/{catalogItemId:int}/pic")] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] // GET: // - public async Task GetImage(int id) + public async Task GetImage(int catalogItemId) { - if (id <= 0) + if (catalogItemId <= 0) { return BadRequest(); } var item = await _catalogContext.CatalogItems - .SingleOrDefaultAsync(ci => ci.Id == id); + .SingleOrDefaultAsync(ci => ci.Id == catalogItemId); if (item != null) { diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 61c8e8839..59f305961 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -1,6 +1,29 @@ -FROM microsoft/aspnetcore:1.1.2 -ARG source +FROM microsoft/aspnetcore:2.0.3 AS base WORKDIR /app EXPOSE 80 -COPY ${source:-obj/Docker/publish} . + +FROM microsoft/aspnetcore-build:2.0 AS build +WORKDIR /src +COPY eShopOnContainers-ServicesAndWebApps.sln ./ +COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ +COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/ +COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/ +COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/ +COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/ +COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/ +RUN dotnet restore +COPY . . +WORKDIR /src/src/Services/Catalog/Catalog.API +RUN dotnet build -c Release -o /app + +FROM build AS publish +RUN dotnet publish -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . ENTRYPOINT ["dotnet", "Catalog.API.dll"] diff --git a/src/Services/Catalog/Catalog.API/Dockerfile.nanowin b/src/Services/Catalog/Catalog.API/Dockerfile.nanowin deleted file mode 100644 index 193ddaef6..000000000 --- a/src/Services/Catalog/Catalog.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Catalog.API.dll"] diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs index f58541b62..8cff66b08 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs @@ -1,9 +1,9 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore; + using EntityConfigurations; using Model; - using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; + using Microsoft.EntityFrameworkCore.Design; public class CatalogContext : DbContext { @@ -16,68 +16,21 @@ protected override void OnModelCreating(ModelBuilder builder) { - builder.Entity(ConfigureCatalogBrand); - builder.Entity(ConfigureCatalogType); - builder.Entity(ConfigureCatalogItem); + builder.ApplyConfiguration(new CatalogBrandEntityTypeConfiguration()); + builder.ApplyConfiguration(new CatalogTypeEntityTypeConfiguration()); + builder.ApplyConfiguration(new CatalogItemEntityTypeConfiguration()); } + } - void ConfigureCatalogItem(EntityTypeBuilder builder) - { - builder.ToTable("Catalog"); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_hilo") - .IsRequired(); - - builder.Property(ci => ci.Name) - .IsRequired(true) - .HasMaxLength(50); - - builder.Property(ci => ci.Price) - .IsRequired(true); - - builder.Property(ci => ci.PictureFileName) - .IsRequired(false); - - builder.Ignore(ci => ci.PictureUri); - - builder.HasOne(ci => ci.CatalogBrand) - .WithMany() - .HasForeignKey(ci => ci.CatalogBrandId); - - builder.HasOne(ci => ci.CatalogType) - .WithMany() - .HasForeignKey(ci => ci.CatalogTypeId); - } - - void ConfigureCatalogBrand(EntityTypeBuilder builder) - { - builder.ToTable("CatalogBrand"); - - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_brand_hilo") - .IsRequired(); - builder.Property(cb => cb.Brand) - .IsRequired() - .HasMaxLength(100); - } - - void ConfigureCatalogType(EntityTypeBuilder builder) + public class CatalogContextDesignFactory : IDesignTimeDbContextFactory + { + public CatalogContext CreateDbContext(string[] args) { - builder.ToTable("CatalogType"); - - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_type_hilo") - .IsRequired(); + var optionsBuilder = new DbContextOptionsBuilder() + .UseSqlServer("Server=.;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;Integrated Security=true"); - builder.Property(cb => cb.Type) - .IsRequired() - .HasMaxLength(100); + return new CatalogContext(optionsBuilder.Options); } } } diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index e7dbe5452..42ac7b740 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -1,15 +1,14 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using EntityFrameworkCore; using Extensions.Logging; using global::Catalog.API.Extensions; - using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Model; + using Polly; using System; using System.Collections.Generic; + using System.Data.SqlClient; using System.Globalization; using System.IO; using System.IO.Compression; @@ -19,56 +18,48 @@ public class CatalogContextSeed { - public static async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0) + public async Task SeedAsync(CatalogContext context,IHostingEnvironment env,IOptions settings,ILogger logger) { - var log = loggerFactory.CreateLogger("catalog seed"); + var policy = CreatePolicy(logger, nameof(CatalogContextSeed)); - var context = (CatalogContext)applicationBuilder - .ApplicationServices.GetService(typeof(CatalogContext)); - - context.Database.Migrate(); - - var settings = (CatalogSettings)applicationBuilder - .ApplicationServices.GetRequiredService>().Value; - - var useCustomizationData = settings.UseCustomizationData; - var contentRootPath = env.ContentRootPath; - var picturePath = env.WebRootPath; - - if (!context.CatalogBrands.Any()) + await policy.ExecuteAsync(async () => { - context.CatalogBrands.AddRange(useCustomizationData - ? GetCatalogBrandsFromFile(contentRootPath, log) - : GetPreconfiguredCatalogBrands() - ); + var useCustomizationData = settings.Value.UseCustomizationData; + var contentRootPath = env.ContentRootPath; + var picturePath = env.WebRootPath; - await context.SaveChangesAsync(); - } + if (!context.CatalogBrands.Any()) + { + context.CatalogBrands.AddRange(useCustomizationData + ? GetCatalogBrandsFromFile(contentRootPath, logger) + : GetPreconfiguredCatalogBrands()); - if (!context.CatalogTypes.Any()) - { - context.CatalogTypes.AddRange(useCustomizationData - ? GetCatalogTypesFromFile(contentRootPath, log) - : GetPreconfiguredCatalogTypes() - ); + await context.SaveChangesAsync(); + } - await context.SaveChangesAsync(); - } + if (!context.CatalogTypes.Any()) + { + context.CatalogTypes.AddRange(useCustomizationData + ? GetCatalogTypesFromFile(contentRootPath, logger) + : GetPreconfiguredCatalogTypes()); - if (!context.CatalogItems.Any()) - { - context.CatalogItems.AddRange(useCustomizationData - ? GetCatalogItemsFromFile(contentRootPath, context, log) - : GetPreconfiguredItems() - ); + await context.SaveChangesAsync(); + } - await context.SaveChangesAsync(); + if (!context.CatalogItems.Any()) + { + context.CatalogItems.AddRange(useCustomizationData + ? GetCatalogItemsFromFile(contentRootPath, context, logger) + : GetPreconfiguredItems()); - GetCatalogItemPictures(contentRootPath, picturePath); - } + await context.SaveChangesAsync(); + + GetCatalogItemPictures(contentRootPath, picturePath); + } + }); } - static IEnumerable GetCatalogBrandsFromFile(string contentRootPath, ILogger log) + private IEnumerable GetCatalogBrandsFromFile(string contentRootPath, ILogger logger) { string csvFileCatalogBrands = Path.Combine(contentRootPath, "Setup", "CatalogBrands.csv"); @@ -85,18 +76,18 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredCatalogBrands(); } return File.ReadAllLines(csvFileCatalogBrands) .Skip(1) // skip header row .SelectTry(x => CreateCatalogBrand(x)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogBrand CreateCatalogBrand(string brand) + private CatalogBrand CreateCatalogBrand(string brand) { brand = brand.Trim('"').Trim(); @@ -111,7 +102,7 @@ }; } - static IEnumerable GetPreconfiguredCatalogBrands() + private IEnumerable GetPreconfiguredCatalogBrands() { return new List() { @@ -123,7 +114,7 @@ }; } - static IEnumerable GetCatalogTypesFromFile(string contentRootPath, ILogger log) + private IEnumerable GetCatalogTypesFromFile(string contentRootPath, ILogger logger) { string csvFileCatalogTypes = Path.Combine(contentRootPath, "Setup", "CatalogTypes.csv"); @@ -140,18 +131,18 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredCatalogTypes(); } return File.ReadAllLines(csvFileCatalogTypes) .Skip(1) // skip header row .SelectTry(x => CreateCatalogType(x)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogType CreateCatalogType(string type) + private CatalogType CreateCatalogType(string type) { type = type.Trim('"').Trim(); @@ -166,7 +157,7 @@ }; } - static IEnumerable GetPreconfiguredCatalogTypes() + private IEnumerable GetPreconfiguredCatalogTypes() { return new List() { @@ -177,7 +168,7 @@ }; } - static IEnumerable GetCatalogItemsFromFile(string contentRootPath, CatalogContext context, ILogger log) + private IEnumerable GetCatalogItemsFromFile(string contentRootPath, CatalogContext context, ILogger logger) { string csvFileCatalogItems = Path.Combine(contentRootPath, "Setup", "CatalogItems.csv"); @@ -195,7 +186,7 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredItems(); } @@ -206,11 +197,11 @@ .Skip(1) // skip header row .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") ) .SelectTry(column => CreateCatalogItem(column, csvheaders, catalogTypeIdLookup, catalogBrandIdLookup)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogItem CreateCatalogItem(string[] column, string[] headers, Dictionary catalogTypeIdLookup, Dictionary catalogBrandIdLookup) + private CatalogItem CreateCatalogItem(string[] column, string[] headers, Dictionary catalogTypeIdLookup, Dictionary catalogBrandIdLookup) { if (column.Count() != headers.Count()) { @@ -316,26 +307,26 @@ return catalogItem; } - static IEnumerable GetPreconfiguredItems() + private IEnumerable GetPreconfiguredItems() { return new List() { - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, Description = ".NET Bot Black Hoodie", Name = ".NET Bot Black Hoodie", Price = 19.5M, PictureFileName = "1.png" }, - new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 2, Description = ".NET Black & White Mug", Name = ".NET Black & White Mug", Price= 8.50M, PictureFileName = "2.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12, PictureFileName = "3.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, Description = ".NET Foundation T-shirt", Name = ".NET Foundation T-shirt", Price = 12, PictureFileName = "4.png" }, - new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 5, Description = "Roslyn Red Sheet", Name = "Roslyn Red Sheet", Price = 8.5M, PictureFileName = "5.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, Description = ".NET Blue Hoodie", Name = ".NET Blue Hoodie", Price = 12, PictureFileName = "6.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12, PictureFileName = "7.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, Description = "Kudu Purple Hoodie", Name = "Kudu Purple Hoodie", Price = 8.5M, PictureFileName = "8.png" }, - new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 5, Description = "Cup White Mug", Name = "Cup White Mug", Price = 12, PictureFileName = "9.png" }, - new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, Description = ".NET Foundation Sheet", Name = ".NET Foundation Sheet", Price = 12, PictureFileName = "10.png" }, - new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, Description = "Cup Sheet", Name = "Cup Sheet", Price = 8.5M, PictureFileName = "11.png" }, - new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, Description = "Prism White TShirt", Name = "Prism White TShirt", Price = 12, PictureFileName = "12.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Bot Black Hoodie", Name = ".NET Bot Black Hoodie", Price = 19.5M, PictureFileName = "1.png" }, + new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Black & White Mug", Name = ".NET Black & White Mug", Price= 8.50M, PictureFileName = "2.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12, PictureFileName = "3.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Foundation T-shirt", Name = ".NET Foundation T-shirt", Price = 12, PictureFileName = "4.png" }, + new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 5, AvailableStock = 100, Description = "Roslyn Red Sheet", Name = "Roslyn Red Sheet", Price = 8.5M, PictureFileName = "5.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Blue Hoodie", Name = ".NET Blue Hoodie", Price = 12, PictureFileName = "6.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12, PictureFileName = "7.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Kudu Purple Hoodie", Name = "Kudu Purple Hoodie", Price = 8.5M, PictureFileName = "8.png" }, + new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 5, AvailableStock = 100, Description = "Cup White Mug", Name = "Cup White Mug", Price = 12, PictureFileName = "9.png" }, + new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Foundation Sheet", Name = ".NET Foundation Sheet", Price = 12, PictureFileName = "10.png" }, + new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, AvailableStock = 100, Description = "Cup Sheet", Name = "Cup Sheet", Price = 8.5M, PictureFileName = "11.png" }, + new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Prism White TShirt", Name = "Prism White TShirt", Price = 12, PictureFileName = "12.png" }, }; } - static string[] GetHeaders(string csvfile, string[] requiredHeaders, string[] optionalHeaders = null) + private string[] GetHeaders(string csvfile, string[] requiredHeaders, string[] optionalHeaders = null) { string[] csvheaders = File.ReadLines(csvfile).First().ToLowerInvariant().Split(','); @@ -363,7 +354,7 @@ return csvheaders; } - static void GetCatalogItemPictures(string contentRootPath, string picturePath) + private void GetCatalogItemPictures(string contentRootPath, string picturePath) { DirectoryInfo directory = new DirectoryInfo(picturePath); foreach (FileInfo file in directory.GetFiles()) @@ -374,7 +365,18 @@ string zipFileCatalogItemPictures = Path.Combine(contentRootPath, "Setup", "CatalogItems.zip"); ZipFile.ExtractToDirectory(zipFileCatalogItemPictures, picturePath); } - } - + private Policy CreatePolicy( ILogger logger, string prefix,int retries = 3) + { + return Policy.Handle(). + WaitAndRetryAsync( + retryCount: retries, + sleepDurationProvider: retry => TimeSpan.FromSeconds(5), + onRetry: (exception, timeSpan, retry, ctx) => + { + logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}"); + } + ); + } + } } diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs new file mode 100644 index 000000000..8312b023d --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogBrandEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CatalogBrand"); + + builder.HasKey(ci => ci.Id); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_brand_hilo") + .IsRequired(); + + builder.Property(cb => cb.Brand) + .IsRequired() + .HasMaxLength(100); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs new file mode 100644 index 000000000..f7f093ce8 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogItemEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("Catalog"); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_hilo") + .IsRequired(); + + builder.Property(ci => ci.Name) + .IsRequired(true) + .HasMaxLength(50); + + builder.Property(ci => ci.Price) + .IsRequired(true); + + builder.Property(ci => ci.PictureFileName) + .IsRequired(false); + + builder.Ignore(ci => ci.PictureUri); + + builder.HasOne(ci => ci.CatalogBrand) + .WithMany() + .HasForeignKey(ci => ci.CatalogBrandId); + + builder.HasOne(ci => ci.CatalogType) + .WithMany() + .HasForeignKey(ci => ci.CatalogTypeId); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs new file mode 100644 index 000000000..4c30bb3b6 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogTypeEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CatalogType"); + + builder.HasKey(ci => ci.Id); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_type_hilo") + .IsRequired(); + + builder.Property(cb => cb.Type) + .IsRequired() + .HasMaxLength(100); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Program.cs b/src/Services/Catalog/Catalog.API/Program.cs index 93c151cf2..bef3fa360 100644 --- a/src/Services/Catalog/Catalog.API/Program.cs +++ b/src/Services/Catalog/Catalog.API/Program.cs @@ -1,23 +1,51 @@ -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; +using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; +using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using System.IO; - namespace Microsoft.eShopOnContainers.Services.Catalog.API { public class Program { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() + BuildWebHost(args) + .MigrateDbContext((context,services)=> + { + var env = services.GetService(); + var settings = services.GetService>(); + var logger = services.GetService>(); + + new CatalogContextSeed() + .SeedAsync(context,env,settings,logger) + .Wait(); + + }) + .MigrateDbContext((_,__)=> { }) + .Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup() + .UseApplicationInsights() .UseHealthChecks("/hc") - .UseIISIntegration() .UseContentRoot(Directory.GetCurrentDirectory()) .UseWebRoot("Pics") - .UseStartup() - .Build(); - - host.Run(); - } + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .Build(); } -} +} \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/Setup/Catalogitems.zip b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip similarity index 100% rename from src/Services/Catalog/Catalog.API/Setup/Catalogitems.zip rename to src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index a0a9c48b6..41dee0069 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -4,11 +4,13 @@ using Autofac.Extensions.DependencyInjection; using global::Catalog.API.Infrastructure.Filters; using global::Catalog.API.IntegrationEvents; + using Microsoft.ApplicationInsights.Extensibility; + using Microsoft.ApplicationInsights.ServiceFabric; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Azure.ServiceBus; using Microsoft.EntityFrameworkCore; - using Microsoft.EntityFrameworkCore.Infrastructure; + using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; @@ -23,39 +25,26 @@ using Microsoft.Extensions.HealthChecks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; - using Polly; using RabbitMQ.Client; using System; using System.Data.Common; - using System.Data.SqlClient; using System.Reflection; - using System.Threading.Tasks; public class Startup { - public IConfigurationRoot Configuration { get; } - - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile($"settings.json", optional: false, reloadOnChange: true) - .AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true); - - if (env.IsDevelopment()) - { - builder.AddUserSecrets(typeof(Startup).GetTypeInfo().Assembly); - } - - builder.AddEnvironmentVariables(); - - Configuration = builder.Build(); + Configuration = configuration; } + public IConfiguration Configuration { get; } + public IServiceProvider ConfigureServices(IServiceCollection services) { // Add framework services. + RegisterAppInsights(services); + services.AddHealthChecks(checks => { var minutes = 1; @@ -64,6 +53,13 @@ minutes = minutesParsed; } checks.AddSqlCheck("CatalogDb", Configuration["ConnectionString"], TimeSpan.FromMinutes(minutes)); + + var accountName = Configuration.GetValue("AzureStorageAccountName"); + var accountKey = Configuration.GetValue("AzureStorageAccountKey"); + if (!string.IsNullOrEmpty(accountName) && !string.IsNullOrEmpty(accountKey)) + { + checks.AddAzureBlobStorageCheck(accountName, accountKey); + } }); services.AddMvc(options => @@ -78,7 +74,7 @@ { sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency - sqlOptions.EnableRetryOnFailure(maxRetryCount: 5, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); }); // Changing default behavior when client evaluation occurs to throw. @@ -87,6 +83,17 @@ //Check Client vs. Server evaluation: https://docs.microsoft.com/en-us/ef/core/querying/client-eval }); + services.AddDbContext(options => + { + options.UseSqlServer(Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }); + services.Configure(Configuration); // Add framework services. @@ -134,12 +141,29 @@ { var settings = sp.GetRequiredService>().Value; var logger = sp.GetRequiredService>(); + var factory = new ConnectionFactory() { - HostName = settings.EventBusConnection + HostName = Configuration["EventBusConnection"] }; - return new DefaultRabbitMQPersistentConnection(factory, logger); + if (!string.IsNullOrEmpty(Configuration["EventBusUserName"])) + { + factory.UserName = Configuration["EventBusUserName"]; + } + + if (!string.IsNullOrEmpty(Configuration["EventBusPassword"])) + { + factory.Password = Configuration["EventBusPassword"]; + } + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new DefaultRabbitMQPersistentConnection(factory, logger, retryCount); }); } @@ -148,7 +172,7 @@ var container = new ContainerBuilder(); container.Populate(services); return new AutofacServiceProvider(container.Build()); - + } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) @@ -157,6 +181,15 @@ loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); + + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); + app.UsePathBase(pathBase); + } app.UseCors("CorsPolicy"); @@ -165,50 +198,34 @@ app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Catalog.API V1"); }); - var context = (CatalogContext)app - .ApplicationServices.GetService(typeof(CatalogContext)); - - WaitForSqlAvailabilityAsync(context, loggerFactory, app, env).Wait(); - ConfigureEventBus(app); - - var integrationEventLogContext = new IntegrationEventLogContext( - new DbContextOptionsBuilder() - .UseSqlServer(Configuration["ConnectionString"], b => b.MigrationsAssembly("Catalog.API")) - .Options); - - integrationEventLogContext.Database.Migrate(); } - private async Task WaitForSqlAvailabilityAsync(CatalogContext ctx, ILoggerFactory loggerFactory, IApplicationBuilder app, IHostingEnvironment env, int retries = 0) + private void RegisterAppInsights(IServiceCollection services) { - var logger = loggerFactory.CreateLogger(nameof(Startup)); - var policy = CreatePolicy(retries, logger, nameof (WaitForSqlAvailabilityAsync)); - await policy.ExecuteAsync(async () => - { - await CatalogContextSeed.SeedAsync(app, env, loggerFactory); - }); - - } + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); - private Policy CreatePolicy(int retries, ILogger logger, string prefix) - { - return Policy.Handle(). - WaitAndRetryAsync( - retryCount: retries, - sleepDurationProvider: retry => TimeSpan.FromSeconds(5), - onRetry: (exception, timeSpan, retry, ctx) => - { - logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}"); - } - ); + if (orchestratorType?.ToUpper() == "K8S") + { + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); + } } private void RegisterEventBus(IServiceCollection services) { + var subscriptionClientName = Configuration["SubscriptionClientName"]; + if (Configuration.GetValue("AzureServiceBusEnabled")) { services.AddSingleton(sp => @@ -217,27 +234,40 @@ var iLifetimeScope = sp.GetRequiredService(); var logger = sp.GetRequiredService>(); var eventBusSubcriptionsManager = sp.GetRequiredService(); - var subscriptionClientName = Configuration["SubscriptionClientName"]; return new EventBusServiceBus(serviceBusPersisterConnection, logger, eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); }); - + } else { - services.AddSingleton(); + services.AddSingleton(sp => + { + var rabbitMQPersistentConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, subscriptionClientName, retryCount); + }); } services.AddSingleton(); - services.AddTransient, - OrderStatusChangedToAwaitingValidationIntegrationEventHandler>(); - services.AddTransient, - OrderStatusChangedToPaidIntegrationEventHandler>(); + services.AddTransient(); + services.AddTransient(); } protected virtual void ConfigureEventBus(IApplicationBuilder app) { var eventBus = app.ApplicationServices.GetRequiredService(); + eventBus.Subscribe(); + eventBus.Subscribe(); } } } diff --git a/src/Services/Catalog/Catalog.API/settings.json b/src/Services/Catalog/Catalog.API/appsettings.json similarity index 52% rename from src/Services/Catalog/Catalog.API/settings.json rename to src/Services/Catalog/Catalog.API/appsettings.json index 8ad31e765..0f36d229c 100644 --- a/src/Services/Catalog/Catalog.API/settings.json +++ b/src/Services/Catalog/Catalog.API/appsettings.json @@ -1,16 +1,20 @@ { "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", - "PicBaseUrl": "http://localhost:5101", - "UseCustomizationData": true, + "PicBaseUrl": "http://localhost:5101/api/v1/catalog/items/[0]/pic/", + "UseCustomizationData": false, "Logging": { "IncludeScopes": false, "LogLevel": { - "Default": "Debug", + "Default": "Trace", "System": "Information", "Microsoft": "Information" } }, "AzureServiceBusEnabled": false, - "AzureStorageEnabled": true, - "SubscriptionClientName": "Catalog" + "AzureStorageEnabled": false, + "SubscriptionClientName": "Catalog", + "ApplicationInsights": { + "InstrumentationKey": "" + }, + "EventBusRetryCount": 5 } diff --git a/src/Services/GracePeriod/GracePeriodManager/.dockerignore b/src/Services/GracePeriod/GracePeriodManager/.dockerignore deleted file mode 100644 index d8f8175f6..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/src/Services/GracePeriod/GracePeriodManager/Dockerfile b/src/Services/GracePeriod/GracePeriodManager/Dockerfile deleted file mode 100644 index 37971fde2..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM microsoft/aspnetcore:1.1.2 -ARG source -WORKDIR /app -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "GracePeriodManager.dll"] \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj b/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj deleted file mode 100644 index d057a6b54..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - Exe - netcoreapp1.1 - 1.1.2 - - - - - - - - - - - - - - - - - - - - - - - - - - Dockerfile - - - - \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs b/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs deleted file mode 100644 index fce04cd24..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GracePeriodManager.IntegrationEvents.Events -{ - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - - public class GracePeriodConfirmedIntegrationEvent : IntegrationEvent - { - public int OrderId { get;} - - public GracePeriodConfirmedIntegrationEvent(int orderId) => OrderId = orderId; - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs b/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs deleted file mode 100644 index 44e0b56f7..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace GracePeriodManager -{ - public class ManagerSettings - { - public string ConnectionString { get; set; } - - public string EventBusConnection { get; set; } - - public int GracePeriodTime { get; set; } - - public int CheckUpdateTime { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Program.cs b/src/Services/GracePeriod/GracePeriodManager/Program.cs deleted file mode 100644 index eecdd80ea..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Program.cs +++ /dev/null @@ -1,94 +0,0 @@ -namespace GracePeriodManager -{ - using System.IO; - using System; - using System.Threading.Tasks; - using Autofac.Extensions.DependencyInjection; - using Autofac; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using RabbitMQ.Client; - using Services; - - public class Program - { - public static IConfigurationRoot Configuration { get; set; } - - public static void Main(string[] args) => MainAsync().Wait(); - - static async Task MainAsync() - { - StartUp(); - - IServiceCollection services = new ServiceCollection(); - var serviceProvider = ConfigureServices(services); - - var logger = serviceProvider.GetService(); - Configure(logger); - - var gracePeriodManagerService = serviceProvider - .GetRequiredService(); - var checkUpdateTime = serviceProvider - .GetRequiredService>().Value.CheckUpdateTime; - - while (true) - { - gracePeriodManagerService.CheckConfirmedGracePeriodOrders(); - await Task.Delay(checkUpdateTime); - } - } - - public static void StartUp() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddEnvironmentVariables(); - - Configuration = builder.Build(); - } - - public static IServiceProvider ConfigureServices(IServiceCollection services) - { - services.AddLogging() - .AddOptions() - .Configure(Configuration) - .AddSingleton() - .AddSingleton(sp => - { - var settings = sp.GetRequiredService>().Value; - var logger = sp.GetRequiredService>(); - var factory = new ConnectionFactory() - { - HostName = settings.EventBusConnection - }; - - return new DefaultRabbitMQPersistentConnection(factory, logger); - }); - - RegisterEventBus(services); - - var container = new ContainerBuilder(); - container.Populate(services); - return new AutofacServiceProvider(container.Build()); - } - - public static void Configure(ILoggerFactory loggerFactory) - { - loggerFactory - .AddConsole(Configuration.GetSection("Logging")) - .AddConsole(LogLevel.Debug); - } - - private static void RegisterEventBus(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs b/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs deleted file mode 100644 index 2362ccd00..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace GracePeriodManager.Services -{ - public interface IManagerService - { - void CheckConfirmedGracePeriodOrders(); - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs b/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs deleted file mode 100644 index 24207ea2b..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs +++ /dev/null @@ -1,62 +0,0 @@ -namespace GracePeriodManager.Services -{ - using Dapper; - using GracePeriodManager.IntegrationEvents.Events; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using System.Collections.Generic; - using System.Data.SqlClient; - - public class ManagerService : IManagerService - { - private readonly ManagerSettings _settings; - private readonly IEventBus _eventBus; - private readonly ILogger _logger; - - public ManagerService(IOptions settings, - IEventBus eventBus, - ILogger logger) - { - _settings = settings.Value; - _eventBus = eventBus; - _logger = logger; - } - - public void CheckConfirmedGracePeriodOrders() - { - var orderIds = GetConfirmedGracePeriodOrders(); - - foreach (var orderId in orderIds) - { - var confirmGracePeriodEvent = new GracePeriodConfirmedIntegrationEvent(orderId); - _eventBus.Publish(confirmGracePeriodEvent); - } - } - - private IEnumerable GetConfirmedGracePeriodOrders() - { - IEnumerable orderIds = new List(); - using (var conn = new SqlConnection(_settings.ConnectionString)) - { - try - { - _logger.LogInformation("Grace Period Manager Client is trying to connect to database server"); - conn.Open(); - orderIds = conn.Query( - @"SELECT Id FROM [Microsoft.eShopOnContainers.Services.OrderingDb].[ordering].[orders] - WHERE DATEDIFF(minute, [OrderDate], GETDATE()) >= @GracePeriodTime - AND [OrderStatusId] = 1", - new { GracePeriodTime = _settings.GracePeriodTime }); - } - catch (SqlException exception) - { - _logger.LogCritical($"FATAL ERROR: Database connections could not be opened: {exception.Message}"); - } - - } - - return orderIds; - } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/appsettings.json b/src/Services/GracePeriod/GracePeriodManager/appsettings.json deleted file mode 100644 index 273437a8e..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/appsettings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - }, - "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;", - "GracePeriodTime": "1", - "CheckUpdateTime": "30000" -} diff --git a/src/Services/Identity/Identity.API/.dockerignore b/src/Services/Identity/Identity.API/.dockerignore deleted file mode 100644 index d8f8175f6..000000000 --- a/src/Services/Identity/Identity.API/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/src/Services/Identity/Identity.API/AppSettings.cs b/src/Services/Identity/Identity.API/AppSettings.cs index 78d848d41..1f45763fe 100644 --- a/src/Services/Identity/Identity.API/AppSettings.cs +++ b/src/Services/Identity/Identity.API/AppSettings.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class AppSettings { public string MvcClient { get; set; } + public bool UseCustomizationData { get; set; } } } diff --git a/src/Services/Identity/Identity.API/Certificate/Certificate.cs b/src/Services/Identity/Identity.API/Certificate/Certificate.cs index f779017fe..d20726d12 100644 --- a/src/Services/Identity/Identity.API/Certificate/Certificate.cs +++ b/src/Services/Identity/Identity.API/Certificate/Certificate.cs @@ -1,11 +1,8 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - -using System.IO; +using System.IO; using System.Reflection; using System.Security.Cryptography.X509Certificates; -namespace Identity.API.Certificate +namespace Microsoft.eShopOnContainers.Services.Identity.API.Certificates { static class Certificate { diff --git a/src/Services/Identity/Identity.API/Configuration/Config.cs b/src/Services/Identity/Identity.API/Configuration/Config.cs index 4aa12d4ce..969b86aa1 100644 --- a/src/Services/Identity/Identity.API/Configuration/Config.cs +++ b/src/Services/Identity/Identity.API/Configuration/Config.cs @@ -2,7 +2,7 @@ using IdentityServer4.Models; using System.Collections.Generic; -namespace Identity.API.Configuration +namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration { public class Config { @@ -67,6 +67,7 @@ namespace Identity.API.Configuration }, RedirectUris = { clientsUrl["Xamarin"] }, RequireConsent = false, + RequirePkce = true, PostLogoutRedirectUris = { $"{clientsUrl["Xamarin"]}/Account/Redirecting" }, AllowedCorsOrigins = { "http://eshopxamarin" }, AllowedScopes = new List @@ -96,6 +97,7 @@ namespace Identity.API.Configuration AllowAccessTokensViaBrowser = false, RequireConsent = false, AllowOfflineAccess = true, + AlwaysIncludeUserClaimsInIdToken = true, RedirectUris = new List { $"{clientsUrl["Mvc"]}/signin-oidc" @@ -114,6 +116,98 @@ namespace Identity.API.Configuration "locations", "marketing" }, + }, + new Client + { + ClientId = "mvctest", + ClientName = "MVC Client Test", + ClientSecrets = new List + { + new Secret("secret".Sha256()) + }, + ClientUri = $"{clientsUrl["Mvc"]}", // public uri of the client + AllowedGrantTypes = GrantTypes.Hybrid, + AllowAccessTokensViaBrowser = true, + RequireConsent = false, + AllowOfflineAccess = true, + RedirectUris = new List + { + $"{clientsUrl["Mvc"]}/signin-oidc" + }, + PostLogoutRedirectUris = new List + { + $"{clientsUrl["Mvc"]}/signout-callback-oidc" + }, + AllowedScopes = new List + { + IdentityServerConstants.StandardScopes.OpenId, + IdentityServerConstants.StandardScopes.Profile, + IdentityServerConstants.StandardScopes.OfflineAccess, + "orders", + "basket", + "locations", + "marketing" + }, + }, + new Client + { + ClientId = "locationsswaggerui", + ClientName = "Locations Swagger UI", + AllowedGrantTypes = GrantTypes.Implicit, + AllowAccessTokensViaBrowser = true, + + RedirectUris = { $"{clientsUrl["LocationsApi"]}/swagger/o2c.html" }, + PostLogoutRedirectUris = { $"{clientsUrl["LocationsApi"]}/swagger/" }, + + AllowedScopes = + { + "locations" + } + }, + new Client + { + ClientId = "marketingswaggerui", + ClientName = "Marketing Swagger UI", + AllowedGrantTypes = GrantTypes.Implicit, + AllowAccessTokensViaBrowser = true, + + RedirectUris = { $"{clientsUrl["MarketingApi"]}/swagger/o2c.html" }, + PostLogoutRedirectUris = { $"{clientsUrl["MarketingApi"]}/swagger/" }, + + AllowedScopes = + { + "marketing" + } + }, + new Client + { + ClientId = "basketswaggerui", + ClientName = "Basket Swagger UI", + AllowedGrantTypes = GrantTypes.Implicit, + AllowAccessTokensViaBrowser = true, + + RedirectUris = { $"{clientsUrl["BasketApi"]}/swagger/o2c.html" }, + PostLogoutRedirectUris = { $"{clientsUrl["BasketApi"]}/swagger/" }, + + AllowedScopes = + { + "basket" + } + }, + new Client + { + ClientId = "orderingswaggerui", + ClientName = "Ordering Swagger UI", + AllowedGrantTypes = GrantTypes.Implicit, + AllowAccessTokensViaBrowser = true, + + RedirectUris = { $"{clientsUrl["OrderingApi"]}/swagger/o2c.html" }, + PostLogoutRedirectUris = { $"{clientsUrl["OrderingApi"]}/swagger/" }, + + AllowedScopes = + { + "orders" + } } }; } diff --git a/src/Services/Identity/Identity.API/Controllers/AccountController.cs b/src/Services/Identity/Identity.API/Controllers/AccountController.cs index 641f39522..79e9c247e 100644 --- a/src/Services/Identity/Identity.API/Controllers/AccountController.cs +++ b/src/Services/Identity/Identity.API/Controllers/AccountController.cs @@ -1,29 +1,23 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using IdentityModel; -using IdentityServer4.Quickstart.UI.Models; +using IdentityModel; +using IdentityServer4; +using IdentityServer4.Models; using IdentityServer4.Services; -using Microsoft.AspNetCore.Http.Authentication; +using IdentityServer4.Stores; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; +using Microsoft.Extensions.Logging; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; -using IdentityServer4.Models; -using IdentityServer4.Stores; -using Identity.API.Services; -using Identity.API.Models; -using Microsoft.Extensions.Logging; -using Microsoft.AspNetCore.Authorization; -using Identity.API.Models.AccountViewModels; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Authentication; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { /// /// This sample controller implements a typical login/logout/provision workflow for local and external accounts. @@ -36,22 +30,22 @@ namespace IdentityServer4.Quickstart.UI.Controllers private readonly ILoginService _loginService; private readonly IIdentityServerInteractionService _interaction; private readonly IClientStore _clientStore; - private readonly ILogger _logger; + private readonly ILogger _logger; private readonly UserManager _userManager; public AccountController( - + //InMemoryUserLoginService loginService, ILoginService loginService, IIdentityServerInteractionService interaction, IClientStore clientStore, - ILoggerFactory loggerFactory, + ILogger logger, UserManager userManager) { _loginService = loginService; _interaction = interaction; _clientStore = clientStore; - _logger = loggerFactory.CreateLogger(); + _logger = logger; _userManager = userManager; } @@ -69,6 +63,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers } var vm = await BuildLoginViewModelAsync(returnUrl, context); + ViewData["ReturnUrl"] = returnUrl; return View(vm); @@ -86,7 +81,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers var user = await _loginService.FindByUsername(model.Email); if (await _loginService.ValidateCredentials(user, model.Password)) { - AuthenticationProperties props = null; + AuthenticationProperties props = null; if (model.RememberMe) { props = new AuthenticationProperties @@ -97,6 +92,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers }; await _loginService.SignIn(user); + // make sure the returnUrl is still valid, and if yes - redirect back to authorize endpoint if (_interaction.IsValidReturnUrl(model.ReturnUrl)) { @@ -111,7 +107,9 @@ namespace IdentityServer4.Quickstart.UI.Controllers // something went wrong, show form with error var vm = await BuildLoginViewModelAsync(model); + ViewData["ReturnUrl"] = model.ReturnUrl; + return View(vm); } @@ -180,6 +178,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers public async Task Logout(LogoutViewModel model) { var idp = User?.FindFirst(JwtClaimTypes.IdentityProvider)?.Value; + if (idp != null && idp != IdentityServerConstants.LocalIdentityProvider) { if (model.LogoutId == null) @@ -191,19 +190,24 @@ namespace IdentityServer4.Quickstart.UI.Controllers } string url = "/Account/Logout?logoutId=" + model.LogoutId; + try { + // hack: try/catch to handle social providers that throw - await HttpContext.Authentication.SignOutAsync(idp, new AuthenticationProperties { RedirectUri = url }); + await HttpContext.SignOutAsync(idp, new AuthenticationProperties + { + RedirectUri = url + }); } - catch(Exception ex) + catch (Exception ex) { _logger.LogCritical(ex.Message); } } // delete authentication cookie - await HttpContext.Authentication.SignOutAsync(); + await HttpContext.SignOutAsync(); // set this so UI rendering sees an anonymous user HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); @@ -217,7 +221,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers public async Task DeviceLogOut(string redirectUrl) { // delete authentication cookie - await HttpContext.Authentication.SignOutAsync(); + await HttpContext.SignOutAsync(); // set this so UI rendering sees an anonymous user HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); @@ -240,7 +244,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers // start challenge and roundtrip the return URL var props = new AuthenticationProperties { - RedirectUri = returnUrl, + RedirectUri = returnUrl, Items = { { "scheme", provider } } }; return new ChallengeResult(provider, props); @@ -293,7 +297,8 @@ namespace IdentityServer4.Quickstart.UI.Controllers } } - if (returnUrl != null) { + if (returnUrl != null) + { if (HttpContext.User.Identity.IsAuthenticated) return Redirect(returnUrl); else diff --git a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs index a5687dd31..095440d6b 100644 --- a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs +++ b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs @@ -1,19 +1,13 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - +using IdentityServer4.Models; using IdentityServer4.Services; +using IdentityServer4.Stores; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels; using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; -using IdentityServer4.Models; -using IdentityServer4.Stores; -using IdentityServer4.Quickstart.UI.Models; -using Identity.API.Models.AccountViewModels; -using Identity.API.Services; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { /// /// This controller implements the consent logic diff --git a/src/Services/Identity/Identity.API/Controllers/HomeController.cs b/src/Services/Identity/Identity.API/Controllers/HomeController.cs index f21ab65e0..66931b764 100644 --- a/src/Services/Identity/Identity.API/Controllers/HomeController.cs +++ b/src/Services/Identity/Identity.API/Controllers/HomeController.cs @@ -1,16 +1,12 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using eShopOnContainers.Identity; -using Identity.API.Services; -using IdentityServer4.Quickstart.UI.Models; + using IdentityServer4.Services; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; using Microsoft.Extensions.Options; using System.Threading.Tasks; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { public class HomeController : Controller { diff --git a/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs b/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs index ddbe7bbfd..aec67258c 100644 --- a/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs +++ b/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; -namespace Identity.API.Data +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data { public class ApplicationDbContext : IdentityDbContext { diff --git a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs similarity index 76% rename from src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs rename to src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs index 0f81bcf66..3dbf28171 100644 --- a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs +++ b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs @@ -1,57 +1,40 @@ -namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Extensions; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data { - using AspNetCore.Identity; - using EntityFrameworkCore; - using Extensions.Logging; - using global::eShopOnContainers.Identity; - using global::Identity.API.Data; - using global::Identity.API.Models; - using Identity.API.Extensions; - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.Options; - using System; - using System.Collections.Generic; - using System.IO; - using System.IO.Compression; - using System.Linq; - using System.Security.Cryptography; - using System.Text.RegularExpressions; - using System.Threading.Tasks; - - public class ApplicationContextSeed - { - private readonly IPasswordHasher _passwordHasher; - public ApplicationContextSeed(IPasswordHasher passwordHasher) - { - _passwordHasher = passwordHasher; - } - public async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0) + public class ApplicationDbContextSeed + { + private readonly IPasswordHasher _passwordHasher = new PasswordHasher(); + + public async Task SeedAsync(ApplicationDbContext context,IHostingEnvironment env, + ILogger logger, IOptions settings,int? retry = 0) { int retryForAvaiability = retry.Value; + try { - var log = loggerFactory.CreateLogger("application seed"); - - var context = (ApplicationDbContext)applicationBuilder - .ApplicationServices.GetService(typeof(ApplicationDbContext)); - - context.Database.Migrate(); - - var settings = (AppSettings)applicationBuilder - .ApplicationServices.GetRequiredService>().Value; - - var useCustomizationData = settings.UseCustomizationData; + var useCustomizationData = settings.Value.UseCustomizationData; var contentRootPath = env.ContentRootPath; var webroot = env.WebRootPath; if (!context.Users.Any()) { context.Users.AddRange(useCustomizationData - ? GetUsersFromFile(contentRootPath, log) + ? GetUsersFromFile(contentRootPath, logger) : GetDefaultUser()); await context.SaveChangesAsync(); @@ -59,7 +42,7 @@ if (useCustomizationData) { - GetPreconfiguredImages(contentRootPath, webroot, log); + GetPreconfiguredImages(contentRootPath, webroot, logger); } } catch (Exception ex) @@ -67,14 +50,15 @@ if (retryForAvaiability < 10) { retryForAvaiability++; - var log = loggerFactory.CreateLogger("catalog seed"); - log.LogError(ex.Message); - await SeedAsync(applicationBuilder, env, loggerFactory, retryForAvaiability); + + logger.LogError(ex.Message,$"There is an error migrating data for ApplicationDbContext"); + + await SeedAsync(context,env,logger,settings, retryForAvaiability); } } } - private IEnumerable GetUsersFromFile(string contentRootPath, ILogger log) + private IEnumerable GetUsersFromFile(string contentRootPath, ILogger logger) { string csvFileUsers = Path.Combine(contentRootPath, "Setup", "Users.csv"); @@ -96,7 +80,8 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); + return GetDefaultUser(); } @@ -104,7 +89,7 @@ .Skip(1) // skip header column .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") ) .SelectTry(column => CreateApplicationUser(column, csvheaders)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null) .ToList(); @@ -207,14 +192,14 @@ return csvheaders; } - static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger log) + static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger logger) { try { string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip"); if (!File.Exists(imagesZipFile)) { - log.LogError($" zip file '{imagesZipFile}' does not exists."); + logger.LogError($" zip file '{imagesZipFile}' does not exists."); return; } @@ -236,14 +221,14 @@ } else { - log.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'"); + logger.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'"); } } } } catch (Exception ex) { - log.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}"); + logger.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}"); } } } diff --git a/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs b/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs new file mode 100644 index 000000000..bb41f0d0a --- /dev/null +++ b/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs @@ -0,0 +1,56 @@ +using IdentityServer4.EntityFramework.DbContexts; +using IdentityServer4.EntityFramework.Mappers; +using Microsoft.eShopOnContainers.Services.Identity.API.Configuration; +using Microsoft.Extensions.Configuration; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data +{ + public class ConfigurationDbContextSeed + { + public async Task SeedAsync(ConfigurationDbContext context,IConfiguration configuration) + { + + //callbacks urls from config: + var clientUrls = new Dictionary(); + + clientUrls.Add("Mvc", configuration.GetValue("MvcClient")); + clientUrls.Add("Spa", configuration.GetValue("SpaClient")); + clientUrls.Add("Xamarin", configuration.GetValue("XamarinCallback")); + clientUrls.Add("LocationsApi", configuration.GetValue("LocationApiClient")); + clientUrls.Add("MarketingApi", configuration.GetValue("MarketingApiClient")); + clientUrls.Add("BasketApi", configuration.GetValue("BasketApiClient")); + clientUrls.Add("OrderingApi", configuration.GetValue("OrderingApiClient")); + + if (!context.Clients.Any()) + { + foreach (var client in Config.GetClients(clientUrls)) + { + await context.Clients.AddAsync(client.ToEntity()); + } + await context.SaveChangesAsync(); + } + + if (!context.IdentityResources.Any()) + { + foreach (var resource in Config.GetResources()) + { + await context.IdentityResources.AddAsync(resource.ToEntity()); + } + await context.SaveChangesAsync(); + } + + if (!context.ApiResources.Any()) + { + foreach (var api in Config.GetApis()) + { + await context.ApiResources.AddAsync(api.ToEntity()); + } + + await context.SaveChangesAsync(); + } + } + } +} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs b/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs deleted file mode 100644 index 07e821f4c..000000000 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs +++ /dev/null @@ -1,242 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Identity.API.Data; - -namespace WebMVC.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20161019122215_Init_Scheme")] - partial class Init_Scheme - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => - { - b.Property("Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => - { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => - { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - } - } -} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs b/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs deleted file mode 100644 index 46dfceb9a..000000000 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace WebMVC.Migrations -{ - public partial class extendProfile : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastName", - table: "AspNetUsers", - nullable: true); - - migrationBuilder.AddColumn( - name: "Name", - table: "AspNetUsers", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LastName", - table: "AspNetUsers"); - - migrationBuilder.DropColumn( - name: "Name", - table: "AspNetUsers"); - } - } -} diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index bd01695f3..53e32f89b 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -1,6 +1,24 @@ -FROM microsoft/aspnetcore:1.1.2 -ARG source +FROM microsoft/aspnetcore:2.0.3 AS base WORKDIR /app EXPOSE 80 -COPY ${source:-obj/Docker/publish} . + +FROM microsoft/aspnetcore-build:2.0 AS build +WORKDIR /src +COPY eShopOnContainers-ServicesAndWebApps.sln ./ +COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ +COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/ +COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/ +RUN dotnet restore +COPY . . +WORKDIR /src/src/Services/Identity/Identity.API +RUN dotnet build -c Release -o /app + +FROM build AS publish +RUN dotnet publish -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . ENTRYPOINT ["dotnet", "Identity.API.dll"] diff --git a/src/Services/Identity/Identity.API/Dockerfile.nanowin b/src/Services/Identity/Identity.API/Dockerfile.nanowin deleted file mode 100644 index 9d24ccf1a..000000000 --- a/src/Services/Identity/Identity.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Identity.API.dll"] diff --git a/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs index e3ff0a3c0..1061881af 100644 --- a/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs +++ b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Identity.API.Extensions +namespace Microsoft.eShopOnContainers.Services.Identity.API.Extensions { public static class LinqSelectExtensions { diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index 1fd2a7fa8..f6356d899 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -1,11 +1,9 @@  - netcoreapp1.1 - 1.1.2 - Exe + netcoreapp2.0 + 2.0.0 aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 ..\..\..\..\docker-compose.dcproj @@ -16,37 +14,16 @@ - - - - - - - - - - - - - All - - - All - - - - - - - - - - - All - - - - + + + + + + + + + + @@ -55,10 +32,10 @@ - - - - + + + + @@ -66,16 +43,13 @@ - + - - Always - PreserveNewest @@ -83,7 +57,6 @@ - diff --git a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs b/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs deleted file mode 100644 index 51c896f5f..000000000 --- a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Identity.API.Migrations -{ - public partial class Initpersistedgrant : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "PersistedGrants", - columns: table => new - { - Key = table.Column(maxLength: 200, nullable: false), - ClientId = table.Column(maxLength: 200, nullable: false), - CreationTime = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false), - Expiration = table.Column(nullable: true), - SubjectId = table.Column(maxLength: 200, nullable: true), - Type = table.Column(maxLength: 50, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PersistedGrants", x => x.Key); - }); - - migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", - table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "PersistedGrants"); - } - } -} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs similarity index 55% rename from src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs index 2d118647d..0850b37b9 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs @@ -1,44 +1,135 @@ -using System; +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using System; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20161020101725_extendProfile")] - partial class extendProfile + [Migration("20170912114036_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => + modelBuilder.Entity("Identity.API.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("CardHolderName") + .IsRequired(); + + b.Property("CardNumber") + .IsRequired(); + + b.Property("CardType"); + + b.Property("City") + .IsRequired(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Country") + .IsRequired(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("Expiration") + .IsRequired(); + + b.Property("LastName") + .IsRequired(); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("Name") + .IsRequired(); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("SecurityNumber") + .IsRequired(); + + b.Property("SecurityStamp"); + + b.Property("State") + .IsRequired(); + + b.Property("Street") + .IsRequired(); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.Property("ZipCode") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); b.Property("ConcurrencyStamp") .IsConcurrencyToken(); b.Property("Name") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("AspNetRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +148,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetRoleClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -76,7 +167,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider"); @@ -94,7 +185,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserLogins"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId"); @@ -104,12 +195,10 @@ namespace WebMVC.Migrations b.HasIndex("RoleId"); - b.HasIndex("UserId"); - b.ToTable("AspNetUserRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId"); @@ -124,123 +213,51 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserTokens"); }); - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("LastName"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("Name"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs similarity index 53% rename from src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs rename to src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs index 278c3f422..cf771dac8 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs +++ b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Metadata; +using System; +using System.Collections.Generic; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { - public partial class Init_Scheme : Migration + public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -13,59 +13,47 @@ namespace WebMVC.Migrations name: "AspNetRoles", columns: table => new { - Id = table.Column(nullable: false), - ConcurrencyStamp = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: true), - NormalizedName = table.Column(maxLength: 256, nullable: true) + Id = table.Column(type: "nvarchar(450)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AspNetRoles", x => x.Id); }); - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(nullable: false), - Name = table.Column(nullable: false), - Value = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - }); - migrationBuilder.CreateTable( name: "AspNetUsers", columns: table => new { - Id = table.Column(nullable: false), - AccessFailedCount = table.Column(nullable: false), - CardHolderName = table.Column(nullable: true), - CardNumber = table.Column(nullable: true), - CardType = table.Column(nullable: false), - City = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - Country = table.Column(nullable: true), - Email = table.Column(maxLength: 256, nullable: true), - EmailConfirmed = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false), - LockoutEnd = table.Column(nullable: true), - NormalizedEmail = table.Column(maxLength: 256, nullable: true), - NormalizedUserName = table.Column(maxLength: 256, nullable: true), - PasswordHash = table.Column(nullable: true), - PhoneNumber = table.Column(nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false), - SecurityNumber = table.Column(nullable: true), - SecurityStamp = table.Column(nullable: true), - State = table.Column(nullable: true), - Street = table.Column(nullable: true), - TwoFactorEnabled = table.Column(nullable: false), - UserName = table.Column(maxLength: 256, nullable: true), - ZipCode = table.Column(nullable: true) + Id = table.Column(type: "nvarchar(450)", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false), + CardHolderName = table.Column(type: "nvarchar(max)", nullable: false), + CardNumber = table.Column(type: "nvarchar(max)", nullable: false), + CardType = table.Column(type: "int", nullable: false), + City = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + Country = table.Column(type: "nvarchar(max)", nullable: false), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false), + Expiration = table.Column(type: "nvarchar(max)", nullable: false), + LastName = table.Column(type: "nvarchar(max)", nullable: false), + LockoutEnabled = table.Column(type: "bit", nullable: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + Name = table.Column(type: "nvarchar(max)", nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), + SecurityNumber = table.Column(type: "nvarchar(max)", nullable: false), + SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), + State = table.Column(type: "nvarchar(max)", nullable: false), + Street = table.Column(type: "nvarchar(max)", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ZipCode = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { @@ -76,11 +64,11 @@ namespace WebMVC.Migrations name: "AspNetRoleClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClaimType = table.Column(nullable: true), - ClaimValue = table.Column(nullable: true), - RoleId = table.Column(nullable: false) + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true), + RoleId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -97,11 +85,11 @@ namespace WebMVC.Migrations name: "AspNetUserClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClaimType = table.Column(nullable: true), - ClaimValue = table.Column(nullable: true), - UserId = table.Column(nullable: false) + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -118,10 +106,10 @@ namespace WebMVC.Migrations name: "AspNetUserLogins", columns: table => new { - LoginProvider = table.Column(nullable: false), - ProviderKey = table.Column(nullable: false), - ProviderDisplayName = table.Column(nullable: true), - UserId = table.Column(nullable: false) + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -138,8 +126,8 @@ namespace WebMVC.Migrations name: "AspNetUserRoles", columns: table => new { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false) + UserId = table.Column(type: "nvarchar(450)", nullable: false), + RoleId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -158,16 +146,38 @@ namespace WebMVC.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName"); + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "nvarchar(450)", nullable: false), + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); migrationBuilder.CreateIndex( name: "IX_AspNetRoleClaims_RoleId", table: "AspNetRoleClaims", column: "RoleId"); + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + migrationBuilder.CreateIndex( name: "IX_AspNetUserClaims_UserId", table: "AspNetUserClaims", @@ -183,11 +193,6 @@ namespace WebMVC.Migrations table: "AspNetUserRoles", column: "RoleId"); - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_UserId", - table: "AspNetUserRoles", - column: "UserId"); - migrationBuilder.CreateIndex( name: "EmailIndex", table: "AspNetUsers", @@ -197,7 +202,8 @@ namespace WebMVC.Migrations name: "UserNameIndex", table: "AspNetUsers", column: "NormalizedUserName", - unique: true); + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs similarity index 55% rename from src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs rename to src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs index 1f14e2321..dcc87bc73 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,42 +1,133 @@ -using System; +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using System; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => + modelBuilder.Entity("Identity.API.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("CardHolderName") + .IsRequired(); + + b.Property("CardNumber") + .IsRequired(); + + b.Property("CardType"); + + b.Property("City") + .IsRequired(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Country") + .IsRequired(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("Expiration") + .IsRequired(); + + b.Property("LastName") + .IsRequired(); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("Name") + .IsRequired(); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("SecurityNumber") + .IsRequired(); + + b.Property("SecurityStamp"); + + b.Property("State") + .IsRequired(); + + b.Property("Street") + .IsRequired(); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.Property("ZipCode") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); b.Property("ConcurrencyStamp") .IsConcurrencyToken(); b.Property("Name") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("AspNetRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -55,7 +146,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetRoleClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -74,7 +165,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider"); @@ -92,7 +183,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserLogins"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId"); @@ -102,12 +193,10 @@ namespace WebMVC.Migrations b.HasIndex("RoleId"); - b.HasIndex("UserId"); - b.ToTable("AspNetUserRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId"); @@ -122,123 +211,51 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserTokens"); }); - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("LastName"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("Name"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs similarity index 88% rename from src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs index 9e6eb2500..327d2fee0 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs @@ -1,20 +1,24 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; namespace Identity.API.Migrations.ConfigurationDb { [DbContext(typeof(ConfigurationDbContext))] - [Migration("20170604151338_Init-configuration")] - partial class Initconfiguration + [Migration("20170927170433_Config")] + partial class Config { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b => @@ -165,6 +169,14 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("AuthorizationCodeLifetime"); + b.Property("BackChannelLogoutSessionRequired"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200); + b.Property("ClientId") .IsRequired() .HasMaxLength(200); @@ -175,21 +187,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("ClientUri") .HasMaxLength(2000); + b.Property("ConsentLifetime"); + + b.Property("Description") + .HasMaxLength(1000); + b.Property("EnableLocalLogin"); b.Property("Enabled"); - b.Property("IdentityTokenLifetime"); + b.Property("FrontChannelLogoutSessionRequired"); - b.Property("IncludeJwtId"); + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000); - b.Property("LogoUri"); + b.Property("IdentityTokenLifetime"); - b.Property("LogoutSessionRequired"); + b.Property("IncludeJwtId"); - b.Property("LogoutUri"); + b.Property("LogoUri") + .HasMaxLength(2000); - b.Property("PrefixClientClaims"); + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() @@ -316,6 +336,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.ToTable("ClientPostLogoutRedirectUris"); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientProperties"); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.Property("Id") @@ -503,6 +546,14 @@ namespace Identity.API.Migrations.ConfigurationDb .OnDelete(DeleteBehavior.Cascade); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") @@ -534,6 +585,7 @@ namespace Identity.API.Migrations.ConfigurationDb .HasForeignKey("IdentityResourceId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs similarity index 62% rename from src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs rename to src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs index 8cf20e865..754c75486 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs @@ -1,11 +1,10 @@ -using System; -using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Metadata; +using System; namespace Identity.API.Migrations.ConfigurationDb { - public partial class Initconfiguration : Migration + public partial class Config : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -13,12 +12,12 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiResources", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Enabled = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false) + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -29,37 +28,42 @@ namespace Identity.API.Migrations.ConfigurationDb name: "Clients", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - AbsoluteRefreshTokenLifetime = table.Column(nullable: false), - AccessTokenLifetime = table.Column(nullable: false), - AccessTokenType = table.Column(nullable: false), - AllowAccessTokensViaBrowser = table.Column(nullable: false), - AllowOfflineAccess = table.Column(nullable: false), - AllowPlainTextPkce = table.Column(nullable: false), - AllowRememberConsent = table.Column(nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), - AlwaysSendClientClaims = table.Column(nullable: false), - AuthorizationCodeLifetime = table.Column(nullable: false), - ClientId = table.Column(maxLength: 200, nullable: false), - ClientName = table.Column(maxLength: 200, nullable: true), - ClientUri = table.Column(maxLength: 2000, nullable: true), - EnableLocalLogin = table.Column(nullable: false), - Enabled = table.Column(nullable: false), - IdentityTokenLifetime = table.Column(nullable: false), - IncludeJwtId = table.Column(nullable: false), - LogoUri = table.Column(nullable: true), - LogoutSessionRequired = table.Column(nullable: false), - LogoutUri = table.Column(nullable: true), - PrefixClientClaims = table.Column(nullable: false), - ProtocolType = table.Column(maxLength: 200, nullable: false), - RefreshTokenExpiration = table.Column(nullable: false), - RefreshTokenUsage = table.Column(nullable: false), - RequireClientSecret = table.Column(nullable: false), - RequireConsent = table.Column(nullable: false), - RequirePkce = table.Column(nullable: false), - SlidingRefreshTokenLifetime = table.Column(nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(nullable: false) + AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), + AccessTokenLifetime = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ConsentLifetime = table.Column(type: "int", nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + RefreshTokenUsage = table.Column(type: "int", nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -70,15 +74,15 @@ namespace Identity.API.Migrations.ConfigurationDb name: "IdentityResources", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Emphasize = table.Column(nullable: false), - Enabled = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false), - Required = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Emphasize = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Required = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -89,10 +93,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + ApiResourceId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -109,15 +113,15 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiScopes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Emphasize = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false), - Required = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) + ApiResourceId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Emphasize = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Required = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -134,13 +138,13 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiSecrets", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - Expiration = table.Column(nullable: true), - Type = table.Column(maxLength: 250, nullable: true), - Value = table.Column(maxLength: 2000, nullable: true) + ApiResourceId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true) }, constraints: table => { @@ -157,11 +161,11 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -178,10 +182,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientCorsOrigins", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) }, constraints: table => { @@ -198,10 +202,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientGrantTypes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -218,10 +222,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientIdPRestrictions", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -238,10 +242,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientPostLogoutRedirectUris", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -254,14 +258,35 @@ namespace Identity.API.Migrations.ConfigurationDb onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "ClientProperties", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + ClientId = table.Column(type: "int", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientProperties", x => x.Id); + table.ForeignKey( + name: "FK_ClientProperties_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "ClientRedirectUris", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -278,10 +303,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientScopes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -298,13 +323,13 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientSecrets", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true), - Type = table.Column(maxLength: 250, nullable: true), - Value = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -321,10 +346,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "IdentityClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - IdentityResourceId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + IdentityResourceId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -341,10 +366,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiScopeClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiScopeId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + ApiScopeId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -357,6 +382,11 @@ namespace Identity.API.Migrations.ConfigurationDb onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateIndex( + name: "IX_ApiClaims_ApiResourceId", + table: "ApiClaims", + column: "ApiResourceId"); + migrationBuilder.CreateIndex( name: "IX_ApiResources_Name", table: "ApiResources", @@ -364,9 +394,9 @@ namespace Identity.API.Migrations.ConfigurationDb unique: true); migrationBuilder.CreateIndex( - name: "IX_ApiClaims_ApiResourceId", - table: "ApiClaims", - column: "ApiResourceId"); + name: "IX_ApiScopeClaims_ApiScopeId", + table: "ApiScopeClaims", + column: "ApiScopeId"); migrationBuilder.CreateIndex( name: "IX_ApiScopes_ApiResourceId", @@ -379,22 +409,11 @@ namespace Identity.API.Migrations.ConfigurationDb column: "Name", unique: true); - migrationBuilder.CreateIndex( - name: "IX_ApiScopeClaims_ApiScopeId", - table: "ApiScopeClaims", - column: "ApiScopeId"); - migrationBuilder.CreateIndex( name: "IX_ApiSecrets_ApiResourceId", table: "ApiSecrets", column: "ApiResourceId"); - migrationBuilder.CreateIndex( - name: "IX_Clients_ClientId", - table: "Clients", - column: "ClientId", - unique: true); - migrationBuilder.CreateIndex( name: "IX_ClientClaims_ClientId", table: "ClientClaims", @@ -420,11 +439,22 @@ namespace Identity.API.Migrations.ConfigurationDb table: "ClientPostLogoutRedirectUris", column: "ClientId"); + migrationBuilder.CreateIndex( + name: "IX_ClientProperties_ClientId", + table: "ClientProperties", + column: "ClientId"); + migrationBuilder.CreateIndex( name: "IX_ClientRedirectUris_ClientId", table: "ClientRedirectUris", column: "ClientId"); + migrationBuilder.CreateIndex( + name: "IX_Clients_ClientId", + table: "Clients", + column: "ClientId", + unique: true); + migrationBuilder.CreateIndex( name: "IX_ClientScopes_ClientId", table: "ClientScopes", @@ -473,6 +503,9 @@ namespace Identity.API.Migrations.ConfigurationDb migrationBuilder.DropTable( name: "ClientPostLogoutRedirectUris"); + migrationBuilder.DropTable( + name: "ClientProperties"); + migrationBuilder.DropTable( name: "ClientRedirectUris"); diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index 7c725f5ae..88d9baba3 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,9 +1,12 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; namespace Identity.API.Migrations.ConfigurationDb { @@ -12,8 +15,9 @@ namespace Identity.API.Migrations.ConfigurationDb { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b => @@ -164,6 +168,14 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("AuthorizationCodeLifetime"); + b.Property("BackChannelLogoutSessionRequired"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200); + b.Property("ClientId") .IsRequired() .HasMaxLength(200); @@ -174,21 +186,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("ClientUri") .HasMaxLength(2000); + b.Property("ConsentLifetime"); + + b.Property("Description") + .HasMaxLength(1000); + b.Property("EnableLocalLogin"); b.Property("Enabled"); - b.Property("IdentityTokenLifetime"); + b.Property("FrontChannelLogoutSessionRequired"); - b.Property("IncludeJwtId"); + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000); - b.Property("LogoUri"); + b.Property("IdentityTokenLifetime"); - b.Property("LogoutSessionRequired"); + b.Property("IncludeJwtId"); - b.Property("LogoutUri"); + b.Property("LogoUri") + .HasMaxLength(2000); - b.Property("PrefixClientClaims"); + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() @@ -315,6 +335,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.ToTable("ClientPostLogoutRedirectUris"); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientProperties"); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.Property("Id") @@ -502,6 +545,14 @@ namespace Identity.API.Migrations.ConfigurationDb .OnDelete(DeleteBehavior.Cascade); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") @@ -533,6 +584,7 @@ namespace Identity.API.Migrations.ConfigurationDb .HasForeignKey("IdentityResourceId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs similarity index 81% rename from src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs index a2b93219b..aaf24d10c 100644 --- a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs @@ -1,20 +1,23 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; -namespace Identity.API.Migrations +namespace Identity.API.Migrations.PersistedGrantDb { [DbContext(typeof(PersistedGrantDbContext))] - [Migration("20170604151240_Init-persisted-grant")] - partial class Initpersistedgrant + [Migration("20170927170423_Grants")] + partial class Grants { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => @@ -47,6 +50,7 @@ namespace Identity.API.Migrations b.ToTable("PersistedGrants"); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs new file mode 100644 index 000000000..4017f8bf0 --- /dev/null +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; + +namespace Identity.API.Migrations.PersistedGrantDb +{ + public partial class Grants : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "PersistedGrants", + columns: table => new + { + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_PersistedGrants", x => x.Key); + }); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type", + table: "PersistedGrants", + columns: new[] { "SubjectId", "ClientId", "Type" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "PersistedGrants"); + } + } +} diff --git a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs similarity index 85% rename from src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs rename to src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index ffe6bc35a..7989f0586 100644 --- a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,19 +1,22 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; -namespace Identity.API.Migrations +namespace Identity.API.Migrations.PersistedGrantDb { [DbContext(typeof(PersistedGrantDbContext))] partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => @@ -46,6 +49,7 @@ namespace Identity.API.Migrations b.ToTable("PersistedGrants"); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs index 89a2d90e7..633f37b89 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs @@ -1,10 +1,6 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. +using System.Collections.Generic; - -using System.Collections.Generic; - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ConsentInputModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs index e0df65555..c010f636f 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs @@ -1,12 +1,10 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - + using System.Collections.Generic; using System.Linq; using IdentityServer4.Models; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ConsentViewModel : ConsentInputModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs index 526f320ba..5d4f597a2 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ExternalLoginConfirmationViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs index fd00ca55f..f5dd3ab61 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ForgotPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs index d78c9e984..bd7f7c7bb 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs @@ -1,8 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LoggedOutViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs index edb29a8d2..3b1926cc2 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs @@ -1,10 +1,6 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. +using System.ComponentModel.DataAnnotations; - -using System.ComponentModel.DataAnnotations; - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LoginViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs index fd5153288..d81dcd6ac 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs @@ -1,8 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LogoutViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs index c84c1478d..df97bb965 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class RegisterViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs index a90c4ca64..57edc44c3 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ResetPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs index b5efaed34..a6f316c48 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Rendering; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class SendCodeViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs index f0a18d663..83d075f9c 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class VerifyCodeViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs deleted file mode 100644 index 63290cb8a..000000000 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using System.Collections.Generic; - -namespace Identity.API.Models.AccountViewModels -{ - //public class _LoginViewModel : LoginViewModel - //{ - // public bool EnableLocalLogin { get; set; } - // public IEnumerable ExternalProviders { get; set; } - //} - - //public class ExternalProvider - //{ - // public string DisplayName { get; set; } - // public string AuthenticationScheme { get; set; } - //} -} \ No newline at end of file diff --git a/src/Services/Identity/Identity.API/Models/ApplicationUser.cs b/src/Services/Identity/Identity.API/Models/ApplicationUser.cs index b520c333b..fa43017fc 100644 --- a/src/Services/Identity/Identity.API/Models/ApplicationUser.cs +++ b/src/Services/Identity/Identity.API/Models/ApplicationUser.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models { // Add profile data for application users by adding properties to the ApplicationUser class public class ApplicationUser : IdentityUser diff --git a/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs b/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs index 379377aec..b101bca7a 100644 --- a/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs @@ -4,7 +4,7 @@ using IdentityServer4.Models; -namespace IdentityServer4.Quickstart.UI.Models +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models { public class ErrorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs index ada4b8a03..2a1cc49d0 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class AddPhoneNumberViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs index b0df1b2af..fa9193c38 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ChangePasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs index 5ed3b2925..15cf719fa 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Rendering; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ConfigureTwoFactorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs index 92eccf504..4a6d4497f 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class FactorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs index f6e5b6874..b13bc18e3 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Identity; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class IndexViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs index 1238585cd..0b24c3b7c 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http.Authentication; +using Microsoft.AspNetCore.Http.Authentication; using Microsoft.AspNetCore.Identity; +using System.Collections.Generic; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ManageLoginsViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs index 546f0b1e8..c9171fcf3 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class RemoveLoginViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs index d824afc94..9d0711b08 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class SetPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs index af7105a2e..fccf56e4e 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class VerifyPhoneNumberViewModel { diff --git a/src/Services/Identity/Identity.API/Program.cs b/src/Services/Identity/Identity.API/Program.cs index 2f731c045..7b73838e6 100644 --- a/src/Services/Identity/Identity.API/Program.cs +++ b/src/Services/Identity/Identity.API/Program.cs @@ -1,21 +1,60 @@ -using Microsoft.AspNetCore.Hosting; +using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using System.IO; -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class Program { public static void Main(string[] args) { - var host = new WebHostBuilder() + BuildWebHost(args) + .MigrateDbContext((_, __) => { }) + .MigrateDbContext((context, services) => + { + var env = services.GetService(); + var logger = services.GetService>(); + var settings = services.GetService>(); + + new ApplicationDbContextSeed() + .SeedAsync(context, env, logger, settings) + .Wait(); + }) + .MigrateDbContext((context,services)=> + { + var configuration = services.GetService(); + + new ConfigurationDbContextSeed() + .SeedAsync(context, configuration) + .Wait(); + }).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) .UseKestrel() .UseHealthChecks("/hc") .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .UseApplicationInsights() .Build(); - - host.Run(); - } } } + diff --git a/src/Services/Identity/Identity.API/Services/EFLoginService.cs b/src/Services/Identity/Identity.API/Services/EFLoginService.cs index e1c2fe52e..63c4d4b7e 100644 --- a/src/Services/Identity/Identity.API/Services/EFLoginService.cs +++ b/src/Services/Identity/Identity.API/Services/EFLoginService.cs @@ -1,11 +1,8 @@ -using Identity.API.Models; -using Microsoft.AspNetCore.Identity; -using System; -using System.Collections.Generic; -using System.Linq; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class EFLoginService : ILoginService { diff --git a/src/Services/Identity/Identity.API/Services/IEmailSender.cs b/src/Services/Identity/Identity.API/Services/IEmailSender.cs index 2259641f8..95a4f99ee 100644 --- a/src/Services/Identity/Identity.API/Services/IEmailSender.cs +++ b/src/Services/Identity/Identity.API/Services/IEmailSender.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface IEmailSender { diff --git a/src/Services/Identity/Identity.API/Services/ILoginService.cs b/src/Services/Identity/Identity.API/Services/ILoginService.cs index 5915b42ee..7bff7f272 100644 --- a/src/Services/Identity/Identity.API/Services/ILoginService.cs +++ b/src/Services/Identity/Identity.API/Services/ILoginService.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface ILoginService { diff --git a/src/Services/Identity/Identity.API/Services/IRedirectService.cs b/src/Services/Identity/Identity.API/Services/IRedirectService.cs index 9dd277e2d..4ec8ea1fc 100644 --- a/src/Services/Identity/Identity.API/Services/IRedirectService.cs +++ b/src/Services/Identity/Identity.API/Services/IRedirectService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface IRedirectService { diff --git a/src/Services/Identity/Identity.API/Services/ISmsSender.cs b/src/Services/Identity/Identity.API/Services/ISmsSender.cs index 5c6bd2aae..f842e7ae9 100644 --- a/src/Services/Identity/Identity.API/Services/ISmsSender.cs +++ b/src/Services/Identity/Identity.API/Services/ISmsSender.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface ISmsSender { diff --git a/src/Services/Identity/Identity.API/Services/MessageServices.cs b/src/Services/Identity/Identity.API/Services/MessageServices.cs index d9898cba4..18ab35a7c 100644 --- a/src/Services/Identity/Identity.API/Services/MessageServices.cs +++ b/src/Services/Identity/Identity.API/Services/MessageServices.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { // This class is used by the application to send Email and SMS // when you turn on two-factor authentication in ASP.NET Identity. diff --git a/src/Services/Identity/Identity.API/Services/ProfileService.cs b/src/Services/Identity/Identity.API/Services/ProfileService.cs index 71d10a777..204ac3119 100644 --- a/src/Services/Identity/Identity.API/Services/ProfileService.cs +++ b/src/Services/Identity/Identity.API/Services/ProfileService.cs @@ -1,15 +1,15 @@ -using IdentityServer4.Services; +using IdentityModel; +using IdentityServer4.Models; +using IdentityServer4.Services; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; -using IdentityServer4.Models; -using Microsoft.AspNetCore.Identity; -using Identity.API.Models; using System.Security.Claims; -using IdentityModel; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class ProfileService : IProfileService { diff --git a/src/Services/Identity/Identity.API/Services/RedirectService.cs b/src/Services/Identity/Identity.API/Services/RedirectService.cs index 440272d39..bbe0ae976 100644 --- a/src/Services/Identity/Identity.API/Services/RedirectService.cs +++ b/src/Services/Identity/Identity.API/Services/RedirectService.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; +using System.Text.RegularExpressions; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class RedirectService : IRedirectService { diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index bc8ca3cac..58ac0bd10 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -1,61 +1,50 @@ -using Identity.API.Certificate; -using Identity.API.Configuration; -using Identity.API.Data; -using Identity.API.Models; -using Identity.API.Services; -using IdentityServer4.EntityFramework.DbContexts; -using IdentityServer4.EntityFramework.Mappers; +using Autofac; +using Autofac.Extensions.DependencyInjection; using IdentityServer4.Services; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.ServiceFabric; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using Microsoft.eShopOnContainers.BuildingBlocks; -using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.eShopOnContainers.Services.Identity.API.Certificates; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.HealthChecks; -using Identity.API.Certificate; -using Autofac.Extensions.DependencyInjection; -using Autofac; using Microsoft.Extensions.Logging; +using StackExchange.Redis; using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Threading.Tasks; -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class Startup { - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); - - if (env.IsDevelopment()) - { - // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 - builder.AddUserSecrets(); - } - - builder.AddEnvironmentVariables(); - Configuration = builder.Build(); + Configuration = configuration; } - public IConfigurationRoot Configuration { get; } + public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) - { + { + RegisterAppInsights(services); // Add framework services. services.AddDbContext(options => - options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); + options.UseSqlServer(Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + })); services.AddIdentity() .AddEntityFrameworkStores() @@ -71,7 +60,7 @@ namespace eShopOnContainers.Identity { opts.ApplicationDiscriminator = "eshop.identity"; }) - .PersistKeysToRedis(Configuration["DPConnectionString"]); + .PersistKeysToRedis(ConnectionMultiplexer.Connect(Configuration["DPConnectionString"]), "DataProtection-Keys"); } services.AddHealthChecks(checks => @@ -81,7 +70,7 @@ namespace eShopOnContainers.Identity { minutes = minutesParsed; } - checks.AddSqlCheck("Identity_Db", Configuration.GetConnectionString("DefaultConnection"), TimeSpan.FromMinutes(minutes)); + checks.AddSqlCheck("Identity_Db", Configuration["ConnectionString"], TimeSpan.FromMinutes(minutes)); }); services.AddTransient(); @@ -89,23 +78,38 @@ namespace eShopOnContainers.Identity services.AddTransient, EFLoginService>(); services.AddTransient(); - var connectionString = Configuration.GetConnectionString("DefaultConnection"); + var connectionString = Configuration["ConnectionString"]; var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name; // Adds IdentityServer services.AddIdentityServer(x => x.IssuerUri = "null") - .AddSigningCredential(Certificate.Get()) + .AddSigningCredential(Certificate.Get()) .AddAspNetIdentity() - .AddConfigurationStore(builder => - builder.UseSqlServer(connectionString, options => - options.MigrationsAssembly(migrationsAssembly))) - .AddOperationalStore(builder => - builder.UseSqlServer(connectionString, options => - options.MigrationsAssembly(migrationsAssembly))) + .AddConfigurationStore(options => + { + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(migrationsAssembly); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }) + .AddOperationalStore(options => + { + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(migrationsAssembly); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }) .Services.AddTransient(); var container = new ContainerBuilder(); container.Populate(services); + return new AutofacServiceProvider(container.Build()); } @@ -114,18 +118,26 @@ namespace eShopOnContainers.Identity { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); - app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); + app.UsePathBase(pathBase); + } + app.UseStaticFiles(); @@ -136,8 +148,6 @@ namespace eShopOnContainers.Identity await next(); }); - app.UseIdentity(); - // Adds IdentityServer app.UseIdentityServer(); @@ -147,55 +157,23 @@ namespace eShopOnContainers.Identity name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); - - // Store idsrv grant config into db - InitializeGrantStoreAndConfiguration(app).Wait(); - - //Seed Data - var hasher = new PasswordHasher(); - new ApplicationContextSeed(hasher).SeedAsync(app, env, loggerFactory).Wait(); } - private async Task InitializeGrantStoreAndConfiguration(IApplicationBuilder app) + private void RegisterAppInsights(IServiceCollection services) { - //callbacks urls from config: - Dictionary clientUrls = new Dictionary(); - clientUrls.Add("Mvc", Configuration.GetValue("MvcClient")); - clientUrls.Add("Spa", Configuration.GetValue("SpaClient")); - clientUrls.Add("Xamarin", Configuration.GetValue("XamarinCallback")); + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); - using (var serviceScope = app.ApplicationServices.GetService().CreateScope()) + if (orchestratorType?.ToUpper() == "K8S") { - serviceScope.ServiceProvider.GetRequiredService().Database.Migrate(); - var context = serviceScope.ServiceProvider.GetRequiredService(); - context.Database.Migrate(); - - if (!context.Clients.Any()) - { - foreach (var client in Config.GetClients(clientUrls)) - { - await context.Clients.AddAsync(client.ToEntity()); - } - await context.SaveChangesAsync(); - } - - if (!context.IdentityResources.Any()) - { - foreach (var resource in Config.GetResources()) - { - await context.IdentityResources.AddAsync(resource.ToEntity()); - } - await context.SaveChangesAsync(); - } - - if (!context.ApiResources.Any()) - { - foreach (var api in Config.GetApis()) - { - await context.ApiResources.AddAsync(api.ToEntity()); - } - await context.SaveChangesAsync(); - } + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); } } } diff --git a/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml b/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml index ea6fdbfbc..f843973f8 100644 --- a/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml +++ b/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml @@ -1,4 +1,4 @@ -@model Identity.API.Models.AccountViewModels.LoggedOutViewModel +@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LoggedOutViewModel