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

[Doc] Create ARC Overview doc #1707

Merged
merged 8 commits into from
Aug 23, 2022
Merged

[Doc] Create ARC Overview doc #1707

merged 8 commits into from
Aug 23, 2022

Conversation

Vijay-train
Copy link
Contributor

@Vijay-train Vijay-train commented Aug 10, 2022

The purpose of this doc is a starting point overview to ARC, with links to Quick start guide within. Users can use this doc to get a high level understanding of ARC with a bit more details than the QuickStart guide. Note - links to QuickStart guide will be updated once that PR gets merged.

README.md will be updated( in a separate PR) with links to this doc post merge.

The purpose of this doc is a starting point overview to ARC, with links to Quick start guide within.
@Vijay-train Vijay-train marked this pull request as ready for review August 11, 2022 10:26
@Vijay-train Vijay-train changed the title [Doc] Create ARC overview doc [Doc] Create ARC Overview doc Aug 11, 2022
Fixed links to include quotes, where missing. Added spaces after periods, where missing.
### The Runner container image
The GitHub hosted runners include a large amount of pre-installed software packages. For complete list, see "[Runner images](https://github.com/actions/virtual-environments/tree/main/images/linux)."

ARC maintains a few runner images with `latest` aligning with GitHub's Ubuntu version, these images do not contain all of the software installed on the GitHub runners. They contain subset of packages from the GitHub runners: Basic CLI packages, git, docker and build-essentials.
Copy link
Collaborator

@mumoshu mumoshu Aug 15, 2022

Choose a reason for hiding this comment

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

JFYI, it's true that our image is intended NOT to include anything that can be installed via setup-* actions. The use ofsetup-* actions for installing additional software on top of the runner container image backed runners is recommended. (Worth mentioning in this sentence? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did mention using the setup actions as the last sentence in this section, but I agree to make it more explicit. Will do so.

2) Scaling parameters - `minReplicas` and `maxReplicas` indicates the min and max number of replicas to scale to.
3) Scaling metrics - ARC supports two types of scaling metrics. `TotalNumberOfQueuedAndInProgressWorkflowRuns` and `PercentageRunnersBusy`. These indicate the type of scaling to employ.

The `TotalNumberOfQueuedAndInProgressWorkflowRuns` metric polls GitHub for all pending workflow runs against a given set of repositories. The metric will scale the runner count up to the total number of pending jobs at the sync time up to the `maxReplicas` configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The TotalNumberOfQueuedAndInProgressWorkflowRuns metric is half-baked. It doesn't support labels so it won't work correctly on a repository that uses both github-hosted and self-hosted runners. I've seen several folks had troubles due to that and eventually moved to the webhook-based scaling or PercentageRunnersBusy.

Would it still be a good idea to introduce this metric? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in that case, it might be better to remove it for now. Will do so.

Updated the following based on PR feedback
- `The Runner container image` now calls out more explicitly the recommended way to install additional software
- `Scaling runners - dynamically with Pull Driven ScalingScaling runners - dynamically with Pull Driven Scaling` - Removed mentions of `TotalNumberOfQueuedAndInProgressWorkflowRuns` as its not fully implemented
Copy link
Contributor

@andyfeller andyfeller left a comment

Choose a reason for hiding this comment

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

How are these changes meant to compliment what is in the repository README.md file?

Currently, the main README.md is massive as all features and functionality are documented with most this content is covered in some form or fashion. I could see reorganizing the existing content into smaller, digestible docs to be easier to read and navigate while maintaining linkage.

Actions-Runner-Controller-Overview.md Outdated Show resolved Hide resolved
Actions-Runner-Controller-Overview.md Outdated Show resolved Hide resolved
Actions-Runner-Controller-Overview.md Outdated Show resolved Hide resolved
Actions-Runner-Controller-Overview.md Outdated Show resolved Hide resolved
Actions-Runner-Controller-Overview.md Outdated Show resolved Hide resolved
Comment on lines +33 to +34
## ARC components
ARC basically consists of a set of custom resources. An ARC deployment is applying these custom resources onto a K8s cluster. Once applied, it creates a set of Pods, with the Github Actions runner running within them. Github is now able to treat these Pods as self hosted runners and allocate jobs to them.
Copy link
Contributor

Choose a reason for hiding this comment

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

How much about the underlying ARC components from the Helm chart are generally useful for adopters to understand? Are these covered elsewhere in more detail?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think some of it might be useful to document in their own sections. We should do so incrementally going forward. We can then link those in this article.

Comment on lines 36 to 44
### Custom resources
ARC consists of several custom resource definitions (Runner, Runner Set, Runner Deployment, Runner Replica Set and Horizontal Runner AutoScaler). For more information on CRDs, refer "[Kubernetes Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)."

The helm command (in the QuickStart guide) installs the custom resources into the actions-runner-system namespace.
```code
helm install -f custom-values.yaml --wait --namespace actions-runner-system \
--create-namespace actions-runner-controller \
actions-runner-controller/actions-runner-controller
```
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the best way for adopters to review and reference the CRDs' schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that could be one way. As we incrementally add additional documentation, we could ( in future) have a section on CRDs and include these details there.

You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production. Your workflow contains one or more jobs which can run in sequential order or in parallel. Each job will run inside its own runner and has one or more steps that either run a script that you define or run an action, which is a reusable extension that can simplify your workflow. To learn more about about Actions - see "[Github Actions](https://docs.github.com/en/actions/learn-github-actions)."

## Runners
Runners execute the job that is assigned to them by Github Actions workflow. There are two types of Runners..
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Runners execute the job that is assigned to them by Github Actions workflow. There are two types of Runners..
Runners execute the job that is assigned to them by Github Actions workflow. There are two types of Runners.

Copy link
Contributor Author

@Vijay-train Vijay-train Aug 17, 2022

Choose a reason for hiding this comment

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

Thanks for the suggestion. Actually fixed this in latest commit by replacing .. with ':`

Incorporated review feedback from  @andyfeller, @sethrylan, @debuger24 and @mumoshu. Thank you all.

Co-authored-by: Andy Feller <andyfeller@github.com>
Co-authored-by: Rahul Kumar <rahulcomp24@gmail.com>
Co-authored-by: Seth Rylan Gainey <sethrylan@github.com>
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
@Vijay-train
Copy link
Contributor Author

How are these changes meant to compliment what is in the repository README.md file?

Currently, the main README.md is massive as all features and functionality are documented with most this content is covered in some form or fashion. I could see reorganizing the existing content into smaller, digestible docs to be easier to read and navigate while maintaining linkage.

@andyfeller - Yes, the intent is to incrementally update the README.md with links to the digestible articles (like this one). We will also remove any duplication then.

@Vijay-train Vijay-train requested review from mumoshu, sethrylan and andyfeller and removed request for sethrylan August 17, 2022 05:35
@Vijay-train Vijay-train requested review from debugger24 and removed request for andyfeller August 17, 2022 05:36
Add more detailed config for PercentageRunnersBusy metric

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
mumoshu
mumoshu previously approved these changes Aug 23, 2022
Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot for your efforts and contribution @Vijay-train ☺️

@mumoshu mumoshu merged commit 2b5af62 into actions:master Aug 23, 2022
@andyfeller
Copy link
Contributor

@Vijay-train Vijay-train deleted the patch-4 branch October 3, 2022 02:48
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.

None yet

5 participants