Infrastructure modernization, from on-premises to Microsoft Azure with backup solution using Azure Files, Azure Backup and Recovery Services Vault.
In this project, reflecting a practical scenario, I functioned as a Cloud Specialist to enhance and transition an on-premises infrastructure to Microsoft Azure. The process involved deploying a series of Virtual Machines, setting up the necessary infrastructure, establishing a shared file system, and migrating backup solutions from tape to cloud-based backups with an impressive 99.9% availability.
To manage and organize resources, I utilized a Resource Group. For the network setup, I implemented a Virtual Network (VNet) with a subnet designed for provisioning two Application VMs. The shared file system was established using Azure Files to facilitate smooth interaction between the Application VMs.
For backup and recovery, I leveraged the robust capabilities of Azure Backup and Azure Recovery Services. This included configuring file backups within the shared file system and ensuring their transfer to the Recovery Services Vault, thereby enhancing the reliability and security of our backup solutions.
Deployment Steps Performed:
Step 1: Created Azure VM1 and VM2
Step 2: Created a File Share
Step 3: Connected/Mounted the File Share into the VMs
Step 4: Created Fake Files in the Filesystem
Step 5: Set up the Backup using Azure Backup
Step 6: Deleted Files to Simulate Data Loss
Step 7: Restored Files
Step 8: Validated Restored Files
Summary of Experience:
“In this project, I successfully modernized an on-premises infrastructure environment by migrating it to Microsoft Azure. The key components of this modernization included deploying Virtual Machines, creating a shared file system, and implementing a robust cloud-based backup solution.
Step 1: Creating Azure Virtual Machines (VMs):
I began by provisioning two Azure Virtual Machines (VM1 and VM2) within a Virtual Network (VNET) and a subnet. This setup ensured that the VMs were in a secure and isolated environment, facilitating seamless communication and resource sharing.
Step 2: Creating a File Share:
Using Azure Files, I established a shared file system that could be accessed by both VMs. This shared storage solution provided a centralized location for application data, enhancing collaboration and data consistency\
Step 3: Connecting/Mounting the File Share:
I connected and mounted the Azure File Share to both VMs, ensuring that the shared storage was accessible and usable from each VM. This step was crucial for data storage and access in a multi-VM environment.
Technical Steps
Here is a step-by-step breakdown of the script to create a local directory and mount it to app-shared
:
Explanation of Each Command Line Syntax with CLI Output
Create the Local Directory:
- This command creates a local directory called app-shared under /mnt where the shared files will be mounted.
Ensure smbcredentials Directory Exists:
- This checks if the directory /etc/smbcredentials exists. If not, it creates it. This directory will store the credentials needed for accessing the Azure file share.
Create Credentials File:
- This checks if the credentials file exists. If not, it creates a file named tcbstorageprojects.cred and writes the username and password into it.
Set Permissions on the Credentials File:
- This sets the file permissions to 600, meaning only the root user can read and write to this file, securing the credentials.
Though the tcbstorageprojects.cred
file is used only for this sandbox use case, it stores the credentials in clear text, which presents a security concern. While the file permissions are set to 600
, allowing only the root user to read and write to it, storing credentials in clear text is not ideal for security reasons.
To enhance security, consider using more secure methods, such as Azure Key Vault, for storing and accessing these credentials.
Add the Mount to /etc/fstab:
- This command appends an entry to /etc/fstab to mount the Azure file share to the local directory /mnt/app-shared with the specified options. This ensures the share is mounted automatically at boot.
Mount the File Share:
- This command mounts the Azure file share to the local directory using the provided credentials and options. The -o flag specifies the mount options, ensuring the directory and file modes are set correctly and optimizing file access.
By following these steps, we securely mount the Azure file share to a local directory, allowing seamless access to cloud-stored files as if they were on the local filesystem.
Step 4: Creating Fake Files:
To simulate real-world data usage, I created multiple test files within the shared file system. These files served as placeholders for actual application data, allowing me to test the backup and recovery processes effectively.
Step 5: Setting up Azure Backup / Running Job:
Leveraging Azure Backup, I configured a backup solution for the shared file system. By creating a Recovery Services Vault, I ensured that the backup data was securely stored with high availability (99.9% SLA). Azure Backup’s reliability and ease of use were evident throughout this process.
Step 6: Simulating Data Loss:
To demonstrate the effectiveness of the backup solution, I deleted specific files (file2.txt and file5.txt) from the shared file system. This simulated a common real-world scenario of accidental data loss.
Step 7: Restoring Files:
Utilizing Azure Backup, I initiated the restore process for the deleted files. The straightforward restoration procedure underscored Azure Backup’s efficiency in recovering lost data quickly and accurately.
Step 8: Validating Restored Files:
Finally, I verified the successful restoration of the deleted files by listing the contents of the shared file system and displaying the contents of the restored files. This validation confirmed that the backup and recovery solution functioned as intended.
Overall, this project demonstrated my understanding and capability to modernize infrastructure using Microsoft Azure’s powerful storage and backup solutions. The experience highlighted the importance of cloud-based backups in ensuring data availability and resilience, thereby reinforcing best practices in cloud infrastructure management.”
Summary
In this project, I successfully modernized an on-premises infrastructure environment by migrating it to Microsoft Azure. The process involved provisioning two Azure Virtual Machines (VM1 and VM2) within a secure Virtual Network, establishing a shared file system with Azure Files, and connecting and mounting this file share to both VMs.
To simulate real-world usage, multiple test files were created in the shared file system. Leveraging Azure Backup, I set up a robust backup solution by creating a Recovery Services Vault.
I demonstrated the effectiveness of the backup solution by deleting specific files to simulate data loss, then restoring them using Azure Backup, and finally validating the successful restoration of the files.
Lastly, this project showcased the capability to modernize infrastructure using Azure’s storage and backup solutions, emphasizing the importance of cloud-based backups for data availability and resilience.