Skip to content
Test Net Tools
Branch: master
Clone or download
substratumservices Sc 627 (#7)
* SC-627: Fixing tests.

After changing Created -> Sent the tests failed.
Latest commit 3a4d9fd Apr 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Jan 17, 2019
binaries
ci SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
test
.coveragerc SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
.gitignore SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
CODE-OF-CONDUCT.md SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
CODE_STRUCTURE.md
CONTRIBUTING.md
Dockerfile SC-810 and SC-691 (#5) Apr 9, 2019
LICENSE
README.md SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
USAGE.md SC-810 and SC-691 (#5) Apr 9, 2019
cluster.py
command.py SC-810 and SC-691 (#5) Apr 9, 2019
compute.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
config.py
curl.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
daisy.py SC-810 and SC-691 (#5) Apr 9, 2019
dns.py
dns_commands.py
dns_docker_commands.py
dns_ssh_commands.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
docker.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
ec2.py
executor.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
finish.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
help.py SC-810 and SC-691 (#5) Apr 9, 2019
info.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
init.py SC-810 and SC-691 (#5) Apr 9, 2019
instance.py SC-810 and SC-691 (#5) Apr 9, 2019
instance_api.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
kill.py
metrics.sh SC-810 and SC-691 (#5) Apr 9, 2019
nfo.py
node.py SC-627: Update what outbound is looking for. (#6) Apr 25, 2019
node_commands.py SC-747: Changing --home to --data_directory (#4) Mar 5, 2019
node_docker_commands.py SC-747: Changing --home to --data_directory (#4) Mar 5, 2019
node_ssh_commands.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
pokemon_name.json SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
requirements.txt
runner.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
ssh_wrapper.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
start.py
test_net.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
tnt_config_template.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
traffic.py
traffic_commands.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
traffic_docker_commands.py
traffic_handler.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
traffic_ssh_commands.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
update.py SC-661 : Initial transition to open source repository. (#1) Feb 7, 2019
virtualbox.py
wget.py

README.md

Test Net Tools

Dev notes

We used Python 2.7.12 to develop TNT

TNT uses ssh to interact with cloud instances or local VirtualBox VMs. The instances must be set up to use the same user's ssh key.

Setup

Requires installation of python dependencies (listed in requirements.txt)

ci/setup.sh

Also, GraphViz has to be installed not just for python...

sudo apt-get install graphviz

If you want to be able to update the binaries the instances run via the TNT, run the TNT script from a directory that has a binaries directory with SubstratumNode and dns_utility executables in it.

Create your own modifiable version of tnt_config.py based off of tnt_config_template.py.

cp tnt_config_template.py tnt_config.py

Fill in the INSTANCE_USER to match the account needed to connect to your instances.

Additional Setup Required for Mac

Some TNT commands execute commands in new terminal windows. On a Mac, the default Terminal does not support this, so TNT on Mac relies on iTerm. The main loop of TNT can be run from a regular Terminal, but in order to ssh or tail, you must have iTerm installed.

To use with Google Cloud

Requires installation of python library googleapiclient

Also requires that GOOGLE_APPLICATION_CREDENTIALS environment variable be set to point to a JSON file containing credentials for authentication to google cloud. (This hasn't been checked in.)

Fill in the COMPUTE_CONFIG dictionary in tnt_config.py to match your project and zone configuration. Fill in the COMPUTE_INSTANCES list in tnt_config.py to include your compute instances i.e. Google('<name_of_cloud_instance>').

We recommend using templates when creating multiple cloud instances. You'll need to setup SSH keys on all the instances in order for ssh to work without prompting for a password.

To use with AWS EC2

Requires installation of python library boto3

sudo -H pip install boto3

You'll need to set up your AWS credentials (see the AWS documentation). Also requires that AWS credentials and config files exist in the ~/.aws/ directory

Fill in the EC2_CONFIG dictionary in tnt_config.py to include your ec2 region. Fill in the EC2_INSTANCES list in tnt_config.py to include your ec2 instances i.e. Amazon('<name_of_ec2_instance>').

We recommend using templates when creating multiple cloud instances. You'll need to setup SSH keys on all the instances in order for ssh to work without prompting for a password.

To use with VirtualBox

In VirtualBox create a VM with Bridged networking (so it will have its own IP)

To create more you can clone the existing VM, but remember to check the box to regenerate the MAC address, and once it is created, change the hostname (in /etc/hostname) to match the VM name. Finally, restart the VM.

Fill in the VIRTUALBOX_INSTANCES list in tnt_config.py to include your virtualbox instances i.e. VBox('<name_of_vbox_instance>').

To use with Docker

Requires building the docker image

ci/setup_docker.sh

Running the Tests

Run the tests with pytest.

pytest

Running Code Coverage

Install pytest-cov, then run ci/coverage.sh

Other Documentation

You can’t perform that action at this time.