From 1347e3a8d2e804be2874ef90be9c3c93f9cacbf6 Mon Sep 17 00:00:00 2001 From: Vladica Pavlovic Date: Fri, 26 Jan 2018 05:34:33 +0100 Subject: [PATCH 1/6] Update readme.md bug --- deploy/az/storage/catalog/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/az/storage/catalog/readme.md b/deploy/az/storage/catalog/readme.md index f3ece6fed..3a4e07d13 100644 --- a/deploy/az/storage/catalog/readme.md +++ b/deploy/az/storage/catalog/readme.md @@ -24,7 +24,7 @@ Once parameter file is edited you can deploy it using [create-resources script]( 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 +create-resources.cmd storage\catalog\deploystorage newResourceGroup -c westus ``` From 23bdd59b1000105ab3ee8c491e28c261e28ee311 Mon Sep 17 00:00:00 2001 From: yantang Date: Sun, 28 Jan 2018 23:33:44 -0800 Subject: [PATCH 2/6] Update AI k8s package version, otherwise kubernetes deployment will fail because of deadlock. --- src/Services/Basket/Basket.API/Basket.API.csproj | 2 +- src/Services/Catalog/Catalog.API/Catalog.API.csproj | 2 +- src/Services/Identity/Identity.API/Identity.API.csproj | 2 +- src/Services/Location/Locations.API/Locations.API.csproj | 2 +- src/Services/Marketing/Marketing.API/Marketing.API.csproj | 2 +- src/Services/Ordering/Ordering.API/Ordering.API.csproj | 2 +- src/Services/Payment/Payment.API/Payment.API.csproj | 2 +- src/Web/WebMVC/WebMVC.csproj | 2 +- src/Web/WebSPA/WebSPA.csproj | 2 +- src/Web/WebStatus/WebStatus.csproj | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index 0866e1161..a613151e7 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index 749c00efd..acb17ce16 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -37,7 +37,7 @@ - + diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index c3b7cc5d3..0d30c43c0 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj index 9ea93b9e4..e1c41a251 100644 --- a/src/Services/Location/Locations.API/Locations.API.csproj +++ b/src/Services/Location/Locations.API/Locations.API.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj index d566408ec..a6c6eb83b 100644 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index 01c95761d..533149591 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -35,7 +35,7 @@ - + diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj index 009abfd27..bd0d595c0 100644 --- a/src/Services/Payment/Payment.API/Payment.API.csproj +++ b/src/Services/Payment/Payment.API/Payment.API.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Web/WebMVC/WebMVC.csproj b/src/Web/WebMVC/WebMVC.csproj index 89c58bd50..d31fec311 100644 --- a/src/Web/WebMVC/WebMVC.csproj +++ b/src/Web/WebMVC/WebMVC.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/Web/WebSPA/WebSPA.csproj b/src/Web/WebSPA/WebSPA.csproj index b5274462c..00199f08f 100644 --- a/src/Web/WebSPA/WebSPA.csproj +++ b/src/Web/WebSPA/WebSPA.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Web/WebStatus/WebStatus.csproj b/src/Web/WebStatus/WebStatus.csproj index 60a0a6c0a..02ee3e622 100644 --- a/src/Web/WebStatus/WebStatus.csproj +++ b/src/Web/WebStatus/WebStatus.csproj @@ -7,7 +7,7 @@ - + From f33cc304d4af65fce6fa154cf5ada1bce280bcc7 Mon Sep 17 00:00:00 2001 From: Liam Barnett Date: Thu, 8 Feb 2018 11:56:45 +0000 Subject: [PATCH 3/6] Corrected details for the 'configFile' param Corrected all details related to the 'configFile' parameter. The current documents refer to a .JSON file which does not exist, the script expects a .YAML file (conf_local.yaml' or 'conf_cloud.yaml). Corrected the examples to refer to the 'conf_local.yaml' or 'conf_cloud.yaml' files included in this repo. --- k8s/README.k8s.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/k8s/README.k8s.md b/k8s/README.k8s.md index 85bcdec6c..77acdf236 100644 --- a/k8s/README.k8s.md +++ b/k8s/README.k8s.md @@ -33,18 +33,18 @@ or using AKS instead of ACS 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 +>./deploy.ps1 -registry myregistry.azurecr.io -dockerUser User -dockerPassword SecretPassword -configFile file_with_config.yaml >``` -The parameter `configFile` is important (and mandatory) because it contains the configuration used for the Pods in Kubernetes. This allow deploying Pods that use your own resources in Azure or any other cloud provider. A configuration file `local.json` is provided which configures Pods to use the infrastructure containers (that is sql server, rabbitmq, redis and mongodb must be deployed also in the k8s). +The parameter `configFile` is important (and mandatory) because it contains the configuration used for the Pods in Kubernetes. This allow deploying Pods that use your own resources in Azure or any other cloud provider. A configuration file `conf_local.yaml` is provided which configures Pods to use the infrastructure containers (that is sql server, rabbitmq, redis and mongodb must be deployed also in the k8s). The script will build the code and corresponding Docker images, push the later 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) ### Pods configuration file -When deploying to k8s the script needs the `configFile` with the location of a JSON configuration file. This file contains the configuration of the pods. The file is a JSON file. For reference another configuration file (cloud.json) is provided but without valid values. +When deploying to k8s the script needs the `configFile` parameter with the location of the YAML configuration file. This file contains the configuration of the pods. The file is a .YAML file. For reference another configuration file (conf_cloud.yaml) is provided but without valid values. -If you deploy the infrastructure containers use `local.json` as a value for `configFile` parameter. If you don't deploy the infrastructure containers use your own configuration file with the correct values. +If you deploy the infrastructure containers use `conf_local.yaml` as a value for `configFile` parameter. If you don't deploy the infrastructure containers use your own configuration file with the correct values. ### Parameters of the deploy.ps1 script From 200e36ee56926ca359791ef83592ce75cddb042f Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Fri, 9 Feb 2018 14:18:03 -0800 Subject: [PATCH 4/6] Update readme-docker-compose.md --- readme/readme-docker-compose.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/readme/readme-docker-compose.md b/readme/readme-docker-compose.md index 69735a9f4..882630682 100644 --- a/readme/readme-docker-compose.md +++ b/readme/readme-docker-compose.md @@ -2,10 +2,6 @@ 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**. @@ -47,6 +43,17 @@ PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://${ESHOP_PROD_EXTERNAL_DNS_NAME_ 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. +## Build container (DEPRECATED) + +NOTE that since we support Docker MULTI-STAGE builds (support in VS 2017 since December 2017), the build container is no loger needed in CI/CD pipelines as a similar process is done by Docker itself under the covers with the multi-stage builds. +For more info on Docker Multi-Stage, read: + +https://docs.docker.com/develop/develop-images/multistage-build/ + +https://blogs.msdn.microsoft.com/stevelasker/2017/09/11/net-and-multistage-dockerfiles/ + +* `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. + **For more information** about docker-compose variable substitution read the [compose docs](https://docs.docker.com/compose/compose-file/#variable-substitution). ## Other files @@ -76,4 +83,4 @@ These files were intended to provide a fast way to start only "infrastructure" c * `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 +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/) From 33c35ffa0f12bead819218fb9a0fb5e125a33e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Bornsj=C3=B6?= Date: Sat, 10 Feb 2018 16:42:28 +0100 Subject: [PATCH 5/6] Changed how the MessageId is created. --- .../EventBus/EventBusServiceBus/EventBusServiceBus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index 03a3d1139..b5c951ffd 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -46,7 +46,7 @@ var message = new Message { - MessageId = new Guid().ToString(), + MessageId = Guid.NewGuid().ToString(), Body = Encoding.UTF8.GetBytes(jsonMessage), Label = eventName, }; From debc2fe4c4c06aab5c774692eb1cd1dd3aebf660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Bornsj=C3=B6?= Date: Mon, 12 Feb 2018 18:31:20 +0100 Subject: [PATCH 6/6] Removed duplicate string to byte conversion --- .../EventBus/EventBusServiceBus/EventBusServiceBus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index b5c951ffd..446fcd7b7 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -47,7 +47,7 @@ var message = new Message { MessageId = Guid.NewGuid().ToString(), - Body = Encoding.UTF8.GetBytes(jsonMessage), + Body = body, Label = eventName, };