From 1ad6857b56e708869f8bdf732d06451dbe09deff Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 13 May 2019 15:55:33 -0700 Subject: [PATCH 1/2] Add requirements.txt. --- tests/letstest/requirements.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/letstest/requirements.txt diff --git a/tests/letstest/requirements.txt b/tests/letstest/requirements.txt new file mode 100644 index 000000000..64e1f6a0c --- /dev/null +++ b/tests/letstest/requirements.txt @@ -0,0 +1,25 @@ +asn1crypto==0.24.0 +awscli==1.16.157 +bcrypt==3.1.6 +boto3==1.9.146 +botocore==1.12.147 +cffi==1.12.3 +colorama==0.3.9 +cryptography==2.4.2 +docutils==0.14 +enum34==1.1.6 +Fabric==1.14.1 +futures==3.2.0 +idna==2.8 +ipaddress==1.0.22 +jmespath==0.9.4 +paramiko==2.4.2 +pyasn1==0.4.5 +pycparser==2.19 +PyNaCl==1.3.0 +python-dateutil==2.8.0 +PyYAML==3.10 +rsa==3.4.2 +s3transfer==0.2.0 +six==1.12.0 +urllib3==1.24.3 From bcfb070a9d207247ebdb9823c7be41292d4f60c7 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 13 May 2019 15:55:58 -0700 Subject: [PATCH 2/2] update readme --- tests/letstest/README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/letstest/README.md b/tests/letstest/README.md index 0155065b0..f8a15208e 100644 --- a/tests/letstest/README.md +++ b/tests/letstest/README.md @@ -14,15 +14,17 @@ Simple AWS testfarm scripts for certbot client testing - AWS EC2 has a default limit of 20 t2/t1 instances, if more are needed, they need to be requested via online webform. -## Usage - - To install the necessary dependencies on Ubuntu 16.04, run: +## Installation and configuration +These tests require Python 2.7, awscli, boto3, PyYAML, and fabric<2.0. If you +have Python 2.7 and virtualenv installed, you can use requirements.txt to +create a virtual environment with a known set of dependencies by running: ``` -sudo apt install awscli python-yaml python-boto3 fabric +virtualenv --python $(command -v python2.7 || command -v python2 || command -v python) venv +. ./venv/bin/activate +pip install --requirement requirements.txt ``` - - Requires AWS IAM secrets to be set up with aws cli - - Requires an AWS associated keyfile .pem - +You can then configure AWS credentials and create a key by running: ``` >aws configure --profile [interactive: enter secrets for IAM role] @@ -30,9 +32,10 @@ sudo apt install awscli python-yaml python-boto3 fabric ``` Note: whatever you pick for `` will be shown to other users with AWS access. -When prompted for a default region name, enter: `us-east-1` +When prompted for a default region name, enter: `us-east-1`. -then: +## Usage +To run tests, activate the virtual environment you created above and run: ``` >python multitester.py targets.yaml /path/to/your/key.pem scripts/ ```