Browse Source

Added Envoy yaml files; updated mobilemarketingapigw to use the Envoy ConfigMap

pull/1259/head
Tim McCarthy 5 years ago
parent
commit
341d964008
6 changed files with 50 additions and 30 deletions
  1. +3
    -0
      deploy/aro/mobilemarketingapigw/azure-pipelines.yml
  2. +2
    -2
      deploy/aro/mobilemarketingapigw/envoy.yml
  3. +18
    -1
      deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml
  4. +11
    -11
      deploy/aro/mobileshoppingapigw/envoy.yml
  5. +5
    -5
      deploy/aro/webmarketingapigw/envoy.yml
  6. +11
    -11
      deploy/aro/webshoppingapigw/envoy.yml

+ 3
- 0
deploy/aro/mobilemarketingapigw/azure-pipelines.yml View File

@ -35,6 +35,9 @@ stages:
- script: 'oc project $(OpenShiftProject)' - script: 'oc project $(OpenShiftProject)'
failOnStderr: true failOnStderr: true
displayName: 'Set OpenShift Project Context' displayName: 'Set OpenShift Project Context'
- script: 'oc create configmap mobilemarketingapigw --from-file=./deploy/aro/mobilemarketingapigw/envoy.yml'
failOnStderr: true
displayName: 'Add Envoy ConfigMap'
- script: 'oc process -f ./deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' - script: 'oc process -f ./deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
failOnStderr: true failOnStderr: true
displayName: 'Ensure Mobile Marketing API Gateway OpenShift DeploymentConfig and Service' displayName: 'Ensure Mobile Marketing API Gateway OpenShift DeploymentConfig and Service'

deploy/aro/mobilemarketingapigw/envoy.yaml → deploy/aro/mobilemarketingapigw/envoy.yml View File

@ -28,11 +28,11 @@ static_resources:
prefix: "/m/" prefix: "/m/"
route: route:
auto_host_rewrite: true auto_host_rewrite: true
prefix_rewrite: "/marketingapi/"
prefix_rewrite: "/marketing-api/"
cluster: marketing cluster: marketing
- name: "m-long" - name: "m-long"
match: match:
prefix: "/marketingapi/"
prefix: "/marketing-api/"
route: route:
auto_host_rewrite: true auto_host_rewrite: true
cluster: marketing cluster: marketing

+ 18
- 1
deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml View File

@ -24,13 +24,23 @@ objects:
app: ${APPLICATION_NAME} app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME} deploymentconfig: ${APPLICATION_NAME}
spec: spec:
volumes:
- name: config
configMap:
name: ${APPLICATION_NAME}-config-map
items:
- key: envoy.yml
path: envoy.yml
containers: containers:
- env: - env:
- name: PATH_BASE - name: PATH_BASE
value: /mobilemarketingapigw
value: /${APPLICATION_NAME}
image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
imagePullPolicy: Always imagePullPolicy: Always
name: ${APPLICATION_NAME} name: ${APPLICATION_NAME}
volumeMounts:
- name: envoy-volume
mountPath: /etc/envoy
ports: ports:
- containerPort: 8080 - containerPort: 8080
protocol: TCP protocol: TCP
@ -39,6 +49,13 @@ objects:
resources: {} resources: {}
terminationMessagePath: /dev/termination-log terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File terminationMessagePolicy: File
volumes:
- name: envoy-volume
configMap:
name: mobilemarketingapigw-config-map
items:
- key: envoy.yml
path: envoy.yml
dnsPolicy: ClusterFirst dnsPolicy: ClusterFirst
restartPolicy: Always restartPolicy: Always
schedulerName: default-scheduler schedulerName: default-scheduler


deploy/aro/mobileshoppingapigw/envoy.yaml → deploy/aro/mobileshoppingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address: - address:
socket_address: socket_address:
address: 0.0.0.0 address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains: filter_chains:
- filters: - filters:
- name: envoy.http_connection_manager - name: envoy.http_connection_manager
@ -103,37 +103,37 @@ static_resources:
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: webshoppingagg
port_value: 80
address: webshoppingagg.__OpenShiftProject__.svc:8080
port_value: 8080
- name: catalog - name: catalog
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: catalog-api
port_value: 80
address: catalogapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: basket - name: basket
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: basket-api
port_value: 80
address: basketapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: ordering - name: ordering
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: ordering-api
port_value: 80
address: orderingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: signalr-hub - name: signalr-hub
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: ordering-signalrhub
port_value: 80
address: orderingsignalrhub.__OpenShiftProject__.svc:8080
port_value: 8080

deploy/aro/webmarketingapigw/envoy.yaml → deploy/aro/webmarketingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address: - address:
socket_address: socket_address:
address: 0.0.0.0 address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains: filter_chains:
- filters: - filters:
- name: envoy.http_connection_manager - name: envoy.http_connection_manager
@ -63,13 +63,13 @@ static_resources:
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: marketing-api
port_value: 80
address: marketingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: locations - name: locations
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: locations-api
port_value: 80
address: locationsapi.__OpenShiftProject__.svc:8080
port_value: 8080

deploy/aro/webshoppingapigw/envoy.yaml → deploy/aro/webshoppingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address: - address:
socket_address: socket_address:
address: 0.0.0.0 address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains: filter_chains:
- filters: - filters:
- name: envoy.http_connection_manager - name: envoy.http_connection_manager
@ -103,37 +103,37 @@ static_resources:
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: webshoppingagg
port_value: 80
address: webshoppingagg.__OpenShiftProject__.svc:8080
port_value: 8080
- name: catalog - name: catalog
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: catalog-api
port_value: 80
address: catalogapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: basket - name: basket
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: basket-api
port_value: 80
address: basketapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: ordering - name: ordering
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: ordering-api
port_value: 80
address: orderingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: signalr-hub - name: signalr-hub
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: hosts:
- socket_address: - socket_address:
address: ordering-signalrhub
port_value: 80
address: orderingsignalrhub.__OpenShiftProject__.svc:8080
port_value: 8080

Loading…
Cancel
Save