Running a Microservice Application on DC/OS
Learn how to get a local development cluster running on DC/OS using dcos-vagrant and the dcos-cli.
Join the DZone community and get the full member experience.
Join For FreeThere are multiple methods of deploying a DC/OS cluster, today we’ll be focused on getting a local development cluster running using dcos-vagrant. We’ll also be using the dcos-cli.
The Instana agent and Stan’s Robot Shop is capable of running on any modern laptop with a quad-core processor and 16GB of ram.
Start up the development DC/OS cluster and authenticate through the DC/OS CLI tool:
$ vagrant up
$ dcos auth login
Deploy Stan’s Robot Shop
Return to your command line prompt and change directory into the robot-shop/DCOS folder. Run the deploy.sh script:
$ cd robot-shop/DCOS
$ ./deploy.sh
While you’re waiting for the deployment to complete, this is a good opportunity to install the Instana agent to monitor your sample microservice application.
Deploy the Instana Agent
Next, you’ll need to install the Instana agent. Open the DC/OS web portal in your browser, click the Catalog menu item on the left, search for Instana, click on instana-agent, then click Review & Run. You’ll need to configure your agent key, set agent-zone name and click Review & Run again, then finally click Run Service.
Once the Instana agent is running, you should find a healthy set of services in Services > robotshop in your DC/OS web portal. Click the web service, find the running task, click on it, and then click on the Endpoint hyperlink.
Once you’ve landed on the shop page, feel free to click around, buy some stuff. Once you’re done buying a truckload of squishy Stan's you may notice Instana has automatically discovered all the services we just deployed and is now monitoring them.
As you fill your cart with R2D2s you’ll notice the service map is automatically built and the request is traced end-to-end.
Monitoring Your Applications on DC/OS
Monitoring DC/OS with Instana is so easy, even a K9 robot could do it.
You have reached microservice monitoring Guru status and achieved a Zen-like inner peace not having to worry about how your application is performing. What are you going to do with all the time you have just got back?
Published at DZone with permission of Kevin Crawley, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments