Every time you deploy an application, you hope that it's efficient and error-free. The reality, however, is usually quite different. You might introduce a bug in a release, overlook an edge case, or rely on a broken dependency. These issues, and others, can result in bad user experiences.
In this guide, you:
- Use the open-source New Relic
demo-deployerto spin up the infrastructure for Acme Telco Lite, a fictional company, and simulate real-world issues in a controlled, demo environment
- Use New Relic to understand those issues from the perspective of a Telco Lite developer
- Use the deployer to tear down the resources you create
Welcome to Acme Telco Lite!
Acme Telco Lite is a mock telecom business that maintains an eCommerce website for its customers. The site's architecture has eight, interconnected microservices, plus a simulator:
The simulator isn't part of the Telco Lite infrastructure, but it is part of the demo deployment. It runs scenarios against the application to create web traffic and generate interesting data in New Relic.
Set up your environment
Before you begin, follow the Prerequisites guide from the deployer's GitHub repository for a detailed walkthrough of how to set up your environment. For this guide, you can choose between Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP) to host your deployment.
The guide steps you through:
- Installing Docker
- Cloning the demo-deployer
- Creating a user config file containing credentials for New Relic and your cloud provider
- Downloading a .pem key file (if your cloud provider is AWS)
Once you're all set up, deploy Acme Telco Lite.
Deploy Telco Lite
It's time to deploy and instrument the Telco Lite services using
demo-deployer. Copy the url for the demo that corresponds to the cloud provider you chose when you set up your environment:
Follow the Deployment guide in the deployer's repository for a thorough explanation of how to use the deployer in a local Docker environment. When you run the deployment script, make sure to pass the url you copied for
NOTE: Since Telco Lite contains several services, the deployment can take over half an hour.
When the deloyer is finished, you should see some output stating that the deployment was successful:
[INFO] Executing Deployment[✔] Parsing and validating Deployment configuration success[✔] Provisioner success[✔] Installing On-Host instrumentation success[✔] Installing Services and instrumentations success[INFO] Deployment successful!Deployed Resources:simuhost (aws/ec2):ip: 18.104.22.168services: ["simulator"]uihost (aws/ec2):ip: 22.214.171.124services: ["webportal", "fluentd"]instrumentation:nr_infra: newrelic v1.12.1backendhost (aws/ec2):ip: 126.96.36.199services: ["promo", "login", "inventory", "plan", "fulfillment", "warehouse", "fluentd"]instrumentation:nr_infra: newrelic v1.12.1reportinghost (aws/ec2):ip: 188.8.131.52services: ["billing", "fluentd"]instrumentation:nr_infra: newrelic v1.12.1Installed Services:simulator:url: http://184.108.40.206:5000webportal:url: http://220.127.116.11:5001instrumentation:nr_node_agent: newrelic v6.11.0nr_logging_in_context: newrelicpromo:url: http://18.104.22.168:8001instrumentation:nr_python_agent: newrelic v22.214.171.124nr_logging_in_context: newreliclogin:url: http://126.96.36.199:8002instrumentation:nr_python_agent: newrelic v188.8.131.52nr_logging_in_context: newrelicinventory:url: http://184.108.40.206:8003instrumentation:nr_python_agent: newrelic v220.127.116.11nr_logging_in_context: newrelicplan:url: http://18.104.22.168:8004instrumentation:nr_python_agent: newrelic v22.214.171.124nr_logging_in_context: newrelicfulfillment:url: http://126.96.36.199:8005instrumentation:nr_python_agent: newrelic v188.8.131.52nr_logging_in_context: newrelicbilling:url: http://184.108.40.206:9001instrumentation:nr_java_agent: newrelic v5.14.0nr_logging_in_context: newrelicnr_logging: newrelicwarehouse:url: http://220.127.116.11:9002instrumentation:nr_python_agent: newrelic v18.104.22.168nr_logging_in_context: newrelicfluentd:url: http://22.214.171.124:9999url: http://126.96.36.199:9999url: http://188.8.131.52:9999Completed at 2020-08-11 11:27:00 -0700[INFO] This deployment summary can also be found in:[INFO] /tmp/telcolite/deploy_summary.txt
After configuring your environment, you only needed two commands (and a bit of patience) to spin up all the Telco Lite services!
View your services
With your services running in the cloud, log in to New Relic and select APM from the top navigation to see how your services are holding up:
Yikes! The alerts, high response times, and red-colored indicators suggest things aren't well. Use New Relic to diagnose these issues, which are simultaneously affecting your services:
- Issue 1: The Warehouse Portal has abnormally high response times
- Issue 2: Multiple services are raising error alerts
Don't worry if you don't see all the same alerts. The simulator triggers issues at regular intervals, so you should start seeing these problems in New Relic within 30 minutes to an hour.
Tear down Telco Lite
When you're finished diagnosing all the issues effecting Telco Lite, follow the Teardown guide in the deployer's repository to tear down the services you created in your cloud provider. If you're still exploring, don't tear down your services, or you'll have to deploy them again later.
Congratulations, you're done! Throughout this tutorial, you:
- Used the
demo-deployerto deploy Telco Lite to the cloud
- Used New Relic to investigate simulated issues in Telco Lite services
- Tore down all the infrastructural resources you created throughout this tutorial
Hopefully, you learned a lot about using New Relic to investigate issues in your services. To get your hands on more features of New Relic, pick another demo from the catalog and spin it up with the deployer!