Browse Source

Merge branch 'dev' into migration/ids4-packages-upgrade

pull/1617/head
gil zhang 2 years ago
parent
commit
0253754c1f
1076 changed files with 104470 additions and 46811 deletions
  1. +35
    -0
      .github/workflows/basket-api-deploy.yml
  2. +16
    -56
      .github/workflows/basket-api.yml
  3. +35
    -0
      .github/workflows/catalog-api-deploy.yml
  4. +22
    -56
      .github/workflows/catalog-api.yml
  5. +71
    -0
      .github/workflows/composite/build-push/action.yml
  6. +47
    -0
      .github/workflows/composite/build-test/action.yml
  7. +21
    -0
      .github/workflows/composite/build/action.yml
  8. +54
    -0
      .github/workflows/composite/deploy-helm/action.yml
  9. +35
    -0
      .github/workflows/identity-api-deploy.yml
  10. +16
    -56
      .github/workflows/identity-api.yml
  11. +35
    -0
      .github/workflows/mobileshoppingagg-deploy.yml
  12. +16
    -56
      .github/workflows/mobileshoppingagg.yml
  13. +35
    -0
      .github/workflows/ordering-api-deploy.yml
  14. +22
    -56
      .github/workflows/ordering-api.yml
  15. +35
    -0
      .github/workflows/ordering-backgroundtasks-deploy.yml
  16. +16
    -56
      .github/workflows/ordering-backgroundtasks.yml
  17. +35
    -0
      .github/workflows/ordering-signalrhub-deploy.yml
  18. +16
    -56
      .github/workflows/ordering-signalrhub.yml
  19. +35
    -0
      .github/workflows/payment-api-deploy.yml
  20. +16
    -56
      .github/workflows/payment-api.yml
  21. +35
    -0
      .github/workflows/webhooks-api-deploy.yml
  22. +16
    -56
      .github/workflows/webhooks-api.yml
  23. +16
    -56
      .github/workflows/webhooks-client.yml
  24. +39
    -0
      .github/workflows/webmvc-deploy.yml
  25. +16
    -56
      .github/workflows/webmvc.yml
  26. +35
    -0
      .github/workflows/webshoppingagg-deploy.yml
  27. +16
    -56
      .github/workflows/webshoppingagg.yml
  28. +35
    -0
      .github/workflows/webspa-deploy.yml
  29. +16
    -56
      .github/workflows/webspa.yml
  30. +35
    -0
      .github/workflows/webstatus-deploy.yml
  31. +16
    -56
      .github/workflows/webstatus.yml
  32. +13
    -11
      README.md
  33. +5
    -2
      branch-guide.md
  34. +0
    -2
      build/acr-build/queue-all.ps1
  35. +63
    -0
      deploy/azure/az/servicebus/sbusdeploy.json
  36. +0
    -8
      deploy/k8s/archived/README.md
  37. +0
    -50
      deploy/k8s/archived/create-aks.ps1
  38. +0
    -18
      deploy/k8s/archived/dashboard-adminuser.yaml
  39. +0
    -20
      deploy/k8s/archived/enable-tls.ps1
  40. +0
    -18
      deploy/k8s/archived/helm-rbac.yaml
  41. +0
    -12
      deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml
  42. +0
    -21
      deploy/k8s/archived/helm/apigwms/.helmignore
  43. +0
    -5
      deploy/k8s/archived/helm/apigwms/Chart.yaml
  44. +0
    -139
      deploy/k8s/archived/helm/apigwms/envoy.yaml
  45. +0
    -2
      deploy/k8s/archived/helm/apigwms/templates/NOTES.txt
  46. +0
    -32
      deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl
  47. +0
    -52
      deploy/k8s/archived/helm/apigwms/templates/_names.tpl
  48. +0
    -110
      deploy/k8s/archived/helm/apigwms/templates/deployment.yaml
  49. +0
    -14
      deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml
  50. +0
    -47
      deploy/k8s/archived/helm/apigwms/templates/ingress.yaml
  51. +0
    -23
      deploy/k8s/archived/helm/apigwms/templates/service.yaml
  52. +0
    -45
      deploy/k8s/archived/helm/apigwms/values.yaml
  53. +0
    -21
      deploy/k8s/archived/helm/apigwws/.helmignore
  54. +0
    -5
      deploy/k8s/archived/helm/apigwws/Chart.yaml
  55. +0
    -139
      deploy/k8s/archived/helm/apigwws/envoy.yaml
  56. +0
    -2
      deploy/k8s/archived/helm/apigwws/templates/NOTES.txt
  57. +0
    -32
      deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl
  58. +0
    -52
      deploy/k8s/archived/helm/apigwws/templates/_names.tpl
  59. +0
    -109
      deploy/k8s/archived/helm/apigwws/templates/deployment.yaml
  60. +0
    -14
      deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml
  61. +0
    -46
      deploy/k8s/archived/helm/apigwws/templates/ingress.yaml
  62. +0
    -23
      deploy/k8s/archived/helm/apigwws/templates/service.yaml
  63. +0
    -46
      deploy/k8s/archived/helm/apigwws/values.yaml
  64. +0
    -38
      deploy/k8s/archived/helm/app.yaml
  65. +0
    -21
      deploy/k8s/archived/helm/basket-api/.helmignore
  66. +0
    -5
      deploy/k8s/archived/helm/basket-api/Chart.yaml
  67. +0
    -8
      deploy/k8s/archived/helm/basket-api/templates/NOTES.txt
  68. +0
    -32
      deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl
  69. +0
    -52
      deploy/k8s/archived/helm/basket-api/templates/_names.tpl
  70. +0
    -17
      deploy/k8s/archived/helm/basket-api/templates/configmap.yaml
  71. +0
    -99
      deploy/k8s/archived/helm/basket-api/templates/deployment.yaml
  72. +0
    -23
      deploy/k8s/archived/helm/basket-api/templates/service.yaml
  73. +0
    -61
      deploy/k8s/archived/helm/basket-api/values.yaml
  74. +0
    -21
      deploy/k8s/archived/helm/basket-data/.helmignore
  75. +0
    -5
      deploy/k8s/archived/helm/basket-data/Chart.yaml
  76. +0
    -8
      deploy/k8s/archived/helm/basket-data/templates/NOTES.txt
  77. +0
    -32
      deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl
  78. +0
    -43
      deploy/k8s/archived/helm/basket-data/templates/deployment.yaml
  79. +0
    -19
      deploy/k8s/archived/helm/basket-data/templates/service.yaml
  80. +0
    -19
      deploy/k8s/archived/helm/basket-data/values.yaml
  81. +0
    -21
      deploy/k8s/archived/helm/catalog-api/.helmignore
  82. +0
    -5
      deploy/k8s/archived/helm/catalog-api/Chart.yaml
  83. +0
    -9
      deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt
  84. +0
    -32
      deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl
  85. +0
    -60
      deploy/k8s/archived/helm/catalog-api/templates/_names.tpl
  86. +0
    -21
      deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml
  87. +0
    -99
      deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml
  88. +0
    -23
      deploy/k8s/archived/helm/catalog-api/templates/service.yaml
  89. +0
    -63
      deploy/k8s/archived/helm/catalog-api/values.yaml
  90. +0
    -149
      deploy/k8s/archived/helm/deploy-all.ps1
  91. +0
    -21
      deploy/k8s/archived/helm/eshop-common/.helmignore
  92. +0
    -5
      deploy/k8s/archived/helm/eshop-common/Chart.yaml
  93. +0
    -7
      deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt
  94. +0
    -32
      deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl
  95. +0
    -3
      deploy/k8s/archived/helm/eshop-common/templates/_names.tpl
  96. +0
    -9
      deploy/k8s/archived/helm/eshop-common/templates/secret.yaml
  97. +0
    -0
      deploy/k8s/archived/helm/eshop-common/values.yaml
  98. +0
    -21
      deploy/k8s/archived/helm/identity-api/.helmignore
  99. +0
    -5
      deploy/k8s/archived/helm/identity-api/Chart.yaml
  100. +0
    -4
      deploy/k8s/archived/helm/identity-api/templates/NOTES.txt

+ 35
- 0
.github/workflows/basket-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy basket-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["basket-api"]
branches: [dev]
types: [completed]
env:
CHART: basket-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/basket-api.yml View File

@ -1,6 +1,7 @@
name: basket-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/catalog-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy catalog-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["catalog-api"]
branches: [dev]
types: [completed]
env:
CHART: catalog-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 22
- 56
.github/workflows/catalog-api.yml View File

@ -1,6 +1,7 @@
name: catalog-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -21,6 +22,9 @@ on:
env:
SERVICE: catalog-api
IMAGE: catalog.api
DOTNET_VERSION: 6.0.x
PROJECT_PATH: Services/Catalog/Catalog.API
TESTS_PATH: Services/Catalog/Catalog.UnitTests
jobs:
@ -28,65 +32,27 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-test
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
dotnet_version: ${{ env.DOTNET_VERSION }}
project_path: ${{ env.PROJECT_PATH }}
tests_path: ${{ env.TESTS_PATH }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 71
- 0
.github/workflows/composite/build-push/action.yml View File

@ -0,0 +1,71 @@
name: "Build and push image"
description: "Builds and pushes an image to a registry"
inputs:
service:
description: "Service to build"
required: true
registry_host:
description: "Image registry host e.g. myacr.azureacr.io"
required: true
registry_endpoint:
description: "Image registry repo e.g. myacr.azureacr.io/eshop"
required: true
image_name:
description: "Name of image"
required: true
registry_username:
description: "Registry username"
required: true
registry_password:
description: "Registry password"
required: true
runs:
using: "composite"
steps:
- name: Enable experimental features for the Docker daemon and CLI
shell: bash
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ${{ inputs.registry_host }}
username: ${{ inputs.registry_username }}
password: ${{ inputs.registry_password }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ inputs.service }}
shell: bash
run: sudo -E docker-compose build ${{ inputs.service }}
working-directory: ./src
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ inputs.registry_endpoint }}
- name: Compose push ${{ inputs.service }}
shell: bash
run: sudo -E docker-compose push ${{ inputs.service }}
working-directory: ./src
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ inputs.registry_endpoint }}
- name: Create multiarch manifest
shell: bash
run: |
docker --config ~/.docker manifest create ${{ inputs.registry_endpoint }}/${{ inputs.image_name }}:${{ env.BRANCH }} ${{ inputs.registry_endpoint }}/${{ inputs.image_name }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ inputs.registry_endpoint }}/${{ inputs.image_name }}:${{ env.BRANCH }}

+ 47
- 0
.github/workflows/composite/build-test/action.yml View File

@ -0,0 +1,47 @@
name: "Build for PRe"
description: "Builds a docker image without pushing"
inputs:
service:
description: "Service to build"
required: true
registry_endpoint:
description: "Image registry repo e.g. myacr.azureacr.io/eshop"
required: true
dotnet_version:
description: "Version of dotnet to use for testing"
required: true
project_path:
description: "Path to project to test e.g. Services/Catalog/Catalog.API"
required: true
tests_path:
description: "Path to test project e.g. Services/Catalog/Catalog.UnitTests"
required: true
runs:
using: "composite"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ inputs.dotnet_version }}
- name: Build and run unit tests
shell: bash
run: |
cd src
dotnet restore "eShopOnContainers-ServicesAndWebApps.sln"
cd ${{ inputs.project_path }}
dotnet build --no-restore
cd -
cd ${{ inputs.tests_path }}
dotnet build --no-restore
dotnet test --no-build -v=normal
- name: Compose build ${{ inputs.service }}
shell: bash
run: sudo -E docker-compose build ${{ inputs.service }}
working-directory: ./src
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ inputs.registry_endpoint }}

+ 21
- 0
.github/workflows/composite/build/action.yml View File

@ -0,0 +1,21 @@
name: "Build for PRe"
description: "Builds a docker image without pushing"
inputs:
service:
description: "Service to build"
required: true
registry_endpoint:
description: "Image registry repo e.g. myacr.azureacr.io/eshop"
required: true
runs:
using: "composite"
steps:
- name: Compose build ${{ inputs.service }}
shell: bash
run: sudo -E docker-compose build ${{ inputs.service }}
working-directory: ./src
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ inputs.registry_endpoint }}

+ 54
- 0
.github/workflows/composite/deploy-helm/action.yml View File

@ -0,0 +1,54 @@
name: "Deploy Helm to AKS"
description: "Deploys a helm chart to AKS"
inputs:
azure_credentials:
description: "Credentials to connect to AKS"
required: true
cluster_name:
description: "Name of AKS cluster"
required: true
resource_group:
description: "Resource group of AKS cluster"
required: true
registry_host:
description: "Image registry host e.g. myacr.azureacr.io"
required: true
chart:
description: "Chart name"
required: true
chart_root:
description: "Root folder of chart"
required: true
namespace:
description: "Namespace to deploy to"
required: true
runs:
using: "composite"
steps:
- uses: azure/login@v1
with:
creds: ${{ inputs.azure_credentials }}
- uses: azure/aks-set-context@v1
name: Set AKS context
with:
creds: '${{ inputs.azure_credentials }}'
cluster-name: ${{ inputs.cluster_name }}
resource-group: ${{ inputs.resource_group }}
- name: Set branch name as env variable
shell: bash
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
- name: Deploy Chart
shell: bash
run: |
./deploy-chart.sh -c ${{ inputs.chart }} --dns aks --aks-name ${{ inputs.clusteR_name }} --aks-rg ${{ inputs.resource_group }} -r ${{ inputs.registry_host }} -t $TAG --namespace ${{ inputs.namespace }} --acr-connected
env:
TAG: ${{ env.BRANCH }}
working-directory: ${{ inputs.chart_root }}

+ 35
- 0
.github/workflows/identity-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy identity-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["identity-api"]
branches: [dev]
types: [completed]
env:
CHART: identity-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/identity-api.yml View File

@ -1,6 +1,7 @@
name: identity-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/mobileshoppingagg-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy mobileshoppingagg
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["mobileshoppingagg"]
branches: [dev]
types: [completed]
env:
CHART: mobileshoppingagg
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/mobileshoppingagg.yml View File

@ -1,6 +1,7 @@
name: mobileshoppingagg
on:
workflow_dispatch:
push:
branches:
- dev
@ -26,65 +27,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/ordering-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy ordering-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["ordering-api"]
branches: [dev]
types: [completed]
env:
CHART: ordering-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 22
- 56
.github/workflows/ordering-api.yml View File

@ -1,6 +1,7 @@
name: ordering-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -21,6 +22,9 @@ on:
env:
SERVICE: ordering-api
IMAGE: ordering.api
DOTNET_VERSION: 6.0.x
PROJECT_PATH: Services/Ordering/Ordering.API
TESTS_PATH: Services/Ordering/Ordering.UnitTests
jobs:
@ -28,65 +32,27 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-test
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
dotnet_version: ${{ env.DOTNET_VERSION }}
project_path: ${{ env.PROJECT_PATH }}
tests_path: ${{ env.TESTS_PATH }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/ordering-backgroundtasks-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy ordering-backgroundtasks
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["ordering-backgroundtasks"]
branches: [dev]
types: [completed]
env:
CHART: ordering-backgroundtasks
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/ordering-backgroundtasks.yml View File

@ -1,6 +1,7 @@
name: ordering-backgroundtasks
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/ordering-signalrhub-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy ordering-signalrhub
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["ordering-signalrhub"]
branches: [dev]
types: [completed]
env:
CHART: ordering-signalrhub
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/ordering-signalrhub.yml View File

@ -1,6 +1,7 @@
name: ordering-signalrhub
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/payment-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy payment-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["payment-api"]
branches: [dev]
types: [completed]
env:
CHART: payment-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/payment-api.yml View File

@ -1,6 +1,7 @@
name: payment-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/webhooks-api-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy webhooks-api
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["webhooks-api"]
branches: [dev]
types: [completed]
env:
CHART: webhooks-api
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/webhooks-api.yml View File

@ -1,6 +1,7 @@
name: webhooks-api
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 16
- 56
.github/workflows/webhooks-client.yml View File

@ -1,6 +1,7 @@
name: webhooks-client
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 39
- 0
.github/workflows/webmvc-deploy.yml View File

@ -0,0 +1,39 @@
name: Deploy webmvc
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["webmvc"]
branches: [dev]
types: [completed]
env:
CHART: webmvc
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/webmvc.yml View File

@ -1,6 +1,7 @@
name: webmvc
on:
workflow_dispatch:
push:
branches:
- dev
@ -29,65 +30,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/webshoppingagg-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy webshoppingagg
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["webshoppingagg"]
branches: [dev]
types: [completed]
env:
CHART: webshoppingagg
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/webshoppingagg.yml View File

@ -1,6 +1,7 @@
name: webshoppingagg
on:
workflow_dispatch:
push:
branches:
- dev
@ -26,65 +27,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/webspa-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy webspa
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["webspa"]
branches: [dev]
types: [completed]
env:
CHART: webspa
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/webspa.yml View File

@ -1,6 +1,7 @@
name: webspa
on:
workflow_dispatch:
push:
branches:
- dev
@ -28,65 +29,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 35
- 0
.github/workflows/webstatus-deploy.yml View File

@ -0,0 +1,35 @@
name: Deploy webstatus
on:
workflow_dispatch:
repository_dispatch:
types:
- deploy
workflow_run:
workflows: ["webstatus"]
branches: [dev]
types: [completed]
env:
CHART: webstatus
NAMESPACE: eshop
CHART_ROOT: deploy/k8s/helm
jobs:
deploy-to-k8s:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' || github.event.workflow_run.conclusion == 'success' }}
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/composite/deploy-helm
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
cluster_name: ${{ secrets.CLUSTER_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
registry_host: ${{ secrets.REGISTRY_HOST }}
chart: ${{ env.CHART }}
chart_root: ${{ env.CHART_ROOT }}
namespace: ${{ env.NAMESPACE }}

+ 16
- 56
.github/workflows/webstatus.yml View File

@ -1,6 +1,7 @@
name: webstatus
on:
workflow_dispatch:
push:
branches:
- dev
@ -29,65 +30,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build
with:
service: ${{ env.SERVICE }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
BuildLinux:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Enable experimental features for the Docker daemon and CLI
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Login to Container Registry
uses: docker/login-action@v1
- name: Checkout code
uses: actions/checkout@v2
- uses: ./.github/workflows/composite/build-push
with:
registry: ${{ secrets.REGISTRY_HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Set branch name as env variable
run: |
currentbranch=$(echo ${GITHUB_REF##*/})
echo "running on $currentbranch"
echo "BRANCH=$currentbranch" >> $GITHUB_ENV
shell: bash
- name: Compose build ${{ env.SERVICE }}
run: sudo -E docker-compose build ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Compose push ${{ env.SERVICE }}
run: sudo -E docker-compose push ${{ env.SERVICE }}
working-directory: ./src
shell: bash
env:
TAG: ${{ env.BRANCH }}
REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }}
- name: Create multiarch manifest
run: |
docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }}
docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }}
shell: bash
service: ${{ env.SERVICE }}
registry_host: ${{ secrets.REGISTRY_HOST }}
registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
image_name: ${{ env.IMAGE }}
registry_username: ${{ secrets.USERNAME }}
registry_password: ${{ secrets.PASSWORD }}

+ 13
- 11
README.md View File

@ -6,7 +6,9 @@
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.
![](img/eshop-webmvc-app-screenshot.png)
## SPA Application (Angular)
![](img/eshop-spa-app-home.png)
## Build Status (GitHub Actions)
@ -54,25 +56,25 @@ The basic scenario can be run locally using docker-compose, and also deployed to
### Advanced scenario
The Advanced scenario can be run only in a Kubernetes cluster. Currently this scenario is the same as a basic scenario with the following differences:
The Advanced scenario can be run only in a Kubernetes cluster. Currently, this scenario is the same as a basic scenario with the following differences:
- [Deploy to AKS with a Service Mesh for resiliency](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS))
In the future more features will be implemented in the advanced scenario.
In the future, more features will be implemented in the advanced scenario.
## IMPORTANT NOTES!
**You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac and Linux**.
**You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac, and Linux**.
**Note for Pull Requests (PRs)**: 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** branch.
**Note for Pull Requests (PRs)**: We accept pull requests 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 **main** branch.
**NEWS / ANNOUNCEMENTS**
Do you want 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
## Updated for .NET 5
## Updated for .NET 6
eShopOnContainers is updated to .NET 5 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes.
eShopOnContainers is updated to .NET 6 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes.
**See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**.
@ -84,15 +86,15 @@ eShopOnContainers is updated to .NET 5 "wave" of technologies. Not just compilat
### Architecture overview
This reference application is cross-platform at the server and client side, thanks to .NET 5 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 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](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap).
This reference application is cross-platform at the server and client-side, thanks to .NET 6 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 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](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap).
![](img/eshop_logo.png)
![](img/eShopOnContainers-architecture.png)
## Related documentation and guidance
You can find the related 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.
You can find the related 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.
There are also additional eBooks focusing on Containers/Docker lifecycle (DevOps, CI/CD, etc.) with Microsoft Tools, already published plus an additional eBook focusing on Enterprise Apps Patterns with Xamarin.Forms.
You can download them and start reviewing these Guides/eBooks here:
@ -105,7 +107,7 @@ You can download them and start reviewing these Guides/eBooks here:
For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: <https://github.com/dotnet-architecture/ebooks/issues>
## Are you new to **microservices** and **cloud-native development**?
Take a look at the free course [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) on MS Learn. This module explains microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`.
Take a look at the free course [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) on MS Learn. This module explains microservices concepts, cloud-native technologies, and reduces the friction in getting started with `eShopOnContainers`.
## Read further


+ 5
- 2
branch-guide.md View File

@ -2,8 +2,11 @@
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 the `dev` branch to be considered**. This branch is developed using `.NET 5`
- `main`: Synced time to time from `dev`.It contains "stable" code, although not the latest one. Right now, this branch contains changes specific to `.NET Core 3.1`
- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against the `dev` branch to be considered**. This branch is developed using `.NET 6`
- `release/net-5`: Contains the code changes specific to the `.NET 5`
- `release/net-3.1.1`: Contains the code changes specific to the `.NET 3.1`
> [!DISCLAIMER]: The `main` branch contains the old code base and will get obsolete in the future. So it's recommended to refer to different [tags](https://github.com/dotnet-architecture/eShopOnContainers/tags) to avoid any confusion.
Any other branch is considered temporary and could be deleted at any time. Do not submit any PR against them!


+ 0
- 2
build/acr-build/queue-all.ps1 View File

@ -31,5 +31,3 @@ $services |% {
Write-Host "Setting ACR build $bname ($bimg)"
az acr build-task create --registry $acrName --name $bname --image ${bimg}:$gitBranch --context $gitContext --branch $gitBranch --git-access-token $patToken --file $bfile
}
# Basket.API

+ 63
- 0
deploy/azure/az/servicebus/sbusdeploy.json View File

@ -16,6 +16,9 @@
"OrderingSubscriptionName": "Ordering",
"GracePeriodSubscriptionName": "GracePeriod",
"PaymentSubscriptionName": "Payment",
"BackgroundTaskSubscriptionName": "backgroundtasks",
"OrderingSignalrHubSubscriptionName": "Ordering.signalrhub",
"WebhooksSubscriptionName": "Webhooks",
"location": "[resourceGroup().location]",
"sbVersion": "2015-08-01",
"defaultSASKeyName": "Root",
@ -172,6 +175,66 @@
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
"entityAvailabilityStatus": "Available"
}
},
{
"apiVersion": "[variables('sbVersion')]",
"name": "[variables('BackgroundTaskSubscriptionName')]",
"type": "Subscriptions",
"dependsOn": [
"[variables('serviceBusTopicName')]"
],
"properties": {
"lockDuration": "00:00:30",
"requiresSession": false,
"defaultMessageTimeToLive": "14.00:00:00",
"deadLetteringOnMessageExpiration": true,
"deadLetteringOnFilterEvaluationExceptions": true,
"maxDeliveryCount": 10,
"enableBatchedOperations": false,
"status": "Active",
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
"entityAvailabilityStatus": "Available"
}
},
{
"apiVersion": "[variables('sbVersion')]",
"name": "[variables('OrderingSignalrHubSubscriptionName')]",
"type": "Subscriptions",
"dependsOn": [
"[variables('serviceBusTopicName')]"
],
"properties": {
"lockDuration": "00:00:30",
"requiresSession": false,
"defaultMessageTimeToLive": "14.00:00:00",
"deadLetteringOnMessageExpiration": true,
"deadLetteringOnFilterEvaluationExceptions": true,
"maxDeliveryCount": 10,
"enableBatchedOperations": false,
"status": "Active",
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
"entityAvailabilityStatus": "Available"
}
},
{
"apiVersion": "[variables('sbVersion')]",
"name": "[variables('WebhooksSubscriptionName')]",
"type": "Subscriptions",
"dependsOn": [
"[variables('serviceBusTopicName')]"
],
"properties": {
"lockDuration": "00:00:30",
"requiresSession": false,
"defaultMessageTimeToLive": "14.00:00:00",
"deadLetteringOnMessageExpiration": true,
"deadLetteringOnFilterEvaluationExceptions": true,
"maxDeliveryCount": 10,
"enableBatchedOperations": false,
"status": "Active",
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
"entityAvailabilityStatus": "Available"
}
}
]
}


+ 0
- 8
deploy/k8s/archived/README.md View File

@ -1,8 +0,0 @@
# Kubernetes deployment
This folder contains the files required to deploy eShopOnContainers to a Kubernetes cluster.
For more information see the following articles in the [wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki):
- [Deploy to Local Kubernetes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes)
- [Deploy to Azure Kubernetes Service (AKS)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS))

+ 0
- 50
deploy/k8s/archived/create-aks.ps1 View File

@ -1,50 +0,0 @@
Param(
[parameter(Mandatory=$true)][string]$resourceGroupName,
[parameter(Mandatory=$true)][string]$location,
[parameter(Mandatory=$true)][string]$serviceName,
[parameter(Mandatory=$true)][string]$dnsNamePrefix,
[parameter(Mandatory=$false)][string]$registryName,
[parameter(Mandatory=$true)][bool]$createAcr=$true,
[parameter(Mandatory=$false)][int]$nodeCount=3,
[parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2",
[parameter(Mandatory=$false)][bool]$enableHttpApplicationAddon=$true,
[parameter(Mandatory=$false)][bool]$enableAzureMonitoring=$false,
[parameter(Mandatory=$false)][ValidateSet("VirtualMachineScaleSets","AvailabilitySet",IgnoreCase=$true)]$vmSetType="VirtualMachineScaleSets"
)
# Create resource group
Write-Host "Creating Azure Resource Group..." -ForegroundColor Yellow
az group create --name=$resourceGroupName --location=$location
if ($createAcr -eq $true) {
# Create Azure Container Registry
if ([string]::IsNullOrEmpty($registryName)) {
$registryName=$serviceName
}
Write-Host "Creating Azure Container Registry named $registryName" -ForegroundColor Yellow
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic
}
# Create kubernetes cluster in AKS
Write-Host "Creating AKS $resourceGroupName/$serviceName" -ForegroundColor Yellow
az aks create --resource-group=$resourceGroupName --name=$serviceName --dns-name-prefix=$dnsNamePrefix --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize --vm-set-type $vmSetType
if ($enableHttpApplicationAddon) {
Write-Host "Enabling Http Applciation Routing in AKS $serviceName" -ForegroundColor Yellow
az aks enable-addons --resource-group $resourceGroupName --name $serviceName --addons http_application_routing
}
if ($enableAzureMonitoring) {
Write-Host "Enabling Azure Monitoring in AKS $serviceName" -ForegroundColor Yellow
az aks enable-addons --resource-group $resourceGroupName --name $serviceName --addons monitoring
}
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
Write-Host "Getting Kubernetes config..." -ForegroundColor Yellow
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
if ($createAcr -eq $true) {
# Show ACR credentials
Write-Host "ACR $registryName credentials:" -ForegroundColor Yellow
az acr credential show -n $registryName
}

+ 0
- 18
deploy/k8s/archived/dashboard-adminuser.yaml View File

@ -1,18 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard

+ 0
- 20
deploy/k8s/archived/enable-tls.ps1 View File

@ -1,20 +0,0 @@
Param (
[parameter(Mandatory=$false)][string]$aksName="",
[parameter(Mandatory=$false)][string]$aksRg=""
)
if ($aksName -and $aksRg) {
$aks=$(az aks show -n $aksName -g $aksRg -o json | ConvertFrom-Json)
if (-not $aks) {
Write-Host "AKS $aksName not found in RG $aksRg" -ForegroundColor Red
exit 1
}
Write-Host "Switching kubectl context to $aksRg/$aksName" -ForegroundColor Yellow
az aks get-credentials -g $aksRg -n $aksName
}
Write-Host "Installing cert-manager on current cluster"
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.11.0/cert-manager.yaml --validate=false

+ 0
- 18
deploy/k8s/archived/helm-rbac.yaml View File

@ -1,18 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system

+ 0
- 12
deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml View File

@ -1,12 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels:
# addonmanager.kubernetes.io/mode: Reconcile
app: addon-http-application-routing-ingress-nginx
kubernetes.io/cluster-service: "true"
name: addon-http-application-routing-nginx-configuration
namespace: kube-system
data:
proxy-buffer-size: "128k"
proxy-buffers: "4 256k"

+ 0
- 21
deploy/k8s/archived/helm/apigwms/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/apigwms/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: apigwms
version: 0.1.0

+ 0
- 139
deploy/k8s/archived/helm/apigwms/envoy.yaml View File

@ -1,139 +0,0 @@
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
routes:
- name: "c-short"
match:
prefix: "/c/"
route:
auto_host_rewrite: true
prefix_rewrite: "/catalog-api/"
cluster: catalog
- name: "c-long"
match:
prefix: "/catalog-api/"
route:
auto_host_rewrite: true
cluster: catalog
- name: "o-short"
match:
prefix: "/o/"
route:
auto_host_rewrite: true
prefix_rewrite: "/ordering-api/"
cluster: ordering
- name: "o-long"
match:
prefix: "/ordering-api/"
route:
auto_host_rewrite: true
cluster: ordering
- name: "h-long"
match:
prefix: "/hub/notificationhub"
route:
auto_host_rewrite: true
cluster: signalr-hub
timeout: 300s
- name: "b-short"
match:
prefix: "/b/"
route:
auto_host_rewrite: true
prefix_rewrite: "/basket-api/"
cluster: basket
- name: "b-long"
match:
prefix: "/basket-api/"
route:
auto_host_rewrite: true
cluster: basket
- name: "agg"
match:
prefix: "/"
route:
auto_host_rewrite: true
prefix_rewrite: "/"
cluster: shoppingagg
http_filters:
- name: envoy.router
access_log:
- name: envoy.file_access_log
filter:
not_health_check_filter: {}
config:
json_format:
time: "%START_TIME%"
protocol: "%PROTOCOL%"
duration: "%DURATION%"
request_method: "%REQ(:METHOD)%"
request_host: "%REQ(HOST)%"
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
response_flags: "%RESPONSE_FLAGS%"
route_name: "%ROUTE_NAME%"
upstream_host: "%UPSTREAM_HOST%"
upstream_cluster: "%UPSTREAM_CLUSTER%"
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
path: "/tmp/access.log"
clusters:
- name: shoppingagg
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
- name: catalog
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
- name: basket
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
- name: ordering
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80
- name: signalr-hub
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-signalrhub
port_value: 80

+ 0
- 2
deploy/k8s/archived/helm/apigwms/templates/NOTES.txt View File

@ -1,2 +0,0 @@
eShop API Gateway for Mobile Shopping services installed
--------------------------------------------------------

+ 0
- 32
deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "apigwms.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "apigwms.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "apigwms.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 52
deploy/k8s/archived/helm/apigwms/templates/_names.tpl View File

@ -1,52 +0,0 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}

+ 0
- 110
deploy/k8s/archived/helm/apigwms/templates/deployment.yaml View File

@ -1,110 +0,0 @@
{{- $name := include "apigwms.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "apigwms.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "apigwms.name" . }}
chart: {{ template "apigwms.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "apigwms.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "apigwms.name" . }}
release: {{ .Release.Name }}
{{ if .Values.inf.mesh.enabled -}}
annotations:
linkerd.io/inject: enabled
{{- end }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ $envoycfgname }}
items:
- key: envoy.yaml
path: envoy.yaml
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config
mountPath: {{ .Values.envoy.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
- name: admin
containerPort: 8001
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 0
- 14
deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml View File

@ -1,14 +0,0 @@
{{- $name := include "apigwms.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "envoy-{{ $name }}"
labels:
app: {{ template "apigwms.name" . }}
chart: {{ template "apigwms.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}

+ 0
- 47
deploy/k8s/archived/helm/apigwms/templates/ingress.yaml View File

@ -1,47 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "apigwms.fullname" . }}
labels:
app: {{ template "apigwms.name" . }}
chart: {{ template "apigwms.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }}
cert-manager.io/issuer: {{ .Values.inf.tls.issuer }}
{{- end }}
{{- if .Values.inf.mesh.enabled }}
{{- with .Values.ingress.mesh.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 0
- 23
deploy/k8s/archived/helm/apigwms/templates/service.yaml View File

@ -1,23 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.mobileshoppingapigw }}
labels:
app: {{ template "apigwms.name" . }}
chart: {{ template "apigwms.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.adminPort }}
targetPort: admin
protocol: TCP
name: admin
selector:
app: {{ template "apigwms.name" . }}
release: {{ .Release.Name }}

+ 0
- 45
deploy/k8s/archived/helm/apigwms/values.yaml View File

@ -1,45 +0,0 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /mobileshoppingapigw
image:
repository: envoyproxy/envoy
tag: v1.11.1
service:
type: ClusterIP
port: 80
adminPort: 8001
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/"
ingress.kubernetes.io/rewrite-target: "/"
tls: []
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
env: {}
envoy:
configPath: /etc/envoy
probes:
liveness:
path: /ready
initialDelaySeconds: 5
periodSeconds: 15
port: 8001
readiness:
path: /ready
initialDelaySeconds: 5
periodSeconds: 60
port: 8001

+ 0
- 21
deploy/k8s/archived/helm/apigwws/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/apigwws/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: apigwws
version: 0.1.0

+ 0
- 139
deploy/k8s/archived/helm/apigwws/envoy.yaml View File

@ -1,139 +0,0 @@
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
routes:
- name: "c-short"
match:
prefix: "/c/"
route:
auto_host_rewrite: true
prefix_rewrite: "/catalog-api/"
cluster: catalog
- name: "c-long"
match:
prefix: "/catalog-api/"
route:
auto_host_rewrite: true
cluster: catalog
- name: "o-short"
match:
prefix: "/o/"
route:
auto_host_rewrite: true
prefix_rewrite: "/ordering-api/"
cluster: ordering
- name: "o-long"
match:
prefix: "/ordering-api/"
route:
auto_host_rewrite: true
cluster: ordering
- name: "h-long"
match:
prefix: "/hub/notificationhub"
route:
auto_host_rewrite: true
cluster: signalr-hub
timeout: 300s
- name: "b-short"
match:
prefix: "/b/"
route:
auto_host_rewrite: true
prefix_rewrite: "/basket-api/"
cluster: basket
- name: "b-long"
match:
prefix: "/basket-api/"
route:
auto_host_rewrite: true
cluster: basket
- name: "agg"
match:
prefix: "/"
route:
auto_host_rewrite: true
prefix_rewrite: "/"
cluster: shoppingagg
http_filters:
- name: envoy.router
access_log:
- name: envoy.file_access_log
filter:
not_health_check_filter: {}
config:
json_format:
time: "%START_TIME%"
protocol: "%PROTOCOL%"
duration: "%DURATION%"
request_method: "%REQ(:METHOD)%"
request_host: "%REQ(HOST)%"
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
response_flags: "%RESPONSE_FLAGS%"
route_name: "%ROUTE_NAME%"
upstream_host: "%UPSTREAM_HOST%"
upstream_cluster: "%UPSTREAM_CLUSTER%"
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
path: "/tmp/access.log"
clusters:
- name: shoppingagg
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
- name: catalog
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
- name: basket
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
- name: ordering
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80
- name: signalr-hub
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-signalrhub
port_value: 80

+ 0
- 2
deploy/k8s/archived/helm/apigwws/templates/NOTES.txt View File

@ -1,2 +0,0 @@
eShop API Gateway for Web Shopping services installed
-----------------------------------------------------

+ 0
- 32
deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "apigwws.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "apigwws.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "apigwws.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 52
deploy/k8s/archived/helm/apigwws/templates/_names.tpl View File

@ -1,52 +0,0 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}

+ 0
- 109
deploy/k8s/archived/helm/apigwws/templates/deployment.yaml View File

@ -1,109 +0,0 @@
{{- $name := include "apigwws.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "apigwws.fullname" . }}
labels:
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "apigwws.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "apigwws.name" . }}
release: {{ .Release.Name }}
{{ if .Values.inf.mesh.enabled -}}
annotations:
linkerd.io/inject: enabled
{{- end }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ $envoycfgname }}
items:
- key: envoy.yaml
path: envoy.yaml
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: {{ .Values.envoy.configPath }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
- name: admin
containerPort: 8001
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 0
- 14
deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml View File

@ -1,14 +0,0 @@
{{- $name := include "apigwws.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "envoy-{{ $name }}"
labels:
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}

+ 0
- 46
deploy/k8s/archived/helm/apigwws/templates/ingress.yaml View File

@ -1,46 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := include "pathBase" . -}}
{{- $serviceName := .Values.app.svc.webshoppingapigw -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "apigwws.fullname" . }}
labels:
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }}
cert-manager.io/issuer: {{ .Values.inf.tls.issuer }}
{{- end }}
{{- if .Values.inf.mesh.enabled }}
{{- with .Values.ingress.mesh.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $serviceName }}
servicePort: http
{{- end }}
{{- end }}

+ 0
- 23
deploy/k8s/archived/helm/apigwws/templates/service.yaml View File

@ -1,23 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.webshoppingapigw }}
labels:
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.adminPort }}
targetPort: admin
protocol: TCP
name: admin
selector:
app: {{ template "apigwws.name" . }}
release: {{ .Release.Name }}

+ 0
- 46
deploy/k8s/archived/helm/apigwws/values.yaml View File

@ -1,46 +0,0 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /webshoppingapigw
image:
repository: envoyproxy/envoy
tag: v1.11.1
service:
type: ClusterIP
port: 80
adminPort: 8001
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/"
ingress.kubernetes.io/rewrite-target: "/"
tls: []
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# env defines the environment variables that will be declared in the pod
env: {}
envoy:
configPath: /etc/envoy
probes:
liveness:
path: /ready
initialDelaySeconds: 5
periodSeconds: 15
port: 8001
readiness:
path: /ready
initialDelaySeconds: 5
periodSeconds: 60
port: 8001

+ 0
- 38
deploy/k8s/archived/helm/app.yaml View File

@ -1,38 +0,0 @@
# This helm values file defines app-based settings
# Charts use those values, so this file **MUST** be included in all chart releases
app: # app global settings
name: "my-eshop" # Override for custom app name
ingress: # ingress related settings
entries:
basket: basket-api # ingress entry for basket api
catalog: catalog-api # ingress entry for catalog api
ordering: ordering-api # ingress entry for ordering api
identity: identity # ingress entry for identity api
mvc: webmvc # ingress entry for web mvc
spa: "" # ingress entry for web spa
status: webstatus # ingress entry for web status
webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw
mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw
webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator
mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator
payment: payment-api # ingress entry for payment api
webhooks: webhooks-api # ingress entry for webhooks api
webhooksweb: webhooks-web # ingress entry for webhooks web demo client
svc:
basket: basket-api # service name for basket api
catalog: catalog-api # service name for catalog api
ordering: ordering-api # service name for ordering api
orderingbackgroundtasks: ordering-backgroundtasks # service name for orderingbackgroundtasks
orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub
identity: identity-api # service name for identity api
mvc: webmvc # service name for web mvc
spa: webspa # service name for web spa
status: webstatus # service name for web status
webshoppingapigw: webshoppingapigw # service name for web shopping Agw
mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw
webshoppingagg: webshoppingagg # service name for web shopping aggregator
mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator
payment: payment-api # service name for payment api
webhooks: webhooks-api # service name for webhooks api
webhooksweb: webhooks-client # service name for webhooks web

+ 0
- 21
deploy/k8s/archived/helm/basket-api/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/basket-api/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: basket-api
version: 0.1.0

+ 0
- 8
deploy/k8s/archived/helm/basket-api/templates/NOTES.txt View File

@ -1,8 +0,0 @@
eShop Basket API installed.
--------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 32
deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "basket-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "basket-api.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "basket-api.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 52
deploy/k8s/archived/helm/basket-api/templates/_names.tpl View File

@ -1,52 +0,0 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}

+ 0
- 17
deploy/k8s/archived/helm/basket-api/templates/configmap.yaml View File

@ -1,17 +0,0 @@
{{- $name := include "basket-api.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "cfg-{{ $name }}"
labels:
app: {{ template "basket-api.name" . }}
chart: {{ template "basket-api.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
basket__ConnectionString: {{ .Values.inf.redis.basket.constr }}
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 0
- 99
deploy/k8s/archived/helm/basket-api/templates/deployment.yaml View File

@ -1,99 +0,0 @@
{{- $name := include "basket-api.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "basket-api.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "basket-api.name" . }}
chart: {{ template "basket-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "basket-api.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "basket-api.name" . }}
release: {{ .Release.Name }}
{{ if .Values.inf.mesh.enabled -}}
annotations:
linkerd.io/inject: enabled
{{- end }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
- name: grpc
containerPort: 81
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 0
- 23
deploy/k8s/archived/helm/basket-api/templates/service.yaml View File

@ -1,23 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.basket }}
labels:
app: {{ template "basket-api.name" . }}
chart: {{ template "basket-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.grpcPort }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
app: {{ template "basket-api.name" . }}
release: {{ .Release.Name }}

+ 0
- 61
deploy/k8s/archived/helm/basket-api/values.yaml View File

@ -1,61 +0,0 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /basket-api
image:
repository: eshop/basket.api
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
grpcPort: 81
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# env defines the environment variables that will be declared in the pod
env:
urls:
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
configmap:
- name: ConnectionString
key: basket__ConnectionString
- name: EventBusConnection
key: all__EventBusConnection
- name: ApplicationInsights__InstrumentationKey
key: all__InstrumentationKey
- name: AzureServiceBusEnabled
key: all__UseAzureServiceBus
- name: IdentityUrl
key: urls__IdentityUrl
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values:
- name: OrchestratorType
value: 'K8S'
- name: PORT
value: "80"
- name: GRPC_PORT
value: "81"
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80
ingress:
enabled: false

+ 0
- 21
deploy/k8s/archived/helm/basket-data/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/basket-data/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: basket-data
version: 0.1.0

+ 0
- 8
deploy/k8s/archived/helm/basket-data/templates/NOTES.txt View File

@ -1,8 +0,0 @@
eShop Redis for keystore data installed
----------------------------------------
Redis is not directly exposed outside cluster. If need to access it from outside use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 32
deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "basket-data.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "basket-data.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "basket-data.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 43
deploy/k8s/archived/helm/basket-data/templates/deployment.yaml View File

@ -1,43 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "basket-data.fullname" . }}
labels:
app: {{ template "basket-data.name" . }}
chart: {{ template "basket-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 6379
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 0
- 19
deploy/k8s/archived/helm/basket-data/templates/service.yaml View File

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.inf.redis.basket.svc }}
labels:
app: {{ template "basket-data.name" . }}
chart: {{ template "basket-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}

+ 0
- 19
deploy/k8s/archived/helm/basket-data/values.yaml View File

@ -1,19 +0,0 @@
replicaCount: 1
image:
repository: redis
tag: 4.0.10
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 6379
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 0
- 21
deploy/k8s/archived/helm/catalog-api/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/catalog-api/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: catalog-api
version: 0.1.0

+ 0
- 9
deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt View File

@ -1,9 +0,0 @@
eShop Catalog API installed.
----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "catalog-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 32
deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "catalog-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "catalog-api.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "catalog-api.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 60
deploy/k8s/archived/helm/catalog-api/templates/_names.tpl View File

@ -1,60 +0,0 @@
{{- define "suffix-name" -}}
{{- if .Values.app.name -}}
{{- .Values.app.name -}}
{{- else -}}
{{- .Release.Name -}}
{{- end -}}
{{- end -}}
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}
{{- define "url-of" -}}
{{- $name := first .}}
{{- $ctx := last .}}
{{- if eq $name "" -}}
{{- $ctx.Values.inf.k8s.dns -}}
{{- else -}}
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
{{- end -}}
{{- end -}}
{{- define "pathBase" -}}
{{- if .Values.inf.k8s.suffix -}}
{{- $suffix := include "suffix-name" . -}}
{{- printf "%s-%s" .Values.pathBase $suffix -}}
{{- else -}}
{{- .Values.pathBase -}}
{{- end -}}
{{- end -}}
{{- define "fqdn-image" -}}
{{- if .Values.inf.registry -}}
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
{{- else -}}
{{- .Values.image.repository -}}
{{- end -}}
{{- end -}}
{{- define "protocol" -}}
{{- if .Values.inf.tls.enabled -}}
{{- printf "%s" "https" -}}
{{- else -}}
{{- printf "%s" "http" -}}
{{- end -}}
{{- end -}}

+ 0
- 21
deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml View File

@ -1,21 +0,0 @@
{{- $name := include "catalog-api.fullname" . -}}
{{- $sqlsrv := include "sql-name" . -}}
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
{{- $protocol := include "protocol" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "cfg-{{ $name }}"
labels:
app: {{ template "catalog-api.name" . }}
chart: {{ template "catalog-api.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
catalog__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.catalog.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
catalog__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/
catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

+ 0
- 99
deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml View File

@ -1,99 +0,0 @@
{{- $name := include "catalog-api.fullname" . -}}
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "catalog-api.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "catalog-api.name" . }}
chart: {{ template "catalog-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "catalog-api.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "catalog-api.name" . }}
release: {{ .Release.Name }}
{{ if .Values.inf.mesh.enabled -}}
annotations:
linkerd.io/inject: enabled
{{- end }}
spec:
{{ if .Values.inf.registry -}}
imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{ if .Values.probes -}}
{{- if .Values.probes.liveness -}}
livenessProbe:
httpGet:
port: {{ .Values.probes.liveness.port }}
path: {{ .Values.probes.liveness.path }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
{{- end -}}
{{- end -}}
{{- if .Values.probes -}}
{{- if .Values.probes.readiness }}
readinessProbe:
httpGet:
port: {{ .Values.probes.readiness.port }}
path: {{ .Values.probes.readiness.path }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end -}}
{{- end }}
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PATH_BASE
value: {{ include "pathBase" . }}
- name: k8sname
value: {{ .Values.clusterName }}
{{- if .Values.env.values -}}
{{- range .Values.env.values }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end -}}
{{- end -}}
{{- if .Values.env.configmap -}}
{{- range .Values.env.configmap }}
- name: {{ .name }}
valueFrom:
configMapKeyRef:
name: {{ $cfgname }}
key: {{ .key }}
{{- end -}}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
- name: grpc
containerPort: 81
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 0
- 23
deploy/k8s/archived/helm/catalog-api/templates/service.yaml View File

@ -1,23 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.svc.catalog }}
labels:
app: {{ template "catalog-api.name" . }}
chart: {{ template "catalog-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.grpcPort }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
app: {{ template "catalog-api.name" . }}
release: {{ .Release.Name }}

+ 0
- 63
deploy/k8s/archived/helm/catalog-api/values.yaml View File

@ -1,63 +0,0 @@
replicaCount: 1
clusterName: eshop-aks
pathBase: /catalog-api
image:
repository: eshop/catalog.api
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
grpcPort: 81
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# env defines the environment variables that will be declared in the pod
env:
urls:
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
configmap:
- name: ConnectionString
key: catalog__ConnectionString
- name: PicBaseUrl
key: catalog__PicBaseUrl
- name: AzureStorageEnabled
key: catalog__AzureStorageEnabled
- name: ApplicationInsights__InstrumentationKey
key: all__InstrumentationKey
- name: EventBusConnection
key: all__EventBusConnection
- name: AzureServiceBusEnabled
key: all__UseAzureServiceBus
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values:
- name: ASPNETCORE_ENVIRONMENT
value: Development
- name: OrchestratorType
value: 'K8S'
- name: PORT
value: "80"
- name: GRPC_PORT
value: "81"
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 80

+ 0
- 149
deploy/k8s/archived/helm/deploy-all.ps1 View File

@ -1,149 +0,0 @@
Param(
[parameter(Mandatory=$false)][string]$registry,
[parameter(Mandatory=$false)][string]$dockerUser,
[parameter(Mandatory=$false)][string]$dockerPassword,
[parameter(Mandatory=$false)][string]$externalDns,
[parameter(Mandatory=$false)][string]$appName="eshop",
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
[parameter(Mandatory=$false)][bool]$deployCharts=$true,
[parameter(Mandatory=$false)][bool]$clean=$true,
[parameter(Mandatory=$false)][string]$aksName="",
[parameter(Mandatory=$false)][string]$aksRg="",
[parameter(Mandatory=$false)][string]$imageTag="latest",
[parameter(Mandatory=$false)][bool]$useLocalk8s=$false,
[parameter(Mandatory=$false)][bool]$useMesh=$false,
[parameter(Mandatory=$false)][string][ValidateSet('Always','IfNotPresent','Never', IgnoreCase=$false)]$imagePullPolicy="Always",
[parameter(Mandatory=$false)][string][ValidateSet('prod','staging','none','custom', IgnoreCase=$false)]$sslSupport = "none",
[parameter(Mandatory=$false)][string]$tlsSecretName = "eshop-tls-custom",
[parameter(Mandatory=$false)][string]$chartsToDeploy="*",
[parameter(Mandatory=$false)][string]$ingressMeshAnnotationsFile="ingress_values_linkerd.yaml"
)
function Install-Chart {
Param([string]$chart,[string]$initialOptions, [bool]$customRegistry)
$options=$initialOptions
if ($sslEnabled) {
$options = "$options --set ingress.tls[0].secretName=$tlsSecretName --set ingress.tls[0].hosts={$dns}"
if ($sslSupport -ne "custom") {
$options = "$options --set inf.tls.issuer=$sslIssuer"
}
}
if ($customRegistry) {
$options = "$options --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret"
}
if ($chart -ne "eshop-common" -or $customRegistry) { # eshop-common is ignored when no secret must be deployed
$command = "install $options --name=$appName-$chart $chart"
Write-Host "Helm Command: helm $command" -ForegroundColor Gray
Invoke-Expression 'cmd /c "helm $command"'
}
}
$dns = $externalDns
$sslEnabled=$false
$sslIssuer=""
if ($sslSupport -eq "staging") {
$sslEnabled=$true
$tlsSecretName="eshop-letsencrypt-staging"
$sslIssuer="letsencrypt-staging"
}
elseif ($sslSupport -eq "prod") {
$sslEnabled=$true
$tlsSecretName="eshop-letsencrypt-prod"
$sslIssuer="letsencrypt-prod"
}
elseif ($sslSupport -eq "custom") {
$sslEnabled=$true
}
$ingressValuesFile="ingress_values.yaml"
if ($useLocalk8s -eq $true) {
$ingressValuesFile="ingress_values_dockerk8s.yaml"
$dns="localhost"
}
if ($externalDns -eq "aks") {
if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) {
Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red
exit 1
}
Write-Host "Getting DNS of AKS of AKS $aksName (in resource group $aksRg)..." -ForegroundColor Green
$dns = $(az aks show -n $aksName -g $aksRg --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName)
if ([string]::IsNullOrEmpty($dns)) {
Write-Host "Error getting DNS of AKS $aksName (in resource group $aksRg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged & in version 2.0.37 or higher" -ForegroundColor Red
exit 1
}
$dns = $dns -replace '[\"]'
Write-Host "DNS base found is $dns. Will use $appName.$dns for the app!" -ForegroundColor Green
$dns = "$appName.$dns"
}
# Initialization & check commands
if ([string]::IsNullOrEmpty($dns)) {
Write-Host "No DNS specified. Ingress resources will be bound to public ip" -ForegroundColor Yellow
if ($sslEnabled) {
Write-Host "Can't bound SSL to public IP. DNS is mandatory when using TLS" -ForegroundColor Red
exit 1
}
}
if ($useLocalk8s -and $sslEnabled) {
Write-Host "SSL can'be enabled on local K8s." -ForegroundColor Red
exit 1
}
if ($clean) {
Write-Host "Cleaning previous helm releases..." -ForegroundColor Green
helm delete --purge $(helm ls -q eshop)
Write-Host "Previous releases deleted" -ForegroundColor Green
}
$useCustomRegistry=$false
if (-not [string]::IsNullOrEmpty($registry)) {
$useCustomRegistry=$true
if ([string]::IsNullOrEmpty($dockerUser) -or [string]::IsNullOrEmpty($dockerPassword)) {
Write-Host "Error: Must use -dockerUser AND -dockerPassword if specifying custom registry" -ForegroundColor Red
exit 1
}
}
Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green
$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data")
$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web")
$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws")
if ($deployInfrastructure) {
foreach ($infra in $infras) {
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --name="$appName-$infra" $infra
}
}
else {
Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow
}
if ($deployCharts) {
foreach ($chart in $charts) {
if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) {
Write-Host "Installing: $chart" -ForegroundColor Green
Install-Chart $chart "-f app.yaml --values inf.yaml -f $ingressValuesFile -f $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.tls.enabled=$sslEnabled --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s" $useCustomRegistry
}
}
foreach ($chart in $gateways) {
if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) {
Write-Host "Installing Api Gateway Chart: $chart" -ForegroundColor Green
Install-Chart $chart "-f app.yaml -f inf.yaml -f $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set ingress.hosts={$dns} --set inf.tls.enabled=$sslEnabled" $false
}
}
}
else {
Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow
}
Write-Host "helm charts installed." -ForegroundColor Green

+ 0
- 21
deploy/k8s/archived/helm/eshop-common/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/eshop-common/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: eshop-common
version: 0.1.0

+ 0
- 7
deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt View File

@ -1,7 +0,0 @@
Common eShop resources installed:
{{- if .Values.inf.registry -}}
* Docker registry secret ({{ .Values.inf.registry.secretName }})
{{- end -}}
+++ Done +++

+ 0
- 32
deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl View File

@ -1,32 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "eshop-common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "eshop-common.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "eshop-common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 0
- 3
deploy/k8s/archived/helm/eshop-common/templates/_names.tpl View File

@ -1,3 +0,0 @@
{{- define "imagePullSecret" }}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.inf.registry.server (printf "%s:%s" .Values.inf.registry.login .Values.inf.registry.pwd | b64enc) | b64enc }}
{{- end }}

+ 0
- 9
deploy/k8s/archived/helm/eshop-common/templates/secret.yaml View File

@ -1,9 +0,0 @@
{{- if .Values.inf.registry -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.inf.registry.secretName }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end -}}

+ 0
- 0
deploy/k8s/archived/helm/eshop-common/values.yaml View File


+ 0
- 21
deploy/k8s/archived/helm/identity-api/.helmignore View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 0
- 5
deploy/k8s/archived/helm/identity-api/Chart.yaml View File

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: identity-api
version: 0.1.0

+ 0
- 4
deploy/k8s/archived/helm/identity-api/templates/NOTES.txt View File

@ -1,4 +0,0 @@
eShop Identity API installed.
-----------------------------
Access this API through ingress.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save