Cloud Native sample microservices showcasing Full Stack Observability using AppDynamics and ThousandEyes

Overview

published

Cloud Native Sample Bookinfo App Observability

Bookinfo is a sample application composed of four Microservices written in different languages. Application is originally created by as part of Istio project to demonstrate various Istio features, See https://istio.io/docs/examples/bookinfo/.

Project extends this sample application to demonstrate observability of Cloud Native application using Cisco AppDynamics and ThousandEyes. Microservices code and docker images area extended to include respective AppDynamics agents that enables Application Performance Monitoring for these microservices. ThousandEyes Web App monitoring is also configured, that helps understand understand how HTTP, page load and transaction performance is affected by the network, and how it stacks up against other similar services.

Architecture

Sample book info application is created using 4 polygot microservices & can be deployed on kubernetes cluster.

Microservice details

Service Name Language Details
Product Page Python Frontend Microservices service simple web page showing book details, reviews & ratings
Details Ruby The details microservice contains book information.
Review Java The reviews microservice contains book reviews. It also calls the ratings microservice.
Ratings NodeJS The ratings microservice contains book ranking information that accompanies a book review.

Full Stack Observability are enabled for this application (composed of microservices) that monitors user experience, business transaction, container, virtual machine, Kubernetes container orchestrator etc. Each Microservices is instrumented with respective language AppDynamics agent to enable application monitoring data. In addition to this AppD cluster agent for Kubernetes is also setup too to monitor health of Kubernetes and collect metrics and metadata for entire cluster, including every node and container.

For ProductPage web endpoints the HTTP monitor are added to ThousandEyes that can monitor Response time, Availability and Throughput from multiple from different geographic location in world.

Setup Application

  1. Pre-requisite
  1. Clone the code to local laptop

    git clone https://github.com/CiscoDevNet/bookinfo-cloudnative-sample
    
  2. Get Access Key and account details from AppDynamics

    Access keys & Account Name

  3. Update Access Keys and deploy microservices pods

    i. Modify access-key (base64 encoded), APPDYNAMICS_AGENT_ACCOUNT_NAME (account_name) and APPDYNAMICS_CONTROLLER_HOST_NAME in field

    echo -n  | base64 - 
    vi platform/kube/appd.yaml
    

    ii. Upload Secret

    kubectl apply -f platform/kube/appd.yaml
    

    iii. Deploy microservice pods & created services

    kubectl apply -f platform/kube/bookinfo.yaml
    

    Sample Creation

    iv. Expose service to internet If your cluster have ingress with public internet domain configured use same.

    Alternative option is to expose service using ngork. Service needs to exposed so that ThousandEye can test app. NOTE: This is will expose your app to world so please read yourself aware of ngrok.

    kubectl run --restart=Never   -t -i --rm   ngrok --image=gcr.io/kuar-demo/ngrok   -- http productpage:9080
    
  4. Access app, browse various page & login using 'demo' and 'demo' cred.

    This will start sending metrics to AppdAccount

    Application Browsing

  5. Check Application and Infra monitoring details in AppDynamics account

    AppDynamics Monitoring Details

  6. Register Web Test on ThousandEyes

    ThousandEyes Test Addition & reports

AppDynamic Agents Instrumentation of Microservices

  1. Python agent for 'Product Page'

    AppDynamics Agent for Python is installed using pip package via requirements.txt

  2. Ruby agent for 'Details Service'

    AppDynamics Agent for Ruby is installed using Gemfile

  3. Java agent for 'Review' Service

    AppDynamics agent for Java is inserted using init-container.

          initContainers:
         - command:
             - cp
             - -r
             - /opt/appdynamics/.
             - /opt/temp
           name: appd-agent
           image: docker.io/appdynamics/java-agent:20.8.0
           volumeMounts:
             - mountPath: /opt/temp
               name: appd-agent-repo
    
  4. NodeJS 'Rating' Service AppDynamics agent for NodeJS are installed using npm install in package.json

  5. Agent configuration are set for following AppDynamics agents configuration Best Practices in kubernetes refer appd.yaml and bookinfo.yaml for details.

Rebuild Microservices docker images

Refer Build Document for build instruction.

You might also like...
Python package for reference counting native pointers
Python package for reference counting native pointers

refcount master: testing: This package is primarily for managing resources in native libraries, written for instance in C++, from Python. While it boi

A python script for combining multiple native SU2 format meshes into one mesh file for multi-zone simulations.

A python script for combining multiple native SU2 format meshes into one mesh file for multi-zone simulations.

This is a far more in-depth and advanced version of "Write user interface to a file API Sample"

Fusion360-Write-UserInterface This is a far more in-depth and advanced version of "Write user interface to a file API Sample" from https://help.autode

Sample python script for monitoring Rocketchat database and get statistics of users.
Sample python script for monitoring Rocketchat database and get statistics of users.

rocketchat-DB-monitoring Sample python script for monitoring Rocketchat database and get statistics of users. 1. Update python: yum check-update && yu

A simple assembly- and brainfuck-inspired stack-based language

asm-stackfuck A simple assembly- and brainfuck-inspired stack-based language. The language has a few goals: Be stack-based Look like assembly Have a s

Korg Volca Sample uploader for linux.

GnuVolca Korg Volca Sample uploader for linux. GnuVolca Usage Installation Via virtualenv Usage Store all the samples you want to upload on an empty d

This is sample project needed for security course to connect web service to database
This is sample project needed for security course to connect web service to database

secufaku This is sample project needed for security course to "connect web service to database". Why it suits alignment purpose It connects to postgre

Python with the scientific stack, compiled to WebAssembly.
Python with the scientific stack, compiled to WebAssembly.

Pyodide may be used in any context where you want to run Python inside a web browser.

51AC8 is a stack based golfing / esolang that I am trying to make.

51AC8 is a stack based golfing / esolang that I am trying to make.

Owner
Cisco DevNet
Place for DevNet community to access sample code and collaborate on open source projects that are used in some way in DevNet
Cisco DevNet
Tracing and Observability with OpenFaaS

Tracing and Observability with OpenFaaS Today we will walk through how to add OpenTracing or OpenTelemetry with Grafana's Tempo. For this walk-through

Lucas Roesler 8 Nov 17, 2022
Open-source data observability for modern data teams

Use cases Monitor your data warehouse in minutes: Data anomalies monitoring as dbt tests Data lineage made simple, reliable, and automated dbt operati

null 889 Jan 1, 2023
A collection of full-stack resources for programmers.

A collection of full-stack resources for programmers.

Charles-Axel Dein 22.3k Dec 30, 2022
4Geeks Academy Full-Stack Developer program final project.

Final Project Chavi, Clara y Pablo 4Geeks Academy Full-Stack Developer program final project. Authors Javier Manteca - Coding - chavisam Clara Rojano

null 1 Feb 5, 2022
PDX Code Guild Full Stack Python Bootcamp starting 2022/02/28

Class Liger Rough Timeline Weeks 1, 2, 3, 4: Python Weeks 5, 6, 7, 8: HTML/CSS/Flask Weeks 9, 10, 11: Javascript Weeks 12, 13, 14, 15: Django Weeks 16

PDX Code Guild 5 Jul 5, 2022
Minos-python - A framework which helps you create reactive microservices in Python

minos-python Summary [TODO] Packages minos-microservice-aggregate minos-microser

Minos Framework 380 Jan 4, 2023
Prophet is a tool to discover resources detailed for cloud migration, cloud backup and disaster recovery

Prophet is a tool to discover resources detailed for cloud migration, cloud backup and disaster recovery

null 22 May 31, 2022
A PowSyBl and Python integration based on GraalVM native image

PyPowSyBl The PyPowSyBl project gives access PowSyBl Java framework to Python developers. This Python integration relies on GraalVM to compile Java co

powsybl 23 Dec 14, 2022
HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures

HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures.

EntySec 8 Nov 9, 2022
🍏 Make Thinc faster on macOS by calling into Apple's native Accelerate library

?? Make Thinc faster on macOS by calling into Apple's native Accelerate library

Explosion 81 Nov 26, 2022