diff --git a/content/en/apm/online-boutique/_index.md b/content/en/apm/online-boutique/_index.md index ee5ef577ff..d4c1855ac0 100644 --- a/content/en/apm/online-boutique/_index.md +++ b/content/en/apm/online-boutique/_index.md @@ -23,14 +23,13 @@ If this is the case, continue with [Deploy Online Boutique](#2-deploy-online-bou ## 2. Deploy Online Boutique -To deploy the Online Boutique application into K3s, run the `apm-config.sh` script, then apply the deployment: +To deploy the Online Boutique application into K3s apply the deployment: {{< tabs >}} {{% tab title="Deploy Online Boutique" %}} ``` bash cd ~/workshop/apm -./apm-config.sh -r kubectl apply -f deployment.yaml ``` diff --git a/content/en/rum/2-setup.md b/content/en/rum/2-setup.md index e18e7884d4..f54f6558b9 100644 --- a/content/en/rum/2-setup.md +++ b/content/en/rum/2-setup.md @@ -73,7 +73,6 @@ To deploy the Online Boutique application into K3s, run the apm config script, t ```bash cd ~/workshop/apm -./apm-config.sh -r kubectl apply -f deployment.yaml ``` diff --git a/content/ja/apm/online-boutique/_index.md b/content/ja/apm/online-boutique/_index.md index 1cec92e5f9..cab5bffa38 100644 --- a/content/ja/apm/online-boutique/_index.md +++ b/content/ja/apm/online-boutique/_index.md @@ -28,7 +28,6 @@ Online BoutiqueアプリケーションをK3sにデプロイするには、以 ``` bash cd ~/workshop/apm -./apm-config.sh kubectl apply -f deployment.yaml ``` diff --git a/content/ja/rum/2-showcase.md b/content/ja/rum/2-showcase.md index cb8752c42f..712010365b 100644 --- a/content/ja/rum/2-showcase.md +++ b/content/ja/rum/2-showcase.md @@ -51,7 +51,6 @@ EC2インスタンスのkubernetes(K3s)にOnline Boutiqueのアプリケー ```bash cd ~/workshop/apm kubectl delete -f deployment.yaml -./apm-config.sh -r kubectl apply -f deployment.yaml ``` diff --git a/content/ja/rum/3-setup.md b/content/ja/rum/3-setup.md index 42c2a351cb..776ee199c9 100644 --- a/content/ja/rum/3-setup.md +++ b/content/ja/rum/3-setup.md @@ -50,7 +50,6 @@ Online BoutiqueアプリケーションをK3sにデプロイするには、apm c ```bash cd ~/workshop/apm -./apm-config.sh -r kubectl apply -f deployment.yaml ``` diff --git a/workshop/apm/README.md b/workshop/apm/README.md deleted file mode 100644 index 0b8823e4a8..0000000000 --- a/workshop/apm/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Readme - -For APM just as part of a regular workshop follow the instructions in the APM workshop guide. - -In order to generate RUM data in Splunk RUM the attendees need to deploy a RUM instrumented version of the Online Boutique instead of the regular APM one. - -## Deploying RUM enabled Online Boutique - -```bash -cd ~/workshop/apm -export RUM_TOKEN= -bash apm-config.sh -r -``` - -This will create a deployment Kubernetes Manifest called `deployment.yaml`. Check that the created `deployment.yaml` contains the correct RUM settings (the `RUM_APP_NAME` and `RUM_ENVIRONMENT` will be prefixed with your EC2 instance hostname) e.g. - -```yaml -- name: RUM_REALM - value: eu0 -- name: RUM_AUTH - value: abc123 -- name: RUM_APP_NAME - value: redu-rum-app -- name: RUM_ENVIRONMENT - value: redu-rum-env -``` - -If all looks correct, run the deployment: - -``` text -kubectl apply -f deployment.yaml -``` - -Wait till all the pods have loaded, to ensure the Online Boutique application is running: - -``` text -kubectl get pods -``` - -Usually it should only take around 1min 30secs for the pods to transition into a Running state. Once they are in a running state you need to wait several minutes to get all the services started and the demo is stabilized. - -If you verify the RUM overview page and it show only urls for ***other***, the RUM backend is still processing requests and wait approximately 10 minutes. to make sure all is settled before starting showing RUM. - -Wait until you see the URLs with proper IP-addresses or localhost appear in the RUM overview before starting with the RUM Workshop diff --git a/workshop/apm/apm-config.sh b/workshop/apm/apm-config.sh deleted file mode 100755 index ac9c94f806..0000000000 --- a/workshop/apm/apm-config.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/bash -norum="True" #no RUM is default -while getopts "r" option; do - case "${option}" in - r) norum="False";; - \?) #For invalid option - echo "For RUM you have to use: [-r]" - exit -1 - esac -done -if [ ${norum} == "True" ]; -then - echo "APM Only Deployment" - RUM_TOKEN="" - REALM="" -else - echo "Adding RUM_TOKEN to deployment" - if [ -z ${REALM+x} ]; then echo "REALM is unset. Please export REALM=YOUR_REALM"; fi - if [ -z ${RUM_TOKEN+x} ]; then echo "RUM_TOKEN is unset. Please export RUM_TOKEN=YOUR_RUM_TOKEN"; fi -fi -if [ -z ${INSTANCE+x} ]; then echo "INSTANCE is unset. Please export INSTANCE=YOUR_HOST_NAME"; fi -envsubst '${REALM},${RUM_TOKEN},${INSTANCE}' < deployment-RUM-org.yaml > deployment.yaml diff --git a/workshop/apm/deployment-RUM-old.yaml b/workshop/apm/deployment-RUM-old.yaml deleted file mode 100644 index 97d0a34599..0000000000 --- a/workshop/apm/deployment-RUM-old.yaml +++ /dev/null @@ -1,880 +0,0 @@ -# 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.yaml similarity index 98% rename from workshop/apm/deployment-RUM-org.yaml rename to workshop/apm/deployment.yaml index 3822a59a96..567b263bde 100644 --- a/workshop/apm/deployment-RUM-org.yaml +++ b/workshop/apm/deployment.yaml @@ -870,13 +870,25 @@ spec: - name: AD_SERVICE_ADDR value: "adservice:9555" - name: RUM_REALM - value: ${REALM} + valueFrom: + secretKeyRef: + name: workshop-secret + key: realm - name: RUM_AUTH - value: ${RUM_TOKEN} + valueFrom: + secretKeyRef: + name: workshop-secret + key: rum_token - name: RUM_APP_NAME - value: ${INSTANCE}-rum-app + valueFrom: + secretKeyRef: + name: workshop-secret + key: rum_app - name: RUM_ENVIRONMENT - value: ${INSTANCE}-rum-env + valueFrom: + secretKeyRef: + name: workshop-secret + key: rum_env - name: RUM_DEBUG - name: ENV_PLATFORM value: "aws" diff --git a/workshop/aws/ec2/templates/userdata.yaml b/workshop/aws/ec2/templates/userdata.yaml index b820adaac3..be061d8b16 100644 --- a/workshop/aws/ec2/templates/userdata.yaml +++ b/workshop/aws/ec2/templates/userdata.yaml @@ -124,6 +124,25 @@ write_files: echo "$NODE_IP $REGISTRY_NAME" | tee -a /etc/cloud/templates/hosts.debian.tmpl systemctl restart docker + - path: /tmp/workshop-secret.yaml + permissions: '0755' + content: | + apiVersion: v1 + kind: Secret + metadata: + name: workshop-secret + namespace: default + type: Opaque + stringData: + rum_app: ${instance_name}-rum-app + rum_env: ${instance_name}-rum-env + access_token: ${access_token} + api_token: ${api_token} + realm: ${realm} + rum_token: ${rum_token} + hec_token: ${hec_token} + hec_url: ${hec_url} + - path: /tmp/pre-setup.sh permissions: '0755' content: | @@ -155,7 +174,6 @@ write_files: export RUM_FRONTEND_IP cd /home/ubuntu/workshop/apm/ - bash apm-config.sh -r sudo kubectl apply -f deployment.yaml echo ${instance_name} > /home/ubuntu/.helmok fi @@ -214,8 +232,6 @@ runcmd: - mv /home/ubuntu/workshop/ansible/playbook.yml /home/ubuntu - rm -rf /home/ubuntu/observability-workshop-$WSVERSION - rm -rf /home/ubuntu/workshop/aws /home/ubuntu/workshop/cloud-init /home/ubuntu/workshop/gcp /home/ubuntu/workshop/ansible - # Set apm-config.sh executable - - chmod +x /home/ubuntu/workshop/apm/apm-config.sh # Download Splunk Observability Content Contrib Repo - curl -s -L https://github.com/splunk/observability-content-contrib/archive/main.zip -o content-contrib.zip - unzip -qq content-contrib.zip -d /home/ubuntu/ @@ -235,6 +251,7 @@ runcmd: - chown -R ubuntu:ubuntu /home/ubuntu # Deploy private registry - /usr/local/bin/kubectl apply -f /home/ubuntu/workshop/k3s/registry/registry.yaml + - /usr/local/bin/kubectl apply -f /tmp/workshop-secret.yaml # Configure shellinabox port and disable ssl then restart - sed -i 's/SHELLINABOX_PORT=4200/SHELLINABOX_PORT=6501/' /etc/default/shellinabox - sed -i "s/\"--no-beep\"/\"--no-beep --disable-ssl\"/" /etc/default/shellinabox diff --git a/workshop/cloud-init/k3s.yaml b/workshop/cloud-init/k3s.yaml index dbfb88fe76..f1c6e0b274 100644 --- a/workshop/cloud-init/k3s.yaml +++ b/workshop/cloud-init/k3s.yaml @@ -157,8 +157,6 @@ runcmd: - mkdir /home/ubuntu/workshop - mv /home/ubuntu/observability-workshop-$WSVERSION/workshop/* /home/ubuntu/workshop - rm -rf /home/ubuntu/observability-workshop-$WSVERSION - # Set apm-config.sh executable - - chmod +x /home/ubuntu/workshop/apm/apm-config.sh # Download Splunk Observability Cloud Jumpstart - curl -s -L https://github.com/splunk/signalfx-jumpstart/archive/main.zip -o jumpstart.zip - unzip -qq jumpstart.zip -d /home/ubuntu/