Merge branch 'master' into rdma

This commit is contained in:
Shital Savekar 2017-04-04 20:36:17 +05:30
Родитель c3aecb28ed 7b6bfc187b
Коммит a0a7b830b1
27 изменённых файлов: 323 добавлений и 215 удалений

2
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
.idea/*

Просмотреть файл

@ -145,25 +145,33 @@
<sshPublicKey>myCert.cer</sshPublicKey>
<WaagentVersion>"2.0.8"</WaagentVersion>
<dnsServer>
<IP>192.168.3.120</IP>
<Hostname>ubuntudns</Hostname>
<Username>root</Username>
<Password>redhat</Password>
<IP>10.1.0.4</IP>
<Hostname>andyDNSServer</Hostname>
<Username>azureuser</Username>
<Password>P@ssw0rd01</Password>
</dnsServer>
<ARMdnsServer>
<IP>10.9.0.4</IP>
<Hostname>ARMDNSServer</Hostname>
<Username>azureuser</Username>
<Password>P@ssw0rd01</Password>
</ARMdnsServer>
<mysqlServer>
<IP>192.168.3.127</IP>
<Hostname>ubuntumysqlserver</Hostname>
<Username>root</Username>
<Password>redhat</Password>
<IP>10.1.0.5</IP>
<Hostname>MySQLServer</Hostname>
<Username>azureuser</Username>
<Password>P@ssw0rd01</Password>
<MysqlUsername>test</MysqlUsername>
<MysqlPassword>redhat</MysqlPassword>
</mysqlServer>
<nfsServer>
<IP>192.168.3.125</IP>
<Hostname>ubuntunfsserver</Hostname>
<Username>root</Username>
<Password>redhat</Password>
</nfsServer>
<ARMmysqlServer>
<IP>10.9.0.5</IP>
<Hostname>ARMMySQLServer</Hostname>
<Username>azureuser</Username>
<Password>P@ssw0rd01</Password>
<MysqlUsername>test</MysqlUsername>
<MysqlPassword>redhat</MysqlPassword>
</ARMmysqlServer>
</Data>
<PublicEndpoint>
<isDeployed>NO</isDeployed>
@ -971,17 +979,18 @@
<VNETVMPR>
<isDeployed>NO</isDeployed>
<HostedService>
<VnetName>AzureDTAP02Net</VnetName>
<VnetName>VNET02</VnetName>
<VnetDomainDBFilePath>/etc/bind/zones/lisvnetlab.com.db</VnetDomainDBFilePath>
<VnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</VnetDomainRevFilePath>
<Subnet1Range>192.168.2.0/27</Subnet1Range>
<Subnet2Range>192.168.2.32/27</Subnet2Range>
<ARMVnetName>DTAPWestUSvn</ARMVnetName>
<Subnet1Range>10.2.0.0/19</Subnet1Range>
<Subnet2Range>10.2.32.0/19</Subnet2Range>
<ARMVnetName>ARMVNET</ARMVnetName>
<ARMVnetDomainDBFilePath>/etc/bind/zones/dtaparm01.com.db</ARMVnetDomainDBFilePath>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.3.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.0.2.0/24</ARMSubnet1Range>
<ARMSubnet2Range>10.0.3.0/24</ARMSubnet2Range>
<DnsServerIP>192.168.3.120</DnsServerIP>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.10.0.0/19</ARMSubnet1Range>
<ARMSubnet2Range>10.10.32.0/19</ARMSubnet2Range>
<DnsServerIP>10.1.0.4</DnsServerIP>
<ARMDnsServerIP>10.9.0.4</ARMDnsServerIP>
<VirtualMachine>
<state></state>
<SubnetName>Subnet1</SubnetName>
@ -1040,17 +1049,18 @@
</VirtualMachine>
</HostedService>
<HostedService>
<VnetName>AzureDTAP02Net</VnetName>
<VnetName>VNET02</VnetName>
<VnetDomainDBFilePath>/etc/bind/zones/lisvnetlab.com.db</VnetDomainDBFilePath>
<VnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</VnetDomainRevFilePath>
<Subnet1Range>192.168.2.0/27</Subnet1Range>
<Subnet2Range>192.168.2.32/27</Subnet2Range>
<ARMVnetName>DTAPWestUSvn</ARMVnetName>
<Subnet1Range>10.2.0.0/19</Subnet1Range>
<Subnet2Range>10.2.32.0/19</Subnet2Range>
<ARMVnetName>ARMVNET</ARMVnetName>
<ARMVnetDomainDBFilePath>/etc/bind/zones/dtaparm01.com.db</ARMVnetDomainDBFilePath>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.3.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.0.2.0/24</ARMSubnet1Range>
<ARMSubnet2Range>10.0.3.0/24</ARMSubnet2Range>
<DnsServerIP>192.168.3.120</DnsServerIP>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.10.0.0/19</ARMSubnet1Range>
<ARMSubnet2Range>10.10.32.0/19</ARMSubnet2Range>
<DnsServerIP>10.1.0.4</DnsServerIP>
<ARMDnsServerIP>10.9.0.4</ARMDnsServerIP>
<VirtualMachine>
<state></state>
<SubnetName>Subnet2</SubnetName>
@ -1112,17 +1122,18 @@
<VNETVM-EXT>
<isDeployed>NO</isDeployed>
<HostedService>
<VnetName>AzureDTAP02Net</VnetName>
<VnetName>VNET02</VnetName>
<VnetDomainDBFilePath>/etc/bind/zones/lisvnetlab.com.db</VnetDomainDBFilePath>
<VnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</VnetDomainRevFilePath>
<Subnet1Range>192.168.2.0/27</Subnet1Range>
<Subnet2Range>192.168.2.32/27</Subnet2Range>
<ARMVnetName>DTAPWestUSvn</ARMVnetName>
<Subnet1Range>10.2.0.0/19</Subnet1Range>
<Subnet2Range>10.2.32.0/19</Subnet2Range>
<ARMVnetName>ARMVNET</ARMVnetName>
<ARMVnetDomainDBFilePath>/etc/bind/zones/dtaparm01.com.db</ARMVnetDomainDBFilePath>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.3.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.0.2.0/24</ARMSubnet1Range>
<ARMSubnet2Range>10.0.3.0/24</ARMSubnet2Range>
<DnsServerIP>192.168.3.120</DnsServerIP>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.10.0.0/19</ARMSubnet1Range>
<ARMSubnet2Range>10.10.32.0/19</ARMSubnet2Range>
<DnsServerIP>10.1.0.4</DnsServerIP>
<ARMDnsServerIP>10.9.0.4</ARMDnsServerIP>
<VirtualMachine>
<state></state>
<SubnetName>Subnet1</SubnetName>
@ -1181,17 +1192,18 @@
</VirtualMachine>
</HostedService>
<HostedService>
<VnetName>AzureDTAP02Net</VnetName>
<VnetName>VNET02</VnetName>
<VnetDomainDBFilePath>/etc/bind/zones/lisvnetlab.com.db</VnetDomainDBFilePath>
<VnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</VnetDomainRevFilePath>
<Subnet1Range>192.168.4.192/26</Subnet1Range>
<Subnet2Range>192.168.4.128/26</Subnet2Range>
<ARMVnetName>DTAPWestUSvn</ARMVnetName>
<Subnet1Range>10.2.0.0/19</Subnet1Range>
<Subnet2Range>10.2.32.0/19</Subnet2Range>
<ARMVnetName>ARMVNET</ARMVnetName>
<ARMVnetDomainDBFilePath>/etc/bind/zones/dtaparm01.com.db</ARMVnetDomainDBFilePath>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.3.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.0.2.0/24</ARMSubnet1Range>
<ARMSubnet2Range>10.0.3.0/24</ARMSubnet2Range>
<DnsServerIP>192.168.3.120</DnsServerIP>
<ARMVnetDomainRevFilePath>/etc/bind/zones/rev.4.168.192.in-addr.arpa</ARMVnetDomainRevFilePath>
<ARMSubnet1Range>10.10.0.0/19</ARMSubnet1Range>
<ARMSubnet2Range>10.10.32.0/19</ARMSubnet2Range>
<DnsServerIP>10.1.0.4</DnsServerIP>
<ARMDnsServerIP>10.9.0.4</ARMDnsServerIP>
<VirtualMachine>
<state></state>
<SubnetName>Subnet2</SubnetName>
@ -8206,5 +8218,11 @@
<Name>BVT-VERIFY-HOSTNAME</Name>
</test>
</Cycle>
<Cycle>
<cycleName>PROVISION</cycleName>
<test>
<Name>BVT-VERIFY-DEPLOYMENT-PROVISION</Name>
</test>
</Cycle>
</testCycles>
</config>

Просмотреть файл

@ -350,11 +350,13 @@ if ( $NewARMStorageAccountType )
$StorageAccountName = $($NewARMStorageAccountType.ToLower().Replace("_","")) + "$RGRandomNumber"
#$StorageAccountName = "$LocationLower" + "$RGRandomNumber"
LogMsg "Using New ARM Storage Account : $StorageAccountName"
$StorageAccountType= $NewARMStorageAccountType
}
else
{
LogMsg "Using ARM Storage Account : $StorageAccountName"
}
$bootDiagnosticsSA = "icadiagnostic$RGRandomNumber"
LogMsg "Using API VERSION : $apiVersion"
$ExistingVnet = $null
if ($RGXMLData.ARMVnetName -ne $null)
@ -597,6 +599,22 @@ Set-Content -Value "$($indents[0]){" -Path $jsonFile -Force
Add-Content -Value "$($indents[2])}," -Path $jsonFile
LogMsg "Added New Storage Account $StorageAccountName.."
}
#endregion
#region New ARM Bood Diagnostic Account
Add-Content -Value "$($indents[2]){" -Path $jsonFile
Add-Content -Value "$($indents[3])^apiVersion^: ^2015-06-15^," -Path $jsonFile
Add-Content -Value "$($indents[3])^type^: ^Microsoft.Storage/storageAccounts^," -Path $jsonFile
Add-Content -Value "$($indents[3])^name^: ^$bootDiagnosticsSA^," -Path $jsonFile
Add-Content -Value "$($indents[3])^location^: ^[variables('location')]^," -Path $jsonFile
Add-Content -Value "$($indents[3])^properties^:" -Path $jsonFile
Add-Content -Value "$($indents[3]){" -Path $jsonFile
Add-Content -Value "$($indents[4])^accountType^: ^Standard_LRS^" -Path $jsonFile
Add-Content -Value "$($indents[3])}" -Path $jsonFile
Add-Content -Value "$($indents[2])}," -Path $jsonFile
LogMsg "Added boot diagnostic Storage Account $bootDiagnosticsSA.."
#endregion
#region virtualNetworks
@ -1171,20 +1189,21 @@ foreach ( $newVM in $RGXMLData.VirtualMachine)
Add-Content -Value "$($indents[7])^id^: ^[resourceId('Microsoft.Network/networkInterfaces','$NIC')]^" -Path $jsonFile
Add-Content -Value "$($indents[6])}" -Path $jsonFile
Add-Content -Value "$($indents[5])]" -Path $jsonFile
Add-Content -Value "$($indents[4])}," -Path $jsonFile
Add-Content -Value "$($indents[4])}" -Path $jsonFile
#endregion
#region Enable boot dignostics.
Add-Content -Value "$($indents[4])," -Path $jsonFile
Add-Content -Value "$($indents[4])^diagnosticsProfile^: " -Path $jsonFile
Add-Content -Value "$($indents[4]){" -Path $jsonFile
Add-Content -Value "$($indents[5])^bootDiagnostics^: " -Path $jsonFile
Add-Content -Value "$($indents[5]){" -Path $jsonFile
Add-Content -Value "$($indents[6])^enabled^: true," -Path $jsonFile
Add-Content -Value "$($indents[6])^storageUri^: ^[reference(resourceId('$StorageAccountRG', 'Microsoft.Storage/storageAccounts', '$StorageAccountName'), '2015-06-15').primaryEndpoints['blob']]^" -Path $jsonFile
Add-Content -Value "$($indents[6])^storageUri^: ^[reference(resourceId('$RGName', 'Microsoft.Storage/storageAccounts', '$bootDiagnosticsSA'), '2015-06-15').primaryEndpoints['blob']]^" -Path $jsonFile
Add-Content -Value "$($indents[5])}" -Path $jsonFile
Add-Content -Value "$($indents[4])}" -Path $jsonFile
#endregion
Add-Content -Value "$($indents[3])}" -Path $jsonFile
LogMsg "Attached Network Interface Card `"$NIC`" to Virtual Machine `"$vmName`"."
#endregion
@ -1474,8 +1493,25 @@ if ( ($numberOfVMs -eq 1) -and !$EnableIPv6 -and !$ForceLoadBalancerForSingleVM
Add-Content -Value "$($indents[4])}" -Path $jsonFile
#endregion
LogMsg "Added Network Profile."
#region Enable boot dignostics.
Add-Content -Value "$($indents[4])," -Path $jsonFile
Add-Content -Value "$($indents[4])^diagnosticsProfile^: " -Path $jsonFile
Add-Content -Value "$($indents[4]){" -Path $jsonFile
Add-Content -Value "$($indents[5])^bootDiagnostics^: " -Path $jsonFile
Add-Content -Value "$($indents[5]){" -Path $jsonFile
Add-Content -Value "$($indents[6])^enabled^: true," -Path $jsonFile
Add-Content -Value "$($indents[6])^storageUri^: ^[reference(resourceId('$RGName', 'Microsoft.Storage/storageAccounts', '$bootDiagnosticsSA'), '2015-06-15').primaryEndpoints['blob']]^" -Path $jsonFile
Add-Content -Value "$($indents[5])}" -Path $jsonFile
Add-Content -Value "$($indents[4])}" -Path $jsonFile
LogMsg "Added Diagnostics Profile."
#endregion
Add-Content -Value "$($indents[3])}" -Path $jsonFile
LogMsg "Added Network Profile."
#endregion
LogMsg "Added Virtual Machine $vmName"
Add-Content -Value "$($indents[2])}" -Path $jsonFile

Просмотреть файл

@ -142,7 +142,7 @@ function InstallCustomKernel ($customKernel, $allVMData, [switch]$RestartAfterUp
try
{
$customKernel = $customKernel.Trim()
if( ($customKernel -ne "linuxnext") -and ($customKernel -ne "netnext") -and !($customKernel.EndsWith(".deb")))
if( ($customKernel -ne "linuxnext") -and ($customKernel -ne "netnext") -and !($customKernel.EndsWith(".deb")) -and !($customKernel.EndsWith(".rpm")) )
{
LogErr "Only linuxnext and netnext version is supported. Other version will be added soon. Use -customKernel linuxnext. Or use -customKernel <link to deb file>"
}
@ -158,7 +158,7 @@ function InstallCustomKernel ($customKernel, $allVMData, [switch]$RestartAfterUp
$out = RunLinuxCmd -ip $vmData.PublicIP -port $vmData.SSHPort -username $user -password $password -command "chmod +x *.sh" -runAsSudo
$currentKernelVersion = RunLinuxCmd -ip $vmData.PublicIP -port $vmData.SSHPort -username $user -password $password -command "uname -r"
LogMsg "Executing $scriptName ..."
$jobID = RunLinuxCmd -ip $vmData.PublicIP -port $vmData.SSHPort -username $user -password $password -command "/home/$user/$scriptName -customKernel $customKernel" -RunInBackground -runAsSudo
$jobID = RunLinuxCmd -ip $vmData.PublicIP -port $vmData.SSHPort -username $user -password $password -command "/home/$user/$scriptName -customKernel $customKernel -logFolder /home/$user" -RunInBackground -runAsSudo
$packageInstallObj = New-Object PSObject
Add-member -InputObject $packageInstallObj -MemberType NoteProperty -Name ID -Value $jobID
Add-member -InputObject $packageInstallObj -MemberType NoteProperty -Name RoleName -Value $vmData.RoleName
@ -214,7 +214,15 @@ function InstallCustomKernel ($customKernel, $allVMData, [switch]$RestartAfterUp
LogMsg "New kernel: $upgradedKernelVersion"
Add-Content -Value "Old kernel: $currentKernelVersion" -Path .\report\AdditionalInfo.html -Force
Add-Content -Value "New kernel: $upgradedKernelVersion" -Path .\report\AdditionalInfo.html -Force
return $true
if ($currentKernelVersion -eq $upgradedKernelVersion)
{
LogErr "Kernel version is same after restarting VMs."
return $false
}
else
{
return $true
}
}
else
{

Просмотреть файл

@ -1948,7 +1948,7 @@ Function RemoteCopy($uploadTo, $downloadFrom, $downloadTo, $port, $files, $usern
if ( $CompressCount -eq $fileCounter )
{
$retry=1
$maxRetry=10
$maxRetry=3
while($retry -le $maxRetry)
{
if($usePrivateKey)
@ -4667,8 +4667,10 @@ Function ConfigureDnsServer($intermediateVM, $DnsServer, $HostnameDIPDetails, $v
{
#Get VNETVM details using - Get-AllVMHostnameAndDIP() function. This will generate the string of all VMs IP and hostname.
$HostnameDIP = $HostnameDIPDetails
$DnsConfigureCommand = "python /home/$user/ConfigureDnsServer.py -v `"$HostnameDIP`" -D $vnetDomainDBFilePath -r $vnetDomainREVFilePath"
$DnsConfigureCommand = "echo $($dnsServer.password) | sudo -S python /home/$user/ConfigureDnsServer.py -v `"$HostnameDIP`" -D $vnetDomainDBFilePath -r $vnetDomainREVFilePath"
$out = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $DnsServer -remoteCommand $DnsConfigureCommand
#Add time interval for changes to take effect
sleep 60
if($out -imatch 'CONFIGURATION_SUCCESSFUL')
{
LogMsg "DNS server configured successfully."
@ -5516,13 +5518,13 @@ Function DoSSHTestFromLocalVM($intermediateVM, $LocalVM, $toVM,[switch]$hostname
if($hostnameMode)
{
LogMsg "Executing - date - command on $($toVM.Hostname) .."
$sshOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'python /home/$user/RunSSHCmd.py -s `"$($toVM.hostname)`" -u $user -p $($toVM.password) -P 22 -c `"date`" -o yes`'"
$sshOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'echo $($LocalVM.password) | sudo -S python /home/$user/RunSSHCmd.py -s `"$($toVM.hostname)`" -u $user -p $($toVM.password) -P 22 -c `"date`" -o yes`'"
}
else
{
LogMsg "Executing - date - command on $($toVM.DIP) .."
$sshOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'python /home/$user/RunSSHCmd.py -s `"$($toVM.dip)`" -u $user -p $($toVM.password) -P 22 -c `"date`" -o yes`'"
$sshOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'echo $($LocalVM.password) | sudo -S python /home/$user/RunSSHCmd.py -s `"$($toVM.dip)`" -u $user -p $($toVM.password) -P 22 -c `"date`" -o yes`'"
}
LogMsg "Verifying output.."
$logfilepath = $toVM.logDir + "\sshOutput.log"
@ -5550,12 +5552,12 @@ Function DoSCPTestFromLocalVM( $intermediateVM, $LocalVM, $toVM, [switch]$hostna
if($hostnameMode)
{
LogMsg "File Created. Now copying it to $($toVM.Hostname) ..."
$scpOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'python /home/$user/RemoteCopy.py -c `"$($toVM.Hostname)`" -m upload -u `"$($toVM.user)`" -p $($toVM.password) -P 22 -r `"/home/$user`" -f `"/home/$user/testfile`"`'"
$scpOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'echo $($LocalVM.password) | sudo -S python /home/$user/RemoteCopy.py -c `"$($toVM.Hostname)`" -m upload -u `"$($toVM.user)`" -p $($toVM.password) -P 22 -r `"/home/$user`" -f `"/home/$user/testfile`"`'"
}
else
{
LogMsg "File Created. Now copying it to $($toVM.DIP) ..."
$scpOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'python /home/$user/RemoteCopy.py -c `"$($toVM.DIP)`" -m upload -u `"$($toVM.user)`" -p $($toVM.password) -P 22 -r `"/home/$user`" -f `"/home/$user/testfile`"`'"
$scpOutput = RunLinuxCmd -username $intermediateVM.user -password $intermediateVM.password -ip $intermediateVM.ip -port $intermediateVM.sshport -runAsSudo -command "$python_cmd /home/$user/RunSSHCmd.py -s `'$($LocalVM.ip)`' -u $($LocalVM.user) -p`'$($LocalVM.password)`' -P $($LocalVM.sshPort) -c `'echo $($LocalVM.password) | sudo -S python /home/$user/RemoteCopy.py -c `"$($toVM.DIP)`" -m upload -u `"$($toVM.user)`" -p $($toVM.password) -P 22 -r `"/home/$user`" -f `"/home/$user/testfile`"`'"
}
LogMsg "Writing output to $logfilepath ..."
Set-Content -Path $logFilepath -Value $scpOutput
@ -5577,7 +5579,7 @@ Function StartIperfServerOnRemoteVM($remoteVM, $intermediateVM, $expectedServerI
$NewremoteVMcmd = $remoteVM.cmd
Write-Host $NewremoteVMcmd
LogMsg "Deleting any previous server logs ..."
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "rm -rf /root/*.txt /root/*.log" -runAsSudo
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "rm -rf /home/$($remoteVM.User)/*.txt /home/$($remoteVM.User)/*.log" -runAsSudo
$CommandOutput = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand $NewremoteVMcmd -runAsSudo -RunInBackGround
LogMsg "Checking if server started successfully or not ..."
$isServerStarted = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "ps -ef | grep iperf -s | grep -v grep | wc -l" -runAsSudo
@ -5615,15 +5617,15 @@ Function StartIperfClientOnRemoteVM($remoteVM, $intermediateVM)
$NewremoteVMcmd = $remoteVM.cmd
Write-Host $NewremoteVMcmd
LogMsg "Deleting any previous client logs ..."
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "rm -rf /root/*.txt /root/*.log" -runAsSudo
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "rm -rf /home/$($remoteVM.User)/*.txt /home/$($remoteVM.User)/*.log" -runAsSudo
$CommandOutput = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand $NewremoteVMcmd -runAsSudo
LogMsg "Checking if client connected successfully or not ..."
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cp /root/Runtime.log /root/start-client.py.log" -runAsSudo
$DeletePreviousLogs = RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cp /home/$($remoteVM.User)/Runtime.log /home/$($remoteVM.User)/start-client.py.log" -runAsSudo
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /root/start-client.py.log" -runAsSudo -RunMaxAllowedTime 60) -Path ("$($remoteVM.logDir)" + "\start-client.py.log")
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /root/state.txt" -runAsSudo -RunMaxAllowedTime 60 ) -Path ("$($remoteVM.logDir)" + "\state.txt")
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /root/Summary.log" -runAsSudo -RunMaxAllowedTime 60 ) -Path ("$($remoteVM.logDir)" + "\Summary.log")
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /home/$($remoteVM.User)/start-client.py.log" -runAsSudo -RunMaxAllowedTime 60) -Path ("$($remoteVM.logDir)" + "\start-client.py.log")
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /home/$($remoteVM.User)/state.txt" -runAsSudo -RunMaxAllowedTime 60 ) -Path ("$($remoteVM.logDir)" + "\state.txt")
Set-Content -Value (RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $remoteVM -remoteCommand "cat /home/$($remoteVM.User)/Summary.log" -runAsSudo -RunMaxAllowedTime 60 ) -Path ("$($remoteVM.logDir)" + "\Summary.log")
$clientState = Get-Content "$($remoteVM.Logdir)\state.txt"
@ -5697,7 +5699,7 @@ Function IperfVnetToLocalUdpTest ($vnetAsClient, $localAsServer)
if ($isClientConnected -eq $true)
{
LogMsg "Checking if server received connections from client of not ..."
$temp = RunLinuxCmdOnRemoteVM -intermediateVM $vnetAsClient -remoteVM $localAsServer -runAsSudo -remoteCommand "cp /root/iperf-server.txt /home/$user/"
$temp = RunLinuxCmdOnRemoteVM -intermediateVM $vnetAsClient -remoteVM $localAsServer -runAsSudo -remoteCommand "cp /home/$($localAsServer.user)/iperf-server.txt /home/$user/"
$checkServer = RunLinuxCmdOnRemoteVM -intermediateVM $vnetAsClient -remoteVM $localAsServer -runAsSudo -remoteCommand "/home/$user/check-server.py"
$checkServerSummary = RunLinuxCmdOnRemoteVM -intermediateVM $vnetAsClient -remoteVM $localAsServer -runAsSudo -remoteCommand "cat ~/Summary.log"
if($checkServerSummary -imatch "PASS")
@ -6764,6 +6766,7 @@ Function GetVNETDetailsFromXMLDeploymentData([string]$deploymentType)
$subnet2Range = $allVnetData.ARMSubnet2Range
$vnetDomainDBFilePath = $allVnetData.ARMVnetDomainDBFilePath
$vnetDomainRevFilePath = $allVnetData.ARMVnetDomainRevFilePath
$dnsServerIP = $allVnetData.ARMDnsServerIP
}
else
{
@ -6772,8 +6775,8 @@ Function GetVNETDetailsFromXMLDeploymentData([string]$deploymentType)
$subnet2Range = $allVnetData.Subnet2Range
$vnetDomainDBFilePath = $allVnetData.VnetDomainDBFilePath
$vnetDomainRevFilePath = $allVnetData.VnetDomainRevFilePath
$dnsServerIP = $allVnetData.DnsServerIP
}
$dnsServerIP = $allVnetData.DnsServerIP
return $vnetName,$subnet1Range,$subnet2Range,$vnetDomainDBFilePath,$vnetDomainRevFilePath,$dnsServerIP
}
#endregion
@ -6854,4 +6857,4 @@ Function GetFilePathsFromLinuxFolder ([string]$folderToSearch, $IpAddress, $SSHP
}
return $LogFilesPaths, $LogFiles
}
#endregion
#endregion

Просмотреть файл

@ -48,7 +48,7 @@
<PrivateConfiguration>
<username>VMAccessUser</username>
<password>VMAccessPassword</password>
<expiration>2017-12-12</expiration>
<expiration>2026-01-01</expiration>
</PrivateConfiguration>
<Version>1.*</Version>
<LatestVersion>1.4</LatestVersion>

Просмотреть файл

@ -15,7 +15,7 @@ white_list_xml = args.whitelist
def RunTest():
UpdateState("TestRunning")
RunLog.info("Checking for ERROR messages in waagent.log...")
errors = Run("grep -i error /var/log/waagent.log")
errors = Run("grep ERROR /var/log/waagent.log")
if (not errors) :
RunLog.info('There is no errors in the logs waagent.log')
ResultLog.info('PASS')

Просмотреть файл

@ -3,7 +3,7 @@
import argparse
import sys
from azuremodules import *
import paramiko
#import paramiko
parser = argparse.ArgumentParser()
parser.add_argument('-D', '--vnetDomain_db_filepath', help='VNET Domain db filepath', required=True)
parser.add_argument('-r', '--vnetDomain_rev_filepath', help='VNET rev filepath',required=True)

Просмотреть файл

@ -3,7 +3,7 @@
import argparse
import sys
from azuremodules import *
import paramiko
#import paramiko
parser = argparse.ArgumentParser()
parser.add_argument('-D', '--vnetDomain_db_filepath', help='VNET Domain db filepath', required=True)
parser.add_argument('-r', '--vnetDomain_rev_filepath', help='VNET rev filepath',required=True)

Просмотреть файл

@ -87,7 +87,7 @@ if ($isDeployed)
$KernelVersion = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "uname -r 2>&1" -runAsSudo
LogMsg "Kernel Version : $KernelVersion"
Set-Content -Value "bash /home/$user/code/$($currentTestData.testScript) > /home/$user/code/linuxNextBuildTest.txt" -Path "$LogDir\StartTest.sh"
Set-Content -Value "bash /home/$user/code/$($currentTestData.testScript) $user > /home/$user/code/linuxNextBuildTest.txt" -Path "$LogDir\StartTest.sh"
$out = RemoteCopy -uploadTo $hs1VIP -port $hs1vm1sshport -files ".\$LogDir\StartTest.sh" -username $user -password $password -upload
$out = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "mv StartTest.sh /home/$user/code/" -runAsSudo
$testJob = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "bash /home/$user/code/StartTest.sh" -runAsSudo -RunInBackground

Просмотреть файл

@ -31,13 +31,20 @@ else
}
foreach($size in $SupportSizes)
{
if($size -match 'DS' -or $size -match 'GS' -or ($size.Trim().EndsWith("s")) )
if ($size -imatch 'Promo')
{
$XioSizes += $size.Trim()
LogMsg "Skipping $size"
}
else
{
$StandardSizes += $size.Trim()
if(($size -match 'DS') -or ($size -match 'GS') -or ($size.Trim().EndsWith("s")))
{
$XioSizes += $size.Trim()
}
else
{
$StandardSizes += $size.Trim()
}
}
}
if($AccountType -match 'Premium')
@ -243,4 +250,4 @@ $result = GetFinalResultHeader -resultarr $resultArr
#DoTestCleanUp -result $result -testName $currentTestData.testName -deployedServices $isDeployed
#Return the result and summery to the test suite script..
return $result, $resultSummary
return $result, $resultSummary

Просмотреть файл

@ -59,7 +59,7 @@ Function VerfiyAddUserScenario ($vmData, $PublicConfigString, $PrivateConfigStri
$LogFilesPaths = $FoundFiles[0]
$LogFiles = $FoundFiles[1]
$retryCount = 1
$maxRetryCount = 10
$maxRetryCount = 3
if ($LogFilesPaths)
{
do
@ -72,11 +72,11 @@ Function VerfiyAddUserScenario ($vmData, $PublicConfigString, $PrivateConfigStri
if ( $extensionLog -imatch "Succeeded in create the account" )
{
LogMsg "extesnsion.log reported Succeeded in create the account."
LogMsg "extension.log reported Succeeded in create the account."
}
else
{
LogErr "extesnsion.log NOT reported Succeeded in create the account."
LogErr "extension.log NOT reported Succeeded in create the account."
$errorCount += 1
}
@ -207,11 +207,11 @@ Function VerfiyResetPasswordScenario ($vmData, $PublicConfigString, $PrivateConf
if (( $extensionLog -imatch "Will update password" ) -and ( $extensionLog -imatch "Succeeded in create the account or set the password" ))
{
LogMsg "extesnsion.log reported Succeeded in reset password."
LogMsg "extension.log reported Succeeded in reset password."
}
else
{
LogErr "extesnsion.log NOT reported Succeeded in reset password."
LogErr "extension.log NOT reported Succeeded in reset password."
$errorCount += 1
}
@ -510,11 +510,11 @@ Function VerfiyResetSSHConfigScenario ($vmData, $PublicConfigString, $PrivateCon
$extensionLog = [string]( Get-Content "$LogDir\extension.log.$metaData.txt" )
if ( $extensionLog -imatch "Succeeded in reset sshd_config" )
{
LogMsg "extesnsion.log reported Succeeded in reset sshd_config."
LogMsg "extension.log reported Succeeded in reset sshd_config."
}
else
{
LogErr "extesnsion.log NOT reported Succeeded in reset sshd_config."
LogErr "extension.log NOT reported Succeeded in reset sshd_config."
$errorCount += 1
}

Просмотреть файл

@ -27,6 +27,9 @@ def set_variables_OS_dependent():
global current_distro
global distro_version
global startup_file
global python_cmd
global waagent_cmd
global waagent_bin_path
RunLog.info ("\nset_variables_OS_dependent ..")
[current_distro, distro_version] = DetectDistro()
@ -38,14 +41,20 @@ def set_variables_OS_dependent():
startup_file = '/etc/rc.local'
elif(current_distro == "centos" or current_distro == "rhel" or current_distro == "fedora" or current_distro == "Oracle"):
startup_file = '/etc/rc.d/rc.local'
elif(current_distro == "SUSE" or current_distro == "sles" or current_distro == "opensuse"):
elif(current_distro == "SUSE" or "sles" in current_distro or current_distro == "opensuse"):
startup_file = '/etc/rc.d/after.local'
if(current_distro == "coreos"):
python_cmd="/usr/share/oem/python/bin/python"
waagent_bin_path="/usr/share/oem/bin/python"
waagent_cmd= "{0} {1}".format(python_cmd, waagent_bin_path)
Run("echo 'checking python version' >> PackageStatus.txt")
retcode, output = RunGetOutput('{0} --version | grep Python'.format(waagent_cmd))
if retcode == 0 and 'Python: 3.' in output:
python_cmd = 'python3'
Run("echo 'using [{0}]' >> PackageStatus.txt".format(python_cmd))
RunLog.info ("\nset_variables_OS_dependent ..[done]")
def download_and_install_rpm(package):
@ -154,7 +163,6 @@ def install_ez_setup():
RunLog.error("File not found: {0}".format(ez_setup))
return False
output = Run("{0} {1}".format(python_cmd, ez_setup))
return ("Finished" in output)
@ -212,7 +220,7 @@ def install_waagent_from_github():
RunLog.error("Installing waagent from github...[failed]")
RunLog.error("{0}".format(e))
return False
waagentSrc = os.listdir(unzipPath)[0]
waagentSrc = os.path.join(unzipPath, waagentSrc)
binPath20 = os.path.join(waagentSrc, "waagent")
@ -227,9 +235,9 @@ def install_waagent_from_github():
#For 2.1, use setup.py to install/uninstall package
os.chmod(binPath21, 0o755)
setup_py = os.path.join(waagentSrc, 'setup.py')
ExecMultiCmdsLocalSudo([
"{0} {1} install --register-service --force".format(python_cmd, setup_py)])
return True
ExecMultiCmdsLocalSudo(["{0} {1} install --register-service --force".format(python_cmd, setup_py)])
return True
else:
RunLog.error("Installing waagent from github...[failed]")
RunLog.error("Unknown waagent verions")
@ -246,7 +254,7 @@ def install_package(package):
return AptgetPackageInstall(package)
elif ((current_distro == "rhel") or (current_distro == "Oracle") or (current_distro == 'centos') or (current_distro == 'fedora')):
return yum_package_install(package)
elif (current_distro == "SUSE") or (current_distro == "openSUSE") or (current_distro == "sles") or (current_distro == "opensuse"):
elif (current_distro == "SUSE") or (current_distro == "openSUSE") or ("sles" in current_distro) or (current_distro == "opensuse"):
return zypper_package_install(package)
else:
RunLog.error (package + ": package installation failed!")
@ -372,14 +380,14 @@ def RunTest():
xml_root = packages_xml_file.getroot()
parse_success = False
Run("echo '** Installing Packages for '"+current_distro+"' Started.. **' > PackageStatus.txt")
Run("echo '** Installing Packages for '"+current_distro+"' Started.. **' >> PackageStatus.txt")
for branch in xml_root:
for node in branch:
if (node.tag == "packages"):
# Get the requisite package list from 'universal' node, that's must have on system
if(node.attrib['distro'] == 'universal'):
required_packages_list = node.text.split(',')
elif(current_distro == node.attrib["distro"]):
elif(node.attrib["distro"] in current_distro):
packages_list = node.text.split(",")
elif node.tag == "waLinuxAgent_link":
tar_link[node.attrib["name"]] = node.text
@ -411,7 +419,7 @@ def RunTest():
else:
Run("echo 'coreos support tools installed successfully' >> PackageStatus.txt")
if (current_distro == "SUSE") or (current_distro == "openSUSE") or (current_distro == "sles") or (current_distro == "opensuse"):
if (current_distro == "SUSE") or (current_distro == "openSUSE") or ("sles" in current_distro) or (current_distro == "opensuse"):
iperf_cmd = Run("command -v iperf")
iperf3_cmd = Run("command -v iperf3")
if not iperf_cmd and iperf3_cmd:

Просмотреть файл

@ -80,16 +80,13 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
#endregion
#region DEFINE A INTERMEDIATE VM THAT WILL BE USED FOR ALL OPERATIONS DONE ON THE LOCAL NET VMS [DNS SERVER, NFSSERVER, MYSQL SERVER]
@ -169,9 +166,6 @@ if($isDeployed)
}
catch
{
Write-Host "haha"
sleep 5
$ErrorMessage = $_.Exception.Message
LogErr "EXCEPTION : $ErrorMessage"
}
@ -205,14 +199,7 @@ else
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
#TBD
#$dnsServer.cmd = "/home/$user/CleanupDnsServer.py"
#RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo
#endregion
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion

Просмотреть файл

@ -81,16 +81,16 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMmysqlServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.mysqlServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$mysqlServer = CreateVMNode -nodeIp $mysqlServerInfo.IP -nodeSshPort 22 -user $mysqlServerInfo.Username -password $mysqlServerInfo.Password -nodeHostname $mysqlServerInfo.Hostname
#endregion
#region DEFINE A INTERMEDIATE VM THAT WILL BE USED FOR ALL OPERATIONS DONE ON THE LOCAL NET VMS [DNS SERVER, NFSSERVER, MYSQL SERVER]
@ -108,11 +108,11 @@ if($isDeployed)
$currentLinuxFiles = ConvertFileNames -ToLinux -currentWindowsFiles $currentTestData.files -expectedLinuxPath "/home/$user"
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteFiles $currentLinuxFiles
# Make them executable..
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
#endregion
@ -132,9 +132,7 @@ if($isDeployed)
if ($isAllConfigured -eq "True")
{
#region TEST EXECUTION
$udpClient = CreateIperfNode -user "root" -password "redhat" -nodeIp "192.168.3.125" -nodeSshPort 22 -nodeUdpPort 990
Write-Host "111"
$udpClient = $mysqlServer
$resultArr = @()
foreach ($Value in $SubtestValues)
{
@ -225,7 +223,7 @@ else
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion

Просмотреть файл

@ -79,16 +79,16 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMmysqlServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.mysqlServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$mysqlServer = CreateVMNode -nodeIp $mysqlServerInfo.IP -nodeSshPort 22 -user $mysqlServerInfo.Username -password $mysqlServerInfo.Password -nodeHostname $mysqlServerInfo.Hostname
#endregion
#region DEFINE A INTERMEDIATE VM THAT WILL BE USED FOR ALL OPERATIONS DONE ON THE LOCAL NET VMS [DNS SERVER, NFSSERVER, MYSQL SERVER]
@ -107,10 +107,10 @@ if($isDeployed)
#region Upload all files to LOCAL NET VMS..
$currentLinuxFiles = ConvertFileNames -ToLinux -currentWindowsFiles $currentTestData.files -expectedLinuxPath "/home/$user"
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteFiles $currentLinuxFiles
# Make them executable..
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
#endregion
#region CONFIGURE DSN SERVER WITH IP ADDRESSES OF DEPLOYED VNET VMs...
@ -129,7 +129,7 @@ if($isDeployed)
if ($isAllConfigured -eq "True")
{
#region TEST EXECUTION
$udpServer = $nfsServer
$udpServer = $mysqlServer
$udpServer.cmd = "/home/$user/start-server.py -u yes -p 990 -m yes"
$resultArr = @()
foreach ($Value in $SubtestValues)
@ -209,14 +209,9 @@ else
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
#TBD
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion

Просмотреть файл

@ -84,16 +84,13 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
#endregion
#region DEFINE A INTERMEDIATE VM THAT WILL BE USED FOR ALL OPERATIONS DONE ON THE LOCAL NET VMS [DNS SERVER, NFSSERVER, MYSQL SERVER]
@ -213,7 +210,7 @@ else
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion

Просмотреть файл

@ -83,16 +83,16 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMmysqlServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.mysqlServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$mysqlServer = CreateVMNode -nodeIp $mysqlServerInfo.IP -nodeSshPort 22 -user $mysqlServerInfo.Username -password $mysqlServerInfo.Password -nodeHostname $mysqlServerInfo.Hostname
#endregion
$intermediateVM = CreateVMNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -user $user -password $password -nodeDip $hs1vm1IP -nodeHostname $hs1vm1Hostname
@ -112,11 +112,11 @@ if($isDeployed)
$currentLinuxFiles = ConvertFileNames -ToLinux -currentWindowsFiles $currentTestData.files -expectedLinuxPath "/home/$user"
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteFiles $currentLinuxFiles
# Make them executable..
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
#endregion
#region CONFIGURE DSN SERVER WITH IP ADDRESSES OF DEPLOYED VNET VMs...
@ -136,7 +136,7 @@ if($isDeployed)
if ($isAllConfigured -eq "True")
{
#region TEST EXECUTION
$pingFrom = CreatePingNode -nodeIp $nfsServer.ip -nodeSshPort 22 -user "root" -password "redhat" -files $currentTestData.files -logDir $LogDir
$pingFrom = CreatePingNode -nodeIp $mysqlServer.ip -nodeSshPort 22 -user $mysqlServer.user -password $mysqlServer.password -files $currentTestData.files -logDir $LogDir
$resultArr = @()
foreach ($Value in $SubtestValues)
{
@ -222,7 +222,7 @@ else
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion

Просмотреть файл

@ -83,16 +83,16 @@ if($isDeployed)
#region DEFINE LOCAL NET VMS
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMmysqlServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.mysqlServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$mysqlServer = CreateVMNode -nodeIp $mysqlServerInfo.IP -nodeSshPort 22 -user $mysqlServerInfo.Username -password $mysqlServerInfo.Password -nodeHostname $mysqlServerInfo.Hostname
#endregion
#region DEFINE A INTERMEDIATE VM THAT WILL BE USED FOR ALL OPERATIONS DONE ON THE LOCAL NET VMS [DNS SERVER, NFSSERVER, MYSQL SERVER]
@ -232,15 +232,10 @@ $result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion
#Clean up the setup
DoTestCleanUp -result $result -testName $currentTestData.testName -deployedServices $isDeployed -ResourceGroups $isDeployed

Просмотреть файл

@ -81,16 +81,13 @@ if($isDeployed)
RunLinuxCmdOnAllDeployedVMs -SSHDetails $SSHDetails -command "chmod +x *.py"
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$intermediateVM = CreateVMNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -user $user -password $password -nodeDip $hs1vm1IP -nodeHostname $hs1vm1Hostname
$currentLinuxFiles = ConvertFileNames -ToLinux -currentWindowsFiles $currentTestData.files -expectedLinuxPath "/home/$user"
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteFiles $currentLinuxFiles
@ -197,7 +194,7 @@ else
}
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion
#Clean up the setup

Просмотреть файл

@ -70,25 +70,25 @@ if($isDeployed)
ConfigureVNETVms -SSHDetails $SSHDetails -vnetDomainDBFilePath $vnetDomainDBFilePath -dnsServerIP $dnsServerIP
if ($UseAzureResourceManager)
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "dns-srv-01-arm"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "nfs-srv-01-arm"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "mysql-srv-01-arm"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMdnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.ARMmysqlServer
}
else
{
$dnsServer = CreateVMNode -nodeIp "192.168.3.120" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntudns"
$nfsServer = CreateVMNode -nodeIp "192.168.3.125" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntunfsserver"
$mysqlServer = CreateVMNode -nodeIp "192.168.3.127" -nodeSshPort 22 -user "root" -password "redhat" -nodeHostname "ubuntumysql"
$dnsServerInfo = $xmlConfig.config.Azure.Deployment.Data.dnsServer
$mysqlServerInfo = $xmlConfig.config.Azure.Deployment.Data.mysqlServer
}
$dnsServer = CreateVMNode -nodeIp $dnsServerInfo.IP -nodeSshPort 22 -user $dnsServerInfo.Username -password $dnsServerInfo.Password -nodeHostname $dnsServerInfo.Hostname
$mysqlServer = CreateVMNode -nodeIp $mysqlServerInfo.IP -nodeSshPort 22 -user $mysqlServerInfo.Username -password $mysqlServerInfo.Password -nodeHostname $mysqlServerInfo.Hostname
$intermediateVM = CreateVMNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -user $user -password $password -nodeDip $hs1vm1IP -nodeHostname $hs1vm1Hostname
UploadFilesToAllDeployedVMs -SSHDetails $SSHDetails -files $currentTestData.files
RunLinuxCmdOnAllDeployedVMs -SSHDetails $SSHDetails -command "chmod +x *"
$currentWindowsfiles = $currentTestData.files
$currentLinuxFiles = ConvertFileNames -ToLinux -currentWindowsFiles $currentTestData.files -expectedLinuxPath "/home/$user"
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteFiles $currentLinuxFiles
RemoteCopyRemoteVM -upload -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteFiles $currentLinuxFiles
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $nfsServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $mysqlServer -remoteCommand "chmod +x /home/$user/*.py" -runAsSudo
ConfigureDnsServer -intermediateVM $intermediateVM -DnsServer $dnsServer -HostnameDIPDetails $HostnameDIPDetails -vnetDomainDBFilePath $vnetDomainDBFilePath -vnetDomainREVFilePath $vnetDomainRevFilePath
$isAllConfigured = "True"
}
@ -133,16 +133,16 @@ if($isDeployed)
if(($mode -eq "IP") -or ($mode -eq "VIP") -or ($mode -eq "DIP"))
{
LogMsg "SSH Test Started from LocaVM to $Value in $mode mode.."
$sshResult = DoSSHTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $dnsServer -toVM $ToVM
$sshResult = DoSSHTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $mysqlServer -toVM $ToVM
LogMsg "SCP Test Started from LocaVM to $Value in $mode mode.."
$scpResult = DoSCPTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $dnsServer -toVM $ToVM
$scpResult = DoSCPTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $mysqlServer -toVM $ToVM
}
if(($mode -eq "URL") -or ($mode -eq "Hostname"))
{
LogMsg "SSH Test Started from LocaVM to $Value in $mode mode.."
$sshResult = DoSSHTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $dnsServer -toVM $ToVM -hostnameMode
$sshResult = DoSSHTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $mysqlServer -toVM $ToVM -hostnameMode
LogMsg "SCP Test Started from LocaVM to $Value in $mode mode.."
$scpResult = DoSCPTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $dnsServer -toVM $ToVM -hostnameMode
$scpResult = DoSCPTestFromLocalVM -intermediateVM $intermediateVM -LocalVM $mysqlServer -toVM $ToVM -hostnameMode
}
LogMsg "SSH result : $sshResult"
LogMsg "SCP result : $scpResult"
@ -191,7 +191,7 @@ else
}
$result = GetFinalResultHeader -resultarr $resultArr
#region Clenup the DNS server.
$dnsServer.cmd = "/home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
$dnsServer.cmd = "echo $($dnsServer.password) | sudo -S /home/$user/CleanupDnsServer.py -D $vnetDomainDBFilePath -r $vnetDomainRevFilePath"
RunLinuxCmdOnRemoteVM -intermediateVM $intermediateVM -remoteVM $dnsServer -runAsSudo -remoteCommand $dnsServer.cmd
#endregion
#Clean up the setup

Просмотреть файл

@ -188,6 +188,22 @@ def GetResourceDiskMountPoint():
RunLog.info("ResourceDisk handled by waagent.")
return walacfg_dict['ResourceDisk.MountPoint']
def RunGetOutput(cmd):
try:
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
retval = proc.communicate()
output = retval[0]
output = unicode(output,
encoding='utf-8',
errors="backslashreplace")
except subprocess.CalledProcessError as e:
output = unicode(e.output,
encoding='utf-8',
errors="backslashreplace")
return e.returncode, output
return 0, output
def Run(cmd):
proc=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
proc.wait()

Просмотреть файл

@ -39,7 +39,16 @@ function check_exit_status ()
function detect_linux_ditribution_version()
{
local distro_version=`cat /etc/*release*|sed 's/"//g'|grep "VERSION_ID="| sed 's/VERSION_ID=//'| sed 's/\r//'`
local distro_version="Unknown"
if [ -f /etc/os-release ] ; then
distro_version=`cat /etc/os-release|sed 's/"//g'|grep "VERSION_ID="| sed 's/VERSION_ID=//'| sed 's/\r//'`
elif [ -f /etc/centos-release ] ; then
distro_version=`cat /etc/centos-release | sed s/.*release\ // | sed s/\ .*//`
elif [ -f /etc/oracle-release ] ; then
distro_version=`cat /etc/oracle-release | sed s/.*release\ // | sed s/\ .*//`
elif [ -f /etc/redhat-release ] ; then
distro_version=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
fi
echo $distro_version
}
@ -67,7 +76,7 @@ function detect_linux_ditribution()
linux_ditribution='unknown'
fi
fi
echo "${linux_ditribution^}"
echo "$(echo "$linux_ditribution" | sed 's/.*/\u&/')"
}
function updaterepos()

Просмотреть файл

@ -12,7 +12,8 @@ ICA_TESTFAILED="TestFailed" # Error during running of test
CONSTANTS_FILE="constants.sh"
username=`cat /var/log/cloud-init.log | grep Adding| sed "s/.*user //"`
#username=`cat /var/log/cloud-init.log | grep Adding| sed "s/.*user //"`
username=$1
current_kernel=`uname -r`
code_path="/home/$username/code"
. $code_path/azuremodules.sh

Просмотреть файл

@ -48,22 +48,32 @@ ICA_TESTFAILED="TestFailed" # Error occurred during the test
# LogMsg()
#
#######################################################################
LogMsg()
{
echo `date "+%b %d %Y %T"` : "${1}" # Add the time stamp to the log message
echo "${1}" >> ~/build-customKernel.txt
}
UpdateTestState()
{
echo "${1}" > ~/state.txt
}
if [ -z "$customKernel" ]; then
echo "Please mention -customKernel next"
exit 1
fi
touch ~/build-customKernel.txt
if [ -z "$logFolder" ]; then
logFolder="~/"
echo "-logFolder is not mentioned. Using ~/"
else
echo "Using Log Folder $logFolder"
fi
LogMsg()
{
echo `date "+%b %d %Y %T"` : "${1}" # Add the time stamp to the log message
echo "${1}" >> /$logFolder/build-customKernel.txt
}
UpdateTestState()
{
echo "${1}" > /$logFolder/state.txt
}
touch /$logFolder/build-customKernel.txt
if [ "${customKernel}" == "linuxnext" ]; then
kernelSource="https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git"
sourceDir="linux-next"
@ -88,10 +98,27 @@ elif [[ $customKernel == *.deb ]]; then
UpdateTestState $ICA_TESTCOMPLETED
fi
exit 0
elif [[ $customKernel == *.rpm ]]; then
LogMsg "Custom Kernel:$customKernel"
yum -y install wget
LogMsg "RPM package web link detected. Downloading $customKernel"
wget $customKernel
LogMsg "Installing ${customKernel##*/}"
rpm -ivh "${customKernel##*/}"
kernelInstallStatus=$?
UpdateTestState $ICA_TESTCOMPLETED
if [ $kernelInstallStatus -ne 0 ]; then
LogMsg "CUSTOM_KERNEL_FAIL"
UpdateTestState $ICA_TESTFAILED
else
LogMsg "CUSTOM_KERNEL_SUCCESS"
UpdateTestState $ICA_TESTCOMPLETED
fi
exit 0
fi
LogMsg "Custom Kernel:$customKernel"
chmod +x ~/DetectLinuxDistro.sh
LinuxDistro=`~/DetectLinuxDistro.sh`
chmod +x /$logFolder/DetectLinuxDistro.sh
LinuxDistro=`/$logFolder/DetectLinuxDistro.sh`
if [ $LinuxDistro == "SLES" -o $LinuxDistro == "SUSE" ]; then
#zypper update
zypper --non-interactive install git-core make tar gcc bc patch dos2unix wget xz
@ -109,12 +136,12 @@ elif [ $LinuxDistro == "UBUNTU" ]; then
LogMsg "Updating distro..."
apt-get update
LogMsg "Installing packages git make tar gcc bc patch dos2unix wget ..."
apt-get install -y git make tar gcc bc patch dos2unix wget >> ~/build-customKernel.txt 2>&1
apt-get install -y git make tar gcc bc patch dos2unix wget >> /$logFolder/build-customKernel.txt 2>&1
LogMsg "Installing kernel-package ..."
apt-get -o Dpkg::Options::="--force-confnew" -y install kernel-package >> ~/build-customKernel.txt 2>&1
apt-get -o Dpkg::Options::="--force-confnew" -y install kernel-package >> /$logFolder/build-customKernel.txt 2>&1
rm -rf linux-next
LogMsg "Downloading kernel source..."
git clone ${kernelSource} >> ~/build-customKernel.txt 2>&1
git clone ${kernelSource} >> /$logFolder/build-customKernel.txt 2>&1
cd ${sourceDir}
#Download kernel build shell script...
@ -122,7 +149,7 @@ elif [ $LinuxDistro == "UBUNTU" ]; then
chmod +x build-ubuntu.sh
#Start installing kernel
LogMsg "Building and Installing kernel..."
./build-ubuntu.sh >> ~/build-customKernel.txt 2>&1
./build-ubuntu.sh >> /$logFolder/build-customKernel.txt 2>&1
if [ $? -ne 0 ]; then
LogMsg "CUSTOM_KERNEL_FAIL"
UpdateTestState $ICA_TESTFAILED

Просмотреть файл

@ -85,6 +85,7 @@ elif [ "${customLIS}" == "netnext" ]; then
sourceDir="net-next"
elif [[ $customLIS == *.rpm ]]; then
LogMsg "Custom LIS:$customLIS"
sed -i '/^exclude/c\#exclude' /etc/yum.conf
yum install -y wget tar
LogMsg "Debian package web link detected. Downloading $customLIS"
wget $customLIS
@ -102,6 +103,7 @@ elif [[ $customLIS == *.rpm ]]; then
exit 0
elif [[ $customLIS == *.tar.gz ]]; then
LogMsg "Custom LIS:$customLIS"
sed -i '/^exclude/c\#exclude' /etc/yum.conf
yum install -y git make tar gcc bc patch dos2unix wget xz >> ~/build-customLIS.txt 2>&1
LogMsg "LIS tar file web link detected. Downloading $customLIS"
wget $customLIS
@ -129,6 +131,7 @@ if [ $DistroName == "SLES" -o $DistroName == "SUSE" ]; then
LogMsg "LIS doesn't support for $DistroName distro..."
elif [ $DistroName == "CENTOS" -o $DistroName == "REDHAT" -o $DistroName == "FEDORA" -o $DistroName == "ORACLELINUX" ]; then
LogMsg "Installing packages git make tar gcc bc patch dos2unix wget ..."
sed -i '/^exclude/c\#exclude' /etc/yum.conf
yum install -y git make tar gcc bc patch dos2unix wget xz >> ~/build-customLIS.txt 2>&1
LogMsg "Downloading LIS source from ${LISSource}..."
git clone ${LISSource} >> ~/build-customLIS.txt 2>&1

Просмотреть файл

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
#
# This program is distributed in the hope that it will be useful,
@ -167,9 +167,9 @@ RunFIO()
ConfigCentOS7()
{
fioCentOS7pkg="fio-2.1.10-1.el7.rf.x86_64.rpm"
fioCentOS7pkg="fio-2.2.8-2.el7.x86_64.rpm"
LogMsg "INFO: CentOS7: installing required packages"
yum install -y wget sysstat mdadm blktrace
yum install -y wget sysstat mdadm blktrace libaio
mount -t debugfs none /sys/kernel/debug
installed=`which fio`
@ -178,7 +178,7 @@ ConfigCentOS7()
fiolPkg=$(ls | grep ${fioCentOS7pkg})
if [ -z "$fiolPkg" ]; then
wget "http://pkgs.repoforge.org/fio/${fioCentOS7pkg}"
wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS7pkg}"
fi
yum install -y ${fioCentOS7pkg}
if [ $? -ne 0 ]; then
@ -192,7 +192,7 @@ ConfigCentOS6()
{
fioCentOS6pkg="fio-2.1.10-1.el6.rf.x86_64.rpm"
LogMsg "INFO: CentOS6: installing required packages"
yum install -y wget sysstat mdadm blktrace
yum install -y wget sysstat mdadm blktrace libaio
mount -t debugfs none /sys/kernel/debug
installed=`which fio`
@ -201,7 +201,7 @@ ConfigCentOS6()
fiolPkg=$(ls | grep ${fioCentOS6pkg})
if [ -z "$fiolPkg" ]; then
wget "http://pkgs.repoforge.org/fio/${fioCentOS6pkg}"
wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS6pkg}"
fi
yum install -y libibverbs.x86_64
yum install -y ${fioCentOS6pkg}
@ -347,7 +347,8 @@ mountDir="/data"
cd ${HOMEDIR}
#DISTRO=`grep -ihs "Ubuntu\|Suse\|Fedora\|Debian\|CentOS\|Red Hat Enterprise Linux" /etc/{issue,*release,*version} | grep DISTRIB_ID= | sed s/DISTRIB_ID=//`
DISTRO="Ubuntu"
DISTRO=`grep -ihs "Ubuntu\|Suse\|Fedora\|Debian\|CentOS\|Red Hat Enterprise Linux" /etc/{issue,*release,*version}`
#DISTRO="Ubuntu"
echo "###############$DISTRO########################"
case $DISTRO in
Ubuntu*)