Deploy ReductStore as Azure Virtual Machine
Alexey Timin
Posted on August 7, 2024
Deploy ReductStore as Azure Virtual Machine
ReductStore, a time series database for unstructured data, is available as a virtual machine on the Azure Marketplace, providing Azure customers with an easy way to deploy out-of-the-box ReductStore instances on Azure VMs.
The following guide provides instructions on how to deploy ReductStore as a virtual machine on Azure using the Azure CLI.
Overview
The virtual machine is pre-configured with ReductStore and all the necessary dependencies to store data in Azure storage accounts. This provides a low cost storage solution that is easy to provision and scale as the data is stored away from the virtual machine.
ReductStore doesn't have native support for Azure Storage Accounts, but the virtual machine is preconfigured with Azure BlobFuse to mount the Azure Storage Account as a local file system. It uses a local disk cache to optimise read and write operations by reducing the number of requests to the Azure Storage Account.
Virtual Machine Requirements
Before creating the virtual machine, you should choose the size of the virtual machine according to your requirements. The minimum requirements for the virtual machine are:
- RAM: 1 GB
- CPU: 1 vCPUs
- Disk: 32 GB HDD
You will also need an Azure storage account to store the data. If you don't have one, you can create one in the Azure portal.
Provisioning
The Virtual Machine uses custom data for provisioning where you must provide credentials for the Azure Storage Account in the dotenv format:
AZURE_STORAGE_ACCOUNT=<STORAGE_ACCOUNT_NAME>
AZURE_STORAGE_ACCOUNT_CONTAINER=<STORAGE_ACCOUNT_CONTAINER>
AZURE_STORAGE_ACCESS_KEY=<STORAGE_ACCOUNT_ACCESS_KEY>
Read more about environment variables in the Azure BlobFuse documentation.
Additionally, you can configure and provision ReductStore's resources in the same way. Read the Configuration page for more information.
Deployment Steps
The following steps describe how to deploy ReductStore as a virtual machine on Azure using the Azure CLI.
Disclaimer: The guide contains instructions on how to deploy ReductStore as a virtual machine on Azure and doesn't cover the security and performance aspects of the deployment. You should review and modify the deployment to meet your needs.
- First create a resource group:
az group create --name myResourceGroup --location westeurope
- Select the plan you want to use (Sku column):
az vm image list --publisher reductsoftware -o table --all
- You must accept the Terms and Conditions of the Azure Marketplace offering before creating the virtual machine.
az vm image terms accept --publisher reductsoftware -f reductstore-server --plan [PLAN_NAME]
The [PLAN_NAME]
is the name of the plan you want to use. You can find it in the image Urn, for example, reductstore-01tb-std
.
- Create the
custom_data.env
file with the custom data - Create the virtual machine:
az vm create \
--resource-group myResourceGroup \
--name myVM \
--image reductsoftware:reductstore-server:[PLAN_NAME]:[VERSION] \
--size Standard_A2_v2 \
--admin-username azureuser \
--generate-ssh-keys \
--custom-data custom_data.env
- Open the HTTPS port in the network security group:
az vm open-port --port 443 --resource-group myResourceGroup --name myVM --priority 800
- Locate the public IP address of the virtual machine:
az network public-ip list -g myResourceGroup -o table
- Go to the public IP address in your browser to access the ReductStore web interface.
- Accept the self-signed SSL certificate to access the web interface.
Best Practices
SSL Certificate
The virtual machine generates a self-signed SSL certificate at the first boot. It is recommended that you replace it with a valid SSL certificate to secure communication with the virtual machine. Copy the SSL certificate and key to the virtual machine in the following paths
sudo cp valid_cert.pem /usr/local/lib/reductstore/certs/cert.crt
sudo cp valid_cert_key.pem /usr/local/lib/reductstore/certs/cert.key
And restart the ReductStore service:
sudo systemctl restart reductstore
Enable ReductStore Token Authentication
By default, ReductStore is configured with token authentication disabled. It is recommended that you enable token authentication to secure communication with the virtual machine. Add the following environment variable to your custom data:
RS_API_TOKEN=<API TOKEN>
Next Steps
After deploying ReductStore as a virtual machine, you can start storing and querying time-series data. Check our Guides to learn more about the ReductStore features and how to use them.
Posted on August 7, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.