-
Notifications
You must be signed in to change notification settings - Fork 20
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
Diagrams #439
base: main
Are you sure you want to change the base?
Diagrams #439
Conversation
Test coverage for 697fbcc
Static code analysis report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding to the docs! I have a few comments to start with, mostly just to better understand the diagrams.
@@ -11,6 +11,104 @@ Conceptually, the charm can be divided into the following: | |||
- Management of [Python web service for checking GitHub repository settings](https://github.com/canonical/repo-policy-compliance) | |||
- Management of dependencies | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a header here, something like ## Overview of the GitHub runner ecosystem
. Feel free to change the wording -- I think the heading will set the expectation that this diagram and section will present a high-level overview of the project.
Other options include moving this diagram to the main index.md
page, the README, or both. I'd appreciate your thoughts about where is the best place for this diagram!
The `RunnerScaler` is the main component to reconcile the desired number of runners using the `RunnerManager`. | ||
The `RunnerManager` uses the `CloudRunnerManager` to interact with the compute infrastructure to create and manage self-hosted runner (OpenStack is currently the only implementation). | ||
The `RunnerManager` uses the `GithubRunnerManager` to interact with the GitHub API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on this description, my impression that the RunnerManager
is the main component of the charm. The RunnerManager
seems to coordinate all the other components to create, manage, and scale the runners. Please correct me if my impression is wrong!
However, if this is a correct interpretation, then I would rephrase the text to say something like
The `RunnerManager` is the main component of the charm. The `RunnerManager` interacts
with the other charm components in the following ways:
* `RunnerScaler`: To reconcile the desired number of runners.
* `CloudRunnerManager`: To interact with the compute infrastructure to create and manage
self-hosted runners. OpenStack is currently the only available cloud implementation.
* `GithubRunnerManager`: To interact with the GitHub API.
The `RunnerManager` uses the `GithubRunnerManager` to interact with the GitHub API. | ||
|
||
In the case of reactive runners, the `RunnerManager` will also create processes that | ||
will be in charge of consuming events that were created from Github webhooks, and starting GitHub runners in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be in charge of consuming events that were created from Github webhooks, and starting GitHub runners in a | |
will be in charge of consuming events that were created from GitHub webhooks and starting GitHub runners in a |
In the case of reactive runners, the `RunnerManager` will also create processes that | ||
will be in charge of consuming events that were created from Github webhooks, and starting GitHub runners in a | ||
reactive manner. Those events are stored in `mongodb` and were enqueued by | ||
the application [github-runner-webhook-router](https://github.com/canonical/github-runner-webhook-router). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is github-runner-webhook-router
a charm? It may be better to refer to it as a charm here, let me know what you think
```mermaid | ||
|
||
C4Container | ||
title Container diagram for the github-runner Charm System | ||
|
||
System_Ext(osrunnign, "OpenStack", "OpenStack deployment used for runners") | ||
System_Ext(github, "GitHub", "GitHub API") | ||
|
||
Container_Boundary(c1, "GitHub Runner Charm"){ | ||
Component(runnerscaler, "RunnerScaler", "", "") | ||
|
||
|
||
Component(runnermanager, "RunnerManager", "", "") | ||
Component(githubrunnermanager, "GitHubRunnerManager", "", "") | ||
|
||
Component(cloudrunnermanager, "CloudRunnerManager", "", "") | ||
Component(openstackrunnermanager, "OpenstackRunnerManager", "", "") | ||
|
||
Rel(runnerscaler, runnermanager, "uses", "") | ||
Rel(runnermanager, cloudrunnermanager, "uses", "") | ||
Rel(runnermanager, githubrunnermanager, "uses", "") | ||
Rel(openstackrunnermanager, cloudrunnermanager, "implements", "") | ||
} | ||
|
||
Container_Boundary(c2, "Reactive Processes"){ | ||
Component(runnerprocess, "Reactive Spawner", "", "") | ||
} | ||
|
||
Rel(githubrunnermanager, github, "manages VMs", "") | ||
Rel(openstackrunnermanager, osrunnign, "manages VMs", "") | ||
|
||
Rel(runnermanager, runnerprocess, "creates/deleted processes", "") | ||
|
||
Rel(runnerprocess, github, "manages VMs", "") | ||
Rel(runnerprocess, osrunnign, "manages VMs", "") | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, are these different components (RunnerManager
, RunnerScaler
, etc.) components of the charm, or the software components? (If there's a difference between those two categories)
The aesthetics of this diagram are a little wonky. If the different components and arrows refuse to cooperate, feel free to change to a different Mermaid syntax.
Clarifiy that it is a machine charm |
Applicable spec:
Overview
C4 Diagrams for github-runner operator.
Rationale
Juju Events Changes
Module Changes
Library Changes
Checklist
urgent
,trivial
,complex
).