This repo contains an Azure Resource Manager template to deploy YugaByte DB cluster on Azure cloud. This is an automated deployment that can deploy a multi-region YugabyteDB cluster to azure. The deployed YugabyteDB cluster gets hosted on 3 nodes residing in 3 separate public subnets and create a universe among them. This repo is ideal to get you running a YugaByte cluster in a few steps.
-
Create a resource group for our YugaByte DB deployment.
- Login into your Azure portal.
- Click Resource groups from the menu of services to access the Resource Groups blade. You will see all the resource groups in your subscription listed in the blade.
- Click Add (+) to create a new resource group. The Create Resource Group blade appears.
- Provide the needed information for the new resource group.
- Click Create. The resource group might take a few seconds to create. Once it is created, you see the resource group on the Azure portal dashboard.
-
Create an SSH key for our user to get access to deployed YugaByte VM's.
- Open Terminal on your local computer.
- Run the following command
ssh-keygen
- The utility prompts you to select a location for the keys. By default, the keys are stored in the ~/.ssh directory with the filenames id_rsa for the private key and id_rsa.pub for the public key. Using the default locations allows your SSH client to automatically find your SSH keys when authenticating, so we recommend accepting them by pressing ENTER
Generating a public/private RSA key pair. Enter file in which to save the key (/home/username/.ssh/id_rsa):
- Once you select a location for the key, you’ll be prompted to enter an optional passphrase which encrypts the private key file on disk.
Created directory '/home/username/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again:
- After this, you will have a public and private key that you can use to authenticate YugaByte DB VM's.
Your identification has been saved in /home/username/.ssh/id_rsa. Your public key has been saved in /home/username/.ssh/id_rsa.pub. The key fingerprint is: a9:49:EX:AM:PL:E3:3e:a9:de:4e:77:11:58:b6:90:26 [email protected] The key's randomart image is: +--[ RSA 2048]----+ | ..o | | E o= . | | o. o | | .. | | ..S | | o o. | | =o.+. | |. =++.. | |o=++. | +-----------------+
- Clone this repo.
$ git clone https://github.com/YugaByte/azure-resource-manager.git
- Change current directory to cloned git repo directory
$ cd azure-resource-manager
- Use Azure CLI command to create deployments
$ az group deployment create --resource-group <Your-Azure-Resource-Group> --template-file yugabyte_deployment.json --parameters ClusterName='<Your-Cluster-Name>' SshUser='<Your-SSH-USER>' YBVersion='2024.1.3.1' SshKeypair='<Your-SSH-USER-PublicKey>'
- Once the deployment creation is complete, you can describe it as shown below.
In the output, you will get the YugaByte DB admin URL, JDBC URL, YSQL, YCQL and YEDIS connection string. You can use YugaByte admin URL to access admin portal.
$ az group deployment show -g <Your-Azure-Resource-Group> -n <Your-Deployment-Name> --query properties.outputs
- Clone this repo locally.
$ git clone https://github.com/YugaByte/azure-resource-manager.git
- First create a resource group, to create a new resource group, select Resource groups from the Azure portal.
- Under newly created Resource groups, select Add.
- In opened marketplace search for Template deployment (deploy using custom templates) and click on create.
- Now click on
Build your own template in the editor
. - Click
Load file
button in specify template section and upload theyugabyte_deployment.json
file from cloned repo. - Click on the
Save
button at the bottom of the window. - Now provide the required details.
- Once details are provided, then check the Terms and Condition checkbox and click on the
Purchase
button. - Once deployments get compleated, you can access the YugaByte DB admin from URL you get in the deployment output section.