Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra Pipeline: Modular Environment Setups #328

Merged
merged 105 commits into from
Jun 7, 2022
Merged

Conversation

namesty
Copy link
Collaborator

@namesty namesty commented May 10, 2021

Overview

This PR aims to enable the new infra CLI command. This command would be used to provide a better, modular and extensible environment orchestration leveraging docker-compose. It also introduces the new infra manifest extension.

The user would declare modules, which are packages that expose a docker-compose YAML file. The CLI would fetch these packages, cache them, resolve the docker-compose YAML of each, and bundle them into a single docker-compose project.

Additionally, the user can write a custom docker-compose file and declare additional services or custom functionality in case no modules suffice their needs. This custom docker-compose is declared and gets bundled and orchestrated along with the rest of the modules.

The CLI also provides some "preset" (or default) environments; which are already properly configured for typical/common use cases. If the user wishes to use one of these, his project's infra manifest gets ignored, and the preset's environment's gets used instead.

The infra command has the following subcommands:

  • up: takes all modules and performs a docker-compose up
  • down: same as docker-compose down
  • config: takes all modules, performs the bundling and outputs the bundled docker-compose project. Useful for validation and debugging.
  • vars: prints a list of all required environment variables needed across all bundled modules

And the following flags:

  • --modules: acts as a filter of modules. Instead of bundling all modules declared in the infra manifest, it only bundles those specified in the flag.
  • --preset: ignores project's infra manifest and uses the selected preset's configuration.

Additional changes

  • Given the modular, extensible capability of the infra pipeline, a preset was created to replace the current "test environment". It orchestrates ganache + ens + ipfs, and provides deterministically consistent and permanent ENS contract addresses. The ENS redeployment endpoint was removed from the DevServer. This package is maintained here.
  • Leveraging the previous point, a new deployer package was created to assume and use the previous preset environment. No need to specify the ENS registry address in the deploy manifest when deploying on local testnet anymore.

@namesty namesty requested a review from dOrgJelli June 12, 2021 20:52
@namesty namesty changed the base branch from prealpha to prealpha-dev June 12, 2021 20:53
@namesty namesty changed the title Modular Test Env Modular Environment Setups Jun 12, 2021
@namesty namesty marked this pull request as ready for review June 12, 2021 20:54
@dOrgJelli dOrgJelli mentioned this pull request Mar 22, 2022
3 tasks
dOrgJelli
dOrgJelli previously approved these changes Jun 7, 2022
@dOrgJelli dOrgJelli merged commit 8f68f0e into prealpha-dev Jun 7, 2022
@dOrgJelli dOrgJelli deleted the modular-testenv branch February 2, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants