NAV
shell

Introduction

As of SOASTA 56.10, you can use a Cloud Service REST API to deploy pre-built grids, environments, and results databases. The Grid feature is the primary method of launching cloud-based servers in SOASTA CloudTest. Grids allow you to determine how many servers to launch and how to recover from failures when allocating servers from the cloud provider.

Grids still need to be created and set up manually, but the Cloud Service REST API allows for ease when launching and managing pre-built grids.

Authentication

Authentication Header

The header below must be included in all of your requests to the Cloud Serivce API.

X-Auth-Token: 1234-ABC

Grids

To interact with a grid, you will need to know the ID, which can be retrieved from the SOASTA Repository API

Start Grid

Starts the grid.

HTTP Request

POST: http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>/action

JSON Payload

Key Value Description
action start starts the cloud object

URL Query Parameters

Parameter Description
ID ID of the Grid

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>/action  --data-binary \
{
  "action" : "start"
}

Response

{
  "cloudServers": [
    {
      "cloudType": "EC2",
      "id": 58204,
      "launchCPA": "SOASTA EC2",
      "locationID": 1,
      "name": "amazon - EC2 Test Server (Large)",
      "publicHostname": "ec2-52-91-34-63.compute-1.amazonaws.com",
      "securityGroup": "sg-cffb2fab",
      "serverClassName": "EC2 Test Server (Large)",
      "usingReservedAddress": false
    }
  ],
  "collectorInstances": 0,
  "instanceId": "15f3f428f1a7adc5:-5d210844:15192fb017d:-7fdd",
  "isFinal": true,
  "journalEntries": [
    {
      "text": "Starting grid deployment (1 server(s)).",
      "type": "INFO"
    }
  ],
  "maestroInstances": 0,
  "resultsServiceInstances": 0,
  "serverCompleteBeans": [

  ],
  "state": "ALLOCATING",
  "statistics": {
    "locations": [
      {
        "locationID": 1,
        "locationName": "Amazon EC2 US East",
        "maxBusyTime": 0,
        "maxPendingTime": 0,
        "minBusyTime": 0,
        "minPendingTime": 0,
        "totalServersAllocated": 0,
        "totalTimedOutServers": 0
      }
    ],
    "totalAllocationTime": 47466,
    "totalCheckServerTime": 0,
    "totalDeploymentTime": 60161
  },
  "totalCheckedCollectorServers": 0,
  "totalCheckedLoadGeneratorServers": 0,
  "totalCheckedResultsServers": 0
}

Get Grid

This endpoint retrieves a specific Grid.

HTTP Request

GET http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>

URL Query Parameters

Parameter Description
ID ID of the Grid

States

State Description Final State
LOADED The grid has been loaded and is ready to start. T
ALLOCATING The grid is allocating servers. F
ALLOCATED The grid has finished allocating servers, with no failures. F
ALLOCATED_WITH_FAILURES The grid has finished allocating servers, with some failures. T
ALLOCATE_FAILED The grid failed to allocate any servers. T
CHECKING The grid is in the process of performing server health checks. F
CHECKED The grid has finished performing server health checks, with no failures. T
CHECKED_AND_TERMINATING The allocated servers are checked and the pending server are terminating. F
CHECKED_AND_DEPLOYING The allocated servers are checked and the pending servers are still deploying. F
CHECKED_WITH_FAILURES The grid has finished performing server health checks, with some failures. T
STARTING_MONITORS The grid is in the process of setting up monitoring for the allocated servers. F
CANCELLING The grid is in the process of cancelling. F
CANCELLED The grid has been cancelled. T
TERMINATING The grid is in the process of terminating. F
TERMINATED The grid has been terminated. T
TERMINATED_WITH_FAILURES The grid has been terminated, with some failures. T

Request

curl -H "X-Auth-Token: 1234-ABC" http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>

Response

{
"cloudServers": [
  {
  "cloudType": "EC2",
  "id": 58204,
  "launchCPA": "Lance's EC2",
  "locationID": 1,
  "name": "amazon - EC2 Test Server (Large)",
  "publicHostname": "ec2-52-91-34-63.compute-1.amazonaws.com",
  "securityGroup": "sg-cffb2fab",
  "serverClassName": "EC2 Test Server (Large)",
  "usingReservedAddress": false
  }
],
"collectorInstances": 0,
"instanceId": "15f3f428f1a7adc5:-5d210844:15192fb017d:-7fdd",
"isFinal": true,
"journalEntries": [
  {
  "text": "Server health check completed for ip-172-31-49-104.ec2.internal",
  "type": "INFO"
  }
],
"maestroInstances": 1,
"resultsServiceInstances": 0,
"state": "CHECKED",
"statistics": {
  "locations": [
    {
    "averageAllocationTime": 802,
    "averagePendingTime": 57573,
    "locationID": 1,
    "locationName": "Amazon EC2 US East",
    "maxBusyTime": 0,
    "maxPendingTime": 57573,
    "minBusyTime": 0,
    "minPendingTime": 57573,
    "totalServersAllocated": 1,
    "totalTimedOutServers": 0
    }
    ],
    "totalAllocationTime": 58558,
    "totalCheckServerTime": 43661,
    "totalDeploymentTime": 118727
  },
"totalCheckedCollectorServers": 0,
"totalCheckedLoadGeneratorServers": 1,
"totalCheckedResultsServers": 0
}

List All Active Grids

This endpoint retrieves a list of Grids that have been started. It may include TERMINATED grids.

HTTP Request

GET http://<hostname>/concerto/services/rest/CloudService/v1/grid/

Request

curl -H "X-Auth-Token: 1234-ABC" http://<hostname>/concerto/services/rest/CloudService/v1/grid`

Response

[
    {
        "cloudServers": [
            {
                "cloudType": "EC2",
                "id": 58803,
                "launchCPA": "Lance's EC2",
                "locationID": 1,
                "name": "amazon - EC2 Test Server (Large)",
                "securityGroup": "sg-cffb2fab",
                "serverClassName": "EC2 Test Server (Large)",
                "usingReservedAddress": false
            }
        ],
        "collectorInstances": 0,
        "instanceId": "f22711e8c5fcc9d2:6eea8875:151a27f10fc:-7fde",
        "isFinal": false,
        "journalEntries": [
            {
                "text": "Starting grid deployment (1 server(s)).",
                "type": "INFO"
            },
            {
                "text": "Allocating 1 \"EC2 Test Server (Large)\" server(s) in Amazon EC2 US East.",
                "type": "INFO"
            }
        ],
        "maestroInstances": 0,
        "resultsServiceInstances": 0,
        "state": "ALLOCATING",
        "statistics": {
            "locations": [
                {
                    "averageAllocationTime": 2224,
                    "locationID": 1,
                    "locationName": "Amazon EC2 US East",
                    "maxBusyTime": 0,
                    "maxPendingTime": 0,
                    "minBusyTime": 0,
                    "minPendingTime": 0,
                    "totalServersAllocated": 1,
                    "totalTimedOutServers": 0
                }
            ],
            "totalAllocationTime": 3920,
            "totalCheckServerTime": 0,
            "totalDeploymentTime": 9268
        },
        "totalCheckedCollectorServers": 0,
        "totalCheckedLoadGeneratorServers": 0,
        "totalCheckedResultsServers": 0
    }
]

Terminate Grid

Terminates the specified grid

HTTP Request

POST http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>/action

JSON Payload

Key Value Description
action terminate terminates the cloud object

Query Parameters

Parameter Description
id ID of the grid

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/grid/<id>/action  --data-binary \
{
  "action" : "terminate"
}

Response

This endpoint terminates a grid. It will return a status code 202, signaling that the action has been accepted, and is processing.

Cloud Servers

Cloud servers are created by the grid deployment process. They are either load generating servers, or results servers.

Get All Cloud Servers

Retrives a list of all cloud servers on the system.

HTTP Request

GET: http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/

Request

curl -H "X-Auth-Token: 1234-ABC" http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/

Response

[
    {
        "cloudType": "EC2",
        "id": 1401,
        "instanceSize": "EC2 Test Server (Large)",
        "launchCPAName": "SOASTA EC2",
        "region": "us-west-1",
        "state": "PENDING",
        "vendorID": "i-782502ca",
        "zone": "us-west-1a"
    },
    {
        "cloudType": "EC2",
        "id": 1402,
        "instanceSize": "EC2 Test Server (Large)",
        "launchCPAName": "SOASTA EC2",
        "region": "us-west-1",
        "state": "PENDING",
        "vendorID": "i-792502cb",
        "zone": "us-west-1a"
    }
]

Get Cloud Server

Retrives a specific Cloud server

HTTP Request

GET: http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/<id>

Query Parameters

Parameter Description
ID ID of the CloudServer

Request

curl -H "X-Auth-Token: 1234-ABC" http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/<id>

Response

{
    "cloudType": "EC2",
    "id": 1401,
    "instanceSize": "EC2 Test Server (Large)",
    "launchCPAName": "SOASTA EC2",
    "privateHostName": "ip-172-31-2-86.us-west-1.compute.internal",
    "publicHostName": "ec2-52-53-232-184.us-west-1.compute.amazonaws.com",
    "region": "us-west-1",
    "state": "RUNNING",
    "vendorID": "i-782502ca",
    "zone": "us-west-1a"
}

Restart Cloud Server

This endpoint will allow you to restart a cloud server.

HTTP Request

POST: http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/<id>/action

Query Parameters

Parameter Description
ID ID of the CloudServer

JSON Payload

Key Value Description
action restart restarts the cloud object

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/cloudservice/<id>/action  --data-binary \
{
  "action:"restart"
}

Response

{
    "cloudType": "EC2",
    "id": 1401,
    "instanceSize": "EC2 Test Server (Large)",
    "launchCPAName": "SOASTA EC2",
    "privateHostName": "ip-172-31-2-86.us-west-1.compute.internal",
    "publicHostName": "ec2-52-53-232-184.us-west-1.compute.amazonaws.com",
    "region": "us-west-1",
    "state": "RUNNING",
    "vendorID": "i-782502ca",
    "zone": "us-west-1a"
}

Terminate Cloud Server

This endpoint will allow you to terminate (shutdown) a cloud server.

HTTP Request

POST: http://<hostname>/concerto/services/rest/CloudService/v1/cloudserver/<id>/action

Query Parameters

Parameter Description
ID ID of the CloudServer

JSON Payload

Key Value Description
action terminate terminates the cloud object

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/cloudservice/<id>/action  --data-binary \
{
  "action:"terminate"
}

Response

Returns an HTTP status code of 202 if the request was accepted.

Results Databases (RSDB)

In order to interact with a result database you will need to know the ID, which is retrieved via the SOASTA Repository API

Get RSDB Info

Gets information on the RSDB

HTTP Request

GET: http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>

Query Parameters

Parameter Description
ID ID of the RSDB

Request

curl -H "X-Auth-Token: 1234-ABC" http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/

Response

{
    "cloudServer": {
        "cloudType": "EC2",
        "instanceSize": "EC2 Results Database (Large)",
        "launchCPAName": "Lance's EC2",
        "privateHostName": "ip-172-31-48-194.ec2.internal",
        "publicHostName": "ec2-52-90-188-238.compute-1.amazonaws.com",
        "region": "us-east-1",
        "state": "RUNNING",
        "vendorID": "i-0713efb6",
        "zone": "us-east-1a"
    },
    "state": "ALLOCATED_DATABASE"
}

Start RSDB

Starts the RSDB.

HTTP Request

POST http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/action

JSON Payload

Key Value Description
action start starts the cloud object

Query Parameters

Parameter Description
ID ID of the RSDB

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/action  --data-binary \
{
  "action:"start"
}

Response

{
    "cloudServer": {
        "cloudType": "EC2",
        "instanceSize": "EC2 Results Database (Large)",
        "launchCPAName": "SOASTA EC2",
        "privateHostName": "ip-172-31-48-194.ec2.internal",
        "publicHostName": "ec2-52-90-188-238.compute-1.amazonaws.com",
        "region": "us-east-1",
        "state": "PENDING",
        "vendorID": "i-0713efb6",
        "zone": "us-east-1a"
    },
    "state": "ALLOCATING_DATABASE"
}

Terminate RSDB

Terminates the RSDB.

HTTP Request

POST http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/action

JSON Payload

Key Value Description
action terminate terminates the cloud object

Query Parameters

Parameter Description
ID ID of the RSDB

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/action  --data-binary \
{
  "action:"terminate"
}

Response

{
    "cloudServer": {
        "cloudType": "EC2",
        "instanceSize": "EC2 Results Database (Large)",
        "launchCPAName": "Lance's EC2",
        "privateHostName": "ip-172-31-48-194.ec2.internal",
        "publicHostName": "ec2-52-90-188-238.compute-1.amazonaws.com",
        "region": "us-east-1",
        "state": "RUNNING",
        "vendorID": "i-0713efb6",
        "zone": "us-east-1a"
    },
    "state": "TERMINATING"
}

Test Environment

Get Test Environment Info

Returns information on the Test Environment

HTTP Request

GET: http://cloudtestmanager.soasta.com/concerto/services/rest/CloudService/v1/environment/<id>/

Query Parameters

Parameter Description
ID ID of the Test Environment

Test Environment States

State Description Final State
ERROR_BUILD_MISMATCH Extracted build does not match the environment’s build setting T
TERMINATED_WITH_FAILURES Servers encountered failures when stopping T
CANCELLING Canceling environment servers while launch is in progress F
CANCELLED Environment servers have been canceled while launch is in progress T
LOADED The environment is loaded. T
ALLOCATING_DATABASE The environment is allocating a database server F
ALLOCATED_DATABASE The environment has allocated a database server F
CHECKED_DATABASE The environment has checked the database server F
ALLOCATING_MAIN The environment is allocating a main server F
ALLOCATED_MAIN The environment has allocated a main server F
CHECKED_MAIN The environment has checked the main server F
RUNNING The environment is running. T
TERMINATED The environment is stopped. T
TERMINATING The environment is stopping. F
PROCESS_FAILED Unable to talk to the resultsservice. T
VOLUME_NOT_FORMATTED The database volume needs to be formatted. T
VOLUME_NOT_AVAILABLE The volume is not available F
EXTERNALLY_TERMINATED Instance was terminated by external means. T

Request

curl -H "X-Auth-Token: 1234-ABC"  http://<hostname>/concerto/services/rest/CloudService/v1/environment/<id>

Response

{
    "databaseInstance": {
        "cloudType": "EC2",
        "instanceSize": "EXTRA_LARGE",
        "privateHostName": "ip-172-31-48-251.ec2.internal",
        "publicHostName": "ec2-52-91-94-50.compute-1.amazonaws.com",
        "vendorID": "i-022dc2b3"
    },
    "lastLaunched": "Wed Dec 09 12:14:26 PST 2015",
    "lastLaunchedBy": "SOASTA",
    "lastStopped": "Wed Dec 09 11:40:22 PST 2015",
    "mainInstance": {
        "cloudType": "EC2",
        "instanceSize": "EXTRA_LARGE",
        "privateHostName": "ip-172-31-58-64.ec2.internal",
        "publicHostName": "ec2-52-90-106-31.compute-1.amazonaws.com",
        "vendorID": "i-8525ca34"
    },
    "state": "RUNNING",
    "url": "http://ec2-52-90-106-31.compute-1.amazonaws.com/concerto"
}

Start Test Environment

Starts the Test Environment.

HTTP Request

POST: https://cloudtestmanager.soasta.com/concerto/services/rest/CloudService/v1/environment/<id>/action

JSON Payload

Key Value Description
action start starts the cloud object

Query Parameters

Parameter Description
ID ID of the Test Environment

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json"  http://<hostname>/concerto/services/rest/CloudService/v1/environment/<id>/action  --data-binary \
{
  "action:"start"
}

Response

{
    "databaseInstance": {
        "cloudType": "EC2",
        "instanceSize": "EXTRA_LARGE",
        "privateHostName": "ip-172-31-48-251.ec2.internal",
        "publicHostName": "ec2-52-91-94-50.compute-1.amazonaws.com",
        "vendorID": "i-022dc2b3"
    },
    "lastLaunched": "Wed Dec 09 12:14:26 PST 2015",
    "lastLaunchedBy": "SOASTA",
    "lastStopped": "Wed Dec 09 11:40:22 PST 2015",
    "state": "ALLOCATING_DATABASE"
}

Terminate Test Environment

Terminates the Test Environment.

HTTP Request

POST: http://cloudtestmanager.soasta.com/concerto/services/rest/CloudService/v1/environment/<id>/action

JSON Payload

Key Value Description
action terminate terminates a cloud object

URL Query Parameters

Parameter Description
ID ID of the Test Environment

Request

curl -X POST -H "X-Auth-Token: 1234-ABC" -H "Content-Type: application/json" http://<hostname>/concerto/services/rest/CloudService/v1/rsdb/<id>/action  --data-binary \
{
  "action:"terminate"
}

Response

{
    "databaseInstance": {
        "cloudType": "EC2",
        "instanceSize": "EXTRA_LARGE",
        "privateHostName": "ip-172-31-48-251.ec2.internal",
        "publicHostName": "ec2-52-91-94-50.compute-1.amazonaws.com",
        "vendorID": "i-022dc2b3"
    },
    "lastLaunched": "Wed Dec 09 12:14:26 PST 2015",
    "lastLaunchedBy": "SOASTA",
    "lastStopped": "Wed Dec 09 11:40:22 PST 2015",
    "state": "TERMINATING"
}

Errors

Error Code Meaning
400 Bad Request – Input Error
401 Unauthorized – The Authorization Token is invalid
404 Not Found – The specified resource could not be found
405 Method Not Allowed – Invalid method used to access resource
500 Internal Server Error – The request caused a server error.