Why bring your own Azure account?
ScaleGrid ‘Management’ model supports the ability to ‘Bring your own Azure account’ to host your databases (MongoDB®, Redis™*, etc) through the Bring Your Own Cloud (BYOC) DBaaS plans. This provides the best of both worlds – you can leverage ScaleGrid expertise to manage your databases and still keep all the machines in your own cloud account. Here are some other advantages of using your own cloud account:
- Databases can be deployed in your own Virtual networks (VNET) and subnets.
- You can leverage network security groups (NSG) for access control.
- Custom pricing. If you have a discounted rate from Azure, you can leverage it for your database machines. For example, if you are a startup with credits from Azure, you can leverage your credits to pay for your database machines
What do I need to get started?
In order to set up an Azure (ARM) Cloud Profile, you will need the following details from your account to get started:
- Azure Subscription ID
- VNET & Subnet name, Resource group name
VNET & Subnet in which the database machines will be deployed
- Network security group
Network security group that will be used for database machines
- VM storage account(s)
Storage account(s) to store VM disks. If you provide more than one storage account the VM disks will be distributed across accounts for better performance.
- Backup Storage account
Storage account to store backups of the clusters
Step 1: Enable programmatic access of ScaleGrid images in your subscription
You need to enable ScaleGrid images to be programmatically deployed in your Azure subscriptions. Here are the details of the ScaleGrid images:
- Publisher: ScaleGrid
- Image: Centos 6.8 (free)
Step 2: Start the Create Cloud Profile wizard
Click ‘New Cloud Profile’ button in the top right of the screen and select type Azure (ARM) – documentation.
1. Select Region, Database Type & Azure Subscription ID
2. Enter the VNET, Subnet and NSG details
3. VM storage accounts
Enter one or more VM storage accounts. If you provide more than one storage account then the Virtual machine disks are distributed across the storage accounts. If you wish to deploy High-Performance clusters, then you need to select and enter only Premium storage accounts:
4. Backup storage account
5. Public Static IP
Select public Static IP only if you want your machines to face the internet or if you’re deploying across regions. If you are deploying inside a VNET and subnet, you should not need a public static IP. If you wish to enable and use a public IP, ensure that the selected NSG has the necessary ports open for the selected database.
6. Download the PowerShell script and execute in Azure PowerShell
Step 3: Execute PowerShell script to create a resource group and provide permissions
The Azure PowerShell script creates a resource group with name ” Scalegrid-<cloudprofilename>” and gives the ScaleGrid application permission to deploy and manage machines in this Resource group. It also enables the ScaleGrid application permission to join the newly created machines to the VNET, Subnet, NSG that was supplied earlier in the wizard. The ScaleGrid application does not have permissions on any other machines or entities running in your subscription.
- Download and install Azure Cmdlets from Azure Downloads page
- Open an Azure Cmdlets PowerShell window and Set execution policy (if needed). The script is unsigned. So you might need to update the Execution policy on your machine. E.g “set Execution-Policy UnRestricted”.
- Run the script
Select RunOnce (R) to run the script
The script will prompt you to login to your Azure account. The script writes output to the console. Verify that the script does not run into any errors. If you see any errors, please save the entire screen output and share with the ScaleGrid support team. You can file a ticket in our console or email us at email@example.com.
Step 4: Complete the Create Cloud Profile wizard
Once you have run the PowerShell script return to the cloud profile wizard and click next.
Verify that you have executed the script.
Verify that you have enabled programmatic access for ScaleGrid images as detailed in Step 1 above.
Click complete – this will verify all the details once more and create the Cloud profile.
At this point, your Azure account is ready to use with ScaleGrid. In the Create MongoDB® Cluster wizard, select the newly created Cloud profile and this will place the machines in your Azure account.
If you have further questions please feel free to reach out to us at firstname.lastname@example.org.