Spark on Azure HDInsight
Spark on Azure HDInsight example
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set classic-azure-ts-hdinsight-sparkcd pulumi-examples/classic-azure-ts-hdinsight-sparkAn example Pulumi component that deploys a Spark cluster on Azure HDInsight.
Prerequisites#
Deploying the example#
-
Create a new stack:
Terminal window pulumi stack init dev -
Log in to the Azure CLI (you will be prompted to do this during deployment if you forget this step):
Terminal window az login -
Configure the target Azure environment:
Terminal window pulumi config set azure:location <location>pulumi config set azure:subscriptionId <YOUR_SUBSCRIPTION_ID>pulumi config set username <value>pulumi config set password --secret <value> -
Install dependencies:
Terminal window npm install -
Deploy the stack:
Terminal window pulumi upPreviewing changes:...Performing changes:...info: 5 changes performed:+ 5 resources createdUpdate duration: 15m6s -
Check the deployed Spark endpoint:
Terminal window pulumi stack output endpointhttps://myspark1234abcd.azurehdinsight.net/For instance, Jupyter notebooks are available at
https://myspark1234abcd.azurehdinsight.net/jupyter/. Follow the Apache Spark load data and run queries guide to test it out.
Cleaning up#
Once you are done, you can destroy all of the resources, and the stack:
pulumi destroypulumi stack rm