It checks for internet connectivity before installing Ansible. Specifically, it checks these URLs:
hub.docker.com
github.com
plugins.jenkins.io
What is the background?
We've occasionally had reports of failure to install cdemo which were ultimately traced to basic network connectivity problems, eg with NATs and firewalls and so on blocking access to necessary domains.
In order to make it clear up front where the failure is and what the expectations are, this script prints out in plain language whether it's able to connect.
How should the reviewer test this?
The lazy way is to checkout the network-check branch and run bin/check-network. That will run the network check alone and nothing else.
The more methodical way is:
checkout the network-check branch in your cdemo VM
turn off network access to your VM
run installAnsible.sh
this should FAIL IMMEDIATELY with warnings about connectivity
What does this PR do?
It checks for internet connectivity before installing Ansible. Specifically, it checks these URLs:
What is the background?
We've occasionally had reports of failure to install cdemo which were ultimately traced to basic network connectivity problems, eg with NATs and firewalls and so on blocking access to necessary domains.
In order to make it clear up front where the failure is and what the expectations are, this script prints out in plain language whether it's able to connect.
How should the reviewer test this?
The lazy way is to checkout the
network-check
branch and runbin/check-network
. That will run the network check alone and nothing else.The more methodical way is:
network-check
branch in your cdemo VMrun
installAnsible.sh
this should FAIL IMMEDIATELY with warnings about connectivity
run
installAnsible.sh
this should succeed as usual
Example sessions
Good connectivity:
Bad connectivity: