From 9b86cdb5d89ba6606a9813681c20bc4a0c9c8944 Mon Sep 17 00:00:00 2001 From: Robert Castley Date: Fri, 29 Sep 2023 15:52:38 +0100 Subject: [PATCH] Workshop deployment using same as frontend-demo --- workshop/apm/deployment-RUM-old.yaml | 880 +++++++++++++++++++++++++++ workshop/apm/deployment-RUM-org.yaml | 409 ++++++++----- 2 files changed, 1146 insertions(+), 143 deletions(-) create mode 100644 workshop/apm/deployment-RUM-old.yaml diff --git a/workshop/apm/deployment-RUM-old.yaml b/workshop/apm/deployment-RUM-old.yaml new file mode 100644 index 0000000000..97d0a34599 --- /dev/null +++ b/workshop/apm/deployment-RUM-old.yaml @@ -0,0 +1,880 @@ +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------- +# WARNING: This file is autogenerated. Do not manually edit. +# ---------------------------------------------------------- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: recommendationservice +spec: + selector: + matchLabels: + app: recommendationservice + template: + metadata: + labels: + app: recommendationservice + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + containers: + - name: recommendationservice + image: quay.io/signalfuse/microservices-demo-recommendationservice:433c23881a + ports: + - containerPort: 8080 + readinessProbe: + periodSeconds: 5 + exec: + command: ["/bin/grpc_health_probe", "-addr=:8080"] + livenessProbe: + periodSeconds: 5 + exec: + command: ["/bin/grpc_health_probe", "-addr=:8080"] + env: + - name: PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: "productcatalogservice:3550" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + resources: + requests: + cpu: 100m + memory: 220Mi + limits: + cpu: 100m + memory: 250Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: recommendationservice +spec: + type: ClusterIP + selector: + app: recommendationservice + ports: + - name: grpc + port: 8080 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: productcatalogservice +spec: + selector: + matchLabels: + app: productcatalogservice + template: + metadata: + labels: + app: productcatalogservice + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + containers: + - name: productcatalogservice + image: quay.io/signalfuse/microservices-demo-productcatalogservice:433c23881a + ports: + - containerPort: 3550 + env: + - name: PORT + value: "3550" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:3550"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:3550"] + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: productcatalogservice +spec: + type: ClusterIP + selector: + app: productcatalogservice + ports: + - name: grpc + port: 3550 + targetPort: 3550 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cartservice +spec: + selector: + matchLabels: + app: cartservice + template: + metadata: + labels: + app: cartservice + spec: + terminationGracePeriodSeconds: 5 + tolerations: + nodeSelector: + containers: + - name: cartservice + image: quay.io/signalfuse/microservices-demo-cartservice:1e0032cffb + imagePullPolicy: Always + ports: + - containerPort: 7070 + env: + - name: REDIS_ADDR + value: "redis-cart:6379" + - name: PORT + value: "7070" + - name: LISTEN_ADDR + value: "0.0.0.0" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + - name: SIGNALFX_METRICS_ENDPOINT_URL + value: "http://$(NODE_IP):9943/v2/datapoint" + - name: SIGNALFX_PROFILER_ENABLED + value: "true" + - name: SIGNALFX_PROFILER_LOGS_ENDPOINT + value: "http://$(NODE_IP):4318/v1/logs" + - name: SIGNALFX_RUNTIME_METRICS_ENABLED + value: "true" + - name: SIGNALFX_DISABLED_INTEGRATIONS + value: "Grpc" + - name: SIGNALFX_SERVICE_NAME + value: "cartservice" + - name: SIGNALFX_ENV + value: "${INSTANCE}-apm-env" + - name: EXTERNAL_DB_NAME + value: "Galactus.Postgres" + - name: EXTERNAL_DB_ACCESS_RATE + value: "0.75" + - name: EXTERNAL_DB_MAX_DURATION_MILLIS + value: "750" + - name: EXTERNAL_DB_ERROR_RATE + value: "0.0" + - name: FIX_EXCESSIVE_ALLOCATION + value: "true" + - name: FIX_SLOW_LEAK + value: "true" + - name: OPTIMIZE_CPU + value: "true" + - name: OPTIMIZE_BLOCKING + value: "true" + resources: + requests: + cpu: 200m + memory: 64Mi + limits: + cpu: 300m + memory: 128Mi + readinessProbe: + initialDelaySeconds: 15 + exec: + command: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"] + livenessProbe: + initialDelaySeconds: 15 + periodSeconds: 10 + exec: + command: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"] +--- +apiVersion: v1 +kind: Service +metadata: + name: cartservice +spec: + type: ClusterIP + selector: + app: cartservice + ports: + - name: grpc + port: 7070 + targetPort: 7070 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: adservice +spec: + selector: + matchLabels: + app: adservice + template: + metadata: + labels: + app: adservice + spec: + terminationGracePeriodSeconds: 5 + tolerations: + nodeSelector: + containers: + - name: adservice + image: quay.io/phagen/adserviceprofiling:4.0 + imagePullPolicy: Always + ports: + - containerPort: 9555 + env: + - name: PORT + value: '9555' + - name: OTEL_SERVICE_NAME + value: adservice + - name: OTEL_RESOURCE_ATTRIBUTES + value: "deployment.environment=${INSTANCE}-apm-env" + - name: OTEL_PROPAGATORS + value: "b3multi" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SPLUNK_PROFILER_ENABLED + value: "true" + - name: SPLUNK_PROFILER_MEMORY_ENABLED + value: "true" + - name: SPLUNK_METRICS_ENABLED + value: "true" + - name: SPLUNK_METRICS_ENDPOINT + value: 'http://$(NODE_IP):9943' + - name: ENABLE_COPYRIGHT_CERTIFICATION + value: "false" + - name: STOCK_PHOTO_MAX_FINGERPRINT_SIZE + value: '100' + - name: OTEL_TRACE_EXPORTER + value: otlp + - name: OTEL_TRACES_SAMPLER + value: "rules" + - name: OTEL_TRACES_SAMPLER_ARG + value: "drop=/grpc.health.v1.Health;fallback=parentbased_always_on" + - name: JAVA_TOOL_OPTIONS + value: "-javaagent:/opt/sfx/splunk-otel-javaagent-all.jar -Dsplunk.profiler.call.stack.interval=500ms -Dsplunk.profiler.include.internal.stacks=false -Dsplunk.profiler.cpu.data.format=pprof-gzip-base64 -Xmx640m" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: 'http://$(NODE_IP):4317' + resources: + #requests: + #cpu: 300m + #memory: 780Mi + limits: + memory: 800Mi + readinessProbe: + initialDelaySeconds: 60 + periodSeconds: 25 + exec: + command: ['/bin/grpc_health_probe', '-addr=:9555'] + livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 30 + exec: + command: ['/bin/grpc_health_probe', '-addr=:9555'] +--- +apiVersion: v1 +kind: Service +metadata: + name: adservice +spec: + type: ClusterIP + selector: + app: adservice + ports: + - name: grpc + port: 9555 + targetPort: 9555 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: paymentservice +spec: + selector: + matchLabels: + app: paymentservice + template: + metadata: + labels: + app: paymentservice + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + containers: + - name: paymentservice + image: quay.io/signalfuse/microservices-demo-paymentservice:433c23881a + ports: + - containerPort: 50051 + env: + - name: PORT + value: "50051" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + - name: API_TOKEN_FAILURE_RATE + value: "0.90" + - name: SERIALIZATION_FAILURE_RATE + value: "0.0" + - name: SUCCESS_PAYMENT_SERVICE_DURATION_MILLIS + value: "200" + - name: ERROR_PAYMENT_SERVICE_DURATION_MILLIS + value: "500" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: paymentservice +spec: + type: ClusterIP + selector: + app: paymentservice + ports: + - name: grpc + port: 50051 + targetPort: 50051 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: loadgenerator +spec: + selector: + matchLabels: + app: loadgenerator + replicas: 1 + template: + metadata: + labels: + app: loadgenerator + annotations: + sidecar.istio.io/rewriteAppHTTPProbers: "true" + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + restartPolicy: Always + containers: + - name: loadgenerator + image: quay.io/signalfuse/microservices-demo-loadgenerator:433c23881a + ports: + - containerPort: 8089 + env: + - name: FRONTEND_ADDR + value: "frontend:80" + - name: USERS + value: "10" + resources: + requests: + cpu: 300m + memory: 256Mi + limits: + cpu: 300m + memory: 270Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: loadgenerator + annotations: + service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 + service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "5" + service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: "3" + service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "2" + external-dns.alpha.kubernetes.io/hostname: demo-load. +spec: + type: LoadBalancer + selector: + app: loadgenerator + ports: + - name: http + port: 82 + targetPort: 8089 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shippingservice +spec: + selector: + matchLabels: + app: shippingservice + template: + metadata: + labels: + app: shippingservice + spec: + tolerations: + nodeSelector: + containers: + - name: shippingservice + image: quay.io/signalfuse/microservices-demo-shippingservice:433c23881a + ports: + - containerPort: 50051 + env: + - name: PORT + value: "50051" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + readinessProbe: + periodSeconds: 5 + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: shippingservice +spec: + type: ClusterIP + selector: + app: shippingservice + ports: + - name: grpc + port: 50051 + targetPort: 50051 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: currencyservice +spec: + selector: + matchLabels: + app: currencyservice + template: + metadata: + labels: + app: currencyservice + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + containers: + - name: currencyservice + image: quay.io/signalfuse/microservices-demo-currencyservice:433c23881a + ports: + - name: grpc + containerPort: 7000 + env: + - name: PORT + value: "7000" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:7000"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:7000"] + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: currencyservice +spec: + type: ClusterIP + selector: + app: currencyservice + ports: + - name: grpc + port: 7000 + targetPort: 7000 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis-cart +spec: + selector: + matchLabels: + app: redis-cart + template: + metadata: + labels: + app: redis-cart + spec: + tolerations: + nodeSelector: + containers: + - name: redis + image: redis:alpine + ports: + - containerPort: 6379 + readinessProbe: + periodSeconds: 5 + tcpSocket: + port: 6379 + livenessProbe: + periodSeconds: 5 + tcpSocket: + port: 6379 + volumeMounts: + - mountPath: /data + name: redis-data + resources: + limits: + memory: 256Mi + cpu: 70m + requests: + cpu: 70m + memory: 200Mi + volumes: + - name: redis-data + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: redis-cart +spec: + type: ClusterIP + selector: + app: redis-cart + ports: + - name: redis + port: 6379 + targetPort: 6379 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: checkoutservice +spec: + selector: + matchLabels: + app: checkoutservice + template: + metadata: + labels: + app: checkoutservice + spec: + tolerations: + nodeSelector: + containers: + - name: checkoutservice + image: quay.io/signalfuse/microservices-demo-checkoutservice:433c23881a + ports: + - containerPort: 5050 + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5050"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5050"] + env: + - name: PORT + value: "5050" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: "productcatalogservice:3550" + - name: SHIPPING_SERVICE_ADDR + value: "shippingservice:50051" + - name: PAYMENT_SERVICE_ADDR + value: "paymentservice:50051" + - name: EMAIL_SERVICE_ADDR + value: "emailservice:5000" + - name: CURRENCY_SERVICE_ADDR + value: "currencyservice:7000" + - name: CART_SERVICE_ADDR + value: "cartservice:7070" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + - name: MAX_RETRY_ATTEMPTS + value: "20" + - name: RETRY_INITIAL_SLEEP_MILLIS + value: "25" + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: checkoutservice +spec: + type: ClusterIP + selector: + app: checkoutservice + ports: + - name: grpc + port: 5050 + targetPort: 5050 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: frontend +spec: + selector: + matchLabels: + app: frontend + template: + metadata: + labels: + app: frontend + annotations: + sidecar.istio.io/rewriteAppHTTPProbers: "true" + spec: + tolerations: + nodeSelector: + containers: + - name: frontend + #image: quay.io/phagen/frontend-rum-profile:1 + # image: docker.io/harnit/shopdemo-frontend:2.1-customevents + image: quay.io/signalfuse/microservices-demo-frontend:b9b84e1dd6 + ports: + - containerPort: 8080 + readinessProbe: + initialDelaySeconds: 10 + httpGet: + path: "/_healthz" + port: 8080 + httpHeaders: + - name: "Cookie" + value: "shop_session-id=x-readiness-probe" + livenessProbe: + initialDelaySeconds: 10 + httpGet: + path: "/_healthz" + port: 8080 + httpHeaders: + - name: "Cookie" + value: "shop_session-id=x-liveness-probe" + env: + - name: PORT + value: "8080" + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: "productcatalogservice:3550" + - name: CURRENCY_SERVICE_ADDR + value: "currencyservice:7000" + - name: CART_SERVICE_ADDR + value: "cartservice:7070" + - name: RECOMMENDATION_SERVICE_ADDR + value: "recommendationservice:8080" + - name: SHIPPING_SERVICE_ADDR + value: "shippingservice:50051" + - name: CHECKOUT_SERVICE_ADDR + value: "checkoutservice:5050" + - name: AD_SERVICE_ADDR + value: "adservice:9555" + - name: RUM_REALM + value: ${REALM} + - name: RUM_AUTH + value: ${RUM_TOKEN} + - name: RUM_APP_NAME + value: ${INSTANCE}-rum-app + - name: RUM_ENVIRONMENT + value: ${INSTANCE}-apm-env + - name: RUM_DEBUG + - name: ENV_PLATFORM + value: "aws" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + - name: SIGNALFX_SERVER_TIMING_CONTEXT + value: "true" + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 72Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: frontend +spec: + type: ClusterIP + selector: + app: frontend + ports: + - name: http + port: 80 + targetPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: + name: frontend-external + annotations: + service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 + service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "5" + service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: "3" + service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "2" + external-dns.alpha.kubernetes.io/hostname: demo. +spec: + type: LoadBalancer + selector: + app: frontend + ports: + - name: http + port: 81 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: emailservice +spec: + selector: + matchLabels: + app: emailservice + template: + metadata: + labels: + app: emailservice + spec: + tolerations: + nodeSelector: + terminationGracePeriodSeconds: 5 + containers: + - name: emailservice + image: quay.io/signalfuse/microservices-demo-emailservice:433c23881a + ports: + - containerPort: 8080 + env: + - name: PORT + value: "8080" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + readinessProbe: + periodSeconds: 5 + exec: + command: ["/bin/grpc_health_probe", "-addr=:8080"] + livenessProbe: + periodSeconds: 5 + exec: + command: ["/bin/grpc_health_probe", "-addr=:8080"] + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: emailservice +spec: + type: ClusterIP + selector: + app: emailservice + ports: + - name: grpc + port: 5000 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rum-loadgen-deployment + labels: + app: rum-loadgen +spec: + replicas: 2 + selector: + matchLabels: + app: rum-loadgen + template: + metadata: + labels: + app: rum-loadgen + spec: + # If you are NOT running this from AWS, but from multipass for example set the below env variable + # set RUM_FRONTEND_IP to the IP adress where you can reach your local Online Boutique + #env: + # - name: RUM_FRONTEND_IP + # value: "192.168.1.99" + containers: + - name: rum-loadgen + image: quay.io/phagen/rumloadgen:5.1 + imagePullPolicy: Always \ No newline at end of file diff --git a/workshop/apm/deployment-RUM-org.yaml b/workshop/apm/deployment-RUM-org.yaml index 02ca99d59a..b69f15c194 100644 --- a/workshop/apm/deployment-RUM-org.yaml +++ b/workshop/apm/deployment-RUM-org.yaml @@ -14,6 +14,133 @@ # ---------------------------------------------------------- # WARNING: This file is autogenerated. Do not manually edit. # ---------------------------------------------------------- +apiVersion: v1 +kind: Service +metadata: + name: mysql +spec: + ports: + - port: 3306 + selector: + app: mysql +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mysql +spec: + selector: + matchLabels: + app: mysql + strategy: + type: Recreate + template: + metadata: + labels: + app: mysql + spec: + containers: + - image: mysql:5 + name: mysql + env: + # Use secret in real usage + - name: MYSQL_ROOT_PASSWORD + value: root + - name: MYSQL_DATABASE + value: "LxvGChW075" + ports: + - containerPort: 3306 + name: mysql + volumeMounts: + - name: mysql-persistent-storage + mountPath: /var/lib/mysql + - name: mysql-initdb + mountPath: /docker-entrypoint-initdb.d + volumes: + - name: mysql-persistent-storage + - name: mysql-initdb + configMap: + name: mysql-initdb-config +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mysql-initdb-config +data: + initdb.sql: | + CREATE DATABASE IF NOT EXISTS LxvGChW075; + USE LxvGChW075; + CREATE TABLE friends (id INT, name VARCHAR(256), age INT, gender VARCHAR(3)); + INSERT INTO friends VALUES (1, 'John Smith', 32, 'm'); + INSERT INTO friends VALUES (2, 'Lilian Worksmith', 29, 'f'); + INSERT INTO friends VALUES (3, 'Michael Rupert', 27, 'm'); +--- +apiVersion: v1 +kind: Service +metadata: + name: mysql-datastore +spec: + type: ClusterIP + selector: + app: mysql-datastore + ports: + - name: mysql + port: 3306 + targetPort: 3306 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis-cart +spec: + selector: + matchLabels: + app: redis-cart + template: + metadata: + labels: + app: redis-cart + spec: + containers: + - name: redis + image: redis:alpine + ports: + - containerPort: 6379 + readinessProbe: + periodSeconds: 5 + tcpSocket: + port: 6379 + livenessProbe: + periodSeconds: 5 + tcpSocket: + port: 6379 + volumeMounts: + - mountPath: /data + name: redis-data + resources: + limits: + memory: 256Mi + cpu: 80m + requests: + cpu: 70m + memory: 200Mi + volumes: + - name: redis-data + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: redis-cart +spec: + type: ClusterIP + selector: + app: redis-cart + ports: + - name: redis + port: 6379 + targetPort: 6379 +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -27,12 +154,11 @@ spec: labels: app: recommendationservice spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 containers: - name: recommendationservice - image: quay.io/signalfuse/microservices-demo-recommendationservice:433c23881a + image: quay.io/signalfuse/microservices-demo-recommendationservice:4bf3dfd4f0 + imagePullPolicy: Always ports: - containerPort: 8080 readinessProbe: @@ -54,13 +180,12 @@ spec: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL value: "http://$(NODE_IP):9411/api/v2/spans" - # value: "http://zipkin.default:9411/api/v2/spans" resources: requests: cpu: 100m memory: 220Mi limits: - cpu: 100m + cpu: 120m memory: 250Mi --- apiVersion: v1 @@ -89,12 +214,11 @@ spec: labels: app: productcatalogservice spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 containers: - name: productcatalogservice - image: quay.io/signalfuse/microservices-demo-productcatalogservice:433c23881a + image: quay.io/signalfuse/microservices-demo-productcatalogservice:4bf3dfd4f0 + imagePullPolicy: Always ports: - containerPort: 3550 env: @@ -106,7 +230,6 @@ spec: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL value: "http://$(NODE_IP):9411/api/v2/spans" - # value: "http://zipkin.default:9411/api/v2/spans" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3550"] @@ -116,10 +239,10 @@ spec: resources: requests: cpu: 100m - memory: 64Mi + memory: 100Mi limits: - cpu: 100m - memory: 72Mi + cpu: 120m + memory: 125Mi --- apiVersion: v1 kind: Service @@ -147,12 +270,10 @@ spec: labels: app: cartservice spec: - terminationGracePeriodSeconds: 5 - tolerations: - nodeSelector: + terminationGracePeriodSeconds: 4 containers: - name: cartservice - image: quay.io/signalfuse/microservices-demo-cartservice:1e0032cffb + image: quay.io/phagen/cartserviceprofiling:2.1.3 imagePullPolicy: Always ports: - containerPort: 7070 @@ -175,18 +296,18 @@ spec: value: "true" - name: SIGNALFX_PROFILER_LOGS_ENDPOINT value: "http://$(NODE_IP):4318/v1/logs" + - name: SIGNALFX_PROFILER_CALL_STACK_INTERVAL + value: "1000" - name: SIGNALFX_RUNTIME_METRICS_ENABLED value: "true" - - name: SIGNALFX_DISABLED_INTEGRATIONS - value: "Grpc" - name: SIGNALFX_SERVICE_NAME value: "cartservice" - name: SIGNALFX_ENV - value: "${INSTANCE}-apm-env" + value: "frontend-demo-eu" - name: EXTERNAL_DB_NAME - value: "Galactus.Postgres" + value: "LxvGChW075" - name: EXTERNAL_DB_ACCESS_RATE - value: "0.75" + value: "0.9" - name: EXTERNAL_DB_MAX_DURATION_MILLIS value: "750" - name: EXTERNAL_DB_ERROR_RATE @@ -202,10 +323,10 @@ spec: resources: requests: cpu: 200m - memory: 64Mi + memory: 100Mi limits: cpu: 300m - memory: 128Mi + memory: 158Mi readinessProbe: initialDelaySeconds: 15 exec: @@ -243,11 +364,9 @@ spec: app: adservice spec: terminationGracePeriodSeconds: 5 - tolerations: - nodeSelector: containers: - name: adservice - image: quay.io/phagen/adserviceprofiling:4.0 + image: quay.io/phagen/adserviceprofiling:4.1 imagePullPolicy: Always ports: - containerPort: 9555 @@ -257,7 +376,7 @@ spec: - name: OTEL_SERVICE_NAME value: adservice - name: OTEL_RESOURCE_ATTRIBUTES - value: "deployment.environment=${INSTANCE}-apm-env" + value: "deployment.environment={INSTANCE}-apm-env" - name: OTEL_PROPAGATORS value: "b3multi" - name: NODE_IP @@ -283,7 +402,7 @@ spec: - name: OTEL_TRACES_SAMPLER_ARG value: "drop=/grpc.health.v1.Health;fallback=parentbased_always_on" - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/opt/sfx/splunk-otel-javaagent-all.jar -Dsplunk.profiler.call.stack.interval=500ms -Dsplunk.profiler.include.internal.stacks=false -Dsplunk.profiler.cpu.data.format=pprof-gzip-base64 -Xmx640m" + value: "-javaagent:/opt/sfx/splunk-otel-javaagent-all.jar -Dsplunk.profiler.call.stack.interval=1000ms -Dsplunk.profiler.include.internal.stacks=false -Dsplunk.profiler.cpu.data.format=pprof-gzip-base64 -Xmx640m" - name: OTEL_EXPORTER_OTLP_ENDPOINT value: 'http://$(NODE_IP):4317' resources: @@ -291,7 +410,7 @@ spec: #cpu: 300m #memory: 780Mi limits: - memory: 800Mi + memory: 900Mi readinessProbe: initialDelaySeconds: 60 periodSeconds: 25 @@ -316,7 +435,6 @@ spec: port: 9555 targetPort: 9555 --- ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -325,17 +443,18 @@ spec: selector: matchLabels: app: paymentservice + version: canary template: metadata: labels: app: paymentservice + version: canary spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 containers: - name: paymentservice - image: quay.io/signalfuse/microservices-demo-paymentservice:433c23881a + image: quay.io/signalfuse/microservices-demo-paymentservice:4bf3dfd4f0 + imagePullPolicy: Always ports: - containerPort: 50051 env: @@ -346,7 +465,6 @@ spec: fieldRef: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL - # value: "http://zipkin.default:9411/api/v2/spans" value: "http://$(NODE_IP):9411/api/v2/spans" - name: API_TOKEN_FAILURE_RATE value: "0.90" @@ -364,11 +482,11 @@ spec: command: ["/bin/grpc_health_probe", "-addr=:50051"] resources: requests: - cpu: 100m - memory: 64Mi + cpu: 120m + memory: 100Mi limits: - cpu: 100m - memory: 72Mi + cpu: 130m + memory: 120Mi --- apiVersion: v1 kind: Service @@ -378,6 +496,74 @@ spec: type: ClusterIP selector: app: paymentservice + version: canary + ports: + - name: grpc + port: 50051 + targetPort: 50051 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: paymentservice-stable +spec: + selector: + matchLabels: + app: paymentservice + version: stable + template: + metadata: + labels: + app: paymentservice + version: stable + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: paymentservice-stable + image: quay.io/signalfuse/microservices-demo-paymentservice:4bf3dfd4f0 + imagePullPolicy: Always + ports: + - containerPort: 50051 + env: + - name: PORT + value: "50051" + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: SIGNALFX_ENDPOINT_URL + value: "http://$(NODE_IP):9411/api/v2/spans" + - name: API_TOKEN_FAILURE_RATE + value: "0.0" + - name: SERIALIZATION_FAILURE_RATE + value: "0.0" + - name: SUCCESS_PAYMENT_SERVICE_DURATION_MILLIS + value: "200" + - name: ERROR_PAYMENT_SERVICE_DURATION_MILLIS + value: "500" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:50051"] + resources: + requests: + cpu: 120m + memory: 100Mi + limits: + cpu: 130m + memory: 120Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: paymentservice-stable +spec: + type: ClusterIP + selector: + app: paymentservice + version: stable ports: - name: grpc port: 50051 @@ -399,15 +585,13 @@ spec: annotations: sidecar.istio.io/rewriteAppHTTPProbers: "true" spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 restartPolicy: Always containers: - name: loadgenerator + image: quay.io/signalfuse/microservices-demo-loadgenerator:4bf3dfd4f0 ports: - containerPort: 8089 - image: quay.io/signalfuse/microservices-demo-loadgenerator:433c23881a env: - name: FRONTEND_ADDR value: "frontend:80" @@ -418,8 +602,8 @@ spec: cpu: 300m memory: 256Mi limits: - cpu: 300m - memory: 270Mi + cpu: 330m + memory: 280Mi --- apiVersion: v1 kind: Service @@ -453,11 +637,10 @@ spec: labels: app: shippingservice spec: - tolerations: - nodeSelector: containers: - name: shippingservice - image: quay.io/signalfuse/microservices-demo-shippingservice:433c23881a + image: quay.io/signalfuse/microservices-demo-shippingservice:4bf3dfd4f0 + imagePullPolicy: Always ports: - containerPort: 50051 env: @@ -469,7 +652,6 @@ spec: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL value: "http://$(NODE_IP):9411/api/v2/spans" - # value: "http://zipkin.default:9411/api/v2/spans" readinessProbe: periodSeconds: 5 exec: @@ -479,11 +661,11 @@ spec: command: ["/bin/grpc_health_probe", "-addr=:50051"] resources: requests: - cpu: 100m - memory: 64Mi + cpu: 110m + memory: 110Mi limits: - cpu: 100m - memory: 72Mi + cpu: 120m + memory: 125Mi --- apiVersion: v1 kind: Service @@ -511,16 +693,17 @@ spec: labels: app: currencyservice spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 containers: - name: currencyservice - image: quay.io/signalfuse/microservices-demo-currencyservice:433c23881a + image: quay.io/signalfuse/microservices-demo-currencyservice:4bf3dfd4f0 + imagePullPolicy: Always ports: - name: grpc containerPort: 7000 env: + - name: DISABLE_PROFILER + value: "True" - name: PORT value: "7000" - name: NODE_IP @@ -528,7 +711,6 @@ spec: fieldRef: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL - # value: "http://zipkin.default:9411/api/v2/spans" value: "http://$(NODE_IP):9411/api/v2/spans" readinessProbe: exec: @@ -538,11 +720,11 @@ spec: command: ["/bin/grpc_health_probe", "-addr=:7000"] resources: requests: - cpu: 100m - memory: 64Mi + cpu: 200m + memory: 125Mi limits: - cpu: 100m - memory: 72Mi + cpu: 300m + memory: 150Mi --- apiVersion: v1 kind: Service @@ -559,61 +741,6 @@ spec: --- apiVersion: apps/v1 kind: Deployment -metadata: - name: redis-cart -spec: - selector: - matchLabels: - app: redis-cart - template: - metadata: - labels: - app: redis-cart - spec: - tolerations: - nodeSelector: - containers: - - name: redis - image: redis:alpine - ports: - - containerPort: 6379 - readinessProbe: - periodSeconds: 5 - tcpSocket: - port: 6379 - livenessProbe: - periodSeconds: 5 - tcpSocket: - port: 6379 - volumeMounts: - - mountPath: /data - name: redis-data - resources: - limits: - memory: 256Mi - cpu: 70m - requests: - cpu: 70m - memory: 200Mi - volumes: - - name: redis-data - emptyDir: {} ---- -apiVersion: v1 -kind: Service -metadata: - name: redis-cart -spec: - type: ClusterIP - selector: - app: redis-cart - ports: - - name: redis - port: 6379 - targetPort: 6379 ---- -apiVersion: apps/v1 -kind: Deployment metadata: name: checkoutservice spec: @@ -625,11 +752,11 @@ spec: labels: app: checkoutservice spec: - tolerations: - nodeSelector: containers: - name: checkoutservice - image: quay.io/signalfuse/microservices-demo-checkoutservice:433c23881a + image: quay.io/signalfuse/microservices-demo-checkoutservice:4bf3dfd4f0 + #image: quay.io/signalfuse/microservices-demo-checkoutservice:a728a64c18 + #image: harnit/shopdemo-checkoutservice:1.1 ports: - containerPort: 5050 readinessProbe: @@ -647,6 +774,8 @@ spec: value: "shippingservice:50051" - name: PAYMENT_SERVICE_ADDR value: "paymentservice:50051" + - name: PAYMENT_SERVICE_ADDR_STABLE + value: "paymentservice-stable:50051" - name: EMAIL_SERVICE_ADDR value: "emailservice:5000" - name: CURRENCY_SERVICE_ADDR @@ -658,7 +787,6 @@ spec: fieldRef: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL - # value: "http://zipkin.default:9411/api/v2/spans" value: "http://$(NODE_IP):9411/api/v2/spans" - name: MAX_RETRY_ATTEMPTS value: "20" @@ -666,11 +794,11 @@ spec: value: "25" resources: requests: - cpu: 100m - memory: 64Mi + cpu: 110m + memory: 110Mi limits: - cpu: 100m - memory: 72Mi + cpu: 120m + memory: 125Mi --- apiVersion: v1 kind: Service @@ -700,13 +828,10 @@ spec: annotations: sidecar.istio.io/rewriteAppHTTPProbers: "true" spec: - tolerations: - nodeSelector: containers: - name: frontend - #image: quay.io/phagen/frontend-rum-profile:1 - # image: docker.io/harnit/shopdemo-frontend:2.1-customevents - image: quay.io/signalfuse/microservices-demo-frontend:b9b84e1dd6 + image: quay.io/phagen/frontend-rum-profile:3.0.0 + #image: docker.io/harnit/shopdemo-frontend:2.1-customevents ports: - containerPort: 8080 readinessProbe: @@ -726,6 +851,8 @@ spec: - name: "Cookie" value: "shop_session-id=x-liveness-probe" env: + - name: DISABLE_PROFILER + value: "True" - name: PORT value: "8080" - name: PRODUCT_CATALOG_SERVICE_ADDR @@ -749,7 +876,7 @@ spec: - name: RUM_APP_NAME value: ${INSTANCE}-rum-app - name: RUM_ENVIRONMENT - value: ${INSTANCE}-apm-env + value: ${INSTANCE}-rum-env - name: RUM_DEBUG - name: ENV_PLATFORM value: "aws" @@ -758,17 +885,16 @@ spec: fieldRef: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL - # value: "http://zipkin.default:9411/api/v2/spans" value: "http://$(NODE_IP):9411/api/v2/spans" - name: SIGNALFX_SERVER_TIMING_CONTEXT value: "true" resources: requests: - cpu: 100m - memory: 64Mi + cpu: 130m + memory: 164Mi limits: - cpu: 100m - memory: 72Mi + cpu: 150m + memory: 200Mi --- apiVersion: v1 kind: Service @@ -815,12 +941,11 @@ spec: labels: app: emailservice spec: - tolerations: - nodeSelector: terminationGracePeriodSeconds: 5 containers: - name: emailservice - image: quay.io/signalfuse/microservices-demo-emailservice:433c23881a + image: quay.io/signalfuse/microservices-demo-emailservice:a24bc7e317 + imagePullPolicy: Always ports: - containerPort: 8080 env: @@ -831,7 +956,6 @@ spec: fieldRef: fieldPath: status.hostIP - name: SIGNALFX_ENDPOINT_URL - # value: "http://zipkin.default:9411/api/v2/spans" value: "http://$(NODE_IP):9411/api/v2/spans" readinessProbe: periodSeconds: 5 @@ -843,10 +967,10 @@ spec: command: ["/bin/grpc_health_probe", "-addr=:8080"] resources: requests: - cpu: 100m - memory: 64Mi + cpu: 110m + memory: 90Mi limits: - cpu: 100m + cpu: 130m memory: 128Mi --- apiVersion: v1 @@ -869,7 +993,7 @@ metadata: labels: app: rum-loadgen spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: rum-loadgen @@ -882,9 +1006,8 @@ spec: # set RUM_FRONTEND_IP to the IP adress where you can reach your local Online Boutique #env: # - name: RUM_FRONTEND_IP - # value: "192.168.1.99" + # value: "192.168.1.99" containers: - name: rum-loadgen image: quay.io/phagen/rumloadgen:5.1 imagePullPolicy: Always -