Installing Artillery Pro

What you’ll learn

  • How to install Artillery Pro CLI components
  • How to deploy Artillery Pro backend in your organization’s AWS account

Requirements

Artillery Core needs to be installed before setting up or using Artillery Pro. You will also need an active subscription or a trial license key. Please see Artillery Pro’s product page for more information on Artillery Pro, and on requesting a trial license.

Overview

Artillery Pro builds on top of Artillery Core to provide a self-hosted (AWS) performance testing solution. It provides development teams with an internal self-service performance testing platform, with the ability to run large-scale tests with no resource limits, and additional enterprise-grade features, such as the ability to run tests from multiple geographical regions.

Every feature of Artillery Core is available in Artillery Pro, which provides a seamless upgrade path from tests running on a developer’s machine, to scaling up & running the same test scripts from your organization’s AWS account.


Artillery Pro is comprised of two main components:

  1. Additional commands which are added to the artillery CLI, such as run-test, create-test, and subscription. These commands let you create and run tests, manage your team’s subscription, etc. These CLI commands need to be installed by every user that will run tests with Artillery Pro (including machine users, such as jobs in a CI/CD pipeline).
  2. Artillery Pro backend, which is deployed into an AWS account, and takes care of scheduling & running tests from ECS/Fargate clusters, storing test results, and other heavy lifting. The backend only needs to be deployed once.

The CLI interacts with the backend to create and run tests. The CLI also provides a way deploy the backend to an AWS account in the first place, and to upgraded it to new releases.

Access control and security

Artillery Pro CLI uses the same access mechanisms as the official AWS CLI.

Artillery Pro uses the official AWS SDK, which uses standard AWS cryptographic signing mechanisms to protect your security credentials and communication between the CLI and the backend.

Backend components

Artillery Pro backend is fully serverless, i.e. it only makes use of fully-managed AWS services such as DynamoDB, S3, SQS. There are no servers for your team to set up and manage.

Installing CLI commands

Install the artillery-pro package to add extra commands to the artillery CLI.

Install both with:

npm install -g artillery@latest artillery-pro@latest

You can check that the installation was successful by running:

artillery --version

You should see the version of Artillery Pro in the output:


        ___         __  _ ____                  _
  _____/   |  _____/ /_(_) / /__  _______  __  (_)___  _____
 /____/ /| | / ___/ __/ / / / _ \/ ___/ / / / / / __ \/____/
/____/ ___ |/ /  / /_/ / / /  __/ /  / /_/ / / / /_/ /____/
    /_/  |_/_/   \__/_/_/_/\___/_/   \__, (_)_/\____/
                                    /____/

------------ Version Info ------------
Artillery: 1.6.0
Artillery Pro: 2.2.0
Node.js: v12.16.0
OS: darwin/x64
--------------------------------------

Deploying the backend

Requirements

A valid license key is required to deploy the backend for the first time.

The key is sent via email when the subscription is created. A copy of the key can also be requested with the artillery CLI:

artillery subscription --email user@example.net

(The email addressed used to set up the subscription must be used. It may take a couple of minutes for the email to arrive.)

Deploy the backend with artillery deploy

The deploy command is used to deploy the backend and to upgrade it to new releases.

  Usage: deploy [options]

  Set up Artillery Pro for an AWS account

  Options:

    -h, --help                   output usage information
    -r, --region <region>        AWS region (us-east-1, us-east-2, us-west-2, eu-west-1,
                                 us-west-1, ap-south-1, ap-northeast-2, ap-southeast-1,
                                 ap-southeast-2, ap-northeast-1, eu-central-1, eu-west-2, ca-central-1)
    --export-terraform-template  Export a Terraform template which creates an Artillery Pro CloudFormation
                                 stack
    --upgrade                    Upgrade an existing Artillery Pro installation in an AWS account
    --license-key-file <path>    Path to file containing a license key
    --license-key-text <text>    Contents of a license key

artillery deploy is safe to run multiple times (i.e. it’s idempotent). If everything has already been installed, it will simply do nothing and exit. It uses CloudFormation to create the AWS resources required. Stack events will be printed to the terminal as the deployment is progressing. You can also follow its progress via CloudFormation UI in AWS Console.

Example

To deploy Artillery Pro backend in us-east-1 with the license key stored in ~/artillery-pro-license-key.txt:

artillery deploy --region us-east-1 --license-key-file ~/artillery-pro-license-key.txt

To upgrade an existing installation, pass the --upgrade flag to deploy:

artillery deploy --upgrade --region us-east-1 --license-key-file ~/artillery-pro-license-key.txt

Supported Regions

Artillery Pro may be deployed in any of the following AWS regions:

North America:

  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2
  • ca-central-1

Europe:

  • eu-west-1
  • eu-west-2
  • eu-central-1

Asia/Pacific:

  • ap-south-1
  • ap-southeast-1
  • ap-southeast-2
  • ap-northeast-1
  • ap-northeast-2

Setting up IAM Permissions

Users of the artillery CLI will require adequate IAM permissions to be able to interact with the backend.

The deploy command creates a ready-to-use IAM policy which may be attached to other IAM users or roles to allow those users or roles to create and run tests with Artillery Pro.

deploy will output a command which can be used to attach the generated IAM policy to an existing user, such as:

aws iam attach-user-policy --user-name artillery-cli-user --policy-arn
arn:aws:iam::123451234567:policy/artilleryio-cli-user

where artillery-cli-user is the name of the IAM user whose credentials will be used to run Artillery tests.