13 |
14 |
A simple static website
15 |
16 |
This page was created via an Azure Function written in Windows PowerShell!
17 |
18 |
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 | [](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 | [](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 |