Commit Graph

16 Commits

Author SHA1 Message Date
James E. Blair 89b3d6a4df Refactor AWS driver tests
This makes the AWS driver tests more modular, with minimal changes.
This will allow us to add more tests without extending the
current single-function-which-performs-all-tests.

It splits the config into multiple files, one for each distinct pool
configuration.  This means that tests only run one pool thread (compared
to the current situation where every test runs every pool).

Whatever defect in moto which appeared to require patching the network
methods to verify the call signature appears to have been rectified, so
that is removed.

The two tags tests have been combined into one.

Private IP validation is improved so that we verify the values set on
the nodepool node rather than the mock call args.

There was no test that verified the EBS-optimised setting, so that has
been added.

Change-Id: I023ec41f015c2fcb20835fc0e38714149944de84
2022-02-22 17:06:10 -08:00
James E. Blair 43678bf4c1 Update AWS driver to use statemachine framework
This updates the aws driver to use the statemachine framework which
should be able to scale to a much higher number of parallel operations
than the standard thread-per-node model.  It is also simpler and
easier to maintain.  Several new features are added to bring it to
parity with other drivers.

The unit tests are changed minimally so that they continue to serve
as regression tests for the new framework.  Following changes will
revise the tests and add new tests for the additional functionality.

Change-Id: I8968667f927c82641460debeccd04e0511eb86a9
2022-02-22 17:06:07 -08:00
James E. Blair 9bcc046ffc Add QuotaSupport to drivers that don't have it
This adds QuotaSupport to all the drivers that don't have it, and
also updates their tests so there is at least one test which exercises
the new tenant quota feature.

Since this is expected to work across all drivers/providers/etc, we
should start including at least rudimentary quota support in every
driver.

Change-Id: I891ade226ba588ecdda835b143b7897bb4425bd8
2022-01-27 10:11:01 -08:00
Albin Vass 0c84b7fa4e Add shell-type config
Ansible needs to know which shell type the node uses to operate
correctly, especially for ssh connections for windows nodes because
otherwise ansible defaults to trying bash.

Change-Id: I71abfefa57aaafd88f199be19ee7caa64efda538
2021-03-05 15:14:29 +01:00
Albin Vass 2d59dc461c aws: add support for attaching instance profiles
Change-Id: Ie338f5f9c8f88c7e5584bce02c9b0d081f068da7
2020-06-12 12:22:50 +02:00
David Shrewsbury 8528322cf0 Update tests for node-attributes
This found problems with the openshift and openshiftpods drivers,
so that is fixed. Also update the docs to reflect the fact that
node-attributes is supported across all drivers.

Note that we do not appear to have GCE driver tests, so that one
is just assumed to work.  :(

Change-Id: I98b6f871815d2b564d1550d960e682c180bac7c2
2020-04-02 12:39:56 -07:00
Albin Vass 2ce664ec14 Enable setting label and instance name separately
At the moment nodepools aws driver uses the label to set the instance
name in aws and fails to launch the instance if "Name" is supplied
as a tag.
This makes it possible to supply name as a tag.

Change-Id: I9585db8fe4b4ad6f5b588fb67a7201296c2fc954
2020-03-12 17:15:32 +01:00
Andy Ladjadj 5bae6272f4 add ebs-optimized support for aws provider
Change-Id: I1f6330a71b85f23e6fbe3abd636764e5f3b8a61d
2020-02-04 18:59:24 +01:00
Clément Mondion 49482e157c add tags support for aws provider
Change-Id: Ib871bfda41192a74ee02b0b3d2e422fde21f2801
2020-01-23 10:32:08 +01:00
Tobias Henkel 52f7d4fb62
Make public ip configurable in aws
When running nodepool against private cloud rooms it can be desirable
that the nodes don't get a public ip address. Let the user specify
this on pool level.

Change-Id: I3d636517837fd8a6593c12e4309372da5c062b06
2019-12-21 13:47:08 +01:00
Tobias Henkel 761a9ee00e
Support userdata for instances in aws
In some cases we need to be able to launch instances with custom
userdata also in aws.

Change-Id: I0891961f16bb3bd728622d3413bd185978d79324
2019-12-21 13:35:00 +01:00
Albin Vass ec9a532cdd 'keys' must be defined for host-key-checking: false
If host-key-checking is set to false the aws driver
fails with an UnboundLocalError

Change-Id: I91ec292a48e283f9fb8d60b944da8eaf1bec393b
2019-12-17 16:14:46 +01:00
Kerby Ferris 661b40a4b7 AWS driver: add ability to determine AMI id using filters
Change-Id: I99263a5907f72d7993d7549ff8adf1dfeedd3b69
2019-10-08 12:06:46 -07:00
Clint Byrum da21971e9b Implement max-servers for AWS driver
Max-servers has been ignored up until now. This implements the basic
checks so that AWS users can limit the number of instances they launch.

Change-Id: I73296bde1cdde80c52b6b5b725f268a17562060d
2019-04-11 18:12:12 -07:00
Monty Taylor 516e8cd176 Rename aws flavor-name to instance-type
The AWS term is instance-type, not flavor-name. Rename this while
we don't have a huge userbase.

While we're in there, rename a variable from image_name to image_id
since we use image_id everywhere else.

Change-Id: I1f7f16d2873982626d2434cf5ca1f6280adf739c
2019-02-06 17:09:36 +00:00
Tristan Cacqueray aa16b8b891 Amazon EC2 driver
This change adds an experimental AWS driver. It lacks some of the deeper
features of the openstack driver, such as quota management and image
building, but is highly functional for running tests on a static AMI.

Note that the test base had to be refactored to allow fixtures to be
customized in a more flexible way.

Change-Id: I313f9da435dfeb35591e37ad0bec921c8b5bc2b5
Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Co-Authored-By: David Moreau-Simard <dmsimard@redhat.com>
Co-AUthored-By: Clint Byrum <clint@fewbar.com>
2019-01-28 12:08:36 -08:00