Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Bring your own Azure account for Mongodb & Redis hosting

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). 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

  1. Databases can be deployed in your own Virtual networks (VNET) and subnets
  2. Leverage network security groups (NSG) for access control
  3. Custom pricing. If you have a discounted rate from Azure you can leverage it for your database machines. E.g. 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 setup an  ‘Azure (ARM) Cloud profile’  wizard you will need the following details from your account to get started

  1. Azure Subscription ID
  2. VNET & Subnet name, Resource group name
    VNET & Subnet in which the database machines will be deployed
  3. Network security group
    Network security group that will be used for database machines
  4. 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.
  5. 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)
Enable programmatic access to azure images

Enable programmatic access to azure images

Enable programmatic access to azure images

Step 2: Start Create Cloud profile wizard

Click ‘New Cloud Profile’ button in the top right of the screen and select type Azure (ARM)

1. Select Region, Database type & Azure subscription ID

Azure bring your own account - account details

2. Enter the VNET, subnet and NSG details

Azure bring your own cloud account VNET 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
Azure bring your own cloud account - storage account Details

4. Backup storage account

This is the account in which the backups of the clusters are stored.
Azure bring your own cloud account backup storage account Details

5. Public Static IP

Select public Static IP only if you want your machines to face the internet or if you are deploying across regions. If you are deploying inside a VNET & subnet you should not need a public static IP
Azure bring your own cloud account - enable public IP

6. Download the powershell script and execute in Azure powershell

Click ‘Download script’ to download the power shell script to configure ScaleGrid access. The name of the script will be of form “ScaleGrid--configure.ps1″
Azure bring your own cloud account - download script

Step 3: Execute powershell script to to create a resource group and provide permissions

The Azure powershell script creates a resource group with name ” Scalegrid-” 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.

1. Open a Azure 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”

2. 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 protected]

Step 4: Complete 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

Bring your own Azure account - verify script

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 Mongo 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 [email protected]



This post first appeared on MongoDB Hosting & Management, please read the originial post: here

Share the post

Bring your own Azure account for Mongodb & Redis hosting

×

Subscribe to Mongodb Hosting & Management

Get updates delivered right to your inbox!

Thank you for your subscription

×