Azure
Get A Ubuntu Host on Azure
The first step for setting up DoltLab in Microsoft Azure Cloud is provisioning a virtual machine. A virtual machine in Azure is Microsoft's equivalent to EC2 in AWS.
Referencing the recommended minimum hardware for DoltLab, we'll provision a virtual machine with at least 4 CPU and 16 GB of RAM. We'll also need to ensure our host has at least 300 GB of disk.
From the Azure Cloud console, we'll select "Virtual machines" from the list of services.
This will take you to the Virtual Machines Dashboard.
Next, click "Create". This will take you to the following form with the "Basics" tab open.
The "Subscription" field of the "Project details" section should have your Azure subscription selected. Mine is called "Azure subscription 1". I've also chosen to create a new "Resource group" called "doltlab".
In "Instance details", I've named our DoltLab instance "doltlab", and chosen the appropriate region and availability where I want my virtual machine deployed.
"Security type" defaults to "Trusted launch virtual machines", and does not need to be changed.
For "Image", DoltLab requires Ubuntu, so I went with 20.04 LTS
, though 22.04 LTS
is also fine. DoltLab also requires x86
for "VM architecture" so the choice is selected as well.
Scrolling further down the page, for "Size", we select Standard_D4s_v3
which meets the minimum hardware requirements, and we choose "SSH public key" for connecting to our virtual machine.
We use the default value for "Username", azureuser
, choose "Generate a new key pair" under "SSH public key source", since we don't have an existing one to use on this host.
Now click over to the "Disks" tab.
Here we can choose the size of the OS disk, which defaults to 30 GB. This is sufficient for the OS, but we do need at least 300 GBs for DoltLab.
For that, under the "Data disks" section at the bottom, we can click "Create and attach a new disk".
We can make our data disk for DoltLab using this form. Since the default size for this new disk is 1TB, we go ahead and leave the default values for all fields here. The one exception is whether you want to have this disk automatically deleted when the virtual machine is deleted. I chose this option.
Click "Ok", then move on to the "Networking" tab.
By default, new "Subnet" and new "Public IP" are selected for us. And, since we don't have existing ones we want to use, this is fine for us.
We also want to delete the public IP if we delete the virtual machine, so we check "Delete public IP and NIC when VM is deleted".
Finally, we can click "Review + create".
You'll see a summary of all the configuration options on this page. Click "create" to deploy your virtual machine. Azure will then prompt you to download the generated private key file you'll need to ssh into the host.
Click "Download private key and create resource".
Azure will begin the deployment of your host, and it will take a minute or two to come up. In the meantime, change the permissions of the private key you downloaded by running:
Now let's open the required ports on our virtual machine.
Open the required ports
When the virtual machine is up and running, Azure will redirect you to the dashboard for your running virtual machine.
From the menu on the left, under the "Networking" section, choose "Network settings". This is where we will create inbound rules for the ports DoltLab requires to be open.
We can see that our ssh inbound rule is already configured. Now we need open ports 80
, 100
, 4321
, and 50051
which are required for DoltLab.
Click "Create port rule".
Be sure to select "Inbound port rule". Following this you'll see the form you use to create each port rule.
Creating a rule for port 80
can be done by selecting "HTTP" from the "Service" dropdown menu. Make sure "Action" is "Allow" and click "Add".
For the remaining ports, click "Create port rule" for each one, then fill in the form to create the new port rules. Each port rule should have a "Source" of "Any", an "*" for "Source port ranges", "Any" for "Destination", nothing for "Service", and the port number you're adding in "Destination port ranges", one of 100
, 4321
, and 50051
.
All port-rule "Protocols" should be "TCP", with "Action" "Allow". None of the other settings need to be modified from their default values here. Click "Add" to create each new port rule.
When you're finished, your ports should look like this:
If they do, you've successfully provisioned your virtual machine for DoltLab and it's time to connect to it and set up the attached disk.
Configure the disk
To connect to your virtual machine, ssh into it with a command like the following:
Once connected, if you look for the 1TB disk we attached while creating the virtual machine, you won't see it listed.
This is because we need to format and partition the disk before we can use it. To do this, I followed this documentation, but I'll show each step I performed on my host here as well.
First, I used lsblk
to search for the 1TB attached disk.
The disk we attached is sdc
.
Next we use the parted
and partprobe
utilities to format and partition the disk.
Then we need to mount the disk and get the block id using blkid
. We'll mount the disk to /datadrive
.
Next, we edit /etc/fstab
and add our device's UUID
to the file.
Once those edits are saved, we can see our new device successfully mounted using lsblk
and df
:
Finally, we need to change the permissions of /datadrive
so we can write to it. Initially, only root
can do so.
This can be done using chown
:
Our disk is now ready, and we can move on to installing and running DoltLab. Continue the Getting Started guide.
Last updated