Skip to content

Commit b9aafbe

Browse files
committed
Update docs
1 parent a12ad2f commit b9aafbe

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The goal of ```GARM``` is to be simple to set up, simple to configure and simple
2727

2828
GARM supports creating pools in either GitHub itself or in your own deployment of [GitHub Enterprise Server](https://docs.github.com/en/[email protected]/admin/overview/about-github-enterprise-server). For instructions on how to use ```GARM``` with GHE, see the [credentials](/doc/github_credentials.md) section of the documentation.
2929

30-
Through the use of providers, `GARM` can create runners in a variety of environments using the same `GARM` instance. Whether you want to create pools of runners in your OpenStack cloud, your Azure cloud or your Kubernetes cluster, that is easily achieved by just installing the appropriate providers, configuring them in `GARM` and creating pools that use them. You can create zero-runner pools for instances with high costs (large VMs, GPU enabled instances, etc) and have them spin up on demand, or you can create large pools of eagerly creaated k8s backed runners that can be used for your CI/CD pipelines at a moment's notice. You can mix them up and create pools in any combination of providers or resource allocations you want.
30+
Through the use of providers, `GARM` can create runners in a variety of environments using the same `GARM` instance. Whether you want to create pools of runners in your OpenStack cloud, your Azure cloud or your Kubernetes cluster, that is easily achieved by just installing the appropriate providers, configuring them in `GARM` and creating pools that use them. You can create zero-runner pools for instances with high costs (large VMs, GPU enabled instances, etc) and have them spin up on demand, or you can create large pools of eagerly created k8s backed runners that can be used for your CI/CD pipelines at a moment's notice. You can mix them up and create pools in any combination of providers or resource allocations you want.
3131

3232
Here is a brief architectural diagram of how GARM reacts to workflows triggered in GitHub (click the image to see a larger version):
3333

doc/config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ For example, in a scenario where you expose the API endpoint directly, this sett
9494
callback_url = "https://garm.example.com/api/v1/callbacks"
9595
```
9696

97-
Authentication is done using a short-lived JWT token, that gets generated for a particular instance that we are spinning up. That JWT token grants access to the instance to only update it's own status and to fetch metadata for itself. No other API endpoints will work with that JWT token. The validity of the token is equal to the pool bootstrap timeout value (default 20 minutes) plus the garm polling interval (5 minutes).
97+
Authentication is done using a short-lived JWT token, that gets generated for a particular instance that we are spinning up. That JWT token grants access to the instance to only update its own status and to fetch metadata for itself. No other API endpoints will work with that JWT token. The validity of the token is equal to the pool bootstrap timeout value (default 20 minutes) plus the garm polling interval (5 minutes).
9898

99-
There is a sample ```nginx``` config [in the testdata folder](/testdata/nginx-server.conf). Feel free to customize it whichever way you see fit.
99+
There is a sample ```nginx``` config [in the testdata folder](/testdata/nginx-server.conf). Feel free to customize it in any way you see fit.
100100

101101
### The metadata_url option
102102

@@ -128,7 +128,7 @@ And restart garm. You can then use the following command to start profiling:
128128
go tool pprof http://127.0.0.1:9997/debug/pprof/profile?seconds=120
129129
```
130130

131-
Important note on profiling when behind a reverse proxy. The above command will hang for a fairly long time. Most reverse proxies will timeout after about 60 seconds. To avoid this, you should only profile on localhost by connecting directly to garm.
131+
> **IMPORTANT NOTE on profiling when behind a reverse proxy**: The above command will hang for a fairly long time. Most reverse proxies will timeout after about 60 seconds. To avoid this, you should only profile on localhost by connecting directly to garm.
132132
133133
It's also advisable to exclude the debug server URLs from your reverse proxy and only make them available locally.
134134

@@ -289,7 +289,7 @@ If you want to implement an external provider, you can use this file for anythin
289289

290290
#### Available external providers
291291

292-
For non testing purposes, there are two external providers currently available:
292+
For non-testing purposes, these are the external providers currently available:
293293

294294
* [OpenStack](https://github.com/cloudbase/garm-provider-openstack)
295295
* [Azure](https://github.com/cloudbase/garm-provider-azure)

doc/quickstart.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ docker run -d \
136136
ghcr.io/cloudbase/garm:v0.1.4
137137
```
138138

139-
You will notice we also mounted the LXD unix socket from the host inside the container where the config you pasted expects to find it. If you plan to use an external provider that does not need to connect to LXD over a unix socket, feel free to remove that mount.
139+
You will notice that we also mounted the LXD unix socket from the host inside the container where the config you pasted expects to find it. If you plan to use an external provider that does not need to connect to LXD over a unix socket, feel free to remove that mount.
140140

141141
Check the logs to make sure everything is working as expected:
142142

@@ -333,7 +333,7 @@ In this exampe, we add a new github endpoint called `example`. The `ca-cert-path
333333

334334
Before we can add a new entity, we need github credentials to interact with that entity (manipulate runners, create webhooks, etc). Credentials are tied to a specific github endpoint. In this section we'll be adding credentials that are valid for either [github.com](https://github.com) or your own GHES server (if you added one in the previous section).
335335

336-
When creating a new entity (repo, org, enterprise) using the credentials you define here, GARM will automatically associate that entity with the gitHub endpoint that the credentials use.
336+
When creating a new entity (repo, org, enterprise) using the credentials you define here, GARM will automatically associate that entity with the github endpoint that the credentials use.
337337

338338
If you want to swap the credentials for an entity, the new credentials will need to be associated with the same endpoint as the old credentials.
339339

@@ -620,6 +620,6 @@ gabriel@rossak:~$ garm-cli job ls
620620

621621
There are no jobs sent yet to my GARM install, but once you start sending jobs, you'll see them here as well.
622622

623-
That's it! You now have a working GARM installation. You can add more repos, orgs or enterprises and create more pools. You can also add more providers for different clouds and credentials with access to different GitHub resources.
623+
That's it! Now you have a working GARM installation. You can add more repos, orgs or enterprises and create more pools. You can also add more providers for different clouds and credentials with access to different GitHub resources.
624624

625625
Check out the [Using GARM](/doc/using_garm.md) guide for more details on how to use GARM.

doc/using_garm.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ While using the GARM cli, you will most likely spend most of your time listing p
4848

4949
## Controller operations
5050

51-
The `controller` is essentially GARM itself. Every deployment of GARM will have its own controller ID which will be used to tag runners in github. The controller is responsible for managing runners, webhooks, repositories, organizations and enterprises. There are a few settings at the controller level which you can tweak and we will cover them below.
51+
The `controller` is essentially GARM itself. Every deployment of GARM will have its own controller ID which will be used to tag runners in github. The controller is responsible for managing runners, webhooks, repositories, organizations and enterprises. There are a few settings at the controller level which you can tweak, which we will cover below.
5252

5353
### Listing controller info
5454

@@ -85,7 +85,7 @@ We will see the `Controller Webhook URL` later when we set up the GitHub repo to
8585

8686
### Updating controller settings
8787

88-
Like we've mentioned before, there are 3 URLs that are very important for normal operations:
88+
As we've mentioned before, there are 3 URLs that are very important for normal operations:
8989

9090
* `metadata_url` - Must be reachable by runners
9191
* `callback_url` - Must be reachable by runners
@@ -145,7 +145,7 @@ Each of these providers can be used to set up a runner pool for a repository, or
145145

146146
GARM can be used to manage runners for repos, orgs and enterprises hosted on `github.com` or on a GitHub Enterprise Server.
147147

148-
Endpoints are the way that GARM identifies where the credentials and entities you create are located and where the API endpoints for the GitHub API can be reached, along with a possible CA certificate that validates the connection. There is a default endpoint for `github.com`, so you don't need to add it. But if you're using GHES, you'll need to add an endpoint for it.
148+
Endpoints are the way that GARM identifies where the credentials and entities you create are located and where the API endpoints for the GitHub API can be reached, along with a possible CA certificate that validates the connection. There is a default endpoint for `github.com`, so you don't need to add it, unless you're using GHES.
149149

150150
### Creating a GitHub Endpoint
151151

@@ -241,7 +241,7 @@ There are two types of credentials:
241241
* PAT - Personal Access Token
242242
* App - GitHub App
243243

244-
To add each of these types of credentials requires slightly different command line arguments (obviously). I'm going to give you an example of both.
244+
To add each of these types of credentials, slightly different command line arguments (obviously) are required. I'm going to give you an example of both.
245245

246246
To add a PAT, you can run the following command:
247247

@@ -318,7 +318,7 @@ To delete a credential, you can run the following command:
318318
garm-cli github credentials delete 2
319319
```
320320

321-
Note, you may not delete credentials that are currently associated with a repository, organization or enterprise. You will need to first replace the credentials on the entity, and then you can delete the credentials.
321+
> **NOTE**: You may not delete credentials that are currently associated with a repository, organization or enterprise. You will need to first replace the credentials on the entity, and then you can delete the credentials.
322322
323323
## Repositories
324324

@@ -381,7 +381,7 @@ garm-cli repository delete be3a0673-56af-4395-9ebf-4521fea67567
381381

382382
This will remove the repository from GARM, and if a webhook was installed, will also clean up the webhook from the repository.
383383

384-
Note: GARM will not remove a webhook that points to the `Base Webhook URL`. It will only remove webhooks that are namespaced to the running controller.
384+
> **NOTE**: GARM will not remove a webhook that points to the `Base Webhook URL`. It will only remove webhooks that are namespaced to the running controller.
385385
386386
## Organizations
387387

@@ -407,9 +407,9 @@ ubuntu@garm:~$ garm-cli organization add \
407407

408408
This will add the organization `gsamfira` to GARM, and install a webhook for it. The webhook will be validated against the secret that was generated. The only difference between adding an organization and adding a repository is that you use the `organization` subcommand instead of the `repository` subcommand, and the `--name` option represents the `name` of the organization.
409409

410-
Managing webhooks for organizations is similar to managing webhooks for repositories. You can list, show, install and uninstall webhooks for organizations using the `garm-cli organization webhook` subcommand. We won't go into details here, as it's similar to managing webhooks for repositories.
410+
Managing webhooks for organizations is similar to managing webhooks for repositories. You can *list*, *show*, *install* and *uninstall* webhooks for organizations using the `garm-cli organization webhook` subcommand. We won't go into details here, as it's similar to managing webhooks for repositories.
411411

412-
All the other operations that exist on repositories, like listing, removing, etc, also exist for organizations and enterprises. Have a look at the help for the `garm-cli organization` subcommand for more details.
412+
All the other operations that exist on repositories, like listing, removing, etc, also exist for organizations and enterprises. Check out the help for the `garm-cli organization` subcommand for more details.
413413

414414
## Enterprises
415415

@@ -497,7 +497,7 @@ To manually add a webhook, see the [webhooks](/doc/webhooks.md) section.
497497

498498
Now that we have a repository, organization or enterprise added to GARM, we can create a runner pool for it. A runner pool is a collection of runners of the same type, that are managed by GARM and are used to run workflows for the repository, organization or enterprise.
499499

500-
You can create multiple pools of runners for the same entity (repository, organization or enterprise), and you can create multiple pools of runners, each pool defining different runner types. For example, you can have a pool of runners that are created on AWS, and another pool of runners that are created on Azure, k8s, LXD, etc. For repositories or organizations with complex needs, you can set up a number of pools that cover a wide range of needs, based on cost, capability (GPUs, FPGAs, etc) or sheer raw computing power. You don't have to pick just one and managing all of them is done using the exact same commands, as we'll show below.
500+
You can create multiple pools of runners for the same entity (repository, organization or enterprise), and you can create multiple pools of runners, each pool defining different runner types. For example, you can have a pool of runners that are created on AWS, and another pool of runners that are created on Azure, k8s, LXD, etc. For repositories or organizations with complex needs, you can set up a number of pools that cover a wide range of needs, based on cost, capability (GPUs, FPGAs, etc) or sheer raw computing power. You don't have to pick just one, especially since managing all of them is done using the exact same commands, as we'll show below.
501501

502502
Before we create a pool, we have to decide which provider we want to use. We've listed the providers above, so let's pick one and create a pool of runners for our repository. For the purpose of this example, we'll use the `incus` provider. We'll show you how to create a pool using this provider, but keep in mind that adding another pool using a different provider is done using the exact same commands. The only difference will be in the `--image`, `--flavor` and `--extra-specs` options that you'll use when creating the pool.
503503

0 commit comments

Comments
 (0)