Posted in Active Directory, Azure, Migration, Windows

AZURE STACK DEPLOYMENT

Azure Stack is Azure technology built on vetted hardware and distributed by approved vendors that bring Azure cloud technology into your data center. The vendors manage the hardware and the Microsoft manages the software.

Prerequisites :

  • Check for the prerequisites and considerations for the Azure Stack hub deployment here.
  • Make sure there are minimum 5 hard drives including OS disk (200 GB) with each 350 GB. (This can be achieved using smart array controller)
  • Deploy the OS only through Intelligence provisioning (best practice), which helps in proper installation of drives.
  • Make sure the attached physical/ logical disks can be pooled.

Azure stack deployment :

  • Download the Azure stack hub development kit installer.
  • Follow the registration process to download the installer on the server, where ASDK environment is going to be established.
  • Run the installer as the Administrator and browse for the location where to save the ASDK and download the ASDK.
  • After the completion of the download, run the installer and extract the files to a specified folder.
  • To download the installer, run the following powershell script
$URI = 'https://raw.githubusercontent.com/Azure/AzureStack-Tools/master/Deployment/asdk-installer.ps1'
$LocalPath = 'C:\AzureStack_Installer'
New-Item $LocalPath -Type Directory
Invoke-WebRequest $URI -OutFile ($LocalPath + '\' + 'asdk-installer.ps1')
cd $LocalPath
  • Once the above powershell script has been executed successfully, a powershell script has been downloaded in the defined local path, run the powershell script that has been downloaded as shown below.
  • A GUI will be prompted. Select Prepare environment and browse the previously downloaded CloudBuilder VHDX.
  • Click next to populate accordingly,
CategoryValue
UsernameAdministrator
Password*****
Computer NameASDK-1
Static IP configurationEnable
  • Select the ultimate NIC adapter and click next.
  • Make sure the IP CIDR and the gateways are exemplary.
  • Once Completed > Next > Reboot Now.
  • Following reboot, disable the network adapters that are not in use to provide a clean path to the Azure Stack Development kit in Control Panel\Network and Internet\Network Connections.
  • Re-download the powershell script using following command and run the downloaded powershell script.
$URI = 'https://raw.githubusercontent.com/Azure/AzureStack-Tools/master/Deployment/asdk-installer.ps1'
$LocalPath = 'C:\AzureStack_Installer'
New-Item $LocalPath -Type Directory
Invoke-WebRequest $URI -OutFile ($LocalPath + '\' + 'asdk-installer.ps1')
cd $LocalPath
  • Select Install from the prompted GUI console.
  • Populate the fields accordingly,
CategoryValue
TypeAzure Cloud
AAD Directorydigiphinixstack.onmicrosoft.com (it should be primary domain)
Passwordsame as the local administrator
  • Select the NIC adapter and click next to crowd the network configuration details. (Time server IP : 216.239.35.0 ; DNS forwarder IP : 8.8.8.8)
  • Once Completed > Next > Deploy.
  • In about two minutes or so you’ll be asked to enter the credentials for a global administrator in your AAD directory, enter the credentials accordingly.

NOTE: The user credentials provided should be administrator of the Azure Active Directory tenant.

  • The deployment process will takes almost 8 to 9 hours, during which the host server will automatically reboot (approximately 1 hr 20 min ). Sign in as azurestack\AzureStackAdmin after the ASDK host restarts and password remains same as the host server.
  • After a successful completion of the deployment the message COMPLETE : Action ‘Deployment’ is shown as following,

Post-deployment :

  • Run the following powershell script for installing and configuring Azure powershell for ASDK.
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Get-Module -Name Azs.* -ListAvailable | Uninstall-Module -Force -Verbose
Get-Module -Name Azure* -ListAvailable | Uninstall-Module -Force -Verbose
#Install the AzureRM.BootStrapper module. Select Yes when prompted to install NuGet
Install-Module -Name AzureRM.BootStrapper
#Install and import the API Version Profile required by Azure Stack into the current PowerShell session.
Use-AzureRmProfile -Profile 2019-03-01-hybrid -Force
Install-Module -Name AzureStack -RequiredVersion 1.8.2
  • Download the Azure stack tools using following powershell script.
#Change directory to the root directory.
cd \
#Enforce usage of TLSv1.2 to download the Azure Stack tools archive from GitHub
Invoke-WebRequest
-Uri https://github.com/Azure/AzureStack-Tools/archive/master.zip`

-OutFile master.zip
#Expand the downloaded files.
Expand-Archive -Path master.zip -DestinationPath . -Force
#Change to the tools directory.
cd AzureStack-Tools-master

Portal access to Azure stack :

  • Register the local environment with the Azure.
  • AzS-ERCS01 is one of the virtual machines that is deployed during the process of ASDK deployment. This VM is responsible for the Connection establishment between Azure and ASDK host server.
  • Validate the VM AzS-ERCS01 using following powershell script before local environment registration with Azure.
Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint
Test-AzureStack
  • Sign-in to the Azure stack account using
Login-AzureRmAccount
  • Register the ASDK using following powershell script.
#Add the Azure cloud subscription environment name.
#Supported environment names are AzureCloud, AzureChinaCloud, or AzureUSGovernment depending which Azure subscription you're using.
Add-AzureRmAccount -EnvironmentName "<environment name>"

#Register the Azure Stack resource provider in your Azure subscription
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack

#Import the registration module that was downloaded with the GitHub tools
Import-Module C:\AzureStack-Tools-master\Registration\RegisterWithAzure.psm1

#If you have multiple subscriptions, run the following command to select the one you want to use:
#Get-AzureRmSubscription -SubscriptionID "" | Select-AzureRmSubscription

#Register Azure Stack
$AzureContext = Get-AzureRmContext
$CloudAdminCred = Get-Credential -UserName AZURESTACK\CloudAdmin -Message "Enter the credentials to access the privileged endpoint."
$RegistrationName = "<unique-registration-name>"
Set-AzsRegistration -PrivilegedEndpointCredential $CloudAdminCred
-PrivilegedEndpoint AzS-ERCS01 -BillingModel Development
-RegistrationName $RegistrationName `
-UsageReportingEnabled:$true
  • Approximately around 10 min the following output is obtained confirming that the environment is registered successfully.
  • Redeem the activation key to C:\ using following command
$RegistrationResourceName = "<unique-registration-name>"
#File path to save the activation key. This example saves the file as C:\ActivationKey.txt.
$KeyOutputFilePath = "$env:SystemDrive\ActivationKey.txt"
$ActivationKey = Get-AzsActivationKey -RegistrationName $RegistrationResourceName `
-KeyOutputFilePath $KeyOutputFilePath
  • This confirms that the activation key file is generated in C:\ .
  • Run the following powershell script to create an activation resource using the previously generated Activationkey.txt.
#Import the registration module that was downloaded with the GitHub tools
Import-Module C:\AzureStack-Tools-master\Registration\RegisterWithAzure.psm1
$CloudAdminCred = Get-Credential -UserName AZURESTACK\CloudAdmin -Message "Enter the credentials to access the privileged endpoint."
#This example uses the C:\ActivationKey.txt file.
$ActivationKey = Get-Content -Path "$env:SystemDrive\Activationkey.txt"
New-AzsActivationResource -PrivilegedEndpointCredential $CloudAdminCred -PrivilegedEndpoint AzS-ERCS01
-ActivationKey $ActivationKey
  • Your environment has finished the registration and activation process is returned as the output.
  • Sign in to the Azure Stack administrator portal using following URL in the local host https://adminportal.local.azurestack.external.

Congratulations in advance.

My hearty congratulations in successful deployment of Azure Stack Development Kit.
Posted in Active Directory, Azure, Migration, Windows

SQL SERVER MIGRATION (On-premises to cloud) USING DMA TOOL

On-premise setup :

  • Domain (ravvarapu.com)
  • Sql server (2012)
  • Sql database (weblocal)
  • Consummate Network settings.

Cloud setup :

  • Cloud platform (Microsoft Azure)
  • Valid subscription.
  • Azure Migrate project with a valid project name and location.
  • Sql Managed instance (Deploying can take up to 6 hrs.) or Sql Database.

Procedure :

  • Download DMA tool (Data Migration Assistant) on the sql instance (On-premise).
  • Install the DMA tool on the server and run as administrator.
  • Create New project with type Assessment.
  • Populate the fields as described below and create the project.
Project NameA valid project name
Assessment typeDatabase engine
Source server typeSql server
Target server typeAzure sql database managed instance
  • Click next to define the source sql server, define the server name and authenticate accordingly.
  • Add the required source databases that can be migrated to azure.
  • Start the assessment. (while this takes a quite good amount of time depending on the individual.)
  • Verify and rectify, if any feature parity or any compatibility issues. More database compatibility can be learned at aka.ms/dbcompat.
  • If everything is perfect upload to Azure Migrate and select the desired Azure environment (Azure) and connect to the Azure account for both feature parity and compatibility issues.
  • Select the created migration project in the Azure and upload.
  • Refresh the Azure migrate screen to update the details of data assessment.
  • Click on Accessed database instances to check the status of the database readiness.
  • Plunge into the on-premise sql server DMA tool and create a new project.
  • Populate the fields as shown below.
  • Create the migration by populating the fields.
  • Connect to the sql server and authenticate accordingly. (Enable the Trust server certificate).
  • Select the databases that needed to be migrated.
  • Connect to the target server (Sql database or sql managed instance) with default sql authentication (Enable the Trust server certificate).
  • Select the newly created database in the target server and generate the script.
  • Deploy the generated script and select the desired tabled to migrate the data.

Substantiation :

Once the data has been successfully migrated to the target server, connect to the target server from the local sql server and check the migrated data. The latency of the migrated sql database depends upon the region in which the target sql database or target sql managed instance is in.