<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sascha Dittmann on Medium]]></title>
        <description><![CDATA[Stories by Sascha Dittmann on Medium]]></description>
        <link>https://medium.com/@SaschaDittmann?source=rss-2fe285918e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ooYFiifqRNm75BRSk51oVQ.jpeg</url>
            <title>Stories by Sascha Dittmann on Medium</title>
            <link>https://medium.com/@SaschaDittmann?source=rss-2fe285918e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 05:11:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@SaschaDittmann/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Configuring an Azure VNET to use AZTK in mixed mode]]></title>
            <link>https://medium.com/@SaschaDittmann/configuring-an-azure-vnet-to-use-aztk-in-mixed-mode-28d806383a13?source=rss-2fe285918e------2</link>
            <guid isPermaLink="false">https://medium.com/p/28d806383a13</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[azure-batch]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Sascha Dittmann]]></dc:creator>
            <pubDate>Wed, 20 Jun 2018 11:31:32 GMT</pubDate>
            <atom:updated>2018-08-23T08:58:34.236Z</atom:updated>
            <content:encoded><![CDATA[<p>In my last post, I showed you how to provision a low-cost Apache Spark cluster on Microsoft Azure, with the help of the Azure Batch service, Low Priority Virtual Machines, and the Azure Distributed Data Engineering Toolkit (AZTK).</p><p>But have you tried to mix a cluster with Dedicated-, as well as Low Priority-Virtual Machines?</p><p>If you did, you propably run into an error…</p><h3>Mixing Dedicated- and Low Priority, Virtual Machines</h3><p>I tried to provision a Spark cluster with the following command:</p><p>aztk spark cluster create --id mycluster --size 1 --size-low-priority 2 --vm-size standard_d12_v2</p><p>But all I got, was the following error message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/0*jGn4DO9VGK0XYxG3.png" /></figure><h3>What do I need a mixed mode cluster for</h3><p>But let my first start with the Why.</p><p>Azure offers low-priority virtual machines (VMs) to reduce the cost of your workloads. Low-priority VMs make new types of workloads possible by enabling a large amount of compute power to be used for a very low cost.</p><p>Low-priority VMs take advantage of surplus capacity in Azure. When you specify low-priority VMs in your cluster, Azure can use this surplus, when available.</p><p>The tradeoff for using low-priority VMs is that those VMs may not be available to be allocated or may be preempted at any time, depending on available capacity.</p><p>Dedicated VMs stay online all the time to process your Spark jobs, even if some of the low-priority VMs are offline. That’s the reason, why you might want to add dedicated VMs to your cluster too.</p><p>If you have a mixed-mode Spark cluster with both types of VMs, the master node will always to assigned to a dedicated VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/0*AcbbFgVlasP3RL5B.png" /></figure><h3>Creating an Azure Virtual Network</h3><p>So the first thing I did was to create an Azure Virtual Network (<a href="https://docs.microsoft.com/en-us/azure/virtual-network/quick-create-portal">How to create a virtual network using the Azure portal</a>) in the AZTK resource group.</p><p>After that, I opened the <strong>Properties</strong> section of the newly created VNET and copied the Resource ID to my clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PDKPTqvC8rb4bC6c.png" /></figure><h3>Update cluster.yaml file</h3><p>I opened a Terminal window and used vim to edit the <strong>cluster.yaml</strong> file in the <strong>.aztk</strong> folder.</p><p>In that file, there is a section called “<strong>To add your cluster to a virtual network provide the full arm resource id below</strong>”.</p><p>I removed the comment symbol from the line which contains the “<strong>subnet_id:</strong>” property and added the Resource ID from the Virtual Network.</p><p>I also added the name of the subnet with the <strong>/subnets/</strong> prefix.</p><p>subnet_id: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/aztk/providers/Microsoft.Network/virtualNetworks/aztk-vnet/subnets/default</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rUbFVogl1hcGfm0t.png" /></figure><h3>Create a cluster</h3><p>After saving the chances to the cluster.yaml file, I was able to create a mixed-mode cluster with the toolkit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FoXJCtalDgm4llWP.png" /></figure><p><em>Originally published at </em><a href="https://datainsights.cloud/2018/06/20/aztk-mixed-mode/"><em>datainsights.cloud</em></a><em> on June 20, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28d806383a13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a low-cost Apache Spark cluster on Microsoft Azure]]></title>
            <link>https://medium.com/@SaschaDittmann/how-to-create-a-low-cost-apache-spark-cluster-on-microsoft-azure-3714113061c5?source=rss-2fe285918e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3714113061c5</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[azure-batch]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Sascha Dittmann]]></dc:creator>
            <pubDate>Sat, 16 Jun 2018 10:18:17 GMT</pubDate>
            <atom:updated>2018-08-23T08:56:07.378Z</atom:updated>
            <content:encoded><![CDATA[<p>A few months ago, I found a nice little open-source tool on GitHub called AZTK, which provides a fast and easy way to provision low-cost Apache Spark clusters on Microsoft Azure.</p><p>In this blog post, I would like to show you, how to install the <strong>Azure Distributed Data Engineering Toolkit (AZTK)</strong> on your Windows-, Linux- or MacOS-based system, and how to provision your first Apache Spark cluster with it.</p><h3>Azure Distributed Data Engineering Toolkit (AZTK)</h3><p>The <strong>Azure Distributed Data Engineering Toolkit (AZTK)</strong> is a python CLI application for provisioning on-demand Spark on Docker clusters in Azure. It’s a cheap and easy way to get up and running with a Spark cluster, and a great tool for Spark users who want to experiment and start testing at scale.</p><p>This toolkit is built on top of Azure Batch but does not require any Azure Batch knowledge to use.</p><p>For more details, please have a look on [<a href="https://github.com/Azure/aztk">GitHub</a>].</p><h3>Notable Features</h3><ul><li>Spark cluster provision time of 5 minutes on average</li><li>Spark clusters run in Docker containers</li><li>Run Spark on a GPU enabled cluster</li><li>Users can bring their own Docker image</li><li>Ability to use low-priority VMs for an 80% discount</li><li>Mixed Mode clusters that use both low-priority and dedicated VMs</li><li>Built in support for Azure Blob Storage and Azure Data Lake connection</li><li>Tailored pythonic experience with PySpark, Jupyter, and Anaconda</li><li>Tailored R experience with SparklyR, RStudio-Server, and Tidyverse</li><li>Ability to run spark submit directly from your local machine’s CLI</li></ul><h3>Getting Started</h3><h3>Install Python 3</h3><p>Before you install the Azure Distributed Data Engineering Toolkit, you need Python 3, as well as pip3, installed on your system.</p><p>To do this, please have a look at <a href="https://www.python.org/">Python.org</a>.</p><h3>Virtual Environment (optional)</h3><p>After that, I recommend to create a separate virtual environment for the toolkit.</p><p>python3 -m venv aztk</p><p>Once you’ve created a virtual environment, you may activate it.</p><p>On Windows, run:</p><p>aztk\Scripts\activate.bat</p><p>On Unix or MacOS, run:</p><p>source activate aztk</p><h3>Install AZTK</h3><p>Now you’re ready to install the Azure Distributed Data Engineering Toolkit (AZTK) with a simple:</p><p>pip install aztk</p><h3>Initialize AZTK</h3><p>After you installed the toolkit, you’re ready to create your first Aztk environment. To do that, you simply call</p><p>aztk spark init</p><p>This command creates a .aztk folder in your current directory with the following file structure:</p><ul><li>cluster.yaml</li><li>core-site.xml</li><li>jars</li><li>job.yaml</li><li>secrets.yaml</li><li>spark-defaults.conf</li><li>spark-env.sh</li><li>ssh.yaml</li></ul><p>If you want to create a machine wide configuration, you add the <strong>–global</strong> parameter to the command.</p><h3>Azure Resources and Credentials</h3><p>To be able to work with the toolkit, you have to provision a few Azure resources, e.g. Azure Batch, Azure Storage Account, an Service Principal, etc.</p><p>The easiest way to do this, is to login to the <a href="https://portal.azure.com/">Azure Portal</a> and execute the following command in the <a href="https://shell.azure.com/">Azure Cloud Shell</a>.</p><p>wget -q https://raw.githubusercontent.com/Azure/aztk/v0.7.0/account_setup.sh -O account_setup.sh &amp;&amp; chmod 755 account_setup.sh &amp;&amp; /bin/bash account_setup.sh</p><p>After answering a few questions, the command return the required settings, which you add/update in the <strong>.aztk/secrets.yaml</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/0*2QQOGTsWyeFsts8I.png" /></figure><h3>Provision your first Apache Spark cluster</h3><p>Finally we’re ready to provision our first Apache Spark cluster using the AZTK.</p><p>aztk spark cluster create --id mycluster --size 0 --size-low-priority 5 --vm-size standard_d12_v2</p><ul><li>With the <strong>id</strong> parameter, you specify an unique ID (within your Azure Batch account) for your cluster.</li><li>The <strong>size</strong> parameter specifies the amount of dedicated virtual machines (which are charged at the full price).</li><li>The <strong>size-low-priority</strong> parameter specifies the amount of Low-Priority Virtual Machines (which are charged at the 20% of the regualar price). This, of course, comes with a disadvantage. If Azure needs the virtual machines for another customer, they will be deleted.</li><li>The <strong>vm-size</strong> parameter specifies the <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes">type of the virtual machines</a> to use.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*z-LRMo-6xpYiPOXE.png" /></figure><blockquote><em>You’re also able to use the Azure N-Series virtual machines to provision GPU enabled clusters.</em></blockquote><h3>Getting Cluster Information</h3><p>As soon as a cluster is provisioning, existing or deleting, you can use the following commands to get more details:</p><p>aztk spark cluster list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*LYzwLlSOC9WueWj-.png" /></figure><p>aztk spark cluster get --id mycluster</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*-PAsk3Q5rdTSNNsf.png" /></figure><h3>Connect to the cluster</h3><p>With the following command, you’re able to ssh-connect to the master node of your cluster, as well as do a port forwarding to the services (and plugins) on the cluster.</p><p>aztk spark cluster ssh --id mycluster</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*7RSd2dsfmMvoB1qv.png" /></figure><p>After the connection has been established, you can use the port forwarding to access services like the Spark Web UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*zGKuE2-y2s-6_yOb.png" /></figure><h3>Deleting a cluster</h3><p>Last but not least, don’t forget to delete the cluster if you don’t need it anymore.</p><p>aztk spark cluster delete --id mycluster</p><p><em>Originally published at </em><a href="https://datainsights.cloud/2018/06/16/how-to-create-a-low-cost-spark-cluster-on-azure/"><em>datainsights.cloud</em></a><em> on June 16, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3714113061c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>