Quick Start with Microsoft Azure

The fastest way to deploy MemSQL on Microsoft Azure is through the Azure Marketplace. If you do not want to use the Azure marketplace, you can also set up MemSQL on Azure manually. Both these options are covered in this tutorial.

Using the Azure Marketplace

Launching a single-instance cluster on Microsoft Azure Store is simple and fast.

1. Choose Developer or Enterprise Edition

There are two editions available on the marketplace: Developer and Enterprise. Both are “cluster in a box” configurations, including all the components of a MemSQL cluster on a single virtual machine.

MemSQL Developer Edition has no software charges and comes with community help. MemSQL Enterprise Edition is priced by system RAM, on an hourly basis, and comes with enterprise features such as replication for high availability, and phone and email support. image

2. Choose region, Azure subscription, and credentials

On the first screen, enter the Unix account name and password (or SSH key). This user cannot be an existing account like “root”. Azure accounts may have multiple subscriptions, each with their own payment details and quotas. Make sure the one chosen is correct. On this screen you can also choose which Azure region (eg East US, West US) to launch into.

image

3. Choose an instance size

There are a large number of virtual machine sizes to choose from. The D13 offers good price / performance, as does the premium storage version, the DS13. Click here for more information on Azure instances. image

Info

MemSQL requires at least 4 CPU cores and 8GB of RAM to function. See System Requirements for more details.

4. Configure optional settings

On this screen you can change optional network, storage, and monitoring settings. image

5. Confirm and launch

On these screens you can review and confirm your settings. image

Click “Buy” and then click “Create”.

image

Your MemSQL instance will launch. By default it will have an icon on your Azure startboard. image

6. Connect

Once the instance is provisioned, you can access the MemSQL Ops UI in your browser, using the public IP address or public DNS name of your instance on port 9000.

   http://<your-instance-ip>:9000
Info

To connect to the MemSQL database with a MySQL-compatible client from a different machine, make sure to open port 3306 in your network settings. The default MemSQL user is “root” with no password. See also How to Connect to MemSQL.

Setting up on Azure Manually

Azure offers various tiers of pre-configured machines. Among the current field of VMs offered by Azure, MemSQL recommends pricing tier D. Within pricing tier D, we recommend going with one of DS12 through DS14, which offer a strong combination of CPU cores, RAM and disk speeds. For testing purposes, the minimum requirements is an A3 virtual machine.

There are a few things to note when spinning up a VM in Azure. VMs require a virtual network and a storage account.

Virtual Networks are configurable network overlays in Azure that allow for virtual machines within the same virtual network to speak to each other directly, as opposed to going through the internet. By placing all machines within the same virtual network, network latency is reduced drastically. Storage accounts are helpful because they create a namespace for tables, queues, and blobs. File storage can be requested as needed.

Info

This walkthrough aims to give a deeper understanding of running a

MemSQL cluster on Azure, not automating the process. 
Launching nodes one at a time through a web interface can become 
a bit of a drag when one is creating a cluster of reasonable size. 
Because of that, we recommend investigating some of the tooling 
surrounding Azure, for instance the [Azure CLI](https://azure.microsoft.com/en-us/documentation/articles/xplat-cli/).

Create a Virtual Network

In the left menu, select “New”, then “Networking”, and then add a “Virtual Network”. Name it (e.g., memsql), and configure its address space (e.g., 10.0.0.0/16). We recommend creating a resource group to group all the resources and nodes in the cluster (name it, e.g., memsql).

It is worth mentioning that later you will be able to assign fixed internal IP addresses to each virtual machine, rather than using DHCP because of the virtual network. The benefit of this method is that one would not have to reconfigure their cluster in the event of an IP change. image

Create a Storage Account

In the left menu, select “New”, then “Data + Storage”, and then add a “Storage”. Name it (e.g., memsql), and make sure to place it in the resource group previously created. image

Create the VMs

This section describes how to launch a VM in Azure binding it to the resources previously created, setting a static private IP, and optionally adding an endpoint to enable public access to MemSQL Ops port (only required on the VM that will act as MemSQL Ops Primary Agent).

You can repeat the following procedure to launch as many nodes as necessary.

In the left menu, select “New”, then “Compute”, and then choose an Ubuntu Server 14.04 LTS image.

In the “Create VM” column, fill in host name (e.g., memsql-master), user name and authentication information (e.g., azureuser and password). Choose a pricing tier (we recommend at least a standard DS12 instance), and select the resource group previously created (e.g., memsql). image

Select now “Optional configuration”, then “Network”, and double check the virtual network is set to the one previously created (e.g., memsql).

We recommend setting a static private IP address for each VM. Go to “IP addresses”, then select “Static” in the Private IP address section, enter an IP address (e.g., 10.0.1.10), and confirm with “OK”.

Back to the “Optional config” column, double check the storage account is set to the one previously created (e.g., memsql). image

The last step is to configure an endpoint to open the MemSQL Ops port (default 9000). This step is only required once, for the VM that will act as MemSQL Ops Primary Agent.

In the “Optional config” column, select “Endpoints”. Add a new endpoint, name it (e.g., MemSQL Ops), set the private port and public port to 9000, and confirm with “OK”. image

Finally, create the VM by pressing the “Create” button.

Modifying Settings After VM Creation

This section describes how to configure a static private IP address and add an endpoint to a running VM. If you followed the instructions above, all nodes should be properly configured and you can skip to Full Installation Guide.

As mentioned before, we recommend setting static private IP addresses to the VMs. This can modified anytime via “Settings”, then “IP addresses”, in the “Private IP address” section. image

In addition, the port 9000 must be open to access MemSQL Ops on the VM that will act as Primary Agent. This can be done via “Settings”, then “Endpoints”.

Optionally, if you need access to the MemSQL aggregators from outside the virtual network, you may want to open port 3306 on all aggregator nodes. In this case, we also recommend to set a network access control list to permit access only from an IP or subnet. image

Install MemSQL

The final step is to set up MemSQL. The fastest way to deploy MemSQL in Azure is using MemSQL Ops, as detailed in Quick Start On-Premises .

Was this article useful?