├── .gitattributes ├── .gitignore ├── README.md ├── Samples ├── 001-helloworld │ ├── assets │ │ └── image.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── blank.json ├── 002-hellofunctions │ ├── assets │ │ └── image.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── greet │ │ └── run.csx ├── 003-authorization │ ├── assets │ │ └── image.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── performAuthorizedOperation │ │ ├── project.json │ │ └── run.csx ├── 004-cognitiveservices │ ├── assets │ │ ├── image.png │ │ └── template.index.html │ └── core │ │ ├── Manifest.xml │ │ ├── arm │ │ ├── createCognitiveServicesAccount.json │ │ └── setupCors.json │ │ ├── functions │ │ ├── analyzeFaces │ │ │ ├── function.json │ │ │ ├── project.json │ │ │ └── run.csx │ │ └── createWebsite │ │ │ ├── function.json │ │ │ └── run.csx │ │ └── markdown │ │ ├── Instructions.md │ │ └── Summary.md ├── 005-documentdb │ ├── assets │ │ └── image.png │ └── core │ │ ├── Manifest.xml │ │ ├── arm │ │ ├── documentDb.json │ │ └── publishConnectionStrings.json │ │ ├── functions │ │ └── createDatabase │ │ │ ├── project.json │ │ │ └── run.csx │ │ └── markdown │ │ ├── Instructions.md │ │ └── Summary.md ├── 006-webapp │ ├── assets │ │ └── image.png │ ├── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── deployWebApp.json │ └── src │ │ ├── Common.Build.settings │ │ ├── Common.Build.targets │ │ ├── WebApp │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── WebApp.csproj │ │ ├── favicon.ico │ │ └── index.cshtml │ │ ├── WebApplication.Build.targets │ │ ├── dirs.proj │ │ ├── nugetRestore.cmd │ │ └── packages.config ├── 007-blobupload │ ├── assets │ │ ├── blobs │ │ │ ├── readme.txt │ │ │ └── saw.png │ │ └── image.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── PopulateStorageContainer │ │ └── run.csx ├── 009-twitterstreaming │ ├── assets │ │ ├── dashboards │ │ │ ├── StreamingTweetsDesktop.pbix │ │ │ └── StreamingTweetsEmbedded.pbix │ │ └── image.png │ ├── core │ │ ├── CreateResourcesArm.json │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ └── functions │ │ │ ├── executeSqlQuery │ │ │ ├── project.json │ │ │ └── run.csx │ │ │ └── startStreamingJob │ │ │ ├── project.json │ │ │ └── run.csx │ └── src │ │ ├── build.proj │ │ └── jobs │ │ └── continuous │ │ └── TwitterClient │ │ ├── requirements.txt │ │ ├── run.ps1 │ │ ├── settings.job │ │ └── twitterClient.py ├── 010-azuresqldatabase │ ├── assets │ │ └── azuresqldatabase.png │ └── core │ │ ├── CreateSQLdatabaseArm.json │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ └── Summary.md ├── 011-chickenandegg │ ├── assets │ │ └── chicken.jpg │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── hatch │ │ └── run.csx ├── 012-mlwebsvc │ ├── assets │ │ └── MlWebSvcPattern.JPG │ └── core │ │ ├── Manifest.xml │ │ ├── MlWebSvcInstructions.md │ │ └── MlWebSvcSummary.md ├── 013-mlwebsvcs │ ├── assets │ │ └── MlWebSvcPattern.JPG │ └── core │ │ ├── Manifest.xml │ │ ├── MlWebSvcInstructions.md │ │ └── MlWebSvcSummary.md ├── 014-hellojs │ ├── assets │ │ └── node.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── greet │ │ ├── function.json │ │ └── index.js ├── 015-eggincubator │ ├── assets │ │ ├── chicken-plus-plus.png │ │ ├── dashboard.pbix │ │ └── incubator.jpg │ └── core │ │ ├── Incubator.md │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ ├── functions │ │ ├── hatch │ │ │ ├── SolutionDataTable.csx │ │ │ ├── project.json │ │ │ └── run.csx │ │ └── prepsql │ │ │ ├── prepareDatabase.sql │ │ │ ├── project.json │ │ │ └── run.csx │ │ └── sqlserver.json ├── 016-powershell │ ├── assets │ │ └── KeepCalmPowerShell.jpg │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ └── createWebsite │ │ ├── index.html │ │ └── run.ps1 ├── 017-kafka │ ├── README.md │ ├── assets │ │ ├── kafka.png │ │ └── kafkaArchitecture.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Prereqs.md │ │ ├── README.md │ │ ├── Summary.md │ │ ├── create-linux-based-kafka-spark-cluster-in-vnet-v4.1.json │ │ └── functions │ │ └── CopyScripts │ │ ├── Resources │ │ └── scripts │ │ │ └── notebooks │ │ │ ├── PowerShell │ │ │ └── kafka.ps1 │ │ │ ├── PySpark │ │ │ ├── pySpark+2.0+modeling+MLADS.ipynb │ │ │ └── pySpark_2.0_modeling_MLADS_HDInsight.ipynb │ │ │ └── Streaming │ │ │ ├── Spark-structured-streaming-from-Kafka.ipynb │ │ │ └── Stream-Tweets-To-Kafka.ipynb │ │ ├── project.json │ │ └── run.csx ├── 018-linuxdsvm │ ├── README.md │ ├── assets │ │ ├── DSVMEditionSidebySideComparison.png │ │ ├── DSVMIcon115.png │ │ ├── TakeAFreeTestDrive.png │ │ └── linuxdatasciencevm.png │ └── core │ │ ├── LinuxDataScienceArmTemplate.json │ │ ├── LinuxDataScienceInstructions.md │ │ ├── LinuxDataScienceSummary.md │ │ ├── Manifest.xml │ │ └── PreReqs.md ├── 019-windowsdsvm │ ├── README.md │ ├── assets │ │ ├── DSVMEditionSidebySideComparison.png │ │ ├── DSVMIcon115.png │ │ └── datasciencevm.png │ └── core │ │ ├── DataScienceArmTemplate.json │ │ ├── DataScienceInstructions.md │ │ ├── DataScienceSummary.md │ │ ├── Manifest.xml │ │ └── PreReqs.md ├── 020-pythonflask │ ├── assets │ │ └── image.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── azuredeploy.json ├── 021-polarbear │ ├── assets │ │ ├── 3DMap.xlsx │ │ ├── dashboards │ │ │ ├── PolarBearDesktop.pbix │ │ │ └── PolarBearEmbedded.pbix │ │ ├── polarbear.csv │ │ └── polarcubs.jpg │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ ├── functions │ │ └── prepsql │ │ │ ├── prepareDatabase.sql │ │ │ ├── project.json │ │ │ └── run.csx │ │ └── sqlserver.json ├── 022-twittertimeseriesinsights │ ├── README.md │ ├── assets │ │ ├── dashboards │ │ │ ├── StreamingTweetsDesktop.pbix │ │ │ └── StreamingTweetsEmbedded.pbix │ │ ├── timeseriesinsight.png │ │ └── twittertimeseriesinsights.jpg │ ├── core │ │ ├── CreateResourcesArm.json │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── functions │ │ │ ├── executeSqlQuery │ │ │ ├── project.json │ │ │ └── run.csx │ │ │ └── startStreamingJob │ │ │ ├── project.json │ │ │ └── run.csx │ └── src │ │ ├── build.proj │ │ └── jobs │ │ └── continuous │ │ └── TwitterClient │ │ ├── requirements.txt │ │ ├── run.ps1 │ │ ├── settings.job │ │ └── twitterClient.py ├── 023-mlwebservice │ ├── assets │ │ └── vienna.png │ └── core │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ ├── Summary.md │ │ └── resources.json ├── 024-streamingwithml │ ├── assets │ │ ├── dashboards │ │ │ ├── StreamingTweetsDesktop.pbix │ │ │ └── StreamingTweetsEmbedded.pbix │ │ └── image.png │ └── core │ │ ├── CreateResourcesArm.json │ │ ├── Instructions.md │ │ ├── Manifest.xml │ │ └── functions │ │ ├── eventHubListener │ │ ├── function.json │ │ ├── project.json │ │ └── run.csx │ │ └── executeSqlQuery │ │ ├── project.json │ │ └── run.csx └── README.md └── docs ├── Gemfile ├── README.md ├── _config.yml ├── _includes ├── head.html └── header.html ├── _layouts ├── default.html └── post.html ├── _posts ├── 2017-03-01-release.md ├── 2017-03-23-release.md ├── 2017-03-28-release.md ├── 2017-04-06-release.md ├── 2017-04-14-release.md ├── 2017-05-02-release.md ├── 2017-05-09-release.md ├── 2017-05-16-release.md ├── 2017-05-23-release.md ├── 2017-06-06-release.md ├── 2017-06-13-release.md ├── 2017-06-20-release.md ├── 2017-06-27-release.md ├── 2017-07-05-release.md ├── 2017-07-11-release.md ├── 2017-07-14-release.md ├── 2017-07-31-release.md └── 2017-12-12-release.md ├── _sass └── saw.scss ├── assets └── css │ └── style.scss ├── faq.md ├── getting-started.md ├── images ├── CIG1-e.PNG ├── CIG2-e.PNG ├── CIG3-e.PNG ├── DeployToAzure.PNG ├── bash-jekyll-local.jpg ├── comments.PNG ├── dsvm.PNG ├── error-message.PNG ├── essential-solution-components.jpg ├── faq-1.png ├── faq-2.png ├── faq-3.PNG ├── faq-4.png ├── faq-5.png ├── faq-6.png ├── faq-7.png ├── faq-8.png ├── github-pages-settings.jpg ├── github-pull-request.jpg ├── helloworld-create.jpg ├── helloworld-deployment.jpg ├── helloworld-ready.jpg ├── ingredient-in-ci-gallery.png ├── location.png ├── pbi11-2.png ├── pbi11.png ├── pbi3.png ├── pbi4.png ├── pbi5-2.png ├── pbi5.png ├── pbi6.png ├── pbi7.png ├── pbi8.png ├── pbi9-2.png ├── pbi9.png ├── push-helloworld.gif ├── register.png ├── register2.png ├── register3.png ├── resource-group-empty.jpg ├── samples.jpg ├── saw-legacy.png ├── sawlocal.png ├── sawweb.png ├── sharing.png ├── skus-dynamic.PNG └── switch.png ├── index.md ├── powerbi-configurations.md ├── release-notes.md ├── rest-api.md ├── solution-authoring.md ├── solution-prices.md └── tutorial.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.png binary 3 | *.jpg binary 4 | *.pbix binary 5 | 6 | *.sln text eol=crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | MySolutions/ 3 | NugetPackages/ 4 | *.exe 5 | *.dll 6 | *.zip 7 | obj/ 8 | packages/ 9 | docs/Gemfile.lock 10 | docs/.sass-cache 11 | docs/_site 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Azure Cloud Intelligence Solution Authoring Workspace (SAW) 2 | 3 | This repository contains a community-driven and constantly expanding collection of samples and resources that help shape ideas into ready-to-deploy customizable solutions powered by *Azure* and *Cloud Intelligence Services*. 4 | 5 | *SAW* was built as a development tool to complement the *Cloud Intelligence Solutions* (aka *CIQS*) platform by streamlining the authoring process from the conception of an idea and initial prototyping, to the shipping of a finished product to the end customer. 6 | 7 | Please refer to [our documentation](https://azure.github.io/Azure-CloudIntelligence-SolutionAuthoringWorkspace/) to get started. 8 | 9 | ## Contribute Code or Provide Feedback 10 | 11 | We welcome and highly encourage contributions to the [Samples](Samples) and [Documentation](docs#how-to-contribute). 12 | 13 | * * * 14 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 15 | -------------------------------------------------------------------------------- /Samples/001-helloworld/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/001-helloworld/assets/image.png -------------------------------------------------------------------------------- /Samples/001-helloworld/core/Instructions.md: -------------------------------------------------------------------------------- 1 | Hello world! -------------------------------------------------------------------------------- /Samples/001-helloworld/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/001-helloworld/core/Summary.md: -------------------------------------------------------------------------------- 1 | Just a blank solution. -------------------------------------------------------------------------------- /Samples/001-helloworld/core/blank.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | 5 | "parameters": { 6 | 7 | }, 8 | 9 | "variables": { 10 | 11 | }, 12 | 13 | "resources": [ 14 | 15 | ], 16 | 17 | "outputs": { 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /Samples/002-hellofunctions/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/002-hellofunctions/assets/image.png -------------------------------------------------------------------------------- /Samples/002-hellofunctions/core/Instructions.md: -------------------------------------------------------------------------------- 1 | The function said: **{Outputs.message}** -------------------------------------------------------------------------------- /Samples/002-hellofunctions/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 28 | -------------------------------------------------------------------------------- /Samples/002-hellofunctions/core/Summary.md: -------------------------------------------------------------------------------- 1 | A basic solution with a custom function. -------------------------------------------------------------------------------- /Samples/002-hellofunctions/core/functions/greet/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Net; 4 | 5 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 6 | { 7 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 8 | 9 | string name = parametersReader.GetParameter("name"); 10 | 11 | return new 12 | { 13 | message = $"Hello, {name}!" 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Samples/003-authorization/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/003-authorization/assets/image.png -------------------------------------------------------------------------------- /Samples/003-authorization/core/Instructions.md: -------------------------------------------------------------------------------- 1 | Full management API response: **{Outputs.response}** 2 | 3 | ResourceGroupLocation: **{Outputs.location}** 4 | -------------------------------------------------------------------------------- /Samples/003-authorization/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | -------------------------------------------------------------------------------- /Samples/003-authorization/core/Summary.md: -------------------------------------------------------------------------------- 1 | A basic solution with a custom function. -------------------------------------------------------------------------------- /Samples/003-authorization/core/functions/performAuthorizedOperation/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46": { 4 | "dependencies": { 5 | "Newtonsoft.Json": "8.0.3" 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Samples/003-authorization/core/functions/performAuthorizedOperation/run.csx: -------------------------------------------------------------------------------- 1 | #r "Newtonsoft.Json" 2 | 3 | #load "..\CiqsHelpers\All.csx" 4 | 5 | using System.Net; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | 9 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 10 | { 11 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 12 | 13 | string accessToken = "Bearer " + parametersReader.GetParameter("accessToken"); 14 | var subscriptionId = parametersReader.GetParameter("subscriptionId"); 15 | var resourceGroupName = parametersReader.GetParameter("resourceGroup"); 16 | 17 | var client = new HttpClient(); 18 | client.DefaultRequestHeaders.Add("Authorization", accessToken); 19 | 20 | var url = $"https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?api-version=2016-02-01"; 21 | 22 | var response = await client.GetAsync(url); 23 | 24 | var responseString = await response.Content.ReadAsStringAsync(); 25 | 26 | if (!response.IsSuccessStatusCode) 27 | { 28 | log.Info(responseString); 29 | throw new Exception("API call failed."); 30 | } 31 | 32 | dynamic deserializedResponse = JObject.Parse(responseString); 33 | string location = deserializedResponse.location; 34 | 35 | return new 36 | { 37 | response = responseString, 38 | location = location 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/004-cognitiveservices/assets/image.png -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/arm/createCognitiveServicesAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "variables": { 5 | "name": "faceApi", 6 | "location": "[resourceGroup().location]", 7 | "apiType": "Face", 8 | "sku": "F0", 9 | "apiVersion": "2016-02-01-preview", 10 | "cognitiveServicesAccountResourceId": "[resourceId('Microsoft.CognitiveServices/accounts', variables('name'))]" 11 | }, 12 | "resources": [ 13 | { 14 | "type": "Microsoft.CognitiveServices/accounts", 15 | "sku": { 16 | "name": "[variables('sku')]" 17 | }, 18 | "kind": "[variables('apiType')]", 19 | "name": "[variables('name')]", 20 | "apiVersion": "[variables('apiVersion')]", 21 | "location": "[variables('location')]", 22 | "properties": {} 23 | } 24 | ], 25 | "outputs": { 26 | "cognitiveServicesAccountKey": { 27 | "type": "string", 28 | "value": "[listKeys(variables('cognitiveServicesAccountResourceId'), variables('apiVersion')).key1]" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/arm/setupCors.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "functionAppName": { 6 | "type": "string" 7 | }, 8 | "websiteDomainName": { 9 | "type": "string" 10 | } 11 | }, 12 | "resources": [ 13 | { 14 | "type": "Microsoft.Web/sites", 15 | "kind": "functionapp", 16 | "name": "[parameters('functionAppName')]", 17 | "apiVersion": "2016-03-01", 18 | "location": "[resourceGroup().location]", 19 | "properties": {}, 20 | "resources": [ 21 | { 22 | "type": "config", 23 | "name": "web", 24 | "apiVersion": "2016-03-01", 25 | "properties": { 26 | "cors": { 27 | "allowedOrigins": [ 28 | "https://functions.azure.com", 29 | "https://functions-staging.azure.com", 30 | "https://functions-next.azure.com", 31 | "[parameters('websiteDomainName')]" 32 | ] 33 | } 34 | }, 35 | "dependsOn": [ 36 | "[resourceId('Microsoft.Web/Sites', parameters('functionAppName'))]" 37 | ] 38 | } 39 | ] 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/functions/analyzeFaces/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "authLevel": "anonymous", 5 | "name": "req", 6 | "type": "httpTrigger", 7 | "direction": "in" 8 | }, 9 | { 10 | "name": "$return", 11 | "type": "http", 12 | "direction": "out" 13 | } 14 | ], 15 | "disabled": false 16 | } 17 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/functions/analyzeFaces/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "Microsoft.ProjectOxford.Face": "1.2.1.2" 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/functions/analyzeFaces/run.csx: -------------------------------------------------------------------------------- 1 | #r "System.IO" 2 | #r "System.Runtime" 3 | #r "System.Threading.Tasks" 4 | 5 | using System.Configuration; 6 | using Microsoft.ProjectOxford; 7 | using Microsoft.ProjectOxford.Face; 8 | 9 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 10 | { 11 | var cognitiveServicesAccountKey = ConfigurationManager.AppSettings["CognitiveServicesAccountKey"]; 12 | IFaceServiceClient faceServiceClient = new FaceServiceClient(cognitiveServicesAccountKey); 13 | 14 | string data = await req.Content.ReadAsStringAsync(); 15 | var dataUrlSplit = data.Split(','); 16 | 17 | if (dataUrlSplit.Length != 2) 18 | { 19 | throw new Exception("Invalid image data."); 20 | } 21 | 22 | var base64Data = dataUrlSplit[1]; 23 | var binData = Convert.FromBase64String(base64Data); 24 | 25 | using (var stream = new MemoryStream(binData)) 26 | { 27 | var requiredFaceAttributes = new FaceAttributeType[] { 28 | FaceAttributeType.Age, 29 | FaceAttributeType.Gender, 30 | FaceAttributeType.Smile, 31 | FaceAttributeType.FacialHair, 32 | FaceAttributeType.HeadPose, 33 | FaceAttributeType.Glasses 34 | }; 35 | try 36 | { 37 | return await faceServiceClient.DetectAsync(stream, true, true, requiredFaceAttributes); 38 | } 39 | catch (FaceAPIException e) 40 | { 41 | log.Info(e.ErrorMessage); 42 | throw; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/functions/createWebsite/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "authLevel": "admin", 5 | "name": "req", 6 | "type": "httpTrigger", 7 | "direction": "in" 8 | }, 9 | { 10 | "name": "$return", 11 | "type": "http", 12 | "direction": "out" 13 | } 14 | ], 15 | "disabled": true 16 | } 17 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/functions/createWebsite/run.csx: -------------------------------------------------------------------------------- 1 | #r "Microsoft.WindowsAzure.Storage" 2 | #load "..\CiqsHelpers\All.csx" 3 | 4 | using System.Net; 5 | 6 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 7 | { 8 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 9 | 10 | string templateUrl = parametersReader.GetParameter("templateUrl"); 11 | string storageAccountName = parametersReader.GetParameter("storageAccountName"); 12 | string storageAccountKey = parametersReader.GetParameter("storageAccountKey"); 13 | string apiEndpoint = parametersReader.GetParameter("apiEndpoint"); 14 | string storageContainerName = "$root"; 15 | string storageBlobName = "index.html"; 16 | 17 | string websiteUrl = $"https://{storageAccountName}.blob.core.windows.net/{storageBlobName}"; 18 | 19 | WebClient client = new WebClient(); 20 | var stream = client.OpenRead(templateUrl); 21 | StreamReader reader = new StreamReader(stream); 22 | string htmlTemplate = reader.ReadToEnd(); 23 | 24 | var websiteContent = htmlTemplate.Replace("{apiEndpoint}", apiEndpoint); 25 | 26 | var storageAccountHelper = new CiqsAzureStorageHelper(storageAccountName, storageAccountKey); 27 | 28 | storageAccountHelper.CreateBlobFromText(storageContainerName, storageBlobName, websiteContent); 29 | 30 | return new 31 | { 32 | websiteUrl = websiteUrl 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/markdown/Instructions.md: -------------------------------------------------------------------------------- 1 | ### Your soon-to-be viral APP is ready! 2 | 3 | Congrats! A [demo single-page application]({Outputs.websiteUrl}) connected to the *Cognitive Services Face API* has been successfully created. Needless to say, it can be modified, augmented or completely replaced with something more imaginative. 4 | 5 | **URL**: [{Outputs.websiteUrl}]({Outputs.websiteUrl}) 6 | 7 | -------------------------------------------------------------------------------- /Samples/004-cognitiveservices/core/markdown/Summary.md: -------------------------------------------------------------------------------- 1 | Creating a viral app. -------------------------------------------------------------------------------- /Samples/005-documentdb/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/005-documentdb/assets/image.png -------------------------------------------------------------------------------- /Samples/005-documentdb/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | -------------------------------------------------------------------------------- /Samples/005-documentdb/core/arm/documentDb.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "variables": { 5 | "uniqueNamePrefix": "[toLower(concat(resourceGroup().name, uniqueString(subscription().subscriptionId)))]", 6 | "location": "[resourceGroup().location]", 7 | "databaseAccountName": "[concat(variables('uniqueNamePrefix'), 'addb')]" 8 | }, 9 | "resources": [ 10 | { 11 | "apiVersion": "2015-04-08", 12 | "type": "Microsoft.DocumentDb/databaseAccounts", 13 | "name": "[variables('databaseAccountName')]", 14 | "location": "[variables('location')]", 15 | "properties": { 16 | "name": "[variables('databaseAccountName')]", 17 | "databaseAccountOfferType": "Standard" 18 | } 19 | } 20 | ], 21 | "outputs" : { 22 | "documentDbAccountName" : { 23 | "type": "string", 24 | "value": "[variables('databaseAccountName')]" 25 | }, 26 | "documentDbEndpoint" : { 27 | "type" : "string", 28 | "value" : "[reference(concat('Microsoft.DocumentDb/databaseAccounts/', variables('databaseAccountName'))).documentEndpoint]" 29 | }, 30 | "documentDbPrimaryKey": { 31 | "type": "string", 32 | "value": "[listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', variables('databaseAccountName')), '2015-04-08').primaryMasterKey]" 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Samples/005-documentdb/core/arm/publishConnectionStrings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "functionAppName": { 6 | "type": "string" 7 | }, 8 | "documentDbConnectionString": { 9 | "type": "string" 10 | } 11 | }, 12 | "resources": [ 13 | { 14 | "type": "Microsoft.Web/sites", 15 | "kind": "functionapp", 16 | "name": "[parameters('functionAppName')]", 17 | "apiVersion": "2016-03-01", 18 | "location": "[resourceGroup().location]", 19 | "properties": { 20 | "siteConfig": { 21 | "connectionStrings": [ 22 | { 23 | "ConnectionString": "[parameters('documentDbConnectionString')]", 24 | "Name": "DocumentDb", 25 | "Type": 3 26 | } 27 | ] 28 | } 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /Samples/005-documentdb/core/functions/createDatabase/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "Microsoft.Azure.DocumentDB": "1.11.0" 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Samples/005-documentdb/core/functions/createDatabase/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Configuration; 4 | using System.Text.RegularExpressions; 5 | using Microsoft.Azure.Documents; 6 | using Microsoft.Azure.Documents.Client; 7 | 8 | private static Tuple GetDocumentDbEndpointAndAccessKey() 9 | { 10 | var documentDbConnectionStringSetting = ConfigurationManager.ConnectionStrings["DocumentDb"]; 11 | var connectionString = documentDbConnectionStringSetting.ConnectionString; 12 | Regex r = new Regex(@"^AccountEndpoint=(.*);AccountKey=([^;]*);?$", RegexOptions.IgnoreCase); 13 | 14 | Match m = r.Match(connectionString); 15 | if (!m.Success) 16 | { 17 | throw new Exception("Can't parse the connection string."); 18 | } 19 | 20 | return new Tuple(m.Groups[1].Value, m.Groups[2].Value); 21 | } 22 | 23 | private static async Task CreateOrGetDatabase(DocumentClient client, string databaseId) 24 | { 25 | var databases = client.CreateDatabaseQuery().Where(db => db.Id == databaseId).ToArray(); 26 | if (databases.Any()) 27 | { 28 | return databases.First(); 29 | } 30 | 31 | return await client.CreateDatabaseAsync(new Database { Id = databaseId }); 32 | } 33 | 34 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 35 | { 36 | var credentials = GetDocumentDbEndpointAndAccessKey(); 37 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 38 | string databaseName = parametersReader.GetParameter("databaseName"); 39 | 40 | var client = new DocumentClient(new Uri(credentials.Item1), credentials.Item2); 41 | await CreateOrGetDatabase(client, databaseName); 42 | 43 | return new { 44 | databaseName = databaseName 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /Samples/005-documentdb/core/markdown/Instructions.md: -------------------------------------------------------------------------------- 1 | Dear {UserDisplayName}, 2 | 3 | If you see this, your *DocumentDB* database ```{Outputs.databaseName}``` has been successfully created! 4 | 5 | It can be found [here](https://ms.portal.azure.com/#resource/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup.Name}/providers/Microsoft.DocumentDb/databaseAccounts/{Outputs.documentDbAccountName}/browseCollection). 6 | 7 | Cheers! -------------------------------------------------------------------------------- /Samples/005-documentdb/core/markdown/Summary.md: -------------------------------------------------------------------------------- 1 | Using DocumentDb and Azure Functions. -------------------------------------------------------------------------------- /Samples/006-webapp/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/006-webapp/assets/image.png -------------------------------------------------------------------------------- /Samples/006-webapp/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | ## Your [Sample Web App]({Outputs.websiteUrl}) is ready! -------------------------------------------------------------------------------- /Samples/006-webapp/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | -------------------------------------------------------------------------------- /Samples/006-webapp/core/Summary.md: -------------------------------------------------------------------------------- 1 | This is a Cloud Intelligence Solution SAW (Solution Authoring Workspace) sample that will create a sample web application backed by Microsoft Azure Web Sites -------------------------------------------------------------------------------- /Samples/006-webapp/core/deployWebApp.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "deployPackageUri": { 6 | "type": "string" 7 | } 8 | }, 9 | "variables": { 10 | "uniqueNamePrefix": "[toLower(concat(resourceGroup().name, uniqueString(subscription().subscriptionId)))]", 11 | "location": "[resourceGroup().location]", 12 | "webSiteName": "[concat(variables('uniqueNamePrefix'), 'ws')]", 13 | "hostingPlanName": "[concat(variables('uniqueNamePrefix'), 'hostingplan')]" 14 | }, 15 | "resources": [{ 16 | "name": "[variables('hostingPlanName')]", 17 | "type": "Microsoft.Web/serverfarms", 18 | "location": "[variables('location')]", 19 | "apiVersion": "2014-06-01", 20 | "dependsOn": [], 21 | "tags": { 22 | "displayName": "AppSvcPlan" 23 | }, 24 | "properties": { 25 | "name": "[variables('hostingPlanName')]", 26 | "sku": "Basic", 27 | "workerSize": 0, 28 | "numberOfWorkers": 1 29 | } 30 | }, { 31 | "name": "[variables('webSiteName')]", 32 | "type": "Microsoft.Web/sites", 33 | "location": "[variables('location')]", 34 | "apiVersion": "2015-08-01", 35 | "dependsOn": [ 36 | "[concat('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" 37 | ], 38 | "tags": { 39 | "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]": "Resource", 40 | "displayName": "WebApp" 41 | }, 42 | "properties": { 43 | "name": "[variables('webSiteName')]", 44 | "serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" 45 | }, 46 | "resources": [{ 47 | "apiVersion": "2015-08-01", 48 | "name": "web", 49 | "type": "config", 50 | "dependsOn": [ 51 | "[concat('Microsoft.Web/sites/', variables('webSiteName'))]", 52 | "[concat('Microsoft.Web/sites/', variables('webSiteName'), '/extensions/MSDeploy')]" 53 | ], 54 | "tags": { 55 | "displayName": "WebAppConfig" 56 | }, 57 | "properties": { 58 | "phpVersion": "5.6", 59 | "netFrameworkVersion": "v4.6", 60 | "use32BitWorkerProcess": false, 61 | "webSocketsEnabled": true, 62 | "alwaysOn": false, 63 | "remoteDebuggingEnabled": true, 64 | "remoteDebuggingVersion": "VS2015" 65 | } 66 | }, { 67 | "name": "MSDeploy", 68 | "type": "extensions", 69 | "location": "[variables('location')]", 70 | "apiVersion": "2015-08-01", 71 | "dependsOn": [ 72 | "[concat('Microsoft.Web/sites/', variables('webSiteName'))]" 73 | ], 74 | "tags": { 75 | "displayName": "WebAppMSDeploy" 76 | }, 77 | "properties": { 78 | "packageUri": "[parameters('deployPackageUri')]" 79 | } 80 | }] 81 | }], 82 | "outputs" : 83 | { 84 | "websiteUrl": { 85 | "type": "string", 86 | "value": "[concat('http://', reference(resourceId('Microsoft.Web/Sites', variables('webSiteName'))).hostNames[0])]" 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /Samples/006-webapp/src/Common.Build.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 7 | 8 | 14.0 9 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 10 | 11 | 12 | $(MSBuildProjectDirectory)\..\packages 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/Common.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebApp")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebApp")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("25fdfcc0-a5c1-4690-ae10-f339fdf6f19a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/006-webapp/src/WebApp/favicon.ico -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApp/index.cshtml: -------------------------------------------------------------------------------- 1 | @{ var year = DateTime.Now.Year; } 2 | 3 | 4 | 5 | A sample web application using Microsoft Azure Web Sites 6 | 7 | 8 | 9 | 10 | 11 |

Congrats You have created a Sample Web App

12 |

This is a minimalist "Hello World" HTML page

13 |

Copyright © @year

14 | 15 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/WebApplication.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 7 | 8 | True 9 | True 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/dirs.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/nugetRestore.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | set NUGET_COMMAND=nuget 3 | set APPSERVICE_NUGET_PATH=D:\Program Files (x86)\SiteExtensions\Kudu\63.60712.2926\bin\Scripts\nuget.exe 4 | 5 | IF EXIST %APPSERVICE_NUGET_PATH% ( 6 | set NUGET_COMMAND="%APPSERVICE_NUGET_PATH%" 7 | ) 8 | @echo on 9 | %NUGET_COMMAND% restore -SolutionDirectory ./ 10 | -------------------------------------------------------------------------------- /Samples/006-webapp/src/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/007-blobupload/assets/blobs/readme.txt: -------------------------------------------------------------------------------- 1 | This will be uploaded as a blob along with the image under the same folder. -------------------------------------------------------------------------------- /Samples/007-blobupload/assets/blobs/saw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/007-blobupload/assets/blobs/saw.png -------------------------------------------------------------------------------- /Samples/007-blobupload/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/007-blobupload/assets/image.png -------------------------------------------------------------------------------- /Samples/007-blobupload/core/Instructions.md: -------------------------------------------------------------------------------- 1 | Dear {UserDisplayName}, 2 | 3 | The following blobs have been created in container ```{Outputs.containerName}```: 4 | 5 | ``` 6 | {Outputs.blobsCreated} 7 | ``` -------------------------------------------------------------------------------- /Samples/007-blobupload/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 36 | -------------------------------------------------------------------------------- /Samples/007-blobupload/core/Summary.md: -------------------------------------------------------------------------------- 1 | An example of uploading multiple assets to a storage container as blobs. -------------------------------------------------------------------------------- /Samples/007-blobupload/core/functions/PopulateStorageContainer/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Net; 7 | using System.Threading; 8 | using Microsoft.WindowsAzure.Storage; 9 | using Microsoft.WindowsAzure.Storage.Auth; 10 | using Microsoft.WindowsAzure.Storage.Blob; 11 | 12 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 13 | { 14 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 15 | 16 | string storageAccountName = parametersReader.GetParameter("storageAccountName"); 17 | string storageAccountKey = parametersReader.GetParameter("storageAccountKey"); 18 | string assets = parametersReader.GetParameter("assets"); 19 | string containerName = parametersReader.GetParameter("containerName"); 20 | 21 | var assetUrlList = assets.Split(new char[] {';', ' '}, StringSplitOptions.RemoveEmptyEntries); 22 | 23 | var storageCredentials = new StorageCredentials(storageAccountName, storageAccountKey); 24 | var storageAccount = new CloudStorageAccount(storageCredentials, true); 25 | var storageClient = storageAccount.CreateCloudBlobClient(); 26 | 27 | var container = storageClient.GetContainerReference(containerName); 28 | container.CreateIfNotExists(BlobContainerPublicAccessType.Blob); 29 | 30 | log.Info($"Created container {containerName}"); 31 | 32 | var blobList = new List(); 33 | 34 | foreach (var assetUrl in assetUrlList) 35 | { 36 | Uri uri = new Uri(assetUrl); 37 | string blobName = Path.GetFileName(uri.LocalPath); 38 | 39 | blobList.Add(blobName); 40 | 41 | log.Info($"Copying {assetUrl} as {blobName}"); 42 | 43 | CloudBlockBlob target = container.GetBlockBlobReference(blobName); 44 | 45 | try 46 | { 47 | target.StartCopy(uri); 48 | } 49 | catch (Exception e) 50 | { 51 | return req.CreateResponse(HttpStatusCode.BadRequest, 52 | new { 53 | Message = $"Unable to copy blob {blobName}. \n\n{e.ToString()}" 54 | }); 55 | } 56 | 57 | while (target.CopyState.Status == CopyStatus.Pending) 58 | { 59 | target.FetchAttributes(); 60 | Thread.Sleep(500); 61 | } 62 | 63 | if (target.CopyState.Status == CopyStatus.Success) 64 | { 65 | log.Info($"Done copying {assetUrl} as {blobName}"); 66 | } 67 | else 68 | { 69 | throw new Exception($"Error copying {assetUrl} as {blobName}"); 70 | } 71 | } 72 | 73 | return new { 74 | containerName = containerName, 75 | blobsCreated = string.Join("\r\n", blobList) 76 | }; 77 | } 78 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/assets/dashboards/StreamingTweetsDesktop.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/009-twitterstreaming/assets/dashboards/StreamingTweetsDesktop.pbix -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/assets/dashboards/StreamingTweetsEmbedded.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/009-twitterstreaming/assets/dashboards/StreamingTweetsEmbedded.pbix -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/009-twitterstreaming/assets/image.png -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | [Open the dashboard in a new window]({Outputs.solutionDashboardUrl}). Refresh the browser to see newest data. 4 | 5 | #### Quick links 6 | * [Stream Analysis with Azure ML machine learning web service API manual]({Outputs.webServiceHelpUrl}) 7 | * [Machine Learning Experiment]({Outputs.experimentUrl}) 8 | * [Power BI Desktop .pbix file]({PatternAssetBaseUrl}/dashboards/StreamingTweetsDesktop.pbix) (*Edge 9 | might change the extension to .zip*) 10 | 11 | **Connecting Power BI Desktop to Azure SQL Database** 12 | * Open the Power BI Desktop report and choose **Edit Queries** > **Data Source Settings** > **Change Source** and then paste the Server and Database names from the information below and Click **OK** 13 | * Close the Data Source Settings by clicking **Close** and then click **Refresh** which will prompt you for your Username and Password (Note: Choose **Database** and not Windows) 14 | * Copy and paste your Username and enter the Password (One you entered when deploying the Tutorial) and click **Connect** 15 | 16 | **Azure SQL Database**: Stores the streaming data in table format for access by embedded Power BI. 17 | 18 | Server: {Outputs.sqlServerName}.database.windows.net 19 | Database: {Outputs.sqlDatabaseName} 20 | Username: {Outputs.sqlServerUsername} 21 | Password: \ 22 | 23 | **Change Keywords in Function app settings** 24 | [Open the Function App](https://ms.portal.azure.com/?flight=1#blade/WebsitesExtension/FunctionsIFrameBlade/id/%2Fsubscriptions%2F{SubscriptionId}%2FresourceGroups%2F{ProjectName}%2Fproviders%2FMicrosoft.Web%2Fsites%2F{Outputs.functionAppName}) 25 | 26 | * Click on **Platform features** > **Application setting** > scroll to find **App settings** and then change the values for **TWITTER_KEYWORDS** 27 | * Click **Save** at the top of the App settings blade 28 | * Open the Database in SQL Server Management Studio or Visual Studio and open a **New Query** 29 | * Enter ```truncate table TweetScore``` and click **Execute** (This will remove all the records from you previous key words) -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/core/functions/executeSqlQuery/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/core/functions/executeSqlQuery/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Data.SqlClient; 4 | using Microsoft.SqlServer.Management.Smo; 5 | using Microsoft.SqlServer.Management.Common; 6 | 7 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 8 | { 9 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 10 | string sqlConnectionString = parametersReader.GetParameter("sqlConnectionString"); 11 | string sqlQuery = parametersReader.GetParameter("sqlQuery"); 12 | SqlConnection conn = new SqlConnection(sqlConnectionString); 13 | Server server = new Server(new ServerConnection(conn)); 14 | server.ConnectionContext.ExecuteNonQuery(sqlQuery); 15 | 16 | return null; 17 | } 18 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/core/functions/startStreamingJob/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "Microsoft.Azure.Management.StreamAnalytics": "2.1.0", 6 | "Microsoft.Rest.ClientRuntime.Azure.Authentication": "2.3.1" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/core/functions/startStreamingJob/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Net; 4 | using Microsoft.Azure.Management.StreamAnalytics; 5 | using Microsoft.Azure.Management.StreamAnalytics.Models; 6 | using Microsoft.Rest.Azure.Authentication; 7 | using Microsoft.Rest; 8 | 9 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 10 | { 11 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 12 | string subscriptionId = parametersReader.GetParameter("subscriptionId"); 13 | string authorizationToken = parametersReader.GetParameter("accessToken"); 14 | string resourceGroupName = parametersReader.GetParameter("resourceGroupName"); 15 | string saJobName = parametersReader.GetParameter("saJobName"); 16 | 17 | try 18 | { 19 | StartStreamingJob(subscriptionId, authorizationToken, resourceGroupName, saJobName); 20 | } 21 | catch (Exception e) 22 | { 23 | log.Error("Unable start Stream Analytics Job", e); 24 | return req.CreateResponse( 25 | HttpStatusCode.BadRequest, 26 | new { 27 | Message = $"Unable start Stream Analytics Job {saJobName}. \n\n{e.Message}" 28 | }); 29 | } 30 | 31 | return null; 32 | } 33 | 34 | private static void StartStreamingJob(string subscriptionId, string authorizationToken, string resourceGroupName, string jobName) 35 | { 36 | var credentials = new TokenCredentials(authorizationToken); 37 | using (StreamAnalyticsManagementClient streamClient = new StreamAnalyticsManagementClient(credentials)) 38 | { 39 | streamClient.SubscriptionId = subscriptionId; 40 | 41 | // Start a streaming job 42 | StartStreamingJobParameters jobStartParameters = new StartStreamingJobParameters() 43 | { 44 | OutputStartMode = OutputStartMode.JobStartTime 45 | }; 46 | 47 | streamClient.StreamingJobs.Start(resourceGroupName, jobName, jobStartParameters); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/src/build.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/src/jobs/continuous/TwitterClient/requirements.txt: -------------------------------------------------------------------------------- 1 | azure==1.0.3 2 | tweepy==3.5.0 3 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/src/jobs/continuous/TwitterClient/run.ps1: -------------------------------------------------------------------------------- 1 | $sitePackagesDirectory = 'site-packages' 2 | py -m pip install -t "$sitePackagesDirectory" -r requirements.txt 3 | $env:PYTHONPATH = $(Resolve-Path -Path "$sitePackagesDirectory").Path 4 | py twitterClient.py 5 | -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/src/jobs/continuous/TwitterClient/settings.job: -------------------------------------------------------------------------------- 1 | { 2 | "is_singleton": true 3 | } -------------------------------------------------------------------------------- /Samples/009-twitterstreaming/src/jobs/continuous/TwitterClient/twitterClient.py: -------------------------------------------------------------------------------- 1 | import sys, os, json, re 2 | from tweepy import Stream 3 | from tweepy import OAuthHandler 4 | from tweepy.streaming import StreamListener 5 | from azure.servicebus import ServiceBusService 6 | 7 | class listener(StreamListener): 8 | whitespace_regex = re.compile('\s+') 9 | connection_string_regex = re.compile('^Endpoint=sb://(.+).servicebus.windows.net/;SharedAccessKeyName=(.+);SharedAccessKey=(.+);EntityPath=(.+)$') 10 | 11 | def __init__(self, event_hub_connection_string, keywords): 12 | m = self.connection_string_regex.match(event_hub_connection_string) 13 | self.sbs = ServiceBusService( 14 | m.group(1), 15 | shared_access_key_name=m.group(2), 16 | shared_access_key_value=m.group(3)) 17 | self.keywords = keywords 18 | self.event_hub_name = m.group(4) 19 | 20 | def on_data(self, data): 21 | try: 22 | tweet = json.loads(data) 23 | p = re.compile('\s+') 24 | text =tweet['text'] 25 | for topic in self.get_topics(text, keywords): 26 | output = json.dumps( 27 | { 28 | 'text': text, 29 | 'timestamp_ms': tweet['timestamp_ms'], 30 | 'topic': topic, 31 | 'id': tweet['id'], 32 | 'retweet_count': tweet['retweet_count'], 33 | 'time_zone': tweet['user']['time_zone'], 34 | 'lang': tweet['user']['lang'] 35 | }) 36 | self.sbs.send_event(self.event_hub_name, output) 37 | return True 38 | except BaseException as e: 39 | print('failed ondata' + str(e)) 40 | time.sleep(5) 41 | 42 | def on_error(self, status): 43 | print(status) 44 | 45 | def get_topics(self, input, keywords): 46 | return [keyword for keyword in self.keywords if self.sanitize_text(keyword) in self.sanitize_text(input)] 47 | 48 | def sanitize_text(self, input): 49 | return self.whitespace_regex.sub(' ', input.strip().lower()) 50 | 51 | keywords = os.environ["TWITTER_KEYWORDS"].split(",") 52 | consumer_key_setting = os.environ["TWITTER_OAUTH_CONSUMER_KEY"] 53 | consumer_secret_setting = os.environ["TWITTER_OAUTH_CONSUMER_SECRET"] 54 | oauth_token_setting = os.environ["TWITTER_OAUTH_TOKEN"] 55 | oauth_token_secret_setting = os.environ["TWITTER_OAUTH_TOKEN_SECRET"] 56 | # TODO: need to fix connection string types in AzureFunctionApp. Using MYSQLCONNSTR_ for now, 57 | # which is what they all default to. 58 | # event_hub_connection_string = os.environ["CUSTOMCONNSTR_EventHubConnectionString"] 59 | event_hub_connection_string = os.environ["MYSQLCONNSTR_EventHubConnectionString"] 60 | 61 | auth = OAuthHandler(consumer_key_setting, consumer_secret_setting) 62 | auth.set_access_token(oauth_token_setting, oauth_token_secret_setting) 63 | twitterStream = Stream(auth, listener(event_hub_connection_string, keywords)) 64 | twitterStream.filter(track=keywords) 65 | -------------------------------------------------------------------------------- /Samples/010-azuresqldatabase/assets/azuresqldatabase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/010-azuresqldatabase/assets/azuresqldatabase.png -------------------------------------------------------------------------------- /Samples/010-azuresqldatabase/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | **You can connect to your Azure SQL Database with the following:** 4 | 5 | * ***Server***: _{Outputs.sqlServerName}.database.windows.net_ 6 | * ***Database***: _{Outputs.sqlDatabaseName}_ 7 | * ***Username***: _{Outputs.sqlServerUsername}_ 8 | * ***Password***: _\_ -------------------------------------------------------------------------------- /Samples/010-azuresqldatabase/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /Samples/010-azuresqldatabase/core/Summary.md: -------------------------------------------------------------------------------- 1 | A basic sample/tutorial that creates an Azure SQL Database. -------------------------------------------------------------------------------- /Samples/011-chickenandegg/assets/chicken.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/011-chickenandegg/assets/chicken.jpg -------------------------------------------------------------------------------- /Samples/011-chickenandegg/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Your eggs have successfully hatched! 2 | 3 | **Roosters:** {Outputs.roosters} 4 | 5 | **Hens:** {Outputs.hens} 6 | 7 | These numbers are also reflected in the AppSettings of the 8 | [Function app](https://ms.portal.azure.com/#resource/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup.Name}/providers/Microsoft.Web/sites/{Outputs.functionAppName}/application). -------------------------------------------------------------------------------- /Samples/011-chickenandegg/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/011-chickenandegg/core/Summary.md: -------------------------------------------------------------------------------- 1 | A sample solution that demonstrates how to use **<AzureFunctions>**. -------------------------------------------------------------------------------- /Samples/011-chickenandegg/core/functions/hatch/run.csx: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using System.Net; 4 | 5 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 6 | { 7 | var eggCount = int.Parse(ConfigurationManager.AppSettings.Get("EggCount")); 8 | var sexRatioString = ConfigurationManager.AppSettings.Get("SexRatio"); 9 | 10 | double sexRatio = 0; 11 | 12 | var parts = sexRatioString.Split(':'); 13 | 14 | try 15 | { 16 | sexRatio = Double.Parse(parts[0])/Double.Parse(parts[1]); 17 | } 18 | catch (Exception) 19 | { 20 | return req.CreateResponse(HttpStatusCode.BadRequest, $"Invalid sex ratio provided: {sexRatioString}"); 21 | } 22 | 23 | var roosterCount = 0; 24 | 25 | Random rnd = new Random(); 26 | 27 | for (int i = 0; i < eggCount; i++) 28 | { 29 | var r = rnd.NextDouble(); 30 | if (r / (1 - r) < sexRatio) 31 | { 32 | roosterCount++; 33 | } 34 | } 35 | 36 | return new 37 | { 38 | roosters = roosterCount, 39 | hens = eggCount - roosterCount 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /Samples/012-mlwebsvc/assets/MlWebSvcPattern.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/012-mlwebsvc/assets/MlWebSvcPattern.JPG -------------------------------------------------------------------------------- /Samples/012-mlwebsvc/core/Manifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 24 | -------------------------------------------------------------------------------- /Samples/012-mlwebsvc/core/MlWebSvcInstructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | 1. Your [Machine Learning Web Service]({Outputs.webServiceHelpUrl}) has been successfully deployed. 4 | 5 | _Web Service API key_ 6 | ``` 7 | {Outputs.webServiceApiKey} 8 | ``` 9 | 10 | 2. You can view your experiments by navigating to your [Machine Learning Workspace]({Outputs.mlListExperimentsUrl}). 11 | -------------------------------------------------------------------------------- /Samples/012-mlwebsvc/core/MlWebSvcSummary.md: -------------------------------------------------------------------------------- 1 | This pattern demonstrates how to create a Machine Learning Workspace, copy an Experiment into it and deploy it as a Web service. 2 | 3 | The pattern involves the following two steps: 4 | 5 | 1. Deploy an ARM template which creates a Storage Account, a Machine Learning Workspace and an Azure Function App Service. 6 | 2. Invoke the Azure Function App Service. This Function App Service does the following: 7 | * Copy an Experiment from the Cloud Intelligence Gallery into the new Machine Learning Workspace. 8 | * Run the Experiment. 9 | * Deploy the Experiment as Machine Learning Web Service. 10 | * Return the URLs for the Experiment and the Web Service, as well as the API Key for the Web Service. 11 | 12 | -------------------------------------------------------------------------------- /Samples/013-mlwebsvcs/assets/MlWebSvcPattern.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/013-mlwebsvcs/assets/MlWebSvcPattern.JPG -------------------------------------------------------------------------------- /Samples/013-mlwebsvcs/core/Manifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 50 | -------------------------------------------------------------------------------- /Samples/013-mlwebsvcs/core/MlWebSvcInstructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | 1. Your [Machine Learning Web Services]({Outputs.mlListExperimentsUrl}) has been successfully deployed. 4 | 5 | _Web Service API key 1_ 6 | ``` 7 | {Outputs.mlFunctionApiKey1} 8 | ``` 9 | _Web Service API key 2_ 10 | ``` 11 | {Outputs.mlFunctionApiKey2} 12 | ``` 13 | _Web Service API key 3_ 14 | ``` 15 | {Outputs.webServiceApiKey} 16 | ``` 17 | 18 | 2. You can view your experiments by navigating to your [Machine Learning Workspace]({Outputs.mlListExperimentsUrl}). 19 | -------------------------------------------------------------------------------- /Samples/013-mlwebsvcs/core/MlWebSvcSummary.md: -------------------------------------------------------------------------------- 1 | This pattern demonstrates how to create a Machine Learning Workspace, copy an Experiment into it and deploy it as a Web service. 2 | 3 | The pattern involves the following two steps: 4 | 5 | 1. Deploy an ARM template which creates a Storage Account, a Machine Learning Workspace and an Azure Function App Service. 6 | 2. Invoke the Azure Function App Service. This Function App Service does the following: 7 | * Copy an Experiment from the Cloud Intelligence Gallery into the new Machine Learning Workspace. 8 | * Run the Experiment. 9 | * Deploy the Experiment as Machine Learning Web Service. 10 | * Return the URLs for the Experiment and the Web Service, as well as the API Key for the Web Service. 11 | 12 | -------------------------------------------------------------------------------- /Samples/014-hellojs/assets/node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/014-hellojs/assets/node.png -------------------------------------------------------------------------------- /Samples/014-hellojs/core/Instructions.md: -------------------------------------------------------------------------------- 1 | The NodeJS function said: **{Outputs.message}** -------------------------------------------------------------------------------- /Samples/014-hellojs/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | -------------------------------------------------------------------------------- /Samples/014-hellojs/core/Summary.md: -------------------------------------------------------------------------------- 1 | A basic solution with a NodeJS custom function. -------------------------------------------------------------------------------- /Samples/014-hellojs/core/functions/greet/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "authLevel": "anonymous", 5 | "type": "httpTrigger", 6 | "direction": "in", 7 | "name": "req", 8 | "methods": [ 9 | "get", 10 | "post" 11 | ] 12 | }, 13 | { 14 | "type": "http", 15 | "direction": "out", 16 | "name": "res" 17 | } 18 | ], 19 | "disabled": false 20 | } -------------------------------------------------------------------------------- /Samples/014-hellojs/core/functions/greet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (context, req) { 2 | context.log('JavaScript HTTP trigger function processed a request.'); 3 | 4 | var name = context.bindings.req.body.name; 5 | 6 | context.bindings.res = { message: 'Hello, ' + name + '!' }; 7 | 8 | context.done(); 9 | }; -------------------------------------------------------------------------------- /Samples/015-eggincubator/assets/chicken-plus-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/015-eggincubator/assets/chicken-plus-plus.png -------------------------------------------------------------------------------- /Samples/015-eggincubator/assets/dashboard.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/015-eggincubator/assets/dashboard.pbix -------------------------------------------------------------------------------- /Samples/015-eggincubator/assets/incubator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/015-eggincubator/assets/incubator.jpg -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/Incubator.md: -------------------------------------------------------------------------------- 1 | You are running a private egg incubator. 2 | 3 | ![]({PatternAssetBaseUrl}\incubator.jpg) -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Your eggs have successfully hatched! 2 | 3 | You can see your dashboard [here]({Outputs.solutionDashboardUrl}). 4 | -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/Summary.md: -------------------------------------------------------------------------------- 1 | A sample solution that demonstrates how to visualize data with a PowerBI dashboard. 2 | 3 | This solution is the output of the SAW [tutorial](https://azure.github.io/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tutorial.html). -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/hatch/SolutionDataTable.csx: -------------------------------------------------------------------------------- 1 | using Microsoft.SqlServer.Management.Smo; 2 | using Microsoft.SqlServer.Management.Common; 3 | using System.IO; 4 | using System.Data; 5 | using System.Data.SqlClient; 6 | 7 | public class SolutionDataTable 8 | { 9 | private DataTable table; 10 | private string sqlConnectionString; 11 | 12 | public SolutionDataTable(string sqlConnectionString) 13 | { 14 | this.sqlConnectionString = sqlConnectionString; 15 | this.table = this.MakeTable(); 16 | } 17 | 18 | public void AddMetric(DateTime timestamp, string metricName, Decimal metricValue) 19 | { 20 | DataRow newRow = table.NewRow(); 21 | newRow["InputTimestamp"] = timestamp; 22 | newRow["MetricName"] = metricName; 23 | newRow["MetricValue"] = metricValue; 24 | this.table.Rows.Add(newRow); 25 | } 26 | 27 | public void Commit() 28 | { 29 | this.table.AcceptChanges(); 30 | 31 | using (var connection = new SqlConnection(sqlConnectionString)) 32 | { 33 | connection.Open(); 34 | using (SqlBulkCopy bulkCopy = new SqlBulkCopy(connection)) 35 | { 36 | bulkCopy.DestinationTableName = "dbo.SolutionData"; 37 | bulkCopy.WriteToServer(table); 38 | } 39 | } 40 | } 41 | 42 | private DataTable MakeTable() 43 | { 44 | DataTable solutionDataTable = new DataTable("SolutionData"); 45 | 46 | DataColumn inputTimestamp = new DataColumn(); 47 | inputTimestamp.DataType = System.Type.GetType("System.DateTime"); 48 | inputTimestamp.ColumnName = "InputTimestamp"; 49 | solutionDataTable.Columns.Add(inputTimestamp); 50 | 51 | DataColumn metricName = new DataColumn(); 52 | metricName.DataType = System.Type.GetType("System.String"); 53 | metricName.ColumnName = "MetricName"; 54 | solutionDataTable.Columns.Add(metricName); 55 | 56 | DataColumn metricValue = new DataColumn(); 57 | metricValue.DataType = System.Type.GetType("System.Decimal"); 58 | metricValue.ColumnName = "MetricValue"; 59 | solutionDataTable.Columns.Add(metricValue); 60 | 61 | DataColumn[] keys = new DataColumn[] { inputTimestamp, metricName }; 62 | solutionDataTable.PrimaryKey = keys; 63 | 64 | return solutionDataTable; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/hatch/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/hatch/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | #load "SolutionDataTable.csx" 3 | 4 | using System; 5 | using System.Configuration; 6 | using System.Net; 7 | 8 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 9 | { 10 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 11 | string sqlConnectionString = parametersReader.GetParameter("sqlConnectionString"); 12 | 13 | var eggCount = int.Parse(ConfigurationManager.AppSettings.Get("EggCount")); 14 | var sexRatioString = ConfigurationManager.AppSettings.Get("SexRatio"); 15 | 16 | var experimentCount = int.Parse(parametersReader.GetParameter("experimentCount")); 17 | 18 | double sexRatio = 0; 19 | 20 | var parts = sexRatioString.Split(':'); 21 | 22 | try 23 | { 24 | sexRatio = Double.Parse(parts[0])/Double.Parse(parts[1]); 25 | } 26 | catch (Exception) 27 | { 28 | return req.CreateResponse(HttpStatusCode.BadRequest, $"Invalid sex ratio provided: {sexRatioString}"); 29 | } 30 | 31 | 32 | var dataTable = new SolutionDataTable(sqlConnectionString); 33 | var now = DateTime.Now; 34 | 35 | Random rnd = new Random(); 36 | 37 | while (experimentCount-- > 0) 38 | { 39 | var roosterCount = 0; 40 | 41 | for (int i = 0; i < eggCount; i++) 42 | { 43 | var r = rnd.NextDouble(); 44 | if (r / (1 - r) < sexRatio) 45 | { 46 | roosterCount++; 47 | } 48 | } 49 | 50 | var henCount = eggCount - roosterCount; 51 | var metricTimestamp = now.AddDays(-experimentCount); 52 | 53 | dataTable.AddMetric(metricTimestamp, "Hens", henCount); 54 | dataTable.AddMetric(metricTimestamp, "Roosters", roosterCount); 55 | } 56 | 57 | dataTable.Commit(); 58 | 59 | return null; 60 | } 61 | -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/prepsql/prepareDatabase.sql: -------------------------------------------------------------------------------- 1 | IF NOT EXISTS(SELECT name from sys.tables WHERE name = N'SolutionData') 2 | BEGIN 3 | CREATE TABLE [dbo].[SolutionData]( 4 | [InputTimestamp] [datetime] NOT NULL, 5 | [MetricName] [varchar](800) NOT NULL, 6 | [MetricValue] [float] NOT NULL, 7 | CONSTRAINT [PK_SolutionsData_InputTimestamp_MetricName] PRIMARY KEY CLUSTERED 8 | ( 9 | [InputTimestamp] ASC, 10 | [MetricName] ASC 11 | ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) 12 | ) 13 | END 14 | GO 15 | -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/prepsql/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/functions/prepsql/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using Microsoft.SqlServer.Management.Smo; 7 | using Microsoft.SqlServer.Management.Common; 8 | using System.IO; 9 | using System.Data.SqlClient; 10 | 11 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 12 | { 13 | 14 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 15 | 16 | string sqlConnectionString = parametersReader.GetParameter("sqlConnectionString"); 17 | 18 | string script = File.ReadAllText(@"d:\home\site\wwwroot\prepsql\prepareDatabase.sql"); 19 | 20 | SqlConnection conn = new SqlConnection(sqlConnectionString); 21 | 22 | Server server = new Server(new ServerConnection(conn)); 23 | 24 | server.ConnectionContext.ExecuteNonQuery(script); 25 | 26 | return new object(); 27 | } -------------------------------------------------------------------------------- /Samples/015-eggincubator/core/sqlserver.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "sqlServerUsername": { 6 | "metadata": { 7 | "description": "Username for SQL Server that will be created for results database (minimum 3 characters)" 8 | }, 9 | "type": "string", 10 | "minLength": 3 11 | }, 12 | "sqlServerPassword": { 13 | "metadata": { 14 | "description": "Password for SQL Server that will be created for results database" 15 | }, 16 | "type": "securestring", 17 | "minLength": 8 18 | } 19 | }, 20 | "variables": { 21 | "uniqueString": "[uniqueString(concat(subscription().subscriptionId, resourceGroup().name))]", 22 | 23 | "sqlServer": "[concat(variables('uniqueString'),'srv')]", 24 | "sqlDatabase": "[concat(variables('uniqueString'),'db')]", 25 | "sqlServerUsername": "[parameters('sqlServerUsername')]", 26 | "sqlServerPassword": "[parameters('sqlServerPassword')]", 27 | "startIpAddress": "0.0.0.0", 28 | "endIpAddress": "255.255.255.255", 29 | "sqlServerVersion": "12.0", 30 | "edition": "Standard", 31 | "databaseTier": "S1", 32 | "collation": "SQL_Latin1_General_CP1_CI_AS", 33 | "maxSizeBytes": "2147483648", 34 | "sqlSvrResourceId": "[resourceId('Microsoft.Sql/servers', variables('sqlServer'))]", 35 | "sqlDbResourceId": "[resourceId('Microsoft.Sql/servers/databases', variables('sqlServer'), variables('sqlDatabase'))]" 36 | }, 37 | "resources": [ 38 | { 39 | "name": "[variables('sqlServer')]", 40 | "type": "Microsoft.Sql/servers", 41 | "location": "[resourceGroup().location]", 42 | "apiVersion": "2014-04-01-preview", 43 | "properties": { 44 | "administratorLogin": "[variables('sqlServerUsername')]", 45 | "administratorLoginPassword": "[variables('sqlServerPassword')]", 46 | "version": "[variables('sqlServerVersion')]" 47 | }, 48 | "resources": [ 49 | { 50 | "name": "[variables('sqlDatabase')]", 51 | "type": "databases", 52 | "location": "[resourceGroup().location]", 53 | "apiVersion": "2014-04-01-preview", 54 | "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServer'))]" ], 55 | "properties": { 56 | "edition": "[variables('edition')]", 57 | "requestedServiceObjectiveName": "[variables('databaseTier')]", 58 | "collation": "[variables('collation')]", 59 | "maxSizeBytes": "[variables('maxSizeBytes')]" 60 | } 61 | }, 62 | { 63 | "apiVersion": "2014-04-01-preview", 64 | "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServer'))]" ], 65 | "location": "[resourceGroup().location]", 66 | "name": "AllowAllWindowsAzureIps", 67 | "properties": { 68 | "startIpAddress": "[variables('startIpAddress')]", 69 | "endIpAddress": "[variables('endIpAddress')]" 70 | }, 71 | "type": "firewallrules" 72 | } 73 | ] 74 | } 75 | ], 76 | "outputs": { 77 | "sqlServer": { 78 | "type": "string", 79 | "value": "[variables('sqlServer')]" 80 | }, 81 | "sqlDatabase": { 82 | "type": "string", 83 | "value": "[variables('sqlDatabase')]" 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Samples/016-powershell/assets/KeepCalmPowerShell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/016-powershell/assets/KeepCalmPowerShell.jpg -------------------------------------------------------------------------------- /Samples/016-powershell/core/Instructions.md: -------------------------------------------------------------------------------- 1 | Your webpage has been created and is available at [{Outputs.url}]({Outputs.url}). 2 | 3 | [Azure PowerShell cmdlets documentation](https://docs.microsoft.com/en-us/powershell/azure/overview?view=azurermps-4.0.0). -------------------------------------------------------------------------------- /Samples/016-powershell/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/016-powershell/core/Summary.md: -------------------------------------------------------------------------------- 1 | An example of running PowerShell code with Azure authorization as a CIQS provisioning step. 2 | 3 | This sample will create a simple static website via PowerShell. -------------------------------------------------------------------------------- /Samples/016-powershell/core/functions/createWebsite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | A web page page uploaded with PowerShell. 9 | 10 | 11 | 12 |
13 |
14 |

A simple static website

15 |
16 |

This page was created via an Azure Function written in Windows PowerShell!

17 |
18 |
19 |
20 | Learn more about SAW and Cloud Intelligence Solutions at https://aka.ms/cisaw. 21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /Samples/016-powershell/core/functions/createWebsite/run.ps1: -------------------------------------------------------------------------------- 1 | # read function input parameters passed by CIQS 2 | $input = (Get-Content $req) -join "`n" | ConvertFrom-Json 3 | 4 | # use AccessToken from CIQS input parameters along with environment variables created from AppSettings 5 | # to log into the Azure account 6 | Add-AzureRmAccount -AccessToken $input.accessToken -AccountId $env:AccountId -SubscriptionId $env:SubscriptionId 7 | 8 | $resourceGroupName = $input.resourceGroupName 9 | $storageAccountName = $input.storageAccountName 10 | 11 | $storageKey = (Get-AzureRmStorageAccountKey -Name $storageAccountName -ResourceGroupName $resourceGroupName).Value[0] 12 | $storageContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageKey 13 | 14 | New-AzureStorageContainer -Name "`$root" -Context $storageContext -Permission Container 15 | Set-AzureStorageBlobContent -Context $storageContext -Container "`$root" -File $env:HOME\site\wwwroot\createWebsite\index.html -Blob index.html 16 | 17 | # return output values 18 | $output = @{ 19 | url = "https://" + $storageAccountName + ".blob.core.windows.net/index.html" 20 | } 21 | $output | ConvertTo-Json | Out-File $res 22 | -------------------------------------------------------------------------------- /Samples/017-kafka/README.md: -------------------------------------------------------------------------------- 1 | ### Welcome to the Microsoft Cloud Intelligence Solution Template - Spark with Kafka (preview) on HDInsight 2 | 3 | 4 | [![Deploy to Azure](https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/master/docs/images/DeployToAzure.PNG)](https://quickstart.azure.ai/track/Deployments/new/kafka?source=GitHub) 5 | 6 | [View Deployed Solution](https://quickstart.azure.ai/Deployments?type=kafka) 7 | 8 | ## Architecure 9 | [![Solution Diagram](assets/kafkaArchitecture.png)](assets/kafkaArchitecture.png) 10 | 11 | This Tutorial demonstrates how to use Spark with Kafka (preview) on HDInsight 12 | 13 | While you can create an Azure virtual network, Kafka, and Spark clusters manually, it's easier to use a Cloud Intelligence Solution Template which deploys the clusters using an Azure Resource Manager template and Azure Functions. 14 | Use the following steps to deploy an Azure virtual network, Kafka, and Spark clusters to your Azure subscription. 15 | 16 | The tutorial involves the following steps: 17 | 18 | 1. Deploy the Spark with Kafka (preview) on HDInsight tutorial which creates the following resources: 19 | * Kafka on HDInsight 3.5 cluster 20 | * Spark on HDInsight 3.6 cluster 21 | * Azure Virtual Network, which contains the HDInsight clusters 22 | 23 | 2. Learn how to use Spark Structured Streaming to read data from Apache Kafka on Azure HDInsight. 24 | Spark structured streaming is a stream processing engine built on Spark SQL. It allows you to express streaming computations the same as batch computation on static data. For more information on Structured Streaming, see the Structured Streaming Programming Guide [Alpha] at Apache.org. 25 | 26 | [Use Spark Structured Streaming with Kafka (preview) on HDInsight](https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-apache-kafka-spark-structured-streaming#get-the-kafka-brokers) 27 | 28 | 3. Learn how to use Spark Apache Spark to stream data into or out of Apache Kafka on HDInsight using DStreams. This example uses a Jupyter notebook that runs on the Spark cluster. 29 | 30 | [Apache Spark streaming (DStream) example with Kafka (preview) on HDInsight](https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-apache-spark-with-kafka#a-idkafkahostsakafka-host-information) 31 | 32 | [Apache Hadoop®](http://hadoop.apache.org/) and associated open source project names are trademarks of [The Apache Software Foundation](http://apache.org/). 33 | -------------------------------------------------------------------------------- /Samples/017-kafka/assets/kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/017-kafka/assets/kafka.png -------------------------------------------------------------------------------- /Samples/017-kafka/assets/kafkaArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/017-kafka/assets/kafkaArchitecture.png -------------------------------------------------------------------------------- /Samples/017-kafka/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 36 | -------------------------------------------------------------------------------- /Samples/017-kafka/core/Prereqs.md: -------------------------------------------------------------------------------- 1 | This pattern requires **46** HDInsight cores to operate. Ensure adequate cores are available before provisioning. Refer [here](https://azure.microsoft.com/en-us/pricing/details/hdinsight/) for details on HDInsight Pricing. 2 | -------------------------------------------------------------------------------- /Samples/017-kafka/core/README.md: -------------------------------------------------------------------------------- 1 | # kafka 2 | -------------------------------------------------------------------------------- /Samples/017-kafka/core/Summary.md: -------------------------------------------------------------------------------- 1 | This Tutorial demonstrates how to use Spark with Kafka (preview) on HDInsight 2 | 3 | While you can create an Azure virtual network, Kafka, and Spark clusters manually, it's easier to use a Cloud Intelligence Solution Template which deploys the clusters using an Azure Resource Manager template and Azure Functions. 4 | Use the following steps to deploy an Azure virtual network, Kafka, and Spark clusters to your Azure subscription. 5 | 6 | The tutorial involves the following steps: 7 | 8 | 1. Deploy the Spark with Kafka (preview) on HDInsight tutorial which creates the following resources: 9 | * Kafka on HDInsight 3.5 cluster 10 | * Spark on HDInsight 3.6 cluster 11 | * Azure Virtual Network, which contains the HDInsight clusters 12 | 13 | 2. Learn how to use Spark Structured Streaming to read data from Apache Kafka on Azure HDInsight. 14 | Spark structured streaming is a stream processing engine built on Spark SQL. It allows you to express streaming computations the same as batch computation on static data. For more information on Structured Streaming, see the Structured Streaming Programming Guide [Alpha] at Apache.org. 15 | 16 | [Use Spark Structured Streaming with Kafka (preview) on HDInsight](https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-apache-kafka-spark-structured-streaming#get-the-kafka-brokers) 17 | 18 | 3. Learn how to use Spark Apache Spark to stream data into or out of Apache Kafka on HDInsight using DStreams. This example uses a Jupyter notebook that runs on the Spark cluster. 19 | 20 | [Apache Spark streaming (DStream) example with Kafka (preview) on HDInsight](https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-apache-spark-with-kafka#a-idkafkahostsakafka-host-information) 21 | 22 | ## Architecure 23 | [![Solution Diagram]({PatternAssetBaseUrl}/kafkaArchitecture.png)]({PatternAssetBaseUrl}/kafkaArchitecture.png) 24 | 25 | [Apache Hadoop®](http://hadoop.apache.org/) and associated open source project names are trademarks of [The Apache Software Foundation](http://apache.org/). -------------------------------------------------------------------------------- /Samples/017-kafka/core/functions/CopyScripts/Resources/scripts/notebooks/PowerShell/kafka.ps1: -------------------------------------------------------------------------------- 1 | $creds = Get-Credential -UserName "darwin" -Message "Enter the HDInsight login" 2 | $clusterName = Read-Host -Prompt "Enter the Kafka cluster name" 3 | $resp = Invoke-WebRequest -Uri "https://$clusterName.azurehdinsight.net/api/v1/clusters/$clusterName/services/KAFKA/components/KAFKA_BROKER" ` 4 | -Credential $creds 5 | $respObj = ConvertFrom-Json $resp.Content 6 | $brokerHosts = $respObj.host_components.HostRoles.host_name 7 | ($brokerHosts -join ":9092,") + ":9092" -------------------------------------------------------------------------------- /Samples/017-kafka/core/functions/CopyScripts/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "EntityFramework": "6.1.3", 6 | "Microsoft.Data.Edm": "5.6.2", 7 | "Microsoft.Data.OData": "5.6.2", 8 | "Microsoft.Data.Services.Client": "5.6.2", 9 | "Microsoft.WindowsAzure.ConfigurationManager": "1.8.0.0", 10 | "Newtonsoft.Json": "7.0.1", 11 | "System.Spatial": "5.6.2", 12 | "WindowsAzure.Storage": "6.2.0" 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/README.md: -------------------------------------------------------------------------------- 1 | ### Welcome to the Microsoft Cloud Intelligence Solution Template - Linux Data Science Virtual Machine (DSVM) 2 | 3 | 4 | [![Deploy to Azure](https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/master/docs/images/DeployToAzure.PNG)](https://quickstart.azure.ai/track/Deployments/new/linuxdatasciencevm?source=GitHub) 5 | 6 | [View Deployed Solution](https://quickstart.azure.ai/Deployments?type=linuxdatasciencevm) 7 | 8 | 9 | 10 | [![Take a free test drive](https://caqsres.blob.core.windows.net/linuxdatasciencevm/TakeAFreeTestDrive.png)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu?tab=Overview) 11 | 12 | > **STOP before you proceed to Deploy** You need to accept the Terms of Use of the Data Science Virtual Machine for Linux (Ubuntu) on your Azure Subscription before you deploy this VM the first time by clicking [here](https://portal.azure.com/#blade/Microsoft_Azure_Marketplace/LegalTermsSkuProgrammaticAccessBlade/legalTermsSkuProgrammaticAccessData/%7B%22product%22%3A%7B%22publisherId%22%3A%22microsoft-ads%22%2C%22offerId%22%3A%22linux-data-science-vm-ubuntu%22%2C%22planId%22%3A%22linuxdsvmubuntu%22%7D%7D). **This does not apply to free test drive.** 13 | 14 | The Data Science Virtual machine for Linux (DSVM) is a custom Azure VM built on Ubuntu 16.04 with many popular tools for data science modeling/development, including: 15 | 16 | * Microsoft R Open 17 | * Microsoft R Server Developer Edition 18 | * Anaconda Python 19 | * JupyterHub, a multiuser Jupyter notebooks server supporting Python and R 20 | * Azure tools and libraries to access various Azure services like AzureML, databases, and big data services 21 | * ML and Deep learning tools like xgboost and LightGBM 22 | * Deep learning tools like CNTK, TensorFlow, Caffe, Caffe2, mxnet, Theano, Torch, and more 23 | 24 | The documentation has a [full list of available tools]((https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-virtual-machine-overview) and [more information](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-dsvm-ubuntu-intro) on the Ubuntu VM. 25 | 26 | If are wondering about things you can do with the DSVM read the [How-To Guide to the Data Science Virtual Machine for Linux](https://azure.microsoft.com/documentation/articles/machine-learning-data-science-linux-dsvm-walkthrough/). 27 | -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/assets/DSVMEditionSidebySideComparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/018-linuxdsvm/assets/DSVMEditionSidebySideComparison.png -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/assets/DSVMIcon115.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/018-linuxdsvm/assets/DSVMIcon115.png -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/assets/TakeAFreeTestDrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/018-linuxdsvm/assets/TakeAFreeTestDrive.png -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/assets/linuxdatasciencevm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/018-linuxdsvm/assets/linuxdatasciencevm.png -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/core/LinuxDataScienceInstructions.md: -------------------------------------------------------------------------------- 1 | ## Accessing your VM 2 | 3 | You can access your newly created Data Science VM for Linux in several ways. 4 | 5 | #### Terminal 6 | 7 | Use the following credentials to log in: 8 | 9 | * *VM Name*: {Outputs.vmName} 10 | * *Admin Username*: {Outputs.adminUsername} 11 | * *SSH Command*: {Outputs.sshConnection} 12 | 13 | #### X2Go Client 14 | 15 | You can download The X2Go client from the [X2Go site](http://wiki.x2go.org/doku.php/start). 16 | 17 | * *Host*: {Outputs.dnsName} 18 | * *Login*: {Outputs.adminUsername} 19 | * *SSH port*: 22 20 | * *Session Type*: Change the value to _XFCE_ 21 | 22 | #### PuTTY 23 | 24 | You can download PuTTY from the [PuTTY site](http://www.putty.org/). 25 | 26 | * *Host Name*: {Outputs.dnsName} 27 | * *Port*: 22 28 | * *Connection Type*: SSH 29 | * *login as*: {Outputs.adminUsername} 30 | 31 | #### Azure Portal 32 | 33 | * Click [here]({Outputs.firstDataScienceVmUrl}) to view the first of your {Outputs.numInstances} DSVM instances on the Azure portal. 34 | * Click [here]({Outputs.storageAccountUrl}) to view your Storage Account on the Azure portal. 35 | 36 | ## Resources 37 | * [Documentation](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-dsvm-ubuntu-intro) 38 | * [Data science on the Linux Data Science Virtual Machine](https://azure.microsoft.com/en-us/documentation/articles/machine-learning-data-science-linux-dsvm-walkthrough/) 39 | * [Included Tools](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-virtual-machine-overview) 40 | * [Pricing and alternative provisioning](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu) 41 | * [Team Data Science Process Overview](https://azure.microsoft.com/en-us/documentation/learning-paths/data-science-process/) 42 | * Contact Paul Shealy if you have questions about this Data Science Virtual Machine for Linux. -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/core/LinuxDataScienceSummary.md: -------------------------------------------------------------------------------- 1 | [![Take a free test drive](https://caqsres.blob.core.windows.net/linuxdatasciencevm/TakeAFreeTestDrive.png)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu?tab=Overview) 2 | 3 | > **STOP before you proceed to Deploy** You need to accept the Terms of Use of the Data Science Virtual Machine for Linux (Ubuntu) on your Azure Subscription before you deploy this VM the first time by clicking [here]({Constants.LinuxDsVmTermOfUseUrl}). **This does not apply to free test drive.** 4 | 5 | The Data Science Virtual machine for Linux (DSVM) is a custom Azure VM built on Ubuntu 16.04 with many popular tools for data science modeling/development, including: 6 | 7 | * Microsoft R Open 8 | * Microsoft R Server Developer Edition 9 | * Anaconda Python 10 | * JupyterHub, a multiuser Jupyter notebooks server supporting Python and R 11 | * Azure tools and libraries to access various Azure services like AzureML, databases, and big data services 12 | * ML and Deep learning tools like xgboost and LightGBM 13 | * Deep learning tools like CNTK, TensorFlow, Caffe, Caffe2, mxnet, Theano, Torch, and more 14 | 15 | The documentation has a [full list of available tools]((https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-virtual-machine-overview) and [more information](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-dsvm-ubuntu-intro) on the Ubuntu VM. 16 | 17 | If are wondering about things you can do with the DSVM read the [How-To Guide to the Data Science Virtual Machine for Linux](https://azure.microsoft.com/documentation/articles/machine-learning-data-science-linux-dsvm-walkthrough/). -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/core/Manifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 29 | -------------------------------------------------------------------------------- /Samples/018-linuxdsvm/core/PreReqs.md: -------------------------------------------------------------------------------- 1 | You need to accept the Terms of Use of the Linux Data Science Virtual Machine on your Azure Subscription before you deploy this VM the first time by clicking [here]({Constants.LinuxDsVmTermOfUseUrl}). 2 | -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/README.md: -------------------------------------------------------------------------------- 1 | ### Welcome to the Microsoft Cloud Intelligence Solution Template - Windows Data Science Virtual Machine (DSVM) 2 | 3 | 4 | [![Deploy to Azure](https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/master/docs/images/DeployToAzure.PNG)](https://quickstart.azure.ai/track/Deployments/new/datasciencevm?source=GitHub) 5 | 6 | [View Deployed Solution](https://quickstart.azure.ai/Deployments?type=datasciencevm) 7 | 8 | 9 | > **STOP before you proceed** You need to accept the Terms of Use of the Data Science Virtual Machine (DSVM) - Windows 2016 on your Azure Subscription before you deploy this VM the first time by clicking [here](https://portal.azure.com/#blade/Microsoft_Azure_Marketplace/LegalTermsSkuProgrammaticAccessBlade/legalTermsSkuProgrammaticAccessData/%7B%22product%22%3A%7B%22publisherId%22%3A%22microsoft-ads%22%2C%22offerId%22%3A%22windows-data-science-vm%22%2C%22planId%22%3A%22windows2016%22%7D%7D). 10 | 11 | The 'Data Science Virtual Machine (DSVM)' is a 'Windows Server 2016 with Containers' VM & includes popular tools for data exploration, analysis, modeling & development. 12 | 13 | #### Highlights: 14 | 15 | * Microsoft R Server - Dev. Ed. (Scalable R) 16 | * Anaconda Python 17 | * SQL Server 2016 Dev. Ed. - With In-Database R analytics 18 | * Microsoft Office 365 ProPlus BYOL - Shared Computer Activation 19 | * Julia Pro + Juno Editor 20 | * Jupyter notebooks#### 21 | * Visual Studio Community Ed. + Python, R & node.js tools 22 | * Power BI Desktop 23 | * Deep learning tools e.g. Microsoft Cognitive Toolkit (CNTK 2.0), TensorFlow & mxnet 24 | * ML algorithm libraries e.g. xgboost, Vowpal Wabbit 25 | * Azure SDKs + libraries for various Azure Cloud offerings. Integration tools are included for: 26 | 27 | 1. Azure Machine Learning 28 | 2. Azure Data Factory 29 | 3. Stream Analytics 30 | 4. SQL Data Warehouse 31 | 5. Hadoop + Apache Spark (HDICluster) 32 | 6. Data Lake 33 | 7. Blob storage 34 | 8. ML & Data Science tutorials as Jupyter notebooks 35 | 36 | Tools for ML model operationalization as web services in the cloud, using Azure ML or Microsoft R Server. 37 | 38 | Pre-configured and tested with Nvidia drivers, CUDA Toolkit 8.0, & NVIDIA cuDNN library for GPU workloads available if using [NC class VM SKUs](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-gpu). 39 | 40 | Queries & feedback: [DSVM community support forum](https://social.microsoft.com/Forums/en-US/home?forum=dsvm) 41 | 42 | Resources: [DIY Guide](https://cahandson.blob.core.windows.net/workshop/DSVM%20Workshop%20Walkthrough.pdf) 43 | 44 | #### Learn more 45 | [Documentation](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-provision-vm) 46 | 47 | [Overview](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-virtual-machine-overview) 48 | 49 | [Tutorial](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-vm-do-ten-things) 50 | 51 | [Community Forum](https://social.microsoft.com/Forums/en-US/home?forum=dsvm) 52 | 53 | [Data Science Virtual Machine for Linux (Ubuntu)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu) 54 | -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/assets/DSVMEditionSidebySideComparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/019-windowsdsvm/assets/DSVMEditionSidebySideComparison.png -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/assets/DSVMIcon115.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/019-windowsdsvm/assets/DSVMIcon115.png -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/assets/datasciencevm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/019-windowsdsvm/assets/datasciencevm.png -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/core/DataScienceInstructions.md: -------------------------------------------------------------------------------- 1 | ### Accessing your VM 2 | 3 | You can access your newly created Data Science VM with Remote Desktop: 4 | 5 | * *Computer*: {Outputs.vmName} 6 | * *URL*: {Outputs.vmUri} 7 | * *User name*: {Outputs.adminUsername} 8 | * *password*: {Outputs.adminPassword} 9 | 10 | You'll notice that a file named "output10.txt" has been generated in the folder "C:\Windows\Temp." This file was generated by running the Python script "writefile.py" from the PowerShell script. 11 | 12 | Click [here]({Outputs.dataScienceVmUrl}) to view your DSVM on the Azure portal. 13 | -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/core/DataScienceSummary.md: -------------------------------------------------------------------------------- 1 | > **STOP before you proceed** You need to accept the Terms of Use of the Data Science Virtual Machine on your Azure Subscription before you deploy this VM the first time by clicking [here]({Constants.WindowsDsVmTermOfUseUrl}). 2 | 3 | The Microsoft Data Science Virtual machine (VM) is a custom Azure VM based on Windows Server 2012 with several popular tools for data science modeling/development like: 4 | 5 | * SQL Server 2016 Developer Edition 6 | * Microsoft R server Developer Edition 7 | * Anaconda Python with Juypter notebooks 8 | * Visual Studio 2015 Community edition with language and Azure tools and 9 | * ML and Deep Learning tools like xgboost, CNTK, mxnet 10 | 11 | More information on how to use the VM can be found on the [documentation page](http://aka.ms/dsvmdoc). 12 | 13 | If are wondering about things you can do with the DSVM read this [How-To Guide to the Data Science Virtual Machine](http://aka.ms/dsvmtenthings). 14 | 15 | Here is a list of key software on the Data Science Virtual Machine and comparison between the Windows and Linux editions of the product. 16 | 17 | [![DSVM Feature Matrix]({PatternAssetBaseUrl}/DSVMEditionSidebySideComparison.png)]({PatternAssetBaseUrl}/DSVMEditionSidebySideComparison.png) -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/core/Manifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 29 | -------------------------------------------------------------------------------- /Samples/019-windowsdsvm/core/PreReqs.md: -------------------------------------------------------------------------------- 1 | You need to accept the Terms of Use of the Data Science Virtual Machine on your Azure Subscription before you deploy this VM the first time by clicking [here]({Constants.WindowsDsVmTermOfUseUrl}). 2 | -------------------------------------------------------------------------------- /Samples/020-pythonflask/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/020-pythonflask/assets/image.png -------------------------------------------------------------------------------- /Samples/020-pythonflask/core/Instructions.md: -------------------------------------------------------------------------------- 1 | This is a demo web site developed using the Python Flask framework. Here's the link to the website: 2 | 3 | * {Outputs.siteHostName} 4 | -------------------------------------------------------------------------------- /Samples/020-pythonflask/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /Samples/020-pythonflask/core/Summary.md: -------------------------------------------------------------------------------- 1 | A Flask web app. -------------------------------------------------------------------------------- /Samples/021-polarbear/assets/3DMap.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/021-polarbear/assets/3DMap.xlsx -------------------------------------------------------------------------------- /Samples/021-polarbear/assets/dashboards/PolarBearDesktop.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/021-polarbear/assets/dashboards/PolarBearDesktop.pbix -------------------------------------------------------------------------------- /Samples/021-polarbear/assets/dashboards/PolarBearEmbedded.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/021-polarbear/assets/dashboards/PolarBearEmbedded.pbix -------------------------------------------------------------------------------- /Samples/021-polarbear/assets/polarcubs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/021-polarbear/assets/polarcubs.jpg -------------------------------------------------------------------------------- /Samples/021-polarbear/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | #### Embedded Power BI 4 | [Open the dashboard in a new window]({Outputs.solutionDashboardUrl}). Refresh the browser to see newest data. 5 | 6 | #### Quick links 7 | * [Power BI Desktop .pbix file]({PatternAssetBaseUrl}/dashboards/PolarBearDesktop.pbix) (*Edge 8 | might change the extension to .zip*) 9 | 10 | * [polarbear.csv file]({PatternAssetBaseUrl}/polarbear.csv) 11 | 12 | * [3DMap.xlsx file]({PatternAssetBaseUrl}/3DMap.xlsx) 13 | 14 | **Connecting Power BI Desktop to Azure SQL Database** 15 | * Open the Power BI Desktop report and choose **Edit Queries** > **Data Source Settings** > **Change Source** and then paste the Server and Database names from the information below and Click **OK** 16 | * Close the Data Source Settings by clicking **Close** and then click **Refresh** which will prompt you for your Username and Password (Note: Choose **Database** and not Windows) 17 | * Copy and paste your Username and enter the Password (One you entered when deploying the Tutorial) and click **Connect** 18 | 19 | **Azure SQL Database**: Stores the streaming data in table format for access by embedded Power BI. 20 | 21 | Server: {Outputs.sqlServer}.database.windows.net 22 | Database: {Outputs.sqlDatabase} 23 | Username: {Outputs.sqlServerUsername} 24 | Password: \ 25 | 26 | ##Source data 27 | 28 | [U.S. Geological Survey Polar Bear Mark-Recapture Records, Alaska Portion of the Southern Beaufort Sea, 2001-2010](https://alaska.usgs.gov/products/data.php?dataid=7) 29 | 30 | The data in this tutorial is part of Ecological Society of America journal article [Polar bear population dynamics in the southern Beaufort Sea during a period of sea ice decline](http://onlinelibrary.wiley.com/doi/10.1890/14-1129.1/abstract;jsessionid=971635022786A4B837B4B8EBDCFCF422.f02t03) -------------------------------------------------------------------------------- /Samples/021-polarbear/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | -------------------------------------------------------------------------------- /Samples/021-polarbear/core/Summary.md: -------------------------------------------------------------------------------- 1 | This Tutorial demonstrates how to analyze data from the U.S. Geological Survey Polar Bear Mark-Recapture Records 2 | 3 | The data in this tutorial is part of Ecological Society of America journal article [Polar bear population dynamics in the southern Beaufort Sea during a period of sea ice decline](http://onlinelibrary.wiley.com/doi/10.1890/14-1129.1/abstract;jsessionid=971635022786A4B837B4B8EBDCFCF422.f02t03) 4 | 5 | The tutorial involves the following steps: 6 | 7 | 1. Deploying a Azure SQL Server database to load the data 8 | 9 | 2. Analysis of the data using Embedded Power BI 10 | 11 | ##Source data 12 | 13 | [U.S. Geological Survey Polar Bear Mark-Recapture Records, Alaska Portion of the Southern Beaufort Sea, 2001-2010](https://alaska.usgs.gov/products/data.php?dataid=7) 14 | -------------------------------------------------------------------------------- /Samples/021-polarbear/core/functions/prepsql/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/021-polarbear/core/functions/prepsql/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using Microsoft.SqlServer.Management.Smo; 7 | using Microsoft.SqlServer.Management.Common; 8 | using System.IO; 9 | using System.Data.SqlClient; 10 | 11 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 12 | { 13 | 14 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 15 | 16 | string sqlConnectionString = parametersReader.GetParameter("sqlConnectionString"); 17 | 18 | string script = File.ReadAllText(@"d:\home\site\wwwroot\prepsql\prepareDatabase.sql"); 19 | 20 | SqlConnection conn = new SqlConnection(sqlConnectionString); 21 | 22 | Server server = new Server(new ServerConnection(conn)); 23 | 24 | server.ConnectionContext.ExecuteNonQuery(script); 25 | 26 | return new object(); 27 | } -------------------------------------------------------------------------------- /Samples/021-polarbear/core/sqlserver.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "sqlServerUsername": { 6 | "metadata": { 7 | "description": "Username for SQL Server that will be created for results database (minimum 3 characters)" 8 | }, 9 | "type": "string", 10 | "minLength": 3 11 | }, 12 | "sqlServerPassword": { 13 | "metadata": { 14 | "description": "Password for SQL Server that will be created for results database" 15 | }, 16 | "type": "securestring", 17 | "minLength": 8 18 | } 19 | }, 20 | "variables": { 21 | "uniqueString": "[uniqueString(concat(subscription().subscriptionId, resourceGroup().name))]", 22 | 23 | "sqlServer": "[concat(variables('uniqueString'),'srv')]", 24 | "sqlDatabase": "[concat(variables('uniqueString'),'db')]", 25 | "sqlServerUsername": "[parameters('sqlServerUsername')]", 26 | "sqlServerPassword": "[parameters('sqlServerPassword')]", 27 | "startIpAddress": "0.0.0.0", 28 | "endIpAddress": "255.255.255.255", 29 | "sqlServerVersion": "12.0", 30 | "edition": "Standard", 31 | "databaseTier": "S1", 32 | "collation": "SQL_Latin1_General_CP1_CI_AS", 33 | "maxSizeBytes": "2147483648", 34 | "sqlSvrResourceId": "[resourceId('Microsoft.Sql/servers', variables('sqlServer'))]", 35 | "sqlDbResourceId": "[resourceId('Microsoft.Sql/servers/databases', variables('sqlServer'), variables('sqlDatabase'))]" 36 | }, 37 | "resources": [ 38 | { 39 | "name": "[variables('sqlServer')]", 40 | "type": "Microsoft.Sql/servers", 41 | "location": "[resourceGroup().location]", 42 | "apiVersion": "2014-04-01-preview", 43 | "properties": { 44 | "administratorLogin": "[variables('sqlServerUsername')]", 45 | "administratorLoginPassword": "[variables('sqlServerPassword')]", 46 | "version": "[variables('sqlServerVersion')]" 47 | }, 48 | "resources": [ 49 | { 50 | "name": "[variables('sqlDatabase')]", 51 | "type": "databases", 52 | "location": "[resourceGroup().location]", 53 | "apiVersion": "2014-04-01-preview", 54 | "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServer'))]" ], 55 | "properties": { 56 | "edition": "[variables('edition')]", 57 | "requestedServiceObjectiveName": "[variables('databaseTier')]", 58 | "collation": "[variables('collation')]", 59 | "maxSizeBytes": "[variables('maxSizeBytes')]" 60 | } 61 | }, 62 | { 63 | "apiVersion": "2014-04-01-preview", 64 | "dependsOn": [ "[concat('Microsoft.Sql/servers/', variables('sqlServer'))]" ], 65 | "location": "[resourceGroup().location]", 66 | "name": "AllowAllWindowsAzureIps", 67 | "properties": { 68 | "startIpAddress": "[variables('startIpAddress')]", 69 | "endIpAddress": "[variables('endIpAddress')]" 70 | }, 71 | "type": "firewallrules" 72 | } 73 | ] 74 | } 75 | ], 76 | "outputs": { 77 | "sqlServer": { 78 | "type": "string", 79 | "value": "[variables('sqlServer')]" 80 | }, 81 | "sqlDatabase": { 82 | "type": "string", 83 | "value": "[variables('sqlDatabase')]" 84 | }, 85 | "sqlServerUsername": { 86 | "type": "string", 87 | "value": "[variables('sqlServerUsername')]" 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/README.md: -------------------------------------------------------------------------------- 1 | ### Welcome to the Microsoft Cloud Intelligence Solution Template - Time Series Insights using Twitter 2 | 3 | 4 | [![Deploy to Azure](https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/master/docs/images/DeployToAzure.PNG)](https://quickstart.azure.ai/track/Deployments/new/twittertimeseriesinsights?source=GitHub) 5 | 6 | [View Deployed Solution](https://quickstart.azure.ai/Deployments?type=twittertimeseriesinsights) 7 | 8 | 9 | [![Solution Diagram](assets/twittertimeseriesinsights.jpg)](assets/twittertimeseriesinsights.jpg) 10 | 11 | This solution sets up the infrastructure in the diagram above. The various steps are as follows: 12 | 13 | * Setting up an Azure WebJob to collect Twitter data based on user specified keywords. 14 | * Pumping ingested tweets into Azure Event Hub which can accept millions of events per second. 15 | * Processing incoming tweets with an Azure Stream Analytics job that stores the raw data in Azure Blob Storage and Azure SQL Database. 16 | * The Stream Analytics job calls an Azure Machine Learning web service to determine the sentiment of each tweet. 17 | * Visualizing real-time metrics about inferred sentiment using Time Series Insights for Operational Technology real-time monitoring and Power BI for Information Technology reporting and analysis. 18 | 19 | ## Video 20 | 21 | [Video](https://channel9.msdn.com/Shows/Cortana-Intelligence-Corner/Twitter-Sentiment-Analysis-using-the-Cortana-Intelligence-Gallery) on how to do use this Solution Template to do Twitter Sentiment Analysis using the Cloud Intelligence Gallery by Chris Testa-O'Neill 22 | 23 | 24 | ## Prerequisites 25 | 26 | To run the TwitterClient web job, you will need: 27 | 28 | 1. A [Twitter account](https://twitter.com/login) 29 | 2. A [Twitter application](https://apps.twitter.com) 30 | 3. Twitter's Streaming API OAuth credentials 31 | - On the Twitter application page, click on the *Keys and Access Tokens* tab 32 | - *Consumer Key (API Key)* and *Consumer Secret (API Secret)* can be found under **Application Settings** section 33 | - Under **Your Access Token** section, click on *Create my access token* to obtain both *Access Token* and *Access Token Secret* 34 | 35 | More details on Twitter's Streaming API OAuth access token can be found [here](https://dev.twitter.com/oauth/overview/application-owner-access-tokens). 36 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/assets/dashboards/StreamingTweetsDesktop.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/022-twittertimeseriesinsights/assets/dashboards/StreamingTweetsDesktop.pbix -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/assets/dashboards/StreamingTweetsEmbedded.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/022-twittertimeseriesinsights/assets/dashboards/StreamingTweetsEmbedded.pbix -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/assets/timeseriesinsight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/022-twittertimeseriesinsights/assets/timeseriesinsight.png -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/assets/twittertimeseriesinsights.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/022-twittertimeseriesinsights/assets/twittertimeseriesinsights.jpg -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | #### Time Series Insights 4 | [Add your user in the Time Series Insights Data Access Pane]({Outputs.dataAccessPaneUrl}). 5 | 6 | * Click on **+Add** > **Select user** > **Enter your account** > click **Select** 7 | * Click on **Select role** > choose **Contributor** > click **Ok** > click **Ok** 8 | * Click on **Overview** 9 | * Click on **Go to Environment** or the **Time Series Insights URL** 10 | 11 | [Open Time Series Insights](https://insights.timeseries.azure.com/). 12 | 13 | #### Embedded Power BI 14 | [Open the dashboard in a new window]({Outputs.solutionDashboardUrl}). Refresh the browser to see newest data. 15 | 16 | #### Quick links 17 | * [Time Series Insights](https://insights.timeseries.azure.com/) 18 | * [Power BI]({Outputs.solutionDashboardUrl}) 19 | * [Stream Analysis with Azure ML machine learning web service API manual]({Outputs.webServiceHelpUrl}) 20 | * [Machine Learning Experiment]({Outputs.experimentUrl}) 21 | * [Power BI Desktop .pbix file]({PatternAssetBaseUrl}/dashboards/StreamingTweetsDesktop.pbix) (*Edge 22 | might change the extension to .zip*) 23 | 24 | #### Video 25 | 26 | [Video](https://channel9.msdn.com/Shows/Cortana-Intelligence-Corner/Twitter-Sentiment-Analysis-using-the-Cortana-Intelligence-Gallery) on how to do use this Solution Template to do Twitter Sentiment Analysis using the Cloud Intelligence Gallery by Chris Testa-O'Neill 27 | 28 | **Connecting Power BI Desktop to Azure SQL Database** 29 | * Open the Power BI Desktop report and choose **Edit Queries** > **Data Source Settings** > **Change Source** and then paste the Server and Database names from the information below and Click **OK** 30 | * Close the Data Source Settings by clicking **Close** and then click **Refresh** which will prompt you for your Username and Password (Note: Choose **Database** and not Windows) 31 | * Copy and paste your Username and enter the Password (One you entered when deploying the Tutorial) and click **Connect** 32 | 33 | **Azure SQL Database**: Stores the streaming data in table format for access by embedded Power BI. 34 | 35 | Server: {Outputs.sqlServerName}.database.windows.net 36 | Database: {Outputs.sqlDatabaseName} 37 | Username: {Outputs.sqlServerUsername} 38 | Password: \ 39 | 40 | **Change Keywords in Function app settings** 41 | [Open the Function App](https://ms.portal.azure.com/?flight=1#blade/WebsitesExtension/FunctionsIFrameBlade/id/%2Fsubscriptions%2F{SubscriptionId}%2FresourceGroups%2F{ProjectName}%2Fproviders%2FMicrosoft.Web%2Fsites%2F{Outputs.functionAppName}) 42 | 43 | * Click on **Platform features** > **Application setting** > scroll to find **App settings** and then change the values for **TWITTER_KEYWORDS** 44 | * Click **Save** at the top of the App settings blade 45 | * Open the Database in SQL Server Management Studio or Visual Studio and open a **New Query** 46 | * Enter ```truncate table TweetScore``` and click **Execute** (This will remove all the records from you previous key words) -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/Summary.md: -------------------------------------------------------------------------------- 1 | [![Solution Diagram]({PatternAssetBaseUrl}/twittertimeseriesinsights.jpg)]({PatternAssetBaseUrl}/twittertimeseriesinsights.jpg) 2 | 3 | This solution sets up the infrastructure in the diagram above. The various steps are as follows: 4 | 5 | * Setting up an Azure WebJob to collect Twitter data based on user specified keywords. 6 | * Pumping ingested tweets into Azure Event Hub which can accept millions of events per second. 7 | * Processing incoming tweets with an Azure Stream Analytics job that stores the raw data in Azure Blob Storage and Azure SQL Database. 8 | * The Stream Analytics job calls an Azure Machine Learning web service to determine the sentiment of each tweet. 9 | * Visualizing real-time metrics about inferred sentiment using Time Series Insights for Operational Technology real-time monitoring and Power BI for Information Technology reporting and analysis. 10 | 11 | ## Video 12 | 13 | [Video](https://channel9.msdn.com/Shows/Cortana-Intelligence-Corner/Twitter-Sentiment-Analysis-using-the-Cortana-Intelligence-Gallery) on how to do use this Solution Template to do Twitter Sentiment Analysis using the Cloud Intelligence Gallery by Chris Testa-O'Neill 14 | 15 | 16 | ## Prerequisites 17 | 18 | To run the TwitterClient web job, you will need: 19 | 20 | 1. A [Twitter account](https://twitter.com/login) 21 | 2. A [Twitter application](https://apps.twitter.com) 22 | 3. Twitter's Streaming API OAuth credentials 23 | - On the Twitter application page, click on the *Keys and Access Tokens* tab 24 | - *Consumer Key (API Key)* and *Consumer Secret (API Secret)* can be found under **Application Settings** section 25 | - Under **Your Access Token** section, click on *Create my access token* to obtain both *Access Token* and *Access Token Secret* 26 | 27 | More details on Twitter's Streaming API OAuth access token can be found [here](https://dev.twitter.com/oauth/overview/application-owner-access-tokens). -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/functions/executeSqlQuery/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/functions/executeSqlQuery/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Data.SqlClient; 4 | using Microsoft.SqlServer.Management.Smo; 5 | using Microsoft.SqlServer.Management.Common; 6 | 7 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 8 | { 9 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 10 | string sqlConnectionString = parametersReader.GetParameter("sqlConnectionString"); 11 | string sqlQuery = parametersReader.GetParameter("sqlQuery"); 12 | SqlConnection conn = new SqlConnection(sqlConnectionString); 13 | Server server = new Server(new ServerConnection(conn)); 14 | server.ConnectionContext.ExecuteNonQuery(sqlQuery); 15 | 16 | return null; 17 | } 18 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/functions/startStreamingJob/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "Microsoft.Azure.Management.StreamAnalytics": "2.1.0", 6 | "Microsoft.Rest.ClientRuntime.Azure.Authentication": "2.3.1" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/core/functions/startStreamingJob/run.csx: -------------------------------------------------------------------------------- 1 | #load "..\CiqsHelpers\All.csx" 2 | 3 | using System.Net; 4 | using Microsoft.Azure.Management.StreamAnalytics; 5 | using Microsoft.Azure.Management.StreamAnalytics.Models; 6 | using Microsoft.Rest.Azure.Authentication; 7 | using Microsoft.Rest; 8 | 9 | public static async Task Run(HttpRequestMessage req, TraceWriter log) 10 | { 11 | var parametersReader = await CiqsInputParametersReader.FromHttpRequestMessage(req); 12 | string subscriptionId = parametersReader.GetParameter("subscriptionId"); 13 | string authorizationToken = parametersReader.GetParameter("accessToken"); 14 | string resourceGroupName = parametersReader.GetParameter("resourceGroupName"); 15 | string saJobName = parametersReader.GetParameter("saJobName"); 16 | 17 | try 18 | { 19 | StartStreamingJob(subscriptionId, authorizationToken, resourceGroupName, saJobName); 20 | } 21 | catch (Exception e) 22 | { 23 | log.Error("Unable start Stream Analytics Job", e); 24 | return req.CreateResponse( 25 | HttpStatusCode.BadRequest, 26 | new { 27 | Message = $"Unable start Stream Analytics Job {saJobName}. \n\n{e.Message}" 28 | }); 29 | } 30 | 31 | return null; 32 | } 33 | 34 | private static void StartStreamingJob(string subscriptionId, string authorizationToken, string resourceGroupName, string jobName) 35 | { 36 | var credentials = new TokenCredentials(authorizationToken); 37 | using (StreamAnalyticsManagementClient streamClient = new StreamAnalyticsManagementClient(credentials)) 38 | { 39 | streamClient.SubscriptionId = subscriptionId; 40 | 41 | // Start a streaming job 42 | StartStreamingJobParameters jobStartParameters = new StartStreamingJobParameters() 43 | { 44 | OutputStartMode = OutputStartMode.JobStartTime 45 | }; 46 | 47 | streamClient.StreamingJobs.Start(resourceGroupName, jobName, jobStartParameters); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/src/build.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/src/jobs/continuous/TwitterClient/requirements.txt: -------------------------------------------------------------------------------- 1 | azure==1.0.3 2 | tweepy==3.5.0 3 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/src/jobs/continuous/TwitterClient/run.ps1: -------------------------------------------------------------------------------- 1 | $sitePackagesDirectory = 'site-packages' 2 | py -m pip install -t "$sitePackagesDirectory" -r requirements.txt 3 | $env:PYTHONPATH = $(Resolve-Path -Path "$sitePackagesDirectory").Path 4 | py twitterClient.py 5 | -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/src/jobs/continuous/TwitterClient/settings.job: -------------------------------------------------------------------------------- 1 | { 2 | "is_singleton": true 3 | } -------------------------------------------------------------------------------- /Samples/022-twittertimeseriesinsights/src/jobs/continuous/TwitterClient/twitterClient.py: -------------------------------------------------------------------------------- 1 | import sys, os, json, re 2 | from tweepy import Stream 3 | from tweepy import OAuthHandler 4 | from tweepy.streaming import StreamListener 5 | from azure.servicebus import ServiceBusService 6 | 7 | class listener(StreamListener): 8 | whitespace_regex = re.compile('\s+') 9 | connection_string_regex = re.compile('^Endpoint=sb://(.+).servicebus.windows.net/;SharedAccessKeyName=(.+);SharedAccessKey=(.+);EntityPath=(.+)$') 10 | 11 | def __init__(self, event_hub_connection_string, keywords): 12 | m = self.connection_string_regex.match(event_hub_connection_string) 13 | self.sbs = ServiceBusService( 14 | m.group(1), 15 | shared_access_key_name=m.group(2), 16 | shared_access_key_value=m.group(3)) 17 | self.keywords = keywords 18 | self.event_hub_name = m.group(4) 19 | 20 | def on_data(self, data): 21 | try: 22 | tweet = json.loads(data) 23 | p = re.compile('\s+') 24 | text =tweet['text'] 25 | for topic in self.get_topics(text, keywords): 26 | output = json.dumps( 27 | { 28 | 'text': text, 29 | 'timestamp_ms': tweet['timestamp_ms'], 30 | 'topic': topic, 31 | 'id': tweet['id'], 32 | 'retweet_count': tweet['retweet_count'], 33 | 'time_zone': tweet['user']['time_zone'], 34 | 'lang': tweet['user']['lang'] 35 | }) 36 | self.sbs.send_event(self.event_hub_name, output) 37 | return True 38 | except BaseException as e: 39 | print('failed ondata' + str(e)) 40 | time.sleep(5) 41 | 42 | def on_error(self, status): 43 | print(status) 44 | 45 | def get_topics(self, input, keywords): 46 | return [keyword for keyword in self.keywords if self.sanitize_text(keyword) in self.sanitize_text(input)] 47 | 48 | def sanitize_text(self, input): 49 | return self.whitespace_regex.sub(' ', input.strip().lower()) 50 | 51 | keywords = os.environ["TWITTER_KEYWORDS"].split(",") 52 | consumer_key_setting = os.environ["TWITTER_OAUTH_CONSUMER_KEY"] 53 | consumer_secret_setting = os.environ["TWITTER_OAUTH_CONSUMER_SECRET"] 54 | oauth_token_setting = os.environ["TWITTER_OAUTH_TOKEN"] 55 | oauth_token_secret_setting = os.environ["TWITTER_OAUTH_TOKEN_SECRET"] 56 | # TODO: need to fix connection string types in AzureFunctionApp. Using MYSQLCONNSTR_ for now, 57 | # which is what they all default to. 58 | # event_hub_connection_string = os.environ["CUSTOMCONNSTR_EventHubConnectionString"] 59 | event_hub_connection_string = os.environ["MYSQLCONNSTR_EventHubConnectionString"] 60 | 61 | auth = OAuthHandler(consumer_key_setting, consumer_secret_setting) 62 | auth.set_access_token(oauth_token_setting, oauth_token_secret_setting) 63 | twitterStream = Stream(auth, listener(event_hub_connection_string, keywords)) 64 | twitterStream.filter(track=keywords) 65 | -------------------------------------------------------------------------------- /Samples/023-mlwebservice/assets/vienna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/023-mlwebservice/assets/vienna.png -------------------------------------------------------------------------------- /Samples/023-mlwebservice/core/Instructions.md: -------------------------------------------------------------------------------- 1 | *ML Web Service endpoint*: {Outputs.endpoint} 2 | 3 | NOTE: In the beginning, the Web service will need about 10 minutes to boot. 4 | 5 | #### Test command 6 | 7 | ``` 8 | curl -X POST -H "Content-Type: application/json" {Outputs.endpoint} -d 9 | ``` 10 | -------------------------------------------------------------------------------- /Samples/023-mlwebservice/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/023-mlwebservice/core/Summary.md: -------------------------------------------------------------------------------- 1 | Just a blank solution. -------------------------------------------------------------------------------- /Samples/024-streamingwithml/assets/dashboards/StreamingTweetsDesktop.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/024-streamingwithml/assets/dashboards/StreamingTweetsDesktop.pbix -------------------------------------------------------------------------------- /Samples/024-streamingwithml/assets/dashboards/StreamingTweetsEmbedded.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/024-streamingwithml/assets/dashboards/StreamingTweetsEmbedded.pbix -------------------------------------------------------------------------------- /Samples/024-streamingwithml/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/Samples/024-streamingwithml/assets/image.png -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/Instructions.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | Now, send some data to the EventHub! 4 | 5 | *EventHub connection string*: {Outputs.eventHubConnectionString} 6 | 7 | [Open PowerBI dashboard in a new window]({Outputs.solutionDashboardUrl}). Refresh the browser to see newest data. 8 | -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 38 | -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/functions/eventHubListener/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "type": "eventHubTrigger", 5 | "name": "eventHubMessage", 6 | "direction": "in", 7 | "path": "ehin", 8 | "connection": "EventHubConnectionString", 9 | "consumerGroup": "$Default" 10 | } 11 | ], 12 | "disabled": false 13 | } 14 | -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/functions/eventHubListener/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/functions/executeSqlQuery/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net46":{ 4 | "dependencies": { 5 | "System.Data.SqlClient": "4.3.0", 6 | "Microsoft.SqlServer.Scripting": "11.0.2100.61" 7 | } 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Samples/024-streamingwithml/core/functions/executeSqlQuery/run.csx: -------------------------------------------------------------------------------- 1 | using System.Configuration; 2 | using System.Data.SqlClient; 3 | using Microsoft.SqlServer.Management.Smo; 4 | using Microsoft.SqlServer.Management.Common; 5 | 6 | public static object Run(HttpRequestMessage req, TraceWriter log) 7 | { 8 | string sqlQuery = @" 9 | CREATE TABLE [dbo].[TweetScore] 10 | ( 11 | [timestamp] [datetime] NOT NULL, 12 | [topic] [nvarchar](100) NOT NULL, 13 | [score] [float] NOT NULL, 14 | [sentiment] [char](8) NOT NULL, 15 | [text] [nvarchar](200) NOT NULL, 16 | [id] [bigint] NOT NULL, 17 | [retweet_count] [int] NULL, 18 | [time_zone] [nvarchar](100) NULL, 19 | [lang] [nvarchar](100) NULL 20 | )"; 21 | 22 | var sqlConnectionString = ConfigurationManager.ConnectionStrings["SqlConnectionString"].ConnectionString; 23 | 24 | SqlConnection conn = new SqlConnection(sqlConnectionString); 25 | Server server = new Server(new ServerConnection(conn)); 26 | server.ConnectionContext.ExecuteNonQuery(sqlQuery); 27 | 28 | return null; 29 | } 30 | -------------------------------------------------------------------------------- /Samples/README.md: -------------------------------------------------------------------------------- 1 | # SAW Samples 2 | 3 | ### [Hello world](001-helloworld) 4 | The simplest possible solution that can serve as a starting point when building something from scratch. Cotains an empty ARM template. 5 | 6 | ### [Using Azure Functions](002-hellofunctions) 7 | This sample demonstrates how easily Azure Functions can be incorporated into a CIQS solution. Simply write your code and let the framework take care of the rest! 8 | 9 | ### [Using Azure Authorization token](003-authorization) 10 | Passing the Azure authorization token to functions and using it for calling Azure Resource Management API enables complex provisioning tasks not posible via ARM templates alone. 11 | 12 | ### [Building a solution powered by Microsoft Cognitive Services](004-cognitiveservices) 13 | This Serverless-Architecture-based sample demonstrates how to harness Microsoft Cognitive Services API and build a solution that enables the end user to deploy a customizable website similar to how-old.net into their subscription within less than 5 minutes. 14 | 15 | ### [Using DocumentDB](005-documentdb) 16 | A demonstration of how to create an Azure DocumentDB account and database. 17 | 18 | ### [Deploying a Web site](006-webapp) 19 | A simple Web App is being deploying into a newly created instsance of the Azure App Service. 20 | 21 | ### [Uploading a blob into a Storage account](007-blobupload) 22 | Creating a blob in a Storage account with Azure Functions. 23 | 24 | ### [Analyzing streaming data with Machine Learning](009-twitterstreaming-dev) 25 | This is an example of comprehensive solution that performs Machine Learning powered sentiment analysis of streaming data coming from a Twitter connector. 26 | 27 | ### [Creating a SQL database](010-azuresqldatabase) 28 | A demonstration of how to create a SQL database with an ARM template. 29 | 30 | ### [Azure FunctionApp management](011-chickenandegg) 31 | Showcases framework features allowing effortless Azure FunctionApp (App Service) provisioning and configuration. 32 | 33 | ### [Deploying a Machine Learning Web service](012-mlwebsvc) 34 | Copying an Experiment from Cloud Intelligence Gallery into a new Machine Learning Workspace, and deploying it as a Machine Learning Web service (in just 3 lines of code). 35 | 36 | ### [Deploying multiple Machine Learning Web services](013-mlwebsvcs) 37 | Similar to the previous sample, but with multiple Machine Learning Web services. 38 | 39 | ### [Deploying a Windows Data Science Virtual Machine](019-windowsdsvm) 40 | This example shows how to provision a Windows Data Science Virtual Machine and configure it using PowerShell. 41 | 42 | ### [Deploying a Flask Web App](020-pythonflask) 43 | This example shows how to deploy a website that's based on the Python Flask framework onto Azure Web App. 44 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'wdm' 4 | gem 'jekyll' 5 | gem 'minima' -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | title: Solution Authoring 2 | description: Resources on using SAW to create Cloud Intelligence Solutions. 3 | excerpt_separator: 4 | theme: minima 5 | markdown: kramdown 6 | highlighter: rouge 7 | 8 | kramdown: 9 | input: GFM 10 | syntax_highlighter: rouge 11 | -------------------------------------------------------------------------------- /docs/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }} 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/_includes/header.html: -------------------------------------------------------------------------------- 1 |
2 |

{{ site.title | default: site.github.repository_name }}

3 | 17 |
18 | -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 |
6 | {% include header.html %} 7 |
8 | {{ content }} 9 |
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/_layouts/post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 |
6 | {% include header.html %} 7 |
8 |

{{ page.title }} from {{ page.date | date: "%m/%d/%Y, %r (%Z)" }}

9 | {{ content }} 10 |
11 | {% include footer.html %} 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/_posts/2017-03-01-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-03-01 18:00 PST 3 | layout: post 4 | --- 5 | - Solution Authoring Workspace (SAW) update 6 | - Email notifications 7 | - Simplification of the Azure ML Web Service provisioning step 8 | - Introducing documentation 9 | - Server-side markdown rendering 10 | - Bug fixes 11 | 12 | 13 | 14 | ### Solution Authoring Workspace (SAW) update 15 | 16 | SAW is now integrated into CIQS as a first-class feature. In-browser and native *(alpha preview)* experiences are available. For more detailed information, refer to [Getting started]({{ site.baseurl }}/getting-started.html) 17 | 18 | ### Email notifications 19 | 20 | Customers will start receiving notification emails whenever their deployments complete. This feature is currently being tested and may be temporarily inactive at times. Notifications are sent for successful and failed deployments. 21 | 22 | ### Simplification of the Azure ML Web Service provisioning step 23 | 24 | Previously, **<AzureMlWebService>** provisioning step required providing **PackageUrl** and **EntityId**: 25 | 26 | ``` html 27 | 28 | https://gallery.azure.ai/Details/predictive-mini-twitter-sentiment-analysis-experiment-1 29 | https://storage.azureml.net/directories/5067590f26d5412ebf2220a1dacb0f22/items 30 | Predictive-Experiment-Mini-Twitter-sentiment-analysis-2 31 | 32 | ``` 33 | Now, only **GalleryUrl** is necessary. *Syntax sugar is getting sweeter!* 34 | ```xml 35 | 36 | https://gallery.azure.ai/Details/predictive-mini-twitter-sentiment-analysis-experiment-1 37 | 38 | ``` 39 | 40 | ### Introducing documentation 41 | 42 | Launching this site. We will be gradually populating it with useful documentation related to solution authoring. It will also contain regularly updated release notes like this one. 43 | 44 | ### Server-side markdown rendering 45 | 46 | This is internal to the framework and should be of no consequence to users and solution authors. **Only safe-mode markdown is currently supported.** 47 | -------------------------------------------------------------------------------- /docs/_posts/2017-03-28-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-03-28 15:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | - Deployment engine stability improvements 7 | - Early resource group creation and improved error handling 8 | - Allowing reuse of empty resource groups 9 | - Bug fixes in several solutions 10 | 11 | 12 | 13 | ### Deployment engine stability improvements 14 | 15 | Introducing synchronization into the CIQS provisioning engine to guarantee a single execution of each deployment activity. 16 | 17 | This solves the issue of multiple post-deployment notification emails occasionally sent to the user. 18 | 19 | ### Early resource group creation and improved error handling 20 | 21 | Resource groups are now created at the same time as the deployment itself. This allows catching and reporting such resource group creation issues as: 22 | - use of registered trademarks in the resource group's name 23 | - name conflicts with existing resource groups in the same subscription 24 | - having insufficient permissions to create resource groups 25 | 26 | In all such scenarios, the user will be shown an actionable error message and allowed to correct the error and continue. 27 | 28 | ### Allowing reuse of empty resource groups 29 | 30 | If a resource group already exists, but is empty, CIQS will simply reuse it when a new deployment with the same name is created. 31 | 32 | ### Bug fixes in several solutions 33 | 34 | * Collecting user input up-front in *Telco Customer Churn and Real-time Analytics* 35 | * VM name validation in *Windows Data Science VM* -------------------------------------------------------------------------------- /docs/_posts/2017-04-06-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-04-06 18:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | - Solution self-publishing 7 | - Legacy deployments backfill 8 | - Performance improvements for the Deployments page 9 | - Bug fixes 10 | - What's broken? 11 | 12 | 13 | 14 | ### Solution self-publishing 15 | 16 | Custom solutions and associated "Try It Now" dashboards can now be published directly into CIQS gallery by their respective authors. 17 | 18 | [Detailed description]({{ site.baseurl }}/solution-publishing.html). 19 | 20 | ### Legacy deployments backfill 21 | 22 | 777 successful existing deployments in PROD relied on gallery metadata. These deployments were subject to breaking upon modification of their corresponding solutions in the gallery. We performed a backfill to ensure integrity of such solutions moving forward. 23 | 24 | | Solution ID | Backfilled| 25 | | ---------------------- |:-------:| 26 | |streamanalysiswithml | 164| 27 | |edwspark | 103| 28 | |campaignmanagement | 75 | 29 | |anomalydetectionpcs | 62 | 30 | |hospital | 58 | 31 | |nyrides | 53 | 32 | |anomalydetectionpcsv2 | 46 | 33 | |datasciencevm | 42 | 34 | |telcocustomerchurn | 21 | 35 | |sqldatawarehouse | 19 | 36 | |datalakebasicanalytics | 19 | 37 | |streamanalysis | 19 | 38 | |linuxdatasciencevm | 15 | 39 | |manufacturing | 13 | 40 | |sawweb | 12 | 41 | |azuresearch | 10 | 42 | |realtimefeaturization | 8 | 43 | |datalakeaml | 7 | 44 | |avhivedw | 7 | 45 | |telcorealtime | 6 | 46 | |adfdocdb | 5 | 47 | |asadocdb | 5 | 48 | |multistep | 3 | 49 | |edwhive | 2 | 50 | |mlwebsvc | 1 | 51 | |sqldatawarehouseaml | 1 | 52 | |energysupplyopt | 1 | 53 | 54 | ### Performance improvements for the Deployments page 55 | 56 | As part of the backfill, we also performed a cleanup and data migration that resulted in a significant (order of maginitude) performance improvement when loading the list of deployments. This will particularly be noticeable to owners of accounts with high deployment activity. 57 | 58 | ### Bug fixes 59 | - session expiration notification is now dismissible 60 | - occasional empty error messages in the project details page are removed 61 | - formatting issues caused by invalid error messages are fixed (by using Markdown instead of raw HTML) 62 | - disabling new port names generation when deploying Azure ML Web services (via `generateNewPortNames=false`) 63 | 64 | ### What's broken? 65 | 66 | The bug fix related to Azure ML Web service port name generation caused regressions in several solutions that relied on the old behavior. We are working on mitigating the issue. -------------------------------------------------------------------------------- /docs/_posts/2017-04-14-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-04-14 14:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Updates to the new projects page. 8 | - Enhanced logging to differentiate ARM validation failures. 9 | - Added toggle to remove header from Try It Now dashboards. 10 | - Enhanced SQL Credential tag validation for ODBC restrictions. 11 | - Temporary disable of the publish feature. 12 | 13 | 14 | 15 | ### Updates to Create Project Page 16 | - Added the the solution title with a link to the corresponding solution / tutorial in CI Gallery if available. 17 | - Redirect to “https://www.microsoft.com/en-us/cloud-platform/cortana-intelligence-suite-gallery-solutions” page when user don’t have an active Azure subscription. 18 | - Added estimated provisioning time info. 19 | - Added “Contact Us” (https://info.microsoft.com/cis-gallery-contactus.html?lsd=ciswebsite) at the bottom. 20 | 21 | ### Added toggle to remove header from Try It Now dashboards. 22 | Adding the ```showTitle``` flag to the Try It Now url will disable the header. 23 | eg. 24 | ``` 25 | https://quickstart.azure.ai/TryItNow/Dashboard/campaignmanagement?showTitle=false 26 | ``` 27 | 28 | ### Pattern Publish Disable 29 | We have temporarily disabled the publish feature on production due to issues with: 30 | - Handling stale gallery loads 31 | - High gallery load latencies. 32 | 33 | We apologize for the inconvenience. Please contact [caqseng@microsoft.com](mailto:caqseng@microsoft.com) if you wish to publish your templates. 34 | If you need to share your templates with other users, please use the “Share” feature. 35 | 36 | ### ODBC validation for Credential tag 37 | We now adhere to the ODBC 3.0 spec for credential validation. [Refer here for details]({{site.baseurl}}/solution-authoring.html#credential). 38 | -------------------------------------------------------------------------------- /docs/_posts/2017-05-02-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-05-02 16:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - SAW improvements. 8 | - Making deployments of shared solutions trackable. 9 | - Bug fixes. 10 | - Framework improvements. 11 | 12 | 13 | 14 | ### SAW improvements 15 | - Add SawWeb deployment failure handling 16 | - Add blocking UX when SawWeb is loading 17 | 18 | ### Making deployments of shared solutions trackable 19 | Previously, privately shared solutions could not be easily identified and attributed to specific authors. They appeared in our logs and metrics as `{solution}@user` and were indistinguishable from test deployments done by solution authors themselves. 20 | With this change, solution IDs associated with deployments of private solutions will be in the format of `{solution}@{unique_share_id}`. For example: 21 | 22 | ```xml 23 | mysolution@share13f93a6bee754433b223685f6197add7 24 | ``` 25 | 26 | Besides allowing us to effortlessly track the usage of the “share” feature, this will also enable us to build comprehensive reporting for authors (particularly, ISVs) who privately share solutions with their customers. 27 | 28 | ### Bug fixes 29 | - Users without validate Azure subscription will be redirected to a mitigation pages seamlessly in CIQS 30 | - Solution template fixes 31 | 32 | ### Framework improvements 33 | - Onboarded to MDM (Geneva Hotpath monitoring/alerting), and emit Hearbeat metric of CIQS 34 | -------------------------------------------------------------------------------- /docs/_posts/2017-05-09-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-05-09 12:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Publishing to the CI Gallery for Solutions and Tutorials is now enabled from Custom Solutions 8 | - Show estimated daily cost in creating project page and CI Gallery page 9 | - Links from CIQS deployment detail page to the CI Gallery page 10 | - Display user friendly/actionable error message for ARM 11 | - Bug fixes 12 | 13 | 14 | 15 | ### Publishing to the Gallery from Custom Solutions 16 | - Authors can publish updates to existing solutions and tutorials from My Solutions built with SAW 17 | - Authors can publish new solutions and tutorials from My Solutions built with SAW 18 | - Added CI Gallery link in publishing complete dialog so Author can find the CI Gallery page 19 | 20 | ### Show estimated daily cost in creating project page and CI Gallery page 21 | - Users can now see an estimated daily cost from deployments and link to detail by Month and Year 22 | 23 | ### Links from CIQS deployment detail page to Gallery page 24 | - Solution: Link back to the Gallery page 25 | 26 | ### Display user friendly/actionable error message for ARM 27 | ![new error message]({{ site.baseurl }}/images/error-message.PNG) 28 | 29 | ### Bug fixes 30 | - Fixed broken solution sharing links 31 | - Fixed unity injection error on TemplateMetadata 32 | 33 | -------------------------------------------------------------------------------- /docs/_posts/2017-05-16-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-05-16 12:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Case-insensitive inputs and outputs in provisioning steps and Markdown 8 | - Summary preview is back 9 | - SAW 1.0 release 10 | 11 | 12 | 13 | ### Case-insensitive inputs and outputs in provisioning steps and Markdown 14 | 15 | ARM provisioning step input and output variables are not case-insensitive. CIQS variable resolution in Markdown files is case-insensitive as well. 16 | 17 | ### SAW 1.0 release 18 | 19 | Complete overhaul of SAW. [Read more]({{ site.baseurl }}\getting-started.html). -------------------------------------------------------------------------------- /docs/_posts/2017-05-23-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-05-23 20:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - SQL password validation improvements 8 | - Deployment notification emails are back 9 | - CI Gallery publishing bug fixes 10 | 11 | 12 | 13 | ### SQL password validation improvements 14 | 15 | These changes strengthen SQL password requirements to ensure ODBC connection strings are safe to use in new and existing solutions. 16 | The following characters are no longer accepted: ```' " = \ | : ␣ (whitespace)```. 17 | 18 | ### CI Gallery publishing bug fixes 19 | 20 | Due to a code bug, private solutions from SAW were published to the Gallery instead of the ones present in the curated CIQS account. This is now fixed. -------------------------------------------------------------------------------- /docs/_posts/2017-06-06-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-06-06 18:00 PST 3 | layout: post 4 | --- 5 | - Internally used Web API service metrics to enable service monitoring 6 | - Reduce the time to load the list of deployments 7 | - Bug fixes to make FunctionApp deployment and provisioning more robust 8 | - Auto-resolution of the PatternAssetBaseUrl variable. [More information](https://azure.github.io/Azure-CloudIntelligence-SolutionAuthoringWorkspace/solution-authoring.html) 9 | - Add case-sensitive file (referred in Manifest.xml) existence check in SAW validation phase 10 | 11 | -------------------------------------------------------------------------------- /docs/_posts/2017-06-13-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-06-13 17:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - SAW support of comment in ARM template 8 | - Detect DSVM terms of acceptance for Ubuntu and Windows 2016 (Preview) offer 9 | - Make CI Gallery publishing step optional 10 | - Test Automation - Onboard a set of basic E2E tests 11 | 12 | 13 | 14 | ### SAW support of comment in ARM template 15 | 16 | SAW now supports single/multi-line block comments (`/*…*/`) and single line comments (`//…\r\n`) in armTemplate json file. For example: 17 | 18 | ![support comments]({{ site.baseurl }}/images/comments.PNG) 19 | 20 | ### Detect DSVM terms of use acceptance for Linux Ubuntu offer and Windows 2016 (Preview) offer 21 | 22 | Error message below will be displayed when DSVM terms of use are not accepted; hyperlink "[here]()" links to the corresponding legal terms page per DSVM offer used by the solution. 23 | 24 | ![new dsvm error message]({{ site.baseurl }}/images/dsvm.PNG) 25 | 26 | ### Make CI Gallery publishing step optional to avoid error due to lack of permission 27 | 28 | Publishing to CI Gallery can be skipped now when author doesn't need to or doesn't have permission to publish changes to CI Gallery. 29 | 30 | Please refer to [gallery publishing details here](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/blob/master/docs/solution-publishing.md#gallery-publish-details). 31 | 32 | ### Test Automation - Onboard a set of basic E2E tests 33 | 34 | Test Automation - Onboard a set of basic tests to continue with the creation of the Task that will enable E2E test in VSTS. 35 | -------------------------------------------------------------------------------- /docs/_posts/2017-06-20-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-06-20 14:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - [Security] Migrating JS, CSS and web font to public CDNs. 8 | - Deployment page UX improvements. 9 | - [Security] Fixing ModernCop violations in ServiceConfiguration. 10 | - [Security] Upgrading TypeScript to 2.3.1. 11 | - Making Graph API token and TenantId available to Azure Functions. 12 | - Adding test drive sweeper tasks to track billing, send 24 hour prior notice emails on expiry & to remove expired accounts. 13 | - Added offending resource details for bad locations errors. 14 | - Fixing obsolete error message does not dismiss after new error message appears. 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/_posts/2017-06-27-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-06-27 14:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Preview features of SAW are available in the latest build (bleeding edge). Try it now! 8 | - New solution samples are available in [GitHub](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tree/master/Samples). 9 | - Bug fixes and framework improvements. 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/_posts/2017-07-05-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-07-05 14:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Resource types specified inside Manifest tag are now case-insensitive. For more information about the tag, please consult the [manual](https://azure.github.io/Azure-CloudIntelligence-SolutionAuthoringWorkspace/solution-authoring.html#locationprovidedfor). 8 | - Cloud Intelligence Test Drive improvements making the feature now code complete. 9 | - Improved error handling for solutions with Virtual Machines. CIQS will now validate to ensure that chosen VM SKU is available in the region of customer's choice. 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/_posts/2017-07-11-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-07-11 14:30 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Optimizations and bug fixes for use cases involving functions with numerous files (e.g., PowerShell modules). This feature is currently available only via the latest build of SAW Local (the “red” one). 8 | - Fixes to the new Try It Free feature. This is being tested more this week and then should role out next release for users 9 | - Fixes for HDInsight so that uppercase characters are not allowed in username for HDI clusters 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/_posts/2017-07-14-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-07-14 16:30 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Bug fixes for skipping sending email for custom solution deployments 8 | - Fixes to the new Try It Free (TestDriveController issues) 9 | - Fixes for issues causing ICM incidents 10 | - Gracefully handle OpenIdConnectProtocolInvalidNonceException 11 | - Stabilize provisioning status polling, prevent infinite looping on failure 12 | - Improved monitoring by adding service health metric for provisionstephandler 13 | - Retrieving group membership info from Graph API for internal users 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/_posts/2017-07-31-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-07-31 16:30 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Self-service publishing 8 | - CI Gallery contributor permissions check 9 | - UX and performance improvements 10 | 11 | 12 | 13 | # Self-service publishing 14 | 15 | - Members of IMML ADS org can create new solutions in the curated CIQS gallery without requesting an ID from the CIQS team. 16 | - Publishing into Cloud Intelligence Gallery was separated from publishing into the CIQS Gallery to accelerate the launch of Solutions and Tutorials. 17 | 18 | > Q: *How do I publish to CI Gallery now?* 19 | > 20 | > A: By navigating to [https://quickstart.azure.ai/Account/Manage](https://quickstart.azure.ai/Account/Manage) 21 | 22 | - Adding additional contributors to a solution is no longer curated by the CIQS team. Owners can add contributors via the Manifest. For instance, by replacing this line 23 | 24 | ```xml 25 | 26 | ``` 27 | 28 | with 29 | 30 | ```xml 31 | 32 | 33 | 34 | 35 | ``` 36 | 37 | # CI Gallery contributor permissions check 38 | 39 | In order to prevent unintentional publishing to CI Gallery not on behalf of Microsoft, we will be notifying authors without Microsoft content contributor permissions. 40 | -------------------------------------------------------------------------------- /docs/_posts/2017-12-12-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2017-12-12 08:00 PST 3 | layout: post 4 | published: true 5 | --- 6 | 7 | - Long-running and secure functions 8 | - Resolution steps for recoverable ARM deployment errors 9 | - Numerous bug fixes 10 | 11 | 12 | 13 | # Long-running and secure functions 14 | 15 | Functions used as CIQS provisioning steps timed out after about 5 minutes of execution. That was inconvenient and often 16 | led to deployment failures. 17 | 18 | One of the recent updates to the deployment engine removes this restriction and allows all functions, 19 | regardless of the programming language, to run indefinitely long. In addition, Functions used as provisioning steps 20 | no longer need to be *anonymous* (which essentially makes them publicly accessible). 21 | In fact, they don't even need to be enabled! See [this example](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tree/master/Samples/004-cognitiveservices/core/functions/createWebsite) 22 | to learn how to build more secure solutions. 23 | 24 | # Resolution steps for recoverable ARM deployment errors 25 | 26 | CIQS will parse ARM errors to identify potentially recoverable conditions. If appropriate, a link to 27 | corresponding [recovery steps](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/blob/master/docs/faq.md) 28 | will be shown to the user to assist them in successfully completing the deployment. 29 | -------------------------------------------------------------------------------- /docs/assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | @import "{{ site.theme }}"; 4 | 5 | @import "saw"; 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Getting started 4 | navigation_weight: 2 5 | --- 6 | {:.no_toc} 7 | # Getting started 8 | 9 | Let's get this straight: we really strive to help you be as efficient as possible when building Solutions. That was and still remains the primary goal of the *Solution Authoring Workspace* (aka *SAW*). 10 | 11 |
    12 |
  1. Wait! What exactly is SAW?
  2. 13 |
  3. Hmm… Okay. And what are those tools?
  4. 14 |
  5. That was easy! Now what? 15 |
      16 |
    1. Package 1: In-browser Solution authoring environment
    2. 17 |
    3. Package 2: Local Solution development on Windows
    4. 18 |
    19 |
  6. 20 |
  7. Configuration
  8. 21 |
22 | 23 | ## Wait! What *exactly* is *SAW*? 24 | 25 | Good question! 26 | 27 | *Solution Authoring Workspace* (SAW) has three ingredients: 28 | 29 | - Documentation 30 |
You are reading it now. It will be getting better. We promise. 31 | 32 | - [Samples](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tree/master/Samples) 33 |
They are simple and immediately deployable. Samples can serve as building blocks for the *real stuff* you have in mind. 34 | 35 | - Tools 36 |
We got some tools to help you build new Solutions and get them into CIQS for testing, sharing and publishing. (Not sure what CIQS is? Check [this]({{ site.baseurl }}) out, maybe!) 37 | 38 | ## Hmm... Okay. And what are those tools? 39 | 40 | They come in two packages. Pick whichever you like, or both! 41 | 42 | But first, navigate to [https://quickstart.azure.ai/](https://quickstart.azure.ai/) and, with the flip of a switch, become a Solution Author. (It's as easy as 1-2-3.) 43 | 44 | ![Enabling authoring features]({{ site.baseurl }}\images\switch.png) 45 | 46 | ## That was easy! Now what? 47 | 48 | Now come the packages. 49 | 50 | ### Package 1: In-browser Solution authoring environment 51 | 52 | Works on any host OS and features Web-based *Visual Studio Code*, the Samples, and essential tools like *SAW CLI*, *Git*, *MSBuild*, *Python*, *npm* and many more. No configuration or installation is required. 53 | ![SAW Web]({{ site.baseurl }}\images\sawweb.png) 54 | 55 | ### Package 2: Local Solution development on Windows 56 | 57 | We provide two options: latest stable release and latest build. The latter may be unstable at times, but it's the latest and the greatest! 58 | 59 | Launch either one directly from the Setup page. (If you use *Chrome* or *Firefox*, make sure to follow the instructions from the [section below](#one-time-setup-for-chrome-and-firefox).) A working shortcut will also be created on your Desktop. 60 | 61 | ![]({{ site.baseurl }}/images/sawlocal.png) 62 | 63 | ## Configuration 64 | 65 | Just kidding! You are now all set. 66 | -------------------------------------------------------------------------------- /docs/images/CIG1-e.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/CIG1-e.PNG -------------------------------------------------------------------------------- /docs/images/CIG2-e.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/CIG2-e.PNG -------------------------------------------------------------------------------- /docs/images/CIG3-e.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/CIG3-e.PNG -------------------------------------------------------------------------------- /docs/images/DeployToAzure.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/DeployToAzure.PNG -------------------------------------------------------------------------------- /docs/images/bash-jekyll-local.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/bash-jekyll-local.jpg -------------------------------------------------------------------------------- /docs/images/comments.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/comments.PNG -------------------------------------------------------------------------------- /docs/images/dsvm.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/dsvm.PNG -------------------------------------------------------------------------------- /docs/images/error-message.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/error-message.PNG -------------------------------------------------------------------------------- /docs/images/essential-solution-components.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/essential-solution-components.jpg -------------------------------------------------------------------------------- /docs/images/faq-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-1.png -------------------------------------------------------------------------------- /docs/images/faq-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-2.png -------------------------------------------------------------------------------- /docs/images/faq-3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-3.PNG -------------------------------------------------------------------------------- /docs/images/faq-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-4.png -------------------------------------------------------------------------------- /docs/images/faq-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-5.png -------------------------------------------------------------------------------- /docs/images/faq-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-6.png -------------------------------------------------------------------------------- /docs/images/faq-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-7.png -------------------------------------------------------------------------------- /docs/images/faq-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/faq-8.png -------------------------------------------------------------------------------- /docs/images/github-pages-settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/github-pages-settings.jpg -------------------------------------------------------------------------------- /docs/images/github-pull-request.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/github-pull-request.jpg -------------------------------------------------------------------------------- /docs/images/helloworld-create.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/helloworld-create.jpg -------------------------------------------------------------------------------- /docs/images/helloworld-deployment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/helloworld-deployment.jpg -------------------------------------------------------------------------------- /docs/images/helloworld-ready.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/helloworld-ready.jpg -------------------------------------------------------------------------------- /docs/images/ingredient-in-ci-gallery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/ingredient-in-ci-gallery.png -------------------------------------------------------------------------------- /docs/images/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/location.png -------------------------------------------------------------------------------- /docs/images/pbi11-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi11-2.png -------------------------------------------------------------------------------- /docs/images/pbi11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi11.png -------------------------------------------------------------------------------- /docs/images/pbi3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi3.png -------------------------------------------------------------------------------- /docs/images/pbi4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi4.png -------------------------------------------------------------------------------- /docs/images/pbi5-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi5-2.png -------------------------------------------------------------------------------- /docs/images/pbi5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi5.png -------------------------------------------------------------------------------- /docs/images/pbi6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi6.png -------------------------------------------------------------------------------- /docs/images/pbi7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi7.png -------------------------------------------------------------------------------- /docs/images/pbi8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi8.png -------------------------------------------------------------------------------- /docs/images/pbi9-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi9-2.png -------------------------------------------------------------------------------- /docs/images/pbi9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/pbi9.png -------------------------------------------------------------------------------- /docs/images/push-helloworld.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/push-helloworld.gif -------------------------------------------------------------------------------- /docs/images/register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/register.png -------------------------------------------------------------------------------- /docs/images/register2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/register2.png -------------------------------------------------------------------------------- /docs/images/register3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/register3.png -------------------------------------------------------------------------------- /docs/images/resource-group-empty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/resource-group-empty.jpg -------------------------------------------------------------------------------- /docs/images/samples.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/samples.jpg -------------------------------------------------------------------------------- /docs/images/saw-legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/saw-legacy.png -------------------------------------------------------------------------------- /docs/images/sawlocal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/sawlocal.png -------------------------------------------------------------------------------- /docs/images/sawweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/sawweb.png -------------------------------------------------------------------------------- /docs/images/sharing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/sharing.png -------------------------------------------------------------------------------- /docs/images/skus-dynamic.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/skus-dynamic.PNG -------------------------------------------------------------------------------- /docs/images/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/2035e514883601951c6d230c9bc856db7b49fc86/docs/images/switch.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Home 4 | navigation_weight: 1 5 | --- 6 | 7 | # Authoring Azure Solutions with the Solution Authoring Workspace (SAW) and the Cloud Intelligence Quickstart (CIQS) 8 | 9 | *CIQS* is a service that orchestrates solution deployment into a customer's *Azure* subscription by performing a series of provisioning activities that fall into two categories: 10 | - Cloud resource creation (essentially, things that can be achieved with ARM templates) 11 | - Execution of custom provisioning code (things that are not possible to achieve with ARM) 12 | 13 | The deployment progress is surfaced to the user through a UX which allows collecting input parameters and displaying customizable and interactive multi-media content such as textual instructions, images, and embedded *Power BI* dashboards with live data visualization. 14 | 15 | In the event of an error, the UX displays a message explaining the error and, under certain conditions, allows graceful recovery from the failure. 16 | 17 | In order to unlock the full potential of our platform, we needed a good set of tools that would enable more teams and individuals to build new Solutions with as little effort as possible. The complexity of this process is why *SAW* or *Solution Authoring Workspace* came about as a tool that eliminates the hurdles from the authoring process and lets the developer focus on the problem rather than the specifics of a framework. 18 | 19 | To get started, the first first to the [CUSTOM SOLUTIONS page](https://quickstart.azure.ai/CustomSolutions) and click *Setup*. Then select the subscription and location for the tool to use when configuring the authoring environment. The setup process takes roughly 2 minutes. 20 | 21 | We provide 2 options: 22 | - in-browser authoring environment (Requires no setup and is compatible with any modern browser and any host OS.) 23 | - local installation (Windows only, requires downloading and installing an MSI package) 24 | 25 | Both options offer an identical set of features. 26 | 27 | The in-browser environment comes with a set of Samples that are ready to be consumed examples of *Cloud Intelligence* solutions. The Samples can serve as building blocks for new customer-facing Solutions. For example: 28 | 29 | - [one of the samples](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tree/master/Samples/004-cognitiveservices) demonstrates how to create a solution that would enable anybody with an Azure subscription to create an app similar to Microsoft's viral how-old.net using *Azure Cognitive Services APIs* and *Azure Functions*; 30 | - [another notable example](https://github.com/Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace/tree/master/Samples/009-twitterstreaming) is stream analytics with ML demonstrating how to perform sentiment analysis of Twitter data. It shows how to write a data ingestion piece (implemented as a WebJob written in *Python*), send streaming data to an event hub, run it through a *Stream Analytics Job* that in turn calls *Machine Learning Web API* and finally, visualize the results inside an embedded *Power BI* dashboard. 31 | 32 | To create a new Custom Solution and publish it into CIQS, put the source code into the Solution directory (for instance, let's take the cognitive services sample mentioned earlier). 33 | 34 | Users can publish custom solutions into CIQS by running a shell command from the Windows console. The command is: saw push (If local installation is used, it would be available in the regular windows command prompt and the rest is the same.) After it completes, the solutions are immediately available for deployment and can be found in the *My Solutions* section. 35 | 36 | Notable *SAW* features include: 37 | - Full *Git* support in the Web environment (thanks to the *App Service Editor* aka *Visual Studio Online "Monaco"*); this is really great for collaborative solution authoring (example - git clone and then saw deploy) 38 | - Local SAW environment allows incorporating your own tools into the authoring process 39 | - Self-publishing into *Cloud Intelligence* gallery 40 | - The ability to “Share” custom solutions to anyone with your link 41 | 42 | Questions? [Contact us!](mailto:cisauthors@microsoft.com) 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/powerbi-configurations.md: -------------------------------------------------------------------------------- 1 | # How to connect to data source in Power BI desktop? 2 | ## Step 1 3 | Download and open the sample **pbix** file. You can download Power BI desktop from [**here**](https://powerbi.microsoft.com/en-us/desktop/) to a Windows desktop or a Windows [Virtual Machine](https://azure.microsoft.com/en-us/services/virtual-machines/) if you don’t have one. 4 | ## Step 2 5 | **Close** any prompted dialog if you are asked for data credential, because in this tutorial we are going to change the data source and credential away from default configuration to what you have just provisioned. 6 | ## Step 3 7 | Click "**Edit Queries**" and select "**Data source settings**". 8 | ![](images/pbi3.png) 9 | ## Step 4 10 | In the "**Data source settings**" dialog, choose the default data source as such, and click on "**Change source...**". 11 | ![](images/pbi4.png) 12 | ## Step 5 13 | From the "**Change Source...**" popup, replace the "**Server**" and "**Database**" input as the post-deployment instruction tells and leave everything else as default. for example: 14 | ![](images/pbi5.png) 15 | The "**Server**" name and "**Database**" name are usually displayed in the post-deployment instructions, for example: 16 | ![](images/pbi5-2.png) 17 | ## Step 6 18 | Click "**OK**" to exit changing the data source. 19 | ![](images/pbi6.png) 20 | ## Step 7 21 | Then we are ready to configure the credentials for the new data source we just added. 22 | Navigate again to the data source settings dialog by clicking "**Edit Queries**", and then selecting "**Data source settings**" as in [**Step 3**](#step-3). This time click "**Edit Permissions...**" button. 23 | ![](images/pbi7.png) 24 | ## Step 8 25 | In the "**Edit Permissions...**" popup, within the "**Credentials**" section, click the "**Edit...**" button. 26 | ![](images/pbi8.png) 27 | ## Step 9 28 | From the "**Credentials**" popup, choose "**Database**" and type in the "**User name**" and "**Password**" as instructed. 29 | ![](images/pbi9.png) 30 | The "**User name**" and "**Password**" are the ones you were asked to provide in the middle of the provisioning workflow (Remember? 😊). 31 | ![](images/pbi9-2.png) 32 | ## Step 10 33 | Click "**Save**" to finish configuring the "**Credentials**" and click "**OK**" to finish editing the permissions. Leave other settings as default and click "**Close**" to complete the "**Data source settings**". 34 | ## Step 11 35 | Finally, click "**Refresh**" button or the "**Apply changes**" button to load data from the data source into your report; Power BI report views with real-time streaming data is ready for you! 36 | ![](images/pbi11.png) 37 | You can always create your own custom views in Power BI reports. More details about Report View in Power BI desktop is available [**here**](https://docs.microsoft.com/en-us/power-bi/desktop-report-view). 38 | Below is a sample output from [**Twitter Streaming with Azure Machine Learning**](https://gallery.azure.ai/Solution/Twitter-Stream-Analysis-with-Azure-Machine-Learning) solution template. 39 | ![](images/pbi11-2.png) 40 | If you have any question or feedback, please [**contact us**](mailto:ciqsoncall@microsoft.com). Enjoy and have fun! 41 | -------------------------------------------------------------------------------- /docs/release-notes.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Release notes 4 | navigation_weight: 7 5 | --- 6 | # Release notes 7 | 8 | {% for post in site.posts %} 9 | {% if post.excerpt != post.content %} 10 | ## [{{ post.date | date: "%m/%d/%Y, %r (%Z)" }}]({{ site.baseurl }}{{ post.url }}) 11 | {% else %} 12 | ## {{ post.date | date: "%m/%d/%Y, %r (%Z)" }} 13 | {% endif %} 14 | {{ post.excerpt }} 15 | {% endfor %} 16 | --------------------------------------------------------------------------------