- Stand up a Selenium Grid in AWS ECS Fargate using Selenium Grid Host and Node Docker images.
- A configurable CloudFormation template is provide along with a Makefile to simplify the provisioning and deprovisioning process.
- Keeps your secrets safe with KMS.
- Grid accessible through: http://selenium-grid.your-domain.com:4444
- Simply follow the instructions below and you'll have a functioning Selenium Grid stood up in no time.
- https://github.com/nathanpeck/aws-cloudformation-fargate
- https://github.com/SeleniumHQ/docker-selenium
- These instructions were created for a Mac environment, but could easily be ported to Linux or Windows.
- Set up an AWS Account.
- Install the AWS CLI.
- Use AWS IAM to create an administrator identity. It's generally bad practice to use your AWS account's root user.
- Use AWS Route53 to create a Hosted Zone with a custom domain name. This step is optional.
- Use AWS Key Management System to create a dev ops key for encrypting secrets.
- Add
export AWS_DEV_OPS_KEY_TOKEN=your-aws-dev-ops-kms-key-token
to your.bash_profile
. Runsource ~/.bash_profile
to add the new environment variable to your current terminal session. This only needs to be done once. - Create a file named
secrets.decrypted.json
in./aws/cloud-formation/
with the following contents. Replaceyour-domain.com.
with your custom domain name. If you do not set up a custom domain name, remove theRecordSet
resource from the CloudFormation template.[ { "ParameterKey": "DomainName", "ParameterValue": "your-domain.com." } ]
- Run
make secrets-devops-encrypt
to encrypt the parameters with your key.
- Run
make provision
to stand up your Selenium Grid. Note that it could take up to 10 minutes to stand up the stack.- once provisioned, you can view your Selenium Grid Console at: http://selenium-grid.your-domain.com:4444
- Run
make deprovision
to tear down your Selenium Grid.
Warning! Only run the grid while needed. When not in use, I highly recommend that you run the deprovision step. Why pay for your new Selenium Grid when you don't need it. Isn't elasticity great!?!
Pull requests are welcome. If you see an opportunity to improve this repo, please share.
If you find the contents of this repo useful, please share your experiences with the boarder community. Thanks!