Compare commits
No commits in common. "dev" and "dotnet3-migration/dev-dotnet3" have entirely different histories.
dev
...
dotnet3-mi
132
.editorconfig
132
.editorconfig
@ -1,132 +0,0 @@
|
||||
###############################
|
||||
# Core EditorConfig Options #
|
||||
###############################
|
||||
root = true
|
||||
# All files
|
||||
[*]
|
||||
indent_style = space
|
||||
|
||||
# XML project files
|
||||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
|
||||
indent_size = 2
|
||||
|
||||
# XML config files
|
||||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
|
||||
indent_size = 2
|
||||
|
||||
# Code files
|
||||
[*.{cs,csx,vb,vbx}]
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
charset = utf-8-bom
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
###############################
|
||||
[*.{cs,vb}]
|
||||
# Organize usings
|
||||
dotnet_sort_system_directives_first = true
|
||||
# this. preferences
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
###############################
|
||||
# Naming Conventions #
|
||||
###############################
|
||||
# Style Definitions
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
# Use PascalCase for constant fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
###############################
|
||||
# C# Coding Conventions #
|
||||
###############################
|
||||
[*.cs]
|
||||
# var preferences
|
||||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
# Null-checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
# Expression-level preferences
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
###############################
|
||||
# C# Formatting Rules #
|
||||
###############################
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
# Indentation preferences
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = flush_left
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
###############################
|
||||
# VB Coding Conventions #
|
||||
###############################
|
||||
[*.vb]
|
||||
# Modifier preferences
|
||||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
|
35
.github/workflows/basket-api-deploy.yml
vendored
35
.github/workflows/basket-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/basket-api.yml
vendored
52
.github/workflows/basket-api.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: basket-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Basket/**
|
||||
- .github/workflows/basket-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Basket/**
|
||||
- .github/workflows/basket-api.yml
|
||||
env:
|
||||
SERVICE: basket-api
|
||||
IMAGE: basket.api
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/catalog-api-deploy.yml
vendored
35
.github/workflows/catalog-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
58
.github/workflows/catalog-api.yml
vendored
58
.github/workflows/catalog-api.yml
vendored
@ -1,58 +0,0 @@
|
||||
name: catalog-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Catalog/**
|
||||
- .github/workflows/catalog-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Catalog/**
|
||||
- .github/workflows/catalog-api.yml
|
||||
env:
|
||||
SERVICE: catalog-api
|
||||
IMAGE: catalog.api
|
||||
DOTNET_VERSION: 7.0.x
|
||||
PROJECT_PATH: Services/Catalog/Catalog.API
|
||||
TESTS_PATH: Services/Catalog/Catalog.UnitTests
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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 }}
|
@ -1,71 +0,0 @@
|
||||
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 }}
|
@ -1,47 +0,0 @@
|
||||
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
.github/workflows/composite/build/action.yml
vendored
21
.github/workflows/composite/build/action.yml
vendored
@ -1,21 +0,0 @@
|
||||
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 }}
|
@ -1,54 +0,0 @@
|
||||
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
.github/workflows/identity-api-deploy.yml
vendored
35
.github/workflows/identity-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/identity-api.yml
vendored
52
.github/workflows/identity-api.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: identity-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Identity/**
|
||||
- .github/workflows/identity-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Identity/**
|
||||
- .github/workflows/identity-api.yml
|
||||
env:
|
||||
SERVICE: identity-api
|
||||
IMAGE: identity.api
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/mobileshoppingagg-deploy.yml
vendored
35
.github/workflows/mobileshoppingagg-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
50
.github/workflows/mobileshoppingagg.yml
vendored
50
.github/workflows/mobileshoppingagg.yml
vendored
@ -1,50 +0,0 @@
|
||||
name: mobileshoppingagg
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/**
|
||||
- .github/workflows/mobileshoppingagg.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/**
|
||||
- .github/workflows/mobileshoppingagg.yml
|
||||
env:
|
||||
SERVICE: mobileshoppingagg
|
||||
IMAGE: mobileshoppingagg
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/ordering-api-deploy.yml
vendored
35
.github/workflows/ordering-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
58
.github/workflows/ordering-api.yml
vendored
58
.github/workflows/ordering-api.yml
vendored
@ -1,58 +0,0 @@
|
||||
name: ordering-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-api.yml
|
||||
env:
|
||||
SERVICE: ordering-api
|
||||
IMAGE: ordering.api
|
||||
DOTNET_VERSION: 7.0.x
|
||||
PROJECT_PATH: Services/Ordering/Ordering.API
|
||||
TESTS_PATH: Services/Ordering/Ordering.UnitTests
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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 }}
|
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/ordering-backgroundtasks.yml
vendored
52
.github/workflows/ordering-backgroundtasks.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: ordering-backgroundtasks
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-backgroundtasks.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-backgroundtasks.yml
|
||||
env:
|
||||
SERVICE: ordering-backgroundtasks
|
||||
IMAGE: ordering.backgroundtasks
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/ordering-signalrhub-deploy.yml
vendored
35
.github/workflows/ordering-signalrhub-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/ordering-signalrhub.yml
vendored
52
.github/workflows/ordering-signalrhub.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: ordering-signalrhub
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-signalrhub.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Ordering/**
|
||||
- .github/workflows/ordering-signalrhub.yml
|
||||
env:
|
||||
SERVICE: ordering-signalrhub
|
||||
IMAGE: ordering.signalrhub
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/payment-api-deploy.yml
vendored
35
.github/workflows/payment-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/payment-api.yml
vendored
52
.github/workflows/payment-api.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: payment-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Payment/**
|
||||
- .github/workflows/payment-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Payment/**
|
||||
- .github/workflows/payment-api.yml
|
||||
env:
|
||||
SERVICE: payment-api
|
||||
IMAGE: payment.api
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/webhooks-api-deploy.yml
vendored
35
.github/workflows/webhooks-api-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/webhooks-api.yml
vendored
52
.github/workflows/webhooks-api.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: webhooks-api
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Webhooks/**
|
||||
- .github/workflows/webhooks-api.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Services/Webhooks/**
|
||||
- .github/workflows/webhooks-api.yml
|
||||
env:
|
||||
SERVICE: webhooks-api
|
||||
IMAGE: webhooks.api
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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 }}
|
52
.github/workflows/webhooks-client.yml
vendored
52
.github/workflows/webhooks-client.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: webhooks-client
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebhookClient/**
|
||||
- .github/workflows/webhooks-client.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebhookClient/**
|
||||
- .github/workflows/webhooks-client.yml
|
||||
env:
|
||||
SERVICE: webhooks-client
|
||||
IMAGE: webhooks.client
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/webmvc-deploy.yml
vendored
39
.github/workflows/webmvc-deploy.yml
vendored
@ -1,39 +0,0 @@
|
||||
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 }}
|
53
.github/workflows/webmvc.yml
vendored
53
.github/workflows/webmvc.yml
vendored
@ -1,53 +0,0 @@
|
||||
name: webmvc
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebMVC/**
|
||||
- .github/workflows/webmvc.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebMVC/**
|
||||
- .github/workflows/webmvc.yml
|
||||
|
||||
env:
|
||||
SERVICE: webmvc
|
||||
IMAGE: webmvc
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/webshoppingagg-deploy.yml
vendored
35
.github/workflows/webshoppingagg-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
50
.github/workflows/webshoppingagg.yml
vendored
50
.github/workflows/webshoppingagg.yml
vendored
@ -1,50 +0,0 @@
|
||||
name: webshoppingagg
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/ApiGateways/Web.Bff.Shopping/aggregator/**
|
||||
- .github/workflows/webshoppingagg.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/ApiGateways/Web.Bff.Shopping/aggregator/**
|
||||
- .github/workflows/webshoppingagg.yml
|
||||
env:
|
||||
SERVICE: webshoppingagg
|
||||
IMAGE: webshoppingagg
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/webspa-deploy.yml
vendored
35
.github/workflows/webspa-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
52
.github/workflows/webspa.yml
vendored
52
.github/workflows/webspa.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: webspa
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebSPA/**
|
||||
- .github/workflows/webspa.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebSPA/**
|
||||
- .github/workflows/webspa.yml
|
||||
env:
|
||||
SERVICE: webspa
|
||||
IMAGE: webspa
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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
.github/workflows/webstatus-deploy.yml
vendored
35
.github/workflows/webstatus-deploy.yml
vendored
@ -1,35 +0,0 @@
|
||||
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 }}
|
53
.github/workflows/webstatus.yml
vendored
53
.github/workflows/webstatus.yml
vendored
@ -1,53 +0,0 @@
|
||||
name: webstatus
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebStatus/**
|
||||
- .github/workflows/webstatus.yml
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
paths:
|
||||
- src/BuildingBlocks/**
|
||||
- src/Web/WebStatus/**
|
||||
- .github/workflows/webstatus.yml
|
||||
|
||||
env:
|
||||
SERVICE: webstatus
|
||||
IMAGE: webstatus
|
||||
|
||||
jobs:
|
||||
|
||||
BuildContainersForPR_Linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- 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 code
|
||||
uses: actions/checkout@v2
|
||||
- uses: ./.github/workflows/composite/build-push
|
||||
with:
|
||||
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 }}
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,10 +1,6 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
## Local history files
|
||||
.history/
|
||||
.vshistory/
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
@ -281,5 +277,3 @@ pub/
|
||||
src/**/app.yaml
|
||||
src/**/inf.yaml
|
||||
|
||||
.angular/
|
||||
/src/Services/Identity/Identity.API/keys/*.json
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
This repo is a reference and learning resource and everyone is invited to contribute, however not all PRs will be accepted into the main branch (**`dev`**).
|
||||
|
||||
There's a general development strategy that's driven by @CESARDELATORRE/@nishanil, who chooses, or defines criteria for choosing, the issues to include in the codebase, given a bunch of constraints and other guidelines.
|
||||
There's a general development strategy that's driven by @CESARDELATORRE, who chooses, or defines criteria for choosing, the issues to include in the codebase, given a bunch of constraints and other guidelines.
|
||||
|
||||
However you can always get in touch with him, if you want to implement some general-interest feature in your repo and have it referenced from the [documentation](https://docs.microsoft.com/dotnet/standard/microservices-architecture/) or the [Microservices eBook](https://aka.ms/microservicesebook/).
|
||||
|
||||
@ -47,14 +47,15 @@ All contributions must be submitted as a [Pull Request (PR)](https://help.github
|
||||
The main branches are **`dev`** and **`master`**:
|
||||
|
||||
- **`dev`**: Contains the latest code **and it is the branch actively developed**.
|
||||
**All PRs must be against `dev` branch to be considered**. This branch is developed using `.NET 7`
|
||||
**All PRs must be against `dev` branch to be considered**. This branch is developed using .NET Core 2.x
|
||||
|
||||
- **`main`**: Synced from time to time from **`dev`**. It contains "stable" code.This branch contains changes specific to `.NET Core 3.1` (**Keep in mind "stable" does not mean PRODUCTION-READY!**)
|
||||
- **`master`**: Synced from time to time from **`dev`**. It contains "stable" code.
|
||||
(**Keep in mind "stable" does not mean PRODUCTION-READY!**)
|
||||
|
||||
- Any other branch is considered temporary and could be deleted at any time. Do not submit any PR to them!
|
||||
|
||||
## DISCLAIMER - This is not a PRODUCTION-READY TEMPLATE for microservices
|
||||
eShopOnContainers is a reference application to **showcase architectural patterns** for developing microservices applications on .NET 5. **IT IS NOT A PRODUCTION-READY TEMPLATE** to start real-world application. In fact, the application is in a **permanent beta state**, as it’s also used to test new potentially interesting technologies as they show up.
|
||||
eShopOnContainers is a reference application to **showcase architectural patterns** for developing microservices applications on .NET Core. **IT IS NOT A PRODUCTION-READY TEMPLATE** to start real-world application. In fact, the application is in a **permanent beta state**, as it’s also used to test new potentially interesting technologies as they show up.
|
||||
|
||||
Since this is a learning resource, some design decisions have favored simplicity to convey a pattern, over production-grade robustness.
|
||||
|
||||
|
231
README.md
231
README.md
@ -1,119 +1,226 @@
|
||||
<a href="https://dot.net/architecture">
|
||||
<img src="https://github.com/dotnet-architecture/eShopOnContainers/raw/dev/img/eshop_logo.png" alt="eShop logo" title="eShopOnContainers" align="right" height="60" />
|
||||
</a>
|
||||
|
||||
# .NET Microservices Sample Reference Application
|
||||
# eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio and CLI environments compatible)
|
||||
|
||||
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.
|
||||
|
||||
## SPA Application (Angular)
|
||||
## Linux Build Status for 'dev' branch
|
||||
|
||||

|
||||
Dev branch contains the latest "stable" code, and their images are tagged with `:dev` in our [Docker Hub](https://cloud.docker.com/u/eshop/repository/list):
|
||||
|
||||
## Build Status (GitHub Actions)
|
||||
|
||||
| Image | Status | Image | Status |
|
||||
| Basket API | Catalog API | Identity API | Location API |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| Web Status | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Awebstatus) | Shopping Aggregator (Web) | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Awebshoppingagg) |
|
||||
| Basket API | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Abasket-api) | Shopping Aggregator (Mobile) | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Amobileshoppingagg) |
|
||||
| Catalog API | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Acatalog-api) | Web Client (MVC) | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Awebmvc) |
|
||||
|Identity API | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Aidentity-api) | Web Client (SPA) | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Awebspa) |
|
||||
| Ordering API | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Aordering-api) | Webhooks Client | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Awebhooks-client) |
|
||||
| Payment API | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Apayment-api) | Ordering SignalR | [](https://github.com/dotnet-architecture/eShopOnContainers/actions?query=workflow%3Aordering-signalrhub) | |
|
||||
| [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=199&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=197&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=200&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=202&branchName=dev) |
|
||||
|
||||
_**Dev** branch contains the latest **beta** code and their images are tagged with `:linux-dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_
|
||||
| Marketing API | Ordering API | Payment API | Api Gateways base image |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=203&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=198&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=205&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=201&branchName=dev)
|
||||
|
||||
| Web Shopping Aggregator | Mobile Shopping Aggregator | WebMVC Client | WebSPA Client |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=206&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=204&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=209&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=210&branchName=dev) |
|
||||
|
||||
| Web Status | Webhooks API | Webhooks demo client |
|
||||
| ------------- | ------------- | ------------- |
|
||||
[](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=211&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=207&branchName=dev) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) |
|
||||
|
||||
## Getting Started
|
||||
|
||||
Make sure you have [installed](https://docs.docker.com/docker-for-windows/install/) and [configured](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#configure-docker) docker in your environment. After that, you can run the below commands from the **/src/** directory and get started with the `eShopOnContainers` immediately.
|
||||
eShopOnContainers is provided in "two flavors":
|
||||
|
||||
```powershell
|
||||
docker-compose build
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
You should be able to browse different components of the application by using the below URLs :
|
||||
|
||||
```
|
||||
Web Status : http://host.docker.internal:5107/
|
||||
Web MVC : http://host.docker.internal:5100/
|
||||
Web SPA : http://host.docker.internal:5104/
|
||||
```
|
||||
|
||||
>Note: If you are running this application in macOS then use `docker.for.mac.localhost` as DNS name in `.env` file and the above URLs instead of `host.docker.internal`.
|
||||
|
||||
Below are the other avenues to setup *eShopOnContainers*.
|
||||
- Basic scenario: Can be run locally using docker compose, and also deployed to a local Kubernetes cluster
|
||||
- Production scenario: Can only be deployed on a Kubernetes cluster (local or in the cloud like AKS), and enable production features like the use of a Service Mesh.
|
||||
|
||||
### Basic scenario
|
||||
|
||||
The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started:
|
||||
You can run eShop locally:
|
||||
|
||||
|
||||
- [Visual Studio (F5 experience)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#optional---use-visual-studio)
|
||||
- [Docker compose on windows](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup)
|
||||
- [Docker compose on macOS](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Mac-setup)
|
||||
- [Local Kubernetes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes)
|
||||
- [Using Visual Studio](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup)
|
||||
- Using CLI or Visual Studio Code
|
||||
- Using docker compose
|
||||
- Using local Kubernetes
|
||||
|
||||
### 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 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.
|
||||
- Use of a Service Mesh for Resiliency
|
||||
|
||||
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 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.
|
||||
**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.
|
||||
|
||||
**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 7
|
||||
## Updated for .NET Core 3.0
|
||||
|
||||
eShopOnContainers is updated to .NET 7 "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 Core 3.0 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions.
|
||||
|
||||
**See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**.
|
||||
### Details on the latest mayor release
|
||||
|
||||
- Migrate solution from ASP.NET Core 2.2 to 3.0 and update all projects to use the latest .NET Core 3.0 templates.
|
||||
|
||||
- Implement the new .NET Core 3.0 WorkerService in Ordering.API and other background processes.
|
||||
|
||||
- Improve Ordering.API
|
||||
- Group order items
|
||||
- apply discounts from Marketing.API
|
||||
|
||||
- Handle two deployment scenarios
|
||||
- Basic deployment, better for learning:
|
||||
- Docker compose
|
||||
- Local Kubernetes
|
||||
- Visual Studio F5 experience
|
||||
|
||||
- Advanced deployment, complex but more real-life:
|
||||
- Sidecar implementation with Envoy/Linkerd
|
||||
- Improved API Gateway and resilience
|
||||
- gRPC for inter-service communications
|
||||
- Test and Support Azure Dev Spaces
|
||||
|
||||
### New folder structure
|
||||
|
||||
The repo also has a new, simpler, folder structure, as shown in the following image:
|
||||
|
||||

|
||||
|
||||
In the above image you can see that the first folder level contains, basically:
|
||||
|
||||
- **build**: Scripts for building Docker images.
|
||||
- **deploy**: Scripts for deployment.
|
||||
- **src**: All source projects, including tests.
|
||||
- **ApiGateways**: Envoy configuration and Aggregators source code.
|
||||
- **BuildBlocks**: Common components used by several projects.
|
||||
- **Mobile**: Mobile apps projects.
|
||||
- **Services**: Backend for all services. Including unit and functional tests for some projects.
|
||||
- Basket
|
||||
- Catalog
|
||||
- Identity
|
||||
- Location
|
||||
- Marketing
|
||||
- Ordering
|
||||
- Payment
|
||||
- Webhooks
|
||||
- **Tests**: General functional application tests.
|
||||
- **test-results**: Test results
|
||||
- **Web**: Web applications
|
||||
|
||||
>**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy
|
||||
>
|
||||
> ### DISCLAIMER
|
||||
>
|
||||
> **IMPORTANT:** The current state of this sample application is **BETA**, because we are constantly evolving towards newly released technologies. Therefore, many areas could be improved and change significantly while refactoring the current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted.
|
||||
>
|
||||
> This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. The chosen domain is eShop/eCommerce but simply because it is a well-known domain by most people/developers.
|
||||
However, this sample application should not be considered as an "eCommerce reference model" at all. The implemented business domain might not be ideal from an eCommerce business point of view. It is neither trying to solve all the problems in a large, scalable and mission-critical distributed system. It is just a bootstrap for developers to easily get started in the world of Docker containers and microservices with .NET Core.
|
||||
>
|
||||
> For example, the next step after running the solution in the local dev PC and understanding Docker containers and microservices development with .NET Core, is to select a microservice cluster/orchestrator like Kubernetes in Azure (AKS) or Azure Service Fabric, both environments tested and supported by this solution.
|
||||
> Additional steps would be to move your databases to HA cloud services (like Azure SQL Database) or switch your EventBus to use Azure Service Bus (instead of bare-bone RabbitMQ) or any other production-ready Service Bus in the market.
|
||||
|
||||

|
||||
|
||||
> Read the planned [Roadmap](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap) within the Wiki for further info about possible new implementations and provide feedback at the [ISSUES section](https://github.com/dotnet/eShopOnContainers/issues) if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue.
|
||||
|
||||
### Architecture overview
|
||||
|
||||
This reference application is cross-platform at the server and client-side, thanks to .NET 7 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 Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps.
|
||||
The architecture proposes a 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).
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> ### Important Note on API Gateways and published APIs
|
||||
>
|
||||
> Since April 2018, we have introduced the implementation of the [API Gateway pattern](http://microservices.io/patterns/apigateway.html) and [Backend-For-Front-End (BFF) pattern](https://samnewman.io/patterns/architectural/bff/) in eShopOnContainers architecture, so you can filter and publish simplified APIs and URIs and apply additional security in that tier while hiding/securing the internal microservices to the client apps or outside consumers. These sample API Gateways in eShopOnContainers are based on [Envoy](https://www.envoyproxy.io/), an OSS, production-grade API Gateway and proxy [described in the official documentation page](https://www.envoyproxy.io/docs/envoy/latest/). The deployed API Gateways are autonomous and can be deployed as your own custom microservices/containers, as it is currently done in eShopOnContainers, so you can test it even in a simple development environment with just Docker engine or deploy it into orchestrators like Kubernetes in AKS or Service Fabric.
|
||||
>
|
||||
> For your production-ready architecture you can either keep using Envoy or, if you need further functionality and a much richer set of features suitable for commercial APIs, you can also substitute those API Gateways and use [Azure API Management](https://azure.microsoft.com/services/api-management/) or any other commercial API Gateway.
|
||||
|
||||

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

|
||||
|
||||
> ### Important Note on Database Servers/Containers
|
||||
>
|
||||
> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or a specific server. Each database could also be deployed as a single Docker container, but then you'd need more than 8GB of RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments.
|
||||
>
|
||||
> A similar case is defined in regard to Redis cache running as a container for the development environment. Or a No-SQL database (MongoDB) running as a container.
|
||||
>
|
||||
> However, in a real production environment it is recommended to have your databases (SQL Server, Redis, and the NO-SQL database, in this case) in HA (High Available) services like Azure SQL Database, Redis as a service and Azure CosmosDB instead the MongoDB container (as both systems share the same access protocol). If you want to change to a production configuration, you'll just need to change the connection strings once you have set up the servers in an HA cloud or on-premises.
|
||||
>
|
||||
> ### Important Note on EventBus
|
||||
>
|
||||
> In this solution's current EventBus is a simplified implementation, mainly used for learning purposes (development and testing), so it doesn't handle all production scenarios, most notably on error handling.
|
||||
> The following fork provides production environment level implementation examples with eShopOnContainers:
|
||||
>
|
||||
> - Implementation with [NServiceBus](https://github.com/Particular/NServiceBus) : <https://github.com/Particular/eShopOnContainers>
|
||||
|
||||
## 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:
|
||||
|
||||
| Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms |
|
||||
| ------------ | ------------| ------------|
|
||||
| [](https://aka.ms/microservicesebook) | [](https://aka.ms/dockerlifecycleebook) | [](https://aka.ms/xamarinpatternsebook) |
|
||||
| <sup> <a href='https://aka.ms/microservicesebook'>**Download PDF**</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download PDF** </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download PDF** </a> </sup> |
|
||||
| <a href='https://aka.ms/microservicesebook'><img src="img/Microservices-cover-small.png"> </a> | <a href='https://aka.ms/dockerlifecycleebook'> <img src="img/DevOps-Cover-small.png"> </a> | <a href='https://aka.ms/xamarinpatternsebook'> <img src="img/xamarin-enterprise-patterns-ebook-cover-small.png"> </a> |
|
||||
| <sup> <a href='https://aka.ms/microservicesebook'>**Download .PDF**</a> </sup> | <sup> <a href='https://aka.ms/dockerlifecycleebook'>**Download** </a> </sup> | <sup> <a href='https://aka.ms/xamarinpatternsebook'>**Download** </a> </sup> |
|
||||
|
||||
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>
|
||||
Download in other formats (**eReaders** like **MOBI**, **EPUB**) and other eBooks at the [.NET Architecture center](http://dot.net/architecture).
|
||||
|
||||
## 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 reduces the friction in getting started with `eShopOnContainers`.
|
||||
Send feedback to [dotnet-architecture-ebooks-feedback@service.microsoft.com](dotnet-architecture-ebooks-feedback@service.microsoft.com)
|
||||
|
||||
## Read further
|
||||
However, we encourage you to download and review the [Architecting and Developing Microservices eBook](https://aka.ms/microservicesebook) because the architectural styles and architectural patterns and technologies explained in the guide are using this reference application when explaining many pattern implementations, so you'll understand the context, design and decisions taken in the current architecture and internal designs much better.
|
||||
|
||||
- [Explore the application](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Explore-the-application)
|
||||
- [Explore the code](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Explore-the-code)
|
||||
## Overview of the application code
|
||||
|
||||
In this repo you can find a sample reference application that will help you to understand how to implement a microservice architecture based application using **.NET Core** and **Docker**.
|
||||
|
||||
The example business domain or scenario is based on an eShop or eCommerce which is implemented as a multi-container application. Each container is a microservice deployment (like the basket-microservice, catalog-microservice, ordering-microservice and the identity-microservice) which is developed using ASP.NET Core running on .NET Core so they can run either on Linux Containers and Windows Containers.
|
||||
The screenshot below shows the VS Solution structure for those microservices/containers and client apps.
|
||||
|
||||
- (*Recommended when getting started*) Open **eShopOnContainers-ServicesAndWebApps.sln** for a solution containing just the server-side projects related to the microservices and web applications.
|
||||
- Open <b>eShopOnContainers-MobileApps.sln</b> for a solution containing just the client mobile app projects (Xamarin mobile apps only). It works independently based on mocks, too.
|
||||
- Open <b>eShopOnContainers.sln</b> for a solution containing all the projects (All client apps and services).
|
||||
|
||||
<img src="img/vs-solution-structure.png">
|
||||
|
||||
Finally, those microservices are consumed by multiple client web and mobile apps, as described below.
|
||||
<br>
|
||||
<b>*MVC Application (ASP.NET Core)*</b>: It's an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
|
||||
<img src="img/eshop-webmvc-app-screenshot.png">
|
||||
<br>
|
||||
<b>*SPA (Single Page Application)*</b>: Providing similar "eShop business functionality" but developed with Angular, Typescript and slightly using ASP.NET Core MVC. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet).
|
||||
<img src="img/eshop-webspa-app-screenshot.png">
|
||||
<br>
|
||||
<b>*Xamarin Mobile App (For iOS, Android and Windows/UWP)*</b>: It is a client mobile app supporting the most common mobile OS platforms (iOS, Android and Windows/UWP). In this case, the consumption of the microservices is done from C# but running on the client devices, so out of the Docker Host internal network (Like from your network or even the Internet).
|
||||
|
||||
<img src="img/xamarin-mobile-App.png">
|
||||
|
||||
## Setting up your development environment for eShopOnContainers
|
||||
|
||||
### Windows based (CLI and Visual Studio)
|
||||
|
||||
<https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup>
|
||||
|
||||
### Mac based (CLI and Visual Studio for Mac)
|
||||
|
||||
<https://github.com/dotnet-architecture/eShopOnContainers/wiki/Mac-setup>
|
||||
|
||||
## Orchestrators: Kubernetes and Service Fabric
|
||||
|
||||
See at the [Wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki) the posts on setup/instructions about how to deploy to Kubernetes or Service Fabric in Azure (although you could also deploy to any other cloud or on-premises).
|
||||
|
||||
## Sending feedback and pull requests
|
||||
|
||||
Read the planned [Roadmap](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap) within the Wiki for further info about possible new implementations and provide feedback at the [ISSUES section](https://github.com/dotnet/eShopOnContainers/issues) if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue.
|
||||
As mentioned, we'd appreciate your feedback, improvements and ideas.
|
||||
You can create new issues at the issues section, do pull requests and/or send emails to **eshop_feedback@service.microsoft.com**
|
||||
|
@ -2,13 +2,9 @@
|
||||
|
||||
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 7`
|
||||
- `release/net-6`: Contains the code changes specific to the `.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`
|
||||
- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against `dev` branch to be considered**. This branch is developed using .NET Core 2.0
|
||||
- `master`: Synced time to time from dev. It contains "stable" code, although not the latest one. We plan to do periodic merges from `dev` to `master`, but we are not doing it right now.
|
||||
|
||||
> [!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!
|
||||
Any other branch is considered temporary and could be deleted at any time. Do not do any PR to them!
|
||||
|
||||
Thanks!
|
||||
|
@ -14,10 +14,12 @@ $services = @(
|
||||
@{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" },
|
||||
@{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" },
|
||||
@{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" },
|
||||
@{ Name="eshopmarketing"; Image="eshop/marketing.api"; File="src/Services/Marketing/Marketing.API/Dockerfile" },
|
||||
@{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" },
|
||||
@{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" },
|
||||
@{ Name="eshopwebstatus"; Image="eshop/webstatus"; File="src/Web/WebStatus/Dockerfile" },
|
||||
@{ Name="eshoppayment"; Image="eshop/payment.api"; File="src/Services/Payment/Payment.API/Dockerfile" },
|
||||
@{ Name="eshoplocations"; Image="eshop/locations.api"; File="src/Services/Location/Locations.API/Dockerfile" },
|
||||
@{ Name="eshopocelotapigw"; Image="eshop/ocelotapigw"; File="src/ApiGateways/ApiGw-Base/Dockerfile" },
|
||||
@{ Name="eshopmobileshoppingagg"; Image="eshop/mobileshoppingagg"; File="src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile" },
|
||||
@{ Name="eshopwebshoppingagg"; Image="eshop/webshoppingagg"; File="src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile" },
|
||||
@ -31,3 +33,5 @@ $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
|
||||
|
29
build/azure-devops/apigws/azure-pipelines.yml
Normal file
29
build/azure-devops/apigws/azure-pipelines.yml
Normal file
@ -0,0 +1,29 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/ApiGateways/*
|
||||
- k8s/helm/apigwmm/*
|
||||
- k8s/helm/apigwms/*
|
||||
- k8s/helm/apigwwm/*
|
||||
- k8s/helm/apigwws/*
|
||||
exclude:
|
||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
||||
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: ocelotapigw
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/basket-api/azure-pipelines.yml
Normal file
24
build/azure-devops/basket-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Basket/*
|
||||
- k8s/helm/basket-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: basket.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: basket.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
92
build/azure-devops/buildimages.yaml
Normal file
92
build/azure-devops/buildimages.yaml
Normal file
@ -0,0 +1,92 @@
|
||||
parameters:
|
||||
services: ''
|
||||
registryEndpoint: ''
|
||||
helmfrom: ''
|
||||
helmto: ''
|
||||
|
||||
jobs:
|
||||
- job: BuildContainersForPR_Linux
|
||||
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- bash: docker-compose build ${{ parameters.services }}
|
||||
displayName: Create multiarch manifest
|
||||
env:
|
||||
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||
- job: BuildContainersForPR_Windows
|
||||
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- bash: docker-compose build ${{ parameters.services }}
|
||||
displayName: Create multiarch manifest
|
||||
env:
|
||||
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||
PLATFORM: win
|
||||
NODE_IMAGE: stefanscherer/node-windows:10
|
||||
- job: BuildLinux
|
||||
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- task: DockerCompose@0
|
||||
displayName: Compose build ${{ parameters.services }}
|
||||
inputs:
|
||||
dockerComposeCommand: 'build ${{ parameters.services }}'
|
||||
containerregistrytype: Container Registry
|
||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||
dockerComposeFile: src/docker-compose.yml
|
||||
qualifyImageNames: true
|
||||
projectName: ""
|
||||
dockerComposeFileArgs: |
|
||||
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||
- task: DockerCompose@0
|
||||
displayName: Compose push ${{ parameters.images }}
|
||||
inputs:
|
||||
dockerComposeCommand: 'push ${{ parameters.services }}'
|
||||
containerregistrytype: Container Registry
|
||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||
dockerComposeFile: src/docker-compose.yml
|
||||
qualifyImageNames: true
|
||||
projectName: ""
|
||||
dockerComposeFileArgs: |
|
||||
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: ${{ parameters.helmfrom }}
|
||||
targetFolder: ${{ parameters.helmto }}
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: ${{ parameters.helmto }}
|
||||
artifactName: helm
|
||||
- job: BuildWindows
|
||||
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DockerCompose@0
|
||||
displayName: Compose build ${{ parameters.services }}
|
||||
inputs:
|
||||
dockerComposeCommand: 'build ${{ parameters.services }}'
|
||||
containerregistrytype: Container Registry
|
||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||
dockerComposeFile: src/docker-compose.yml
|
||||
qualifyImageNames: true
|
||||
projectName: ""
|
||||
dockerComposeFileArgs: |
|
||||
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||
PLATFORM=win
|
||||
NODE_IMAGE=stefanscherer/node-windows:10
|
||||
- task: DockerCompose@0
|
||||
displayName: Compose push ${{ parameters.services }}
|
||||
inputs:
|
||||
dockerComposeCommand: 'push ${{ parameters.services }}'
|
||||
containerregistrytype: Container Registry
|
||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||
dockerComposeFile: src/docker-compose.yml
|
||||
qualifyImageNames: true
|
||||
projectName: ""
|
||||
dockerComposeFileArgs: |
|
||||
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||
PLATFORM=win
|
24
build/azure-devops/catalog-api/azure-pipelines.yml
Normal file
24
build/azure-devops/catalog-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Catalog/*
|
||||
- k8s/helm/catalog-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: catalog.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: catalog.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/identity-api/azure-pipelines.yml
Normal file
24
build/azure-devops/identity-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Identity/*
|
||||
- k8s/helm/identity-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: identity.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: identity.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
25
build/azure-devops/infrastructure/azure-pipelines.yml
Normal file
25
build/azure-devops/infrastructure/azure-pipelines.yml
Normal file
@ -0,0 +1,25 @@
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- k8s/helm/basket-data/*
|
||||
- k8s/helm/keystore-data/*
|
||||
- k8s/helm/nosql-data/*
|
||||
- k8s/helm/rabbitmq/*
|
||||
- k8s/helm/sql-data/*
|
||||
steps:
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.SourcesDirectory)/k8s/helm
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
artifactName: helm
|
24
build/azure-devops/location-api/azure-pipelines.yml
Normal file
24
build/azure-devops/location-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Location/*
|
||||
- k8s/helm/locations-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: locations.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: locations.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/marketing-api/azure-pipelines.yml
Normal file
24
build/azure-devops/marketing-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Marketing/*
|
||||
- k8s/helm/marketing-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: marketing.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: marketing.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
Normal file
24
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
||||
- k8s/helm/mobileshoppingagg/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: mobileshoppingagg
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: mobileshoppingagg
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
|
30
build/azure-devops/multiarch.yaml
Normal file
30
build/azure-devops/multiarch.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
parameters:
|
||||
image: ''
|
||||
branch: ''
|
||||
registry: 'eshop'
|
||||
registryEndpoint: ''
|
||||
|
||||
jobs:
|
||||
- job: manifest
|
||||
condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest'))
|
||||
dependsOn:
|
||||
- BuildWindows
|
||||
- BuildLinux
|
||||
pool:
|
||||
vmImage: 'Ubuntu 16.04'
|
||||
steps:
|
||||
- task: Docker@1
|
||||
displayName: Docker Login
|
||||
inputs:
|
||||
command: login
|
||||
containerregistrytype: 'Container Registry'
|
||||
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||
- bash: |
|
||||
mkdir -p ~/.docker
|
||||
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json
|
||||
echo ',"experimental": "enabled" }' >> ~/.docker/config.json
|
||||
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }}
|
||||
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest
|
||||
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
|
||||
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
|
||||
displayName: Create multiarch manifest
|
26
build/azure-devops/ordering-api/azure-pipelines.yml
Normal file
26
build/azure-devops/ordering-api/azure-pipelines.yml
Normal file
@ -0,0 +1,26 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Ordering/*
|
||||
- k8s/helm/ordering-api/*
|
||||
- k8s/helm/ordering-backgroundtasks/*
|
||||
- k8s/helm/ordering-signalrhub/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: ordering.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: ordering.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/payment-api/azure-pipelines.yml
Normal file
24
build/azure-devops/payment-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Payment/*
|
||||
- k8s/helm/payment-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: payment.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: payment.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
5
build/azure-devops/readme.md
Normal file
5
build/azure-devops/readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Azure Devops build definitions
|
||||
|
||||
This folder contains the Azure Devops build definitions in YAML format. Each folder contains one `azure-pipelines.yml` that contains the build definition for one microservice (usually a Docker image, but some microservices generates more than one Docker image).
|
||||
|
||||
For more information about YAML builds read the [Azure DevOps documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-yaml?view=azure-devops).
|
23
build/azure-devops/web-shopping-agg/azure-pipelines.yml
Normal file
23
build/azure-devops/web-shopping-agg/azure-pipelines.yml
Normal file
@ -0,0 +1,23 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||
- k8s/helm/webshoppingagg/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webshoppingagg
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webshoppingagg
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/webhooks-api/azure-pipelines.yml
Normal file
24
build/azure-devops/webhooks-api/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Services/Webhooks/*
|
||||
- k8s/helm/webhooks-api/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webhooks.api
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webhooks.api
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/webhooks-client/azure-pipelines.yml
Normal file
24
build/azure-devops/webhooks-client/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Web/WebhookClient/*
|
||||
- k8s/helm/webhooks-web/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webhooks.client
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webhooks.client
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/webmvc/azure-pipelines.yml
Normal file
24
build/azure-devops/webmvc/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Web/WebMVC/*
|
||||
- k8s/helm/webmvc/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webmvc
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webmvc
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/webspa/azure-pipelines.yml
Normal file
24
build/azure-devops/webspa/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Web/WebSPA/*
|
||||
- k8s/helm/webspa/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webspa
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webspa
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
24
build/azure-devops/webstatus/azure-pipelines.yml
Normal file
24
build/azure-devops/webstatus/azure-pipelines.yml
Normal file
@ -0,0 +1,24 @@
|
||||
variables:
|
||||
registryEndpoint: eshop-registry
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
paths:
|
||||
include:
|
||||
- src/BuildingBlocks/*
|
||||
- src/Web/WebStatus/*
|
||||
- k8s/helm/webstatus/*
|
||||
jobs:
|
||||
- template: ../buildimages.yaml
|
||||
parameters:
|
||||
services: webstatus
|
||||
registryEndpoint: $(registryEndpoint)
|
||||
helmfrom: $(Build.SourcesDirectory)/k8s/helm
|
||||
helmto: $(Build.ArtifactStagingDirectory)/k8s/helm
|
||||
- template: ../multiarch.yaml
|
||||
parameters:
|
||||
image: webstatus
|
||||
branch: $(Build.SourceBranchName)
|
||||
registryEndpoint: $(registryEndpoint)
|
@ -12,7 +12,7 @@ Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-la
|
||||
Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow
|
||||
|
||||
|
||||
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "payment.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
|
||||
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
|
||||
|
||||
foreach ($svc in $services) {
|
||||
Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev"
|
||||
|
@ -51,8 +51,8 @@ if [ ! -f "$1.json" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$1.parameters.json" ]; then
|
||||
echo "$1.parameters.json doesn't exist"
|
||||
if [ ! -f "$2.parameters.json" ]; then
|
||||
echo "$2.parameters.json doesn't exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -14,11 +14,10 @@
|
||||
"BasketSubscriptionName": "Basket",
|
||||
"CatalogSubscriptionName": "Catalog",
|
||||
"OrderingSubscriptionName": "Ordering",
|
||||
"LocationsSubscriptionName": "Locations",
|
||||
"MarketingSubscriptionName": "Marketing",
|
||||
"GracePeriodSubscriptionName": "GracePeriod",
|
||||
"PaymentSubscriptionName": "Payment",
|
||||
"BackgroundTaskSubscriptionName": "backgroundtasks",
|
||||
"OrderingSignalrHubSubscriptionName": "Ordering.signalrhub",
|
||||
"WebhooksSubscriptionName": "Webhooks",
|
||||
"location": "[resourceGroup().location]",
|
||||
"sbVersion": "2015-08-01",
|
||||
"defaultSASKeyName": "Root",
|
||||
@ -136,6 +135,46 @@
|
||||
"entityAvailabilityStatus": "Available"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('sbVersion')]",
|
||||
"name": "[variables('LocationsSubscriptionName')]",
|
||||
"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('MarketingSubscriptionName')]",
|
||||
"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('GracePeriodSubscriptionName')]",
|
||||
@ -175,66 +214,6 @@
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -73,7 +73,22 @@
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "databases",
|
||||
"name": "[parameters('sql_server').dbs.marketing]",
|
||||
"apiVersion": "2014-04-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"edition": "Standard",
|
||||
"collation": "SQL_Latin1_General_CP1_CI_AS",
|
||||
"maxSizeBytes": "1073741824",
|
||||
"requestedServiceObjectiveName": "S1"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "firewallrules",
|
||||
"name": "AllowAllWindowsAzureIps",
|
||||
|
@ -8,7 +8,8 @@
|
||||
"dbs": {
|
||||
"ordering": "orderingdb",
|
||||
"identity": "identitydb",
|
||||
"catalog": "catalogdb"
|
||||
"catalog": "catalogdb",
|
||||
"marketing": "marketingdb"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
94
deploy/azure/az/storage/marketing/deploystorage.json
Normal file
94
deploy/azure/az/storage/marketing/deploystorage.json
Normal file
@ -0,0 +1,94 @@
|
||||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"marketingstorage": {
|
||||
"type": "string"
|
||||
},
|
||||
"profileName" : {
|
||||
"type": "string"
|
||||
},
|
||||
"endpointName" : {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]",
|
||||
"endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]",
|
||||
"profileName": "[parameters('profileName')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('marketingstorage')]",
|
||||
"apiVersion": "2016-01-01",
|
||||
"location": "[resourceGroup().location]",
|
||||
"tags": {
|
||||
"displayName": "[variables('marketingstorage')]"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Standard_LRS"
|
||||
},
|
||||
"kind": "Storage"
|
||||
},
|
||||
{
|
||||
"name": "[variables('profileName')]",
|
||||
"type": "Microsoft.Cdn/profiles",
|
||||
"location": "[resourceGroup().location]",
|
||||
"apiVersion": "2016-04-02",
|
||||
"tags": {
|
||||
"displayName": "[variables('profileName')]"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Standard_Verizon"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2016-04-02",
|
||||
"name": "[variables('endpointName')]",
|
||||
"type": "endpoints",
|
||||
"dependsOn": [
|
||||
"[variables('profileName')]",
|
||||
"[variables('marketingstorage')]"
|
||||
],
|
||||
"location": "[resourceGroup().location]",
|
||||
"tags": {
|
||||
"displayName": "[variables('endpointName')]"
|
||||
},
|
||||
"properties": {
|
||||
"originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
|
||||
"isHttpAllowed": true,
|
||||
"isHttpsAllowed": true,
|
||||
"queryStringCachingBehavior": "IgnoreQueryString",
|
||||
"contentTypesToCompress": [
|
||||
"text/plain",
|
||||
"text/html",
|
||||
"text/css",
|
||||
"application/x-javascript",
|
||||
"text/javascript"
|
||||
],
|
||||
"isCompressionEnabled": "True",
|
||||
"origins": [
|
||||
{
|
||||
"name": "origin1",
|
||||
"properties": {
|
||||
"hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"hostName": {
|
||||
"type": "string",
|
||||
"value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]"
|
||||
},
|
||||
"originHostHeader": {
|
||||
"type": "string",
|
||||
"value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"marketingstorage": {
|
||||
"value": "marketing"
|
||||
},
|
||||
"profileName":{
|
||||
"value": "eshopmarketing"
|
||||
},
|
||||
"endpointName":{
|
||||
"value": "marketing-endpoint"
|
||||
}
|
||||
}
|
||||
}
|
37
deploy/azure/az/storage/marketing/readme.md
Normal file
37
deploy/azure/az/storage/marketing/readme.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Deploying Marketing Storage
|
||||
|
||||
The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources:
|
||||
|
||||
1. One Storage Account
|
||||
2. One CDN profile
|
||||
3. One Endpoint
|
||||
|
||||
## Editing deploystorage.parameters.json file
|
||||
|
||||
You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can
|
||||
be set are:
|
||||
|
||||
1. `marketingstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
|
||||
|
||||
2. `profileName` is a string that is used to create the CDN profile name.
|
||||
|
||||
3. `endpointName` is a string that is used to create the storage endpoint name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
|
||||
|
||||
## Deploy the template
|
||||
|
||||
Once parameter file is edited you can deploy it using [create-resources script](../../readme.md).
|
||||
|
||||
i. e. if you are in windows, to deploy a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type:
|
||||
|
||||
```
|
||||
create-resources.cmd storage\marketing\deploystorage newResourceGroup -c westus
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@ Using `docker-machine` is the recommended way to create a VM with docker install
|
||||
3. [Deploying Redis Cache](az/redis/readme.md)
|
||||
4. [Deploying Cosmosdb](az/cosmos/readme.md)
|
||||
5. [Deploying Catalog Storage](az/storage/catalog/readme.md)
|
||||
6. [Deploying Marketing Storage](az/storage/marketing/readme.md)
|
||||
7. [Deploying Marketing Azure functions](az/azurefunctions/readme.md)
|
||||
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ Write-Host "Creating AKS $resourceGroupName/$serviceName" -ForegroundColor Yello
|
||||
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 Application Routing in AKS $serviceName" -ForegroundColor Yellow
|
||||
Write-Host "Enabling Http Applciation Routing in AKS $serviceName" -ForegroundColor Yellow
|
||||
az aks enable-addons --resource-group $resourceGroupName --name $serviceName --addons http_application_routing
|
||||
}
|
||||
|
||||
|
@ -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
|
2
deploy/k8s/deploy-ingress-dockerlocal.ps1
Normal file
2
deploy/k8s/deploy-ingress-dockerlocal.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
kubectl apply -f nginx-ingress\cm.yaml
|
||||
kubectl apply -f nginx-ingress\cloud-generic.yaml
|
2
deploy/k8s/deploy-ingress.ps1
Normal file
2
deploy/k8s/deploy-ingress.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
# Deploy nginx-ingress core files
|
||||
kubectl apply -f nginx-ingress\mandatory.yaml
|
@ -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
|
@ -1,5 +1,5 @@
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: tt-ssl
|
||||
name: apigwmm
|
||||
version: 0.1.0
|
75
deploy/k8s/helm/apigwmm/envoy.yaml
Normal file
75
deploy/k8s/helm/apigwmm/envoy.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
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: "m-short"
|
||||
match:
|
||||
prefix: "/m/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
prefix_rewrite: "/marketing-api/"
|
||||
cluster: marketing
|
||||
- name: "m-long"
|
||||
match:
|
||||
prefix: "/marketing-api/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
cluster: marketing
|
||||
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: marketing
|
||||
connect_timeout: 0.25s
|
||||
type: logical_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: marketing-api
|
||||
port_value: 80
|
||||
- name: locations
|
||||
connect_timeout: 0.25s
|
||||
type: logical_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: locations-api
|
||||
port_value: 80
|
2
deploy/k8s/helm/apigwmm/templates/NOTES.txt
Normal file
2
deploy/k8s/helm/apigwmm/templates/NOTES.txt
Normal file
@ -0,0 +1,2 @@
|
||||
eShop API Gateway for Mobile Marketing services installed
|
||||
----------------------------------------------------------
|
@ -2,7 +2,7 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "tt-tls.name" -}}
|
||||
{{- define "apigwmm.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
@ -11,7 +11,7 @@ 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 "tt-tls.fullname" -}}
|
||||
{{- define "apigwmm.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
@ -27,6 +27,6 @@ If release name contains chart name it will be used as a full name.
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "tt-tls.chart" -}}
|
||||
{{- define "apigwmm.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
52
deploy/k8s/helm/apigwmm/templates/_names.tpl
Normal file
52
deploy/k8s/helm/apigwmm/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
||||
{{- 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 -}}
|
110
deploy/k8s/helm/apigwmm/templates/deployment.yaml
Normal file
110
deploy/k8s/helm/apigwmm/templates/deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
||||
{{- $name := include "apigwmm.fullname" . -}}
|
||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "apigwmm.fullname" . }}
|
||||
labels:
|
||||
ufo: {{ $cfgname}}
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
chart: {{ template "apigwmm.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "apigwmm.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 }}
|
||||
|
14
deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml
Normal file
14
deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
{{- $name := include "apigwmm.fullname" . -}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "envoy-{{ $name }}"
|
||||
labels:
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
chart: {{ template "apigwmm.chart" .}}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||
|
41
deploy/k8s/helm/apigwmm/templates/ingress.yaml
Normal file
41
deploy/k8s/helm/apigwmm/templates/ingress.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingressPath := include "pathBase" . -}}
|
||||
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "apigwmm.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
chart: {{ template "apigwmm.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- 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:
|
||||
- {{ .Values.inf.k8s.dns }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
23
deploy/k8s/helm/apigwmm/templates/service.yaml
Normal file
23
deploy/k8s/helm/apigwmm/templates/service.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.app.svc.mobilemarketingapigw }}
|
||||
labels:
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
chart: {{ template "apigwmm.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 "apigwmm.name" . }}
|
||||
release: {{ .Release.Name }}
|
45
deploy/k8s/helm/apigwmm/values.yaml
Normal file
45
deploy/k8s/helm/apigwmm/values.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
replicaCount: 1
|
||||
clusterName: eshop-aks
|
||||
pathBase: /mobilemarketingapigw
|
||||
|
||||
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
|
@ -9,20 +9,19 @@ static_resources:
|
||||
- address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 8080
|
||||
port_value: 80
|
||||
filter_chains:
|
||||
- filters:
|
||||
- name: envoy.filters.network.http_connection_manager
|
||||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
||||
- name: envoy.http_connection_manager
|
||||
config:
|
||||
codec_type: auto
|
||||
stat_prefix: ingress_http
|
||||
codec_type: AUTO
|
||||
route_config:
|
||||
name: eshop_backend_route
|
||||
virtual_hosts:
|
||||
- name: eshop_backend
|
||||
domains:
|
||||
- ["*"]
|
||||
- "*"
|
||||
routes:
|
||||
- name: "c-short"
|
||||
match:
|
||||
@ -43,20 +42,13 @@ static_resources:
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
prefix_rewrite: "/ordering-api/"
|
||||
cluster: ordering
|
||||
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
|
||||
cluster: ordering
|
||||
- name: "b-short"
|
||||
match:
|
||||
prefix: "/b/"
|
||||
@ -69,7 +61,7 @@ static_resources:
|
||||
prefix: "/basket-api/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
cluster: basket
|
||||
cluster: basket
|
||||
- name: "agg"
|
||||
match:
|
||||
prefix: "/"
|
||||
@ -78,70 +70,55 @@ static_resources:
|
||||
prefix_rewrite: "/"
|
||||
cluster: shoppingagg
|
||||
http_filters:
|
||||
- name: envoy.filters.http.router
|
||||
- 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
|
||||
load_assignment:
|
||||
cluster_name: shoppingagg
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: webshoppingagg
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: webshoppingagg
|
||||
port_value: 80
|
||||
- name: catalog
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: catalog
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: catalog-api
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: catalog-api
|
||||
port_value: 80
|
||||
- name: basket
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: basket
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: basket-api
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: basket-api
|
||||
port_value: 80
|
||||
- name: ordering
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: ordering
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: ordering-api
|
||||
port_value: 80
|
||||
- name: signalr-hub
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: signalr-hub
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: ordering-signalrhub
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: ordering-api
|
||||
port_value: 80
|
@ -1,7 +1,7 @@
|
||||
{{- $name := include "apigwms.fullname" . -}}
|
||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||
apiVersion: apps/v1
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "apigwms.fullname" . }}
|
||||
@ -27,10 +27,6 @@ spec:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 2000
|
||||
runAsGroup: 3000
|
||||
fsGroup: 2000
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.inf.registry.secretName }}
|
||||
@ -92,7 +88,7 @@ spec:
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
- name: admin
|
||||
containerPort: 8001
|
||||
|
@ -10,5 +10,5 @@ metadata:
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{- $ingressPath := include "pathBase" . -}}
|
||||
{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}}
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "apigwms.fullname" . }}
|
||||
@ -15,9 +15,6 @@ metadata:
|
||||
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 }}
|
||||
@ -28,23 +25,18 @@ spec:
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
- {{ .Values.inf.k8s.dns }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}(/|$)(.*)
|
||||
pathType: Prefix
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
number: 80
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -4,7 +4,7 @@ pathBase: /mobileshoppingapigw
|
||||
|
||||
image:
|
||||
repository: envoyproxy/envoy
|
||||
tag: v1.21.0
|
||||
tag: v1.11.1
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
@ -14,9 +14,8 @@ service:
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/rewrite-target: "/"
|
||||
ingress.kubernetes.io/rewrite-target: "/"
|
||||
tls: []
|
||||
|
||||
resources: {}
|
||||
|
21
deploy/k8s/helm/apigwwm/.helmignore
Normal file
21
deploy/k8s/helm/apigwwm/.helmignore
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
5
deploy/k8s/helm/apigwwm/Chart.yaml
Normal file
5
deploy/k8s/helm/apigwwm/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: apigwwm
|
||||
version: 0.1.0
|
75
deploy/k8s/helm/apigwwm/envoy.yaml
Normal file
75
deploy/k8s/helm/apigwwm/envoy.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
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: "m-short"
|
||||
match:
|
||||
prefix: "/m/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
prefix_rewrite: "/marketing-api/"
|
||||
cluster: marketing
|
||||
- name: "m-long"
|
||||
match:
|
||||
prefix: "/marketing-api/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
cluster: marketing
|
||||
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: marketing
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: marketing-api
|
||||
port_value: 80
|
||||
- name: locations
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: locations-api
|
||||
port_value: 80
|
2
deploy/k8s/helm/apigwwm/templates/NOTES.txt
Normal file
2
deploy/k8s/helm/apigwwm/templates/NOTES.txt
Normal file
@ -0,0 +1,2 @@
|
||||
eShop API Gateway for Web Marketing services installed
|
||||
------------------------------------------------------
|
32
deploy/k8s/helm/apigwwm/templates/_helpers.tpl
Normal file
32
deploy/k8s/helm/apigwwm/templates/_helpers.tpl
Normal file
@ -0,0 +1,32 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "apigwwm.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 "apigwwm.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 "apigwwm.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
52
deploy/k8s/helm/apigwwm/templates/_names.tpl
Normal file
52
deploy/k8s/helm/apigwwm/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
||||
{{- 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 -}}
|
110
deploy/k8s/helm/apigwwm/templates/deployment.yaml
Normal file
110
deploy/k8s/helm/apigwwm/templates/deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
||||
{{- $name := include "apigwwm.fullname" . -}}
|
||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "apigwwm.fullname" . }}
|
||||
labels:
|
||||
ufo: {{ $cfgname}}
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
chart: {{ template "apigwwm.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "apigwwm.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 }}
|
||||
|
14
deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml
Normal file
14
deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
{{- $name := include "apigwwm.fullname" . -}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "envoy-{{ $name }}"
|
||||
labels:
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
chart: {{ template "apigwwm.chart" .}}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}}
|
||||
|
42
deploy/k8s/helm/apigwwm/templates/ingress.yaml
Normal file
42
deploy/k8s/helm/apigwwm/templates/ingress.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingressPath := include "pathBase" . -}}
|
||||
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "apigwwm.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
chart: {{ template "apigwwm.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- 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:
|
||||
- {{ .Values.inf.k8s.dns }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
23
deploy/k8s/helm/apigwwm/templates/service.yaml
Normal file
23
deploy/k8s/helm/apigwwm/templates/service.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.app.svc.webmarketingapigw }}
|
||||
labels:
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
chart: {{ template "apigwwm.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 "apigwwm.name" . }}
|
||||
release: {{ .Release.Name }}
|
46
deploy/k8s/helm/apigwwm/values.yaml
Normal file
46
deploy/k8s/helm/apigwwm/values.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
replicaCount: 1
|
||||
clusterName: eshop-aks
|
||||
pathBase: /webmarketingapigw
|
||||
|
||||
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
|
@ -9,20 +9,19 @@ static_resources:
|
||||
- address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 8080
|
||||
port_value: 80
|
||||
filter_chains:
|
||||
- filters:
|
||||
- name: envoy.filters.network.http_connection_manager
|
||||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
||||
- name: envoy.http_connection_manager
|
||||
config:
|
||||
codec_type: auto
|
||||
stat_prefix: ingress_http
|
||||
codec_type: AUTO
|
||||
route_config:
|
||||
name: eshop_backend_route
|
||||
virtual_hosts:
|
||||
- name: eshop_backend
|
||||
domains:
|
||||
- ["*"]
|
||||
- "*"
|
||||
routes:
|
||||
- name: "c-short"
|
||||
match:
|
||||
@ -43,23 +42,13 @@ static_resources:
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
prefix_rewrite: "/ordering-api/"
|
||||
cluster: ordering
|
||||
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
|
||||
upgrade_configs:
|
||||
upgrade_type: "websocket"
|
||||
enabled: true
|
||||
cluster: ordering
|
||||
- name: "b-short"
|
||||
match:
|
||||
prefix: "/b/"
|
||||
@ -72,7 +61,7 @@ static_resources:
|
||||
prefix: "/basket-api/"
|
||||
route:
|
||||
auto_host_rewrite: true
|
||||
cluster: basket
|
||||
cluster: basket
|
||||
- name: "agg"
|
||||
match:
|
||||
prefix: "/"
|
||||
@ -81,70 +70,55 @@ static_resources:
|
||||
prefix_rewrite: "/"
|
||||
cluster: shoppingagg
|
||||
http_filters:
|
||||
- name: envoy.filters.http.router
|
||||
- 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
|
||||
load_assignment:
|
||||
cluster_name: shoppingagg
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: webshoppingagg
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: webshoppingagg
|
||||
port_value: 80
|
||||
- name: catalog
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: catalog
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: catalog-api
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: catalog-api
|
||||
port_value: 80
|
||||
- name: basket
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: basket
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: basket-api
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: basket-api
|
||||
port_value: 80
|
||||
- name: ordering
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: ordering
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: ordering-api
|
||||
port_value: 80
|
||||
- name: signalr-hub
|
||||
connect_timeout: 0.25s
|
||||
type: strict_dns
|
||||
lb_policy: round_robin
|
||||
load_assignment:
|
||||
cluster_name: signalr-hub
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: ordering-signalrhub
|
||||
port_value: 80
|
||||
hosts:
|
||||
- socket_address:
|
||||
address: ordering-api
|
||||
port_value: 80
|
@ -1,7 +1,7 @@
|
||||
{{- $name := include "apigwws.fullname" . -}}
|
||||
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||
apiVersion: apps/v1
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "apigwws.fullname" . }}
|
||||
@ -26,10 +26,6 @@ spec:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 2000
|
||||
runAsGroup: 3000
|
||||
fsGroup: 2000
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.inf.registry.secretName }}
|
||||
@ -91,7 +87,7 @@ spec:
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
- name: admin
|
||||
containerPort: 8001
|
||||
|
@ -10,5 +10,5 @@ metadata:
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
data:
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user