{"id":387,"date":"2020-08-21T08:48:55","date_gmt":"2020-08-21T15:48:55","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sql\/?p=387"},"modified":"2020-08-21T13:26:18","modified_gmt":"2020-08-21T20:26:18","slug":"developing-in-the-cloud-with-sql-server-big-data-clusters-run-and-monitor-apps","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sql\/developing-in-the-cloud-with-sql-server-big-data-clusters-run-and-monitor-apps\/","title":{"rendered":"Developing in the cloud with SQL Server Big Data Clusters: Run and Monitor Apps"},"content":{"rendered":"<p>As the last part of the series of working with big data analytics solutions in Kubernetes, we learned about how to work with cloud-native applications with BDC. Operating and testing are also essential parts as an enterprise-grade solution.<\/p>\n<p>This article will walk you through how to run and monitoring apps to SQL Server Big Data Clusters (BDC).<\/p>\n<h2>Run and test the application<\/h2>\n<p>To run and test the application that we deployed just now, we need to use <strong>azdata app run<\/strong> command, behind the scenes after you log in with <strong>azdata login<\/strong> command, you get a <strong>JWT token<\/strong> which automatically adds to authorization header, when you use <strong>app run<\/strong> command, the traffic went through application proxy which is an endpoint for managing applications deployed inside the big data cluster, and it authenticates users and then routes the requests through to the applications. By assuming your name of the app is called hello-python and we set the current version is v1, followed by the mandatory input message of your choice, you can use the following command to test out your application:<\/p>\n<pre class=\"prettyprint\">azdata app run --name hello-python --version v1 --inputs msg=hellobdc<\/pre>\n<p><code><img decoding=\"async\" class=\"size-medium wp-image-394 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/Comsuming-app-300x189.png\" alt=\"Image Comsuming app\" width=\"300\" height=\"189\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/Comsuming-app-300x189.png 300w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/Comsuming-app.png 667w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\n<\/code><\/p>\n<p>From the <strong>outputParameters<\/strong> which print out the result of the application and the value of <strong>success<\/strong> is <strong>true<\/strong> which means you have executed the application without any runtime exceptions.<\/p>\n<h2>Consume the application programmatically<\/h2>\n<p>BDC provides endpoints that you can access and consume that application using a RESTful web service, the main purpose is to facilities the interaction with other web or mobile applications and being more proactive for those microservices or Marco service architecture. To get the endpoint of your application and for swagger.json, you can use <strong>azdata app describe<\/strong> command:<\/p>\n<pre class=\"prettyprint\">azdata app describe --name hello-python --version v1<\/pre>\n<p>The screen returned by this command will look like the following:<\/p>\n<p>If you want to know more about how to consume the application with Swagger and Postman , you can check <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/big-data-cluster\/big-data-cluster-consume-apps?view=sql-server-ver15\">here<\/a> to get more details.<\/p>\n<h2>Monitoring the application<\/h2>\n<p>Grafana is one of the best cloud-native virtualization tools which can be used to provide various monitoring metrics of your application running in Kubernetes. You can use the following command which will give you the endpoint of Grafana Dashboard.<\/p>\n<pre class=\"prettyprint\">azdata bdc endpoint list --endpoint-name metricsui<\/pre>\n<p>The output will give you the endpoint which you can use your cluster username and password to log in.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-395 size-full\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/grafana-dashboard-endpoint.png\" alt=\"Image grafana dashboard endpoint\" width=\"964\" height=\"175\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/grafana-dashboard-endpoint.png 964w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/grafana-dashboard-endpoint-300x54.png 300w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/grafana-dashboard-endpoint-768x139.png 768w\" sizes=\"(max-width: 964px) 100vw, 964px\" \/><\/p>\n<p>When you open the <strong>dashboard<\/strong>, go to the <strong>Host Apps Metrics<\/strong>, where you\u2019ll get more insights about your application and keep in track.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics.png\"><img decoding=\"async\" class=\"aligncenter wp-image-396 size-large\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics-1024x586.png\" alt=\"Image host apps metrics\" width=\"640\" height=\"366\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics-1024x586.png 1024w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics-300x172.png 300w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics-768x439.png 768w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-apps-metrics.png 1423w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>If you want to get more insight about a single pod of the application ( in case you have multiple copies of your application), you can also go to the <strong>Host Pods Metrics<\/strong> and choose the pod respectively, you\u2019ll get a view of metrics as the following:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics.png\"><img decoding=\"async\" class=\"aligncenter wp-image-397 size-large\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics-1024x609.png\" alt=\"Image host pods metrics\" width=\"640\" height=\"381\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics-1024x609.png 1024w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics-300x178.png 300w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics-768x457.png 768w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2020\/08\/host-pods-metrics.png 1441w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h2>Next Steps<\/h2>\n<p>Everyone\u2019s embracing DevOps nowadays, at Microsoft, we believe it brings people, processes, and technology together so everyone can focus on delivering value in their job. We talk about the end-to-end walkthrough in this article, we can take a step further to talk about more in-depth about how to deploy enterprise-grade applications with Microsoft DevOps tools such as <strong>Azure DevOps ( ADO )<\/strong> or <strong>GitHub Actions<\/strong> as well as how to integrate them with enterprise-grade DevOps process and <strong>The Team Data Science Process (TDSP)<\/strong>. Let\u2019s stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As the last part of the series of working with big data analytics solutions in Kubernetes, we learned about how to work with cloud-native applications with BDC. Operating and testing are also essential parts as an enterprise-grade solution. This article will walk you through how to run and monitoring apps to SQL Server Big Data [&hellip;]<\/p>\n","protected":false},"author":32492,"featured_media":346,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,283,92],"tags":[279,284,278,277],"class_list":["post-387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sql","category-bdc","category-devops","tag-aks","tag-bdc","tag-kubernetes","tag-sql-server-big-data-clusters"],"acf":[],"blog_post_summary":"<p>As the last part of the series of working with big data analytics solutions in Kubernetes, we learned about how to work with cloud-native applications with BDC. Operating and testing are also essential parts as an enterprise-grade solution. This article will walk you through how to run and monitoring apps to SQL Server Big Data [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/users\/32492"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/comments?post=387"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media\/346"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media?parent=387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/categories?post=387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/tags?post=387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}