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.
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.
Clone the code to local laptop
git clone https://github.com/CiscoDevNet/bookinfo-cloudnative-sample
Get Access Key and account details from AppDynamics
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 <access-key> | 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
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
Access app, browse various page & login using 'demo' and 'demo' cred.
This will start sending metrics to AppdAccount
Check Application and Infra monitoring details in AppDynamics account
Register Web Test on ThousandEyes
Python agent for 'Product Page'
AppDynamics Agent for Python is installed using pip package via requirements.txt
Ruby agent for 'Details Service'
AppDynamics Agent for Ruby is installed using Gemfile
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
NodeJS 'Rating' Service
AppDynamics agent for NodeJS are installed using npm install in package.json
Agent configuration are set for following AppDynamics agents configuration Best Practices in kubernetes refer appd.yaml and bookinfo.yaml for details.
Refer Build Document for build instruction.
Owner
Contributors
Categories
Products
AppDynamicsThousandEyesProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community