QA/Load testing on AWS
< QA
Jump to navigation
Jump to search
How Services QA uses "Bees with Machine Guns" on AWS
Terminology (caution: it shifts)
AWS IAM (Amazon Web Services Identity and Account Management) or AWS Account
- "DEV" is named "cloudservices-aws-dev" -- this is where development happens.
- "STAGE" is named "moz-svc-dev" -- this is where QA plays.
- Each IAM/Account has several Regions associated with it: us-east-1, us-west-1, us-west-2, and eu-west-1 are the ones we usually encounter. The web console in particular only deals with one Region at a time.
AWS Credentials
- Should have been issued to you by Ops.
- Account: as above
- Username: your usual, minus the @mozilla.com
- Password: Allows you to log into the web console.
- Access Key: Allows you to use the AWS API from programs, analagous to SSH public key.
- Access Secret Key: As above, analagous to SSH private key.
The Web Console
- https://console.aws.amazon.com/
- Log in with IAM/Account, username and password, and pay attention to the end of the URL to see which Region you land in.
boto and the aws cli
- Environment variables are most flexible but most confusing.
- $HOME/.boto.cfg is the name of the user-file that boto looks for.
- boto is a Pythonic library, meant for use in scripts but usable from the shell. It is installable with pip.
- awscli is also installable with pip. 'awscli' is the name of the package; the binary is named 'aws'.
- `aws configure` will set up a config file for you.
- The AWS CLI is very JSON oriented.
- boto is old-school; awscli is the new hotness. Bees uses boto.
Finally, Bees!
Cloning and building the repo
git clone https://github.com/mostlygeek/beeswithmachineguns.git
cd beeswithmachineguns
virtualenv .
./bin/pip install -r requirements.txt
- the 'key' in the -k option is an OpenSSH private key (like the one you use to log in to people.mozilla.org) -- it should be in $HOME/.ssh/$USER.pem, and can actually be a symlink to $HOME/.ssh/id_rsa, if you have one. (The commands to do this look like `cd .ssh; ln -s id_rsa $USER.pem`)
- the first command you should run is `bees up -k $USER`
- this should give you