mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02:00
Drop awscli dependency (#9459)
Fixes https://github.com/certbot/certbot/issues/9458. * update readme * drop awscli Co-authored-by: ohemorange <ebportnoy@gmail.com>
This commit is contained in:
co-authored by
ohemorange
parent
455f9a0d6c
commit
652d5e96be
+9
-21
@@ -19,16 +19,16 @@ This package is installed in the Certbot development environment that is
|
||||
created by following the instructions at
|
||||
https://certbot.eff.org/docs/contributing.html#running-a-local-copy-of-the-client.
|
||||
|
||||
After activating that virtual environment, you can then configure AWS
|
||||
credentials and create a key by running:
|
||||
```
|
||||
>aws configure --profile <profile name>
|
||||
[interactive: enter secrets for IAM role]
|
||||
>aws ec2 create-key-pair --profile <profile name> --key-name <key name> --query 'KeyMaterial' --output text > whatever/path/you/want.pem
|
||||
```
|
||||
Note: whatever you pick for `<key name>` will be shown to other users with AWS access.
|
||||
These tests use the AWS SDK for Python (boto3) to manipulate EC2 instances.
|
||||
Before running the tests, you'll need to set up credentials by following the
|
||||
instructions at
|
||||
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#configuration.
|
||||
You will also want to create a `~/.aws/config` file setting the region for your
|
||||
profile to `us-east-1`, following the instructions in the boto3 quickstart guide above.
|
||||
|
||||
When prompted for a default region name, enter: `us-east-1`.
|
||||
Lastly, you will want to create a file on your system containing a trusted SSH key
|
||||
by following the instructions at
|
||||
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html.
|
||||
|
||||
## Usage
|
||||
To run tests, activate the virtual environment you created above and from this directory run:
|
||||
@@ -36,18 +36,6 @@ To run tests, activate the virtual environment you created above and from this d
|
||||
>letstest targets/targets.yaml /path/to/your/key.pem <profile name> scripts/<test to run>
|
||||
```
|
||||
|
||||
You can only run up to two tests at once. The following error is often indicative of there being too many AWS instances running on our account:
|
||||
```
|
||||
NameError: name 'instances' is not defined
|
||||
```
|
||||
|
||||
If you see this, you can run the following command to shut down all running instances:
|
||||
```
|
||||
aws ec2 terminate-instances --profile <profile name> --instance-ids $(aws ec2 describe-instances --profile <profile name> | grep <key name> | cut -f8)
|
||||
```
|
||||
|
||||
It will take a minute for these instances to shut down and become available again. Running this will invalidate any in progress tests.
|
||||
|
||||
A temporary directory whose name is output by the tests is also created with a log file from each instance of the test and a file named "results" containing the output above.
|
||||
The tests take quite a while to run.
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ setup(
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
# awscli isn't required by the tests themselves, but it is a useful
|
||||
# tool to have when using these tests to generate keys and control
|
||||
# running instances so the dependency is declared here for convenience.
|
||||
'awscli',
|
||||
'boto3',
|
||||
'botocore',
|
||||
# The API from Fabric 2.0+ is used instead of the 1.0 API.
|
||||
|
||||
Reference in New Issue
Block a user