You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The goal of ```GARM``` is to be simple to set up, simple to configure and simple
27
27
28
28
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.
29
29
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.
31
31
32
32
Here is a brief architectural diagram of how GARM reacts to workflows triggered in GitHub (click the image to see a larger version):
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).
98
98
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.
100
100
101
101
### The metadata_url option
102
102
@@ -128,7 +128,7 @@ And restart garm. You can then use the following command to start profiling:
128
128
go tool pprof http://127.0.0.1:9997/debug/pprof/profile?seconds=120
129
129
```
130
130
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.
132
132
133
133
It's also advisable to exclude the debug server URLs from your reverse proxy and only make them available locally.
134
134
@@ -289,7 +289,7 @@ If you want to implement an external provider, you can use this file for anythin
289
289
290
290
#### Available external providers
291
291
292
-
For nontesting purposes, there are two external providers currently available:
292
+
For non-testing purposes, these are the external providers currently available:
Copy file name to clipboardExpand all lines: doc/quickstart.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ docker run -d \
136
136
ghcr.io/cloudbase/garm:v0.1.4
137
137
```
138
138
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.
140
140
141
141
Check the logs to make sure everything is working as expected:
142
142
@@ -333,7 +333,7 @@ In this exampe, we add a new github endpoint called `example`. The `ca-cert-path
333
333
334
334
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).
335
335
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.
337
337
338
338
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.
339
339
@@ -620,6 +620,6 @@ gabriel@rossak:~$ garm-cli job ls
620
620
621
621
There are no jobs sent yet to my GARM install, but once you start sending jobs, you'll see them here as well.
622
622
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.
624
624
625
625
Check out the [Using GARM](/doc/using_garm.md) guide for more details on how to use GARM.
Copy file name to clipboardExpand all lines: doc/using_garm.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ While using the GARM cli, you will most likely spend most of your time listing p
48
48
49
49
## Controller operations
50
50
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.
52
52
53
53
### Listing controller info
54
54
@@ -85,7 +85,7 @@ We will see the `Controller Webhook URL` later when we set up the GitHub repo to
85
85
86
86
### Updating controller settings
87
87
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:
89
89
90
90
*`metadata_url` - Must be reachable by runners
91
91
*`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
145
145
146
146
GARM can be used to manage runners for repos, orgs and enterprises hosted on `github.com` or on a GitHub Enterprise Server.
147
147
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.
149
149
150
150
### Creating a GitHub Endpoint
151
151
@@ -241,7 +241,7 @@ There are two types of credentials:
241
241
* PAT - Personal Access Token
242
242
* App - GitHub App
243
243
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.
245
245
246
246
To add a PAT, you can run the following command:
247
247
@@ -318,7 +318,7 @@ To delete a credential, you can run the following command:
318
318
garm-cli github credentials delete 2
319
319
```
320
320
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.
This will remove the repository from GARM, and if a webhook was installed, will also clean up the webhook from the repository.
383
383
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.
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.
409
409
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.
411
411
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.
413
413
414
414
## Enterprises
415
415
@@ -497,7 +497,7 @@ To manually add a webhook, see the [webhooks](/doc/webhooks.md) section.
497
497
498
498
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.
499
499
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.
501
501
502
502
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.
0 commit comments