Code Monkey home page Code Monkey logo

tens-ansible's Introduction

Ansible for Traffic Emulator for Network Service (TENS)

Ansible Plays for installing and running tests with TE-NS Traffic Generator

https://github.com/vmware/te-ns

Prerequisites

  • Linux hosts created for TENS Controller and TEDPs (Traffic Generators). This can be one host or multiple depending on your needs and available compute resources.
  • Docker installed on TENS Controller and TEDP hosts
  • Ansible 2.10 or above installed on the the host that will run the Ansible playbooks for TENS
  • The community.docker collection installed with ansible-galaxy collection install community.docker

Setup Instructions

  1. Clone Repo and change to cloned directory
git clone https://github.com/slarimore02/tens-ansible.git
cd tens-ansible
  1. Edit hosts file
  • The IP Address of the TENS Controller should be added to the [te] group
  • The IP Address(es) of the TEDPs should be added to the [tedp] group
  1. Edit global_vars.yml file
  • The IP address of the TENS Controller and API port (default 5000) should be added to the respective controller_ip and controller_port variables

TENS Controller Setup

  1. Edit variables in the 1_setup-te-controller.yml as required. The defaults are listed below and should work for most use cases.
vars:
    grafana_port: "5002"
    redis_port: "6378"
    postgres_port: "5432"
    zmq_port: "5555"
  1. Run Ansible Play with the ssh user defined (ubuntu given as example)
ansible-playbook -u ubuntu -i hosts 1_setup-te-controller.yml

TEDP Host Setup

  1. Edit variables in the 2_setup-tedp.yml as required. The dataplane interface and username/password credentials for the hosts should be changed to reflect your environment. Alternatively the credentials can sent via the -e option to the ansible-playbook command.
vars:
    tedp_version: "v2.0"
    dp_interface: "ens192"
    username: "ubuntu"
    password: "ubuntu"
  1. Run Ansible Play with the ssh user defined (ubuntu given as example)
ansible-playbook -u ubuntu -e username=ubuntu -e password=password -i hosts 2_setup-tedp.yml

Generate JSON Test Files for TENS

  1. Edit variables in the 3_generate-https-tests.yml or 3_generate-udp-tests.yml files depending on what type of test you'd like to run. These variables will be used to generate a JSON file used by TENS.

  2. Run Ansible Play to generate test files. Generated files will be in the files directory.

ansible-playbook 3_generate-https-tests.yml
ansible-playbook 3_generate-udp-tests.yml
  1. The generated test files can be tweaked as needed based on the following documents:

https://github.com/vmware/te-ns/blob/main/RESOURCE_CONFIGURATION.md

https://github.com/vmware/te-ns/blob/main/SESSION_CONFIGURATION.md

Start Traffic Test

  1. Edit the test type in the 4_start-test.yml file as needed. The available tests are https_rps or udp_rps.
vars:
    test_type: https_rps
  1. Run Ansible Play to start traffic test
ansible-playbook 4_start-test.yml

Stop Traffic Test

ansible-playbook 5_stop-test.yml

tens-ansible's People

Contributors

slarimore02 avatar

Stargazers

Chad Herren avatar Aravindhan K avatar

Watchers

James Cloos avatar  avatar Aravindhan K avatar  avatar

Forkers

shaitmm quynhlab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.