Azure Elastic SAN
Connecting to an Azure Elastic SAN from a DevZero workspace.
You connect to an Azure Elastic SAN Service running on Azure infrastructure from your DevBox.
Architecture Diagram
Azure Elastic SAN is a fully integrated solution that simplifies deploying, scaling, managing, and configuring a SAN while also offering built-in cloud capabilities like high availability. This connection will occur by setting up a bastion host that advertises the private routes to your DevZero network so you can access the private service through network tunneling. You must also set up a DNS Private Resolver to access the Elastic SAN's Private Endpoint from your DevBox.
Prerequisites
- Before you begin, follow the Connecting to Azure guide to set up the Bastion Host to access your private Azure services.
- Following the above criteria, follow the Setting up DNS Private Resolver guide to access the DNS Private Zones.
Existing Azure Elastic SAN
Ensure the existing SAN is in the same resource group that houses the Bastion Host.
Step 1: Creating a Recipe
First, we need to create a recipe for the workspace:
- Go to the DevZero Dashboard > Recipes and click on New recipe.
- Enter the recipe name and click on Create a recipe.
- Now use the below-provided snippet to create a recipe for your workspace:
- Click on Save and Build and when the build is successful, move on to the next step.
Step 2: Creating a Workspace
- Go to the Devzero Dashboard > Workspaces by clicking New workspace.
- Enter the workspace name and click on Select from recipe library.
- Select the recipe you just created above and click on Select.
- Click on Launch, and your workspace will be ready shortly.
Step 3: Creating Volume Groups private endpoint
To connect to the Elastic SAN volumes, we first need to create a Volume Group and give it private endpoint access:
- Go to Home > Azure Elastic SAN and click on the SAN you want to access.
- Go to Volume groups and click on Create.
- Enter the Volume group name and click on Next.
- Click on Create a private endpoint and enter the Resource group, Location, Name and select the Volume group you just created.
- Select the Virtual network and choose an available subnet.
- Select Yes for Integrate with private DNS zone option, and click on Ok.
- After creating the endpoint, click on Create.
You can also add your VNET by clicking on Create under the Virtual Networks section and entering the details of the VNET, which exists in the same region as the Elastic SAN instance.
Step 4: Creating a Volume
Now, with everything set, we need to create a volume and generate the connection script:
- Go to Home > Azure Elastic SAN and click on the SAN you want to access.
- Go to Volumes and click on Create volume.
- Choose the Volume group and enter the Volume name, Source type and Size of the volume.
- Click on Create and wait for it to initialize.
- After creating the volume, select the volume and click on Connect.
- Note down the script code for Linux as we will use it to connect Azure infrastructure and the DevBox.
Step 5: Connecting to the Elastic SAN from DevBox
Now you need to follow the below steps to connect to DevBox:
- Connect to the workspace from your terminal.
- Create a Python script by using the following command:
- Paste in the connection script we got from the volume.
- Run the Python file with elevated access to make the connection:
New Azure Elastic SAN
If you need to make a new Elastic SAN instance and access it through DevZero's network, then follow the below steps:
Step 1: Creating a Elastic SAN
- Go to Home > Azure Elastic SAN and click on Create.
- In the Basics section, select the Resource group you previously selected for your VNET.
- Then input your SAN Name, Region, and Redundancy type.
- You can allocate the desired SAN size in the Resource provisioning on Elastic SAN section.
Remember that the size of your SAN is directly proportional to the IOPS (Input/Output operations per second) and bandwidth allocated to the instance.
- In the Networking section, choose the Disabled option for Public network access.
You can also choose the Enabled option and connect to a VNET if you have a VNET in the same Region as the Elastic SAN instance.
- Click on Review + Create and click on Create.
Step 2: Creating a Recipe
- Go to the DevZero Dashboard > Recipes and click on New recipe.
- Enter the recipe name and click on Create a recipe.
- Now use the below-provided snippet to create a recipe for your workspace:
- Click on Save and Build and when the build is successful, move on to the next step.
Step 3: Creating a Workspace
- Go to the Devzero Dashboard > Workspaces and click on New workspace.
- Enter the workspace name and click on Select from recipe library.
- Select the recipe you just created and click on Select.
- Click on Launch, and your workspace will be ready shortly.
Step 4: Creating Volume Groups private endpoint
To connect to the Elastic SAN volumes, we first need to create a Volume Group and give it private endpoint access:
- Go to Home > Azure Elastic SAN and click on the SAN you want to access.
- Go to Volume groups and click on Create.
- Enter the Volume group name and click on Next.
- Click on Create a private endpoint and enter the Resource group, Location, Name and select the Volume group you just created.
- Select the Virtual network and choose an available subnet.
- Select Yes for Integrate with private DNS zone option, and click on Ok.
- After creating the endpoint, click on Create.
You can also add your VNET by clicking on Create under the Virtual Networks section and entering the details of the VNET, which exists in the same region as the Elastic SAN instance.
Step 5: Creating a Volume
Now, with everything set, we need to create a volume and generate the connection script:
- Go to Home > Azure Elastic SAN and click on the SAN you want to access.
- Go to Volumes and click on Create volume.
- Choose the Volume group and enter the Volume name, Source type and Size of the volume.
- Click on Create and wait for it to initialize.
- After creating the volume, select the volume and click on Connect.
- Note down the script code for Linux as we will use it to connect Azure infrastructure and the DevBox.
Step 6: Connecting to the Elastic SAN from DevBox
Now, you need to follow the below steps to connect to DevBox:
- Connect to the workspace from your terminal.
- Create a Python script by using the following command:
- paste in the connection script we got from the volume.
- Run the Python file with elevated access to make the connection: