Open RayWu222 opened 3 years ago
Date | Activity | Time |
---|---|---|
03/20/2021 | Research on Serverless Artillery and Serverless | 5 hours |
03/21/2021 | Work on Serverkess Artillery without cache for /users/{userid}/tasks/{task_id} | 5 hours |
03/22/2021 | Running test, troubleshooting, and documenting result | 5 hours |
Steps to turn off cache:
Running Serverless Artillery
1. Node JS
You can install Node JS from https://nodejs.org/en/download/ or with your operating system’s package manager.
2. Serverless Framework CLI
To install globally use the following command.
npm install -g serverless@1.38.0
you need to install serverless@1.38.0 to be compatible with serverless-artillery
3. Installing serverless-artillery
npm install -g serverless-artillery
To check that the installation succeeded, run:
slsart --version
1. Setup AWS credentials
Create an AWS user, grab your credentials from a script, tool, and add them to the environment.
$ export AWS_ACCESS_KEY_ID=<access-key-id>
$ export AWS_SECRET_ACCESS_KEY=<secret-access-key>
$ export AWS_SESSION_TOKEN=<session-token>
$ set AWS_ACCESS_KEY_ID=<access-key-id>
$ set AWS_SECRET_ACCESS_KEY=<secret-access-key>
$ set AWS_SESSION_TOKEN=<session-token>
2. Create custom deployment assets
Create a local copy of the deployment assets for your customization and then deployment to AWS, using the following command.
slsart configure
add region information to the serverless.yml file, for example region=us-west-2
3. Deploy
Go to the folder in your local directory containing script.yml file
In the command line, run slsart deploy --stage <your-unique-stage-name>
You can go to your AWS account console > CloudFormation, and see AWS stack
4. Invoke
run slsart invoke --stage <your-unique-stage-name>
If you go to AWS Lambda console > find the loadGenerator Lambda corresponding to your stack > Monitoring tab > Invocations graph, you will see that the Lambda function was invoked to generate the load. You can also see the logs produced by the Lambda in CloudWatch Logs.
5. Remove
The following command will remove the AWS CloudFormation Stack deployed in step 3.
slsart remove --stage <your-unique-stage-name>