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

feat(system-services, tests): composable and overridable system services [NET-530, NET-531] #1770

Merged
merged 19 commits into from
Sep 14, 2023

Conversation

kmd-fl
Copy link
Contributor

@kmd-fl kmd-fl commented Aug 25, 2023

Description

Decompose system services crate to be able to override and extend used system services.

Motivation

ATM the system services are build in the system service deployer. To modify them or to add new ones, you need to change the deployer itself. In this PR we introduce a way to define a system service separately from the deployer and deploy any provided set of services. Also, we extend the tests interface to be able to modify and created custom system services.

Proposed Changes

  1. Introduced the PackageDistro structure to define a system service with all aux spells and services. I call a package, not a system service (since it's not a single service but a set of services) or a worker (since it's not installed on a separate worker) for clarity of the purpose, but we way rename it to SystemServiceDistro, although I find the package concept more general. Probably, we can use this concept in FCLI to make re-usable and composable services.
  2. Put definition of the default system services (aqua-ipfs, registry and so on) outside of the deployer.
  3. Made it possible to override default system services and introduce new ones.
  4. Extended the test interface to override or extend used system services.

Additional Notes

  1. In the future, I plan to create PackageDistro for each system service in the corresponding system service distro crate, and import it.
  2. We need to reorganize the cargo configuration of the project to be able to publish create-swarm crate, but do it in a separate PR.

@linear
Copy link

linear bot commented Aug 25, 2023

NET-531 Override system services in CreatedSwarm

NET-530 Refactor system services crate

To be able to define system services outside of the crate

crates/nox-tests/tests/services.rs Outdated Show resolved Hide resolved
crates/system-services/src/lib.rs Outdated Show resolved Hide resolved
crates/system-services/src/lib.rs Show resolved Hide resolved
@kmd-fl kmd-fl added the e2e Run e2e workflow label Sep 5, 2023
@kmd-fl
Copy link
Contributor Author

kmd-fl commented Sep 6, 2023

@justprosh @nick let's merge it maybe?

Copy link
Member

@folex folex left a comment

Choose a reason for hiding this comment

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

Nice!

@kmd-fl kmd-fl merged commit 459ec72 into master Sep 14, 2023
14 checks passed
@kmd-fl kmd-fl deleted the plugable-system-services branch September 14, 2023 10:35
@kmd-fl kmd-fl restored the plugable-system-services branch September 14, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants