Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

locustio (2) Versions 1.0.1

Installs/Configures locust

Berkshelf/Librarian
Policyfile
Knife
cookbook 'locustio', '~> 1.0.1'
cookbook 'locustio', '~> 1.0.1', :supermarket
knife cookbook site install locustio
knife cookbook site download locustio
README
Dependencies
Changelog
Quality

Chef LocustIO Cookbook

Description

This cookbook automates the provisionning of Locust load testing tool.

Platforms

  • Ubuntu 14.04

Custom Resources

locustio_node

This resource supports the following attributes

  • instance_name - The name of the instance (Default: default)
  • node_type - The type of node, either standalone, master or slave (default: standalone)
  • cluster_name - The name of the cluster. Multiple instances for different clusters could be spawned on a single machine. (default: default)
  • master_ip - The IP of the master locust node. When specifying an IP, the default behaviour of the master discover with a node search is disabled. (default: nil)
  • test_file - The test template file to use. The .erb extension is automatically added. (default: virtual_user.py)
  • test_file_cookbook - The cookbook from which to find the test file template (default: locustio)
  • from_s3 - Download test script file from S3 (default: false)
  • s3_aws_access_key - AWS access key (required if downloading from S3, default: nil)
  • s3_aws_secret_access_key - AWS secret access key (required if downloading from S3, default: nil)
  • s3_bucket - S3 bucket name (required if downloading from S3, default: nil)
  • s3_file_path - S3 file path (required if downloading from S3, default: nil)
  • s3_region - Geographic region where S3 bucket located (required if downloading from S3, default: nil)
  • service_file_cookbook - Cookbook from which to take the runit service templates (default: locustio)
  • test_file_base_path - The base directory where the test will be created. (default: /opt/locustio)
  • log_file_dir - The base directory where the locust related logs will be located (default: /opt/locustio/logs)
  • autostart - If the test should be started immediately upon converge finish. (default: false)
  • autostart_total_virtual_users - If autostart enabled, the number of virtual users/locusts to spawn. (default: 40)
  • autostart_hatch_rate - The number of virtual users/locusts to spawn per second. (default: 3)
  • webui_port - The port used to access the HTTP interface (default: 8089)
  • master_port - Specify the port to be used for the master server (default: 5557)
  • master_bind_host - Specify the host on which to listen to on the master (default: *, meaning 0.0.0.0)
  • discovery_recipe - The recipe used when runing the search query for the master node, given no IP was specified. (default: locustio)
  • script_parameters - The optional variables that can be made available within a custom template. (default: {})
  • enable_firewall - If set to true, will automatically install and setup the system firewall and allow the following necessary ports (default: false)
    • 22 (SSH)
    • 8089 or value of webui_port
    • 5557, 5558 or value of master_port and master_port + 1
  • firewall_access_rules If enable_firewall set to true, set allowed sources for each firewall port to be open, for example:

Usage Examples

** See the included test recipes.

Test Kitchen

  • If running the S3 test suites, you must properly set the values of s3_aws_secret_access_key, s3_aws_access_key, s3_bucket, s3_file_path, s3_region in the .kitchen.yml file

Considerations

  • This cookbook does not implement any firewall rules. That being said, you should remember to set those accordingly to a level which you consider to be secure.
  • If you start spawning too many locusts, you could start seeing an RPS rate that goes down, eventhough your system being tested might be in good condition. This can be due to too many locust threads causing too much CPU contention and context-switching. If running a cluster, my suggestion is to run multiple locust instances, each on a basic server with one or two cores.

Creator

Alain Lefebvre <hartfordfive 'at' gmail.com>

License

Covered under the Apache v2 lisense.

Dependent cookbooks

firewall ~> 2.5.2
aws ~> 3.3.3
runit ~> 1.5.12
apt ~> 2.6.1
poise-python ~> 1.2.1

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

v1.0.1

  • Sets default master IP to nil so that the search can work properly in the case of a slave node
  • Raising error in the case where chef solo is detected as this recipe requires search.

v1.0.0

  • First Inital Stable Version

Collaborator Number Metric
            

1.0.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.1 failed this metric

FC066: Ensure chef_version is set in metadata: locustio/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: locustio/metadata.rb:1
FC069: Ensure standardized license defined in metadata: locustio/metadata.rb:1
Run with Foodcritic Version 10.3.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.0.1 failed this metric

locustio does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

1.0.1 passed this metric

Publish Metric
            

1.0.1 passed this metric

Supported Platforms Metric
            

1.0.1 failed this metric

locustio should declare what platform(s) it supports.

Testing File Metric
            

1.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.1 passed this metric