Skip to content

e2e: configurable IP addresses for e2e testnet generator#9592

Merged
williambanfield merged 18 commits intomainfrom
wb/issue-9587
Oct 25, 2022
Merged

e2e: configurable IP addresses for e2e testnet generator#9592
williambanfield merged 18 commits intomainfrom
wb/issue-9587

Conversation

@williambanfield
Copy link
Contributor

@williambanfield williambanfield commented Oct 18, 2022

This change updates the e2e Setup logic and all other parts of the runner that use its code to accept list of IP addresses from already existing infrastructure to be used when generating the testnet configuration.

The change adds two new flags

  1. --infrastructure-type: The type of the backing infrastructure, either 'digital-ocean' or docker
  2. --infrastructure-data: The path to a file containing information on already existing infrastructure.

This new infrastructure-data flag selects the path to a json file whose contents can be deserialized into the new InfrastructureData type. This type contains a map of node name to IP address. The map is then used when constructing the testnet. Instead of generating a new IP address for each Tendermint node, the code reaches into the map to determine what the IP address is. A docker variant of this is also defined that, instead of reading data from disk, generates a new set of IP addresses per the already existing logic for IP generation.

This change also adds a new infra.Provider interface type. The Provider currently only has one method, Setup that sets up any configuration files for the specific infrastructure being used. For docker, this method generates the docker-compose.yaml file. For digital-ocean, the method is a Noop. This type borrows from the TestnetInfra type created for the runner in the now defunct v0.36.x code as part of #8754. The hope would be to gradually add more functionality to the infra.Provider until it is much closer to what is implemented previously.

Closes: #9587

PR checklist

  • Tests written/updated, or no tests needed
  • CHANGELOG_PENDING.md updated, or no changelog entry needed
  • Updated relevant documentation (docs/) and code comments, or no
    documentation updates needed

@williambanfield williambanfield marked this pull request as ready for review October 18, 2022 21:00
@williambanfield williambanfield requested a review from a team October 18, 2022 21:00
Copy link
Contributor

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is heading in a very good direction IMO

Copy link
Contributor

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the most of the Wifi I can find :-D

@williambanfield williambanfield added the S:automerge Automatically merge PR when requirements pass label Oct 25, 2022
@williambanfield williambanfield merged commit f670920 into main Oct 25, 2022
@williambanfield williambanfield deleted the wb/issue-9587 branch October 25, 2022 14:19
@williambanfield williambanfield restored the wb/issue-9587 branch October 25, 2022 14:20
williambanfield added a commit that referenced this pull request Oct 31, 2022
) (#9624)

Co-authored-by: Thane Thomson <connect@thanethomson.com>
williambanfield added a commit that referenced this pull request Nov 3, 2022
) (#9623)

* e2e: configurable IP addresses for e2e testnet generator (backport #9592)

* resurrect 'misbehavior'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:automerge Automatically merge PR when requirements pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Augment e2e runner to generate testnet configurations suitable for Digital Ocean

2 participants