I am writing a workflow to deploy a vro appliance from vro (it's an inception kind of thing)... So far everything is fine, but before configuring the SSO I need to do a reboot, I need my workflow to wait until the appliance is fully up and ready before proceeding. Does anyone know how I could setup the workflow to wait until the vro appliance is fully up and ready to respond?
I couldn't figure out how to this natively in orchestrator so I wrote it in powershell, if someone out there can convert this to native orchestrator (i.e. javascript) it would be handy. Maybe even make it part of the default workflows as waiting for a url to become active is likely to be used a lot...
Begin {
$url=$args[0]
$web = New-Object System.Net.WebClient
$web.Proxy = [System.Net.GlobalProxySelection]::GetEmptyWebProxy()
$flag = $false
}
Process {
While ($flag -eq $false) {
Try {
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
Write-Host $env:username
write-host $url
$web.DownloadString($url)
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
$flag = $True
}
Catch {
Write-host -fore Red "Access down..."
}
}
}
End {
Write-Host -fore Green "Access is back"
}
I believe you can do a wget to https://yourvcoserver.com:8281/index.html
The URL to check vRO server is up and running and is able to process tasks is: https://vco-appliance-host:8281/vco/api/docs/index.html. This URL does not require authentication. The GET call should return 200 if vRO server is ready for work.
I know the correct answer is to put a valid certificate on the vco server, but is there anyway to skip the certificate check?
I couldn't figure out how to this natively in orchestrator so I wrote it in powershell, if someone out there can convert this to native orchestrator (i.e. javascript) it would be handy. Maybe even make it part of the default workflows as waiting for a url to become active is likely to be used a lot...
Begin {
$url=$args[0]
$web = New-Object System.Net.WebClient
$web.Proxy = [System.Net.GlobalProxySelection]::GetEmptyWebProxy()
$flag = $false
}
Process {
While ($flag -eq $false) {
Try {
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
Write-Host $env:username
write-host $url
$web.DownloadString($url)
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
$flag = $True
}
Catch {
Write-host -fore Red "Access down..."
}
}
}
End {
Write-Host -fore Green "Access is back"
}