Update code due to VNET test environment changed to 'VNET to VNET'
This commit is contained in:
Родитель
7459e1111b
Коммит
fa2cf02116
|
@ -117,25 +117,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>
|
||||
|
@ -928,17 +936,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>
|
||||
|
@ -997,17 +1006,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>
|
||||
|
@ -1069,17 +1079,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>
|
||||
|
@ -1138,17 +1149,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>
|
||||
|
|
|
@ -4503,8 +4503,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."
|
||||
|
@ -5352,13 +5354,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"
|
||||
|
@ -5386,12 +5388,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
|
||||
|
@ -5413,7 +5415,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
|
||||
|
@ -5451,15 +5453,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"
|
||||
|
@ -5533,7 +5535,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")
|
||||
|
@ -6600,6 +6602,7 @@ Function GetVNETDetailsFromXMLDeploymentData([string]$deploymentType)
|
|||
$subnet2Range = $allVnetData.ARMSubnet2Range
|
||||
$vnetDomainDBFilePath = $allVnetData.ARMVnetDomainDBFilePath
|
||||
$vnetDomainRevFilePath = $allVnetData.ARMVnetDomainRevFilePath
|
||||
$dnsServerIP = $allVnetData.ARMDnsServerIP
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6608,8 +6611,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
|
||||
|
@ -6690,4 +6693,4 @@ Function GetFilePathsFromLinuxFolder ([string]$folderToSearch, $IpAddress, $SSHP
|
|||
}
|
||||
return $LogFilesPaths, $LogFiles
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче