This project is a concourse pipeline based on the IaaSSmokeTest project. IaaSSmokeTest is an application to test network connectivity between two hosts over a configurable set of TCP/UDP ports.
You might want to set this pipeline up in order to ensure communication between 2 networks where firewall rules have (or haven't) been established. This could be a precursor to a larger application installation that needs connectivity over various TCP/UDP ports.
- A running concourse installation and fly CLI.
- The pipeline requires the use of a docker image that allows
ssh
and hasexpect
. Connectivity tohttp://hub.docker.com
from Concourse is needed to download this image.
- Fork this repo and clone it to your machine
- Create a configuration file for each host
- Use the
config_template.json
file as a template - Rename the file
config_HOSTNAME.json
, whereHOSTNAME
is an ssh-reachable host address
- Use the
- Edit the configuration file
- Specify the remote host name and TCP/UDP ports to test
- Specify the local hosts' TCP/UDP ports used to listen for requests
- One host's config file content should be the "inverse" of the other host's config file
- Commit config files to github repo
git add config_*.json
git commit
git push
- Create a hosts file.
- Use the
hosts.template.yml
file as a template - Rename the file to
hosts.yml
- For
git_repo
enter forked github repo location from step 1 above - Replace the
host1_*
andhost2_*
values in the file with the appropriate values - This file should not be added to github since it contains credentials
- Use the
- Add pipeline to Concourse with the fly CLI
- Login to concourse server
- e.g.
fly -t iaas-smoke-test login -c [concourse server url]
- e.g.
- Add pipeline
- e.g.
fly -t iaas-smoke-test set-pipeline -c pipeline.yml -l hosts.yml -p iaas-smoke-test
- e.g.
- Unpause pipeline
- e.g.
fly -t iaas-smoke-test unpause-pipeline -p iaas-smoke-test
- e.g.
- Login to concourse server
Open the Concourse server url in your browser, locate the iaas-smoke-test
pipeline, then click on the iaas-smoke-test
job.
Click the +
button to execute the pipeline.
If the configuration is correct the pipeline should execute successfully. If not, you will need to debug the pipeline and/or the configuration files to determine what went wrong.
Alternatively, a sample run.sh
script is included that will set the pipeline, unpause it, start the job, and watch the log output. Review and update this script as appropriate for your environment.
NOTE: The pipeline is not configured to trigger automatically with a change to the config files checked into the github repository. To do this simply add trigger: true
to the git resource in the pipeline.yml
plan like so:
- get: iaas-smoke-test
trigger: true
Even when the pipeline executes successfully and shows green, you should double-check the output of the run_test1
and run_test2
tasks to be sure the hosts are able to connect to each other.
As of the writing of this document, the pipeline itself does not contain any validation of the IaaSSmokeTest
output to make sure connectivity was successful. Hopefully a future version will add it.