Giter Club home page Giter Club logo

tyk-ansible-performance-testing's Introduction

Performance Testing Tyk with Ansible

Requirements

  1. Ansible.

Getting Started

  1. Clone repo and navigate to the repo directory.

  2. Run initalization script to initialize environment sh scripts/init.sh.

  3. Create 5 different servers to conduct the testing:

  • Upstream: expose port 8000 (ex. c5.2xlarge)
  • Load Generator (ex. c5.2xlarge)
  • Tyk: expose port 8080 (ex. c5.2xlarge)
  • Kong: expose port 8000 (ex. c5.2xlarge)
  • Apollo: expose port 4000 (ex. c5.2xlarge)
  1. Modify hosts.yml file to update ssh variables to your server(s). You can learn more about the hosts file here.

  2. Run sudo ansible-playbook playbook.yml -t install -t standup -t test to run performance tests. sudo is used to allow ansible to create the performance testing results files on your local machine.

  3. View output of performance tests under ./benchmarks/.

  4. Run ansible-playbook playbook.yml -t cleanup to cleanup files and turn off services on the machines.

Documentation

Please check the /docs folder for more information about the repo.

  • Tests: Explains the different REST and GraphQL tests available.
  • Analysis: Explains how to use the analyze.r script to generate comparison graphs and csv based on the tests ran.
  • AWS: Explains how to use the aws.playbook.yml to standup the resources necessary to run the tests in AWS.
  • GCP: Explains how to use the gcp.playbook.yml to standup the resources necessary to run the tests in GCP.
  • Azure: Explains how to use the azure.playbook.yml to standup the resources necessary to run the tests in Azure.
  • Variables: Explains the different variables used in this repo.

tyk-ansible-performance-testing's People

Contributors

zalbiraw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tyk-ansible-performance-testing's Issues

Azure module error while creating a resource group

Hello, I received an error while trying to execute the azure playbook. The error indicates that requirements-azure.txt is not up-to-date with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt. I was able to fix this after updating requirements-azure.txt in the repository with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt.

Problem

% ansible-playbook azure.playbook.yml -t standup -e '{ "azure_vm_size": "Standard_F2s_v2", "test_services": [ "tyk", "kong" ] }'
​
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
​
PLAY [Create Azure instances] **********************************************************************************************************************************************
​
TASK [azure : Include standup task] ****************************************************************************************************************************************
included: /Users/USER/tyk-ansible-performance-testing/roles/azure/tasks/standup.yml for localhost
​
TASK [azure : Create a resource group Standard_F2s_v2-resource-group] ******************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: ResourceManagementClient.__init__() got an unexpected keyword argument 'credential'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.azure.azcollection.plugins.modules.azure_rm_resourcegroup', init_globals=dict(_module_fqn='ansible_collections.azure.azcollection.plugins.modules.azure_rm_resourcegroup', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 286, in <module>\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 282, in main\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 162, in __init__\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 472, in __init__\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 178, in exec_module\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 1101, in rm_client\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 950, in get_mgmt_svc_client\nTypeError: ResourceManagementClient.__init__() got an unexpected keyword argument 'credential'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
​
PLAY RECAP *****************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Solution

Update requirements-azure.txt in the repository with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt.

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.