Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud committed Jan 6, 2025
1 parent dc6e947 commit 42a2b01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ plugins:
1. [Set up the Handler Plugin.](./plugins/handlers/github/README.md)
1. Run the binary on the host that has the [Anka CLI installed](https://docs.veertu.com/anka/anka-virtualization-cli/getting-started/installing-the-anka-virtualization-package/) (Anka is not needed if just running an Anklet Receiver).
- You can run `anklet` with `LOG_LEVEL=DEBUG` to see more verbose output.
1. To stop, send an interrupt or ctrl+c. It will attempt a graceful shut down of plugins, sending unfinished jobs back to the queue or waiting until the job is done to prevent orphans.
1. To stop, send an interrupt signal or ctrl+c. It will attempt a graceful shut down of plugins, sending unfinished jobs back to the queue or waiting until the job is done to prevent orphans.

It is also possible to use ENVs for several of the items in the config. They override anything set in the yml. Here is a list of ENVs that you can use:

Expand All @@ -115,8 +115,13 @@ It is also possible to use ENVs for several of the items in the config. They ove
| ANKLET_WORK_DIR | Absolute path to work directory for anklet (ex: /tmp/) (defaults to `./`) |
| ANKLET_PID_FILE_DIR | Absolute path to pid file directory for anklet (ex: /tmp/) (defaults to `./`) |
| ANKLET_LOG_FILE_DIR | Absolute path to log file directory for anklet (ex: /Users/myUser/Library/Logs/) (defaults to `./`) |

For error handling, see the [github plugin README](./plugins/handlers/github/README.md).
| ANKLET_PLUGINS_PATH | Absolute path to plugins directory for anklet (ex: /Users/myUser/anklet/plugins/) (defaults to `~/.config/anklet/plugins/`) |
| ANKLET_GLOBAL_DATABASE_URL | URL of the database (ex: localhost) |
| ANKLET_GLOBAL_DATABASE_PORT | Port of the database (ex: 6379) |
| ANKLET_GLOBAL_DATABASE_USER | User to use (ex: "") |
| ANKLET_GLOBAL_DATABASE_PASSWORD | Password to use (ex: "") |
| ANKLET_GLOBAL_DATABASE_DATABASE | Database to use (ex: 0) |
| ANKLET_GLOBAL_PRIVATE_KEY | Absolute path to private key for anklet (ex: /Users/myUser/.private-key.pem) |

### Database Setup

Expand Down Expand Up @@ -145,7 +150,7 @@ You can control the location plugins are stored on the host by setting the `plug
#### Github Actions

- [**`Webhook Receiver Plugin`**](./plugins/receivers/github/README.md)
- [**`Anka VM Handler Plugin`**](./plugins/handlers/github/README.md)
- [**`Workflow Run Job Handler Plugin`**](./plugins/handlers/github/README.md)

#### Docker / Containers

Expand Down
4 changes: 2 additions & 2 deletions plugins/handlers/github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ jobs:

### Install Supporting Scripts

Finally, the `github` plugin requires three different bash scripts available on the host, which it will copy into the VM and run. You can find them under https://github.com/veertuinc/anklet/tree/main/plugins/handlers/github. They can be customized to fit your needs. Place them in under `${plugins_path}/handlers/github/` (default `~/.config/anklet/plugins/handlers/github/`).
Finally, the `github` plugin requires three different bash scripts available on the host, which it will copy into the VM and run. You can find them under https://github.com/veertuinc/anklet/tree/main/plugins/handlers/github. They can be customized to fit your needs. Place them under `${plugins_path}/handlers/github/` (default `~/.config/anklet/plugins/handlers/github/`).

---

## Failure and Retry handling

Anklet does its best to handle failures gracefully. We attempt to retry the entire VM setup/registration process for failures that are transient. This includes connection problems, Anka CLI failures that can be retried, and other transient issues.
Anklet does its best to handle failures gracefully. We attempt to retry the entire VM setup/registration process for failures that are transient and recoverable. This includes connection problems, Anka CLI failures that can be retried, and others.

If something cannot be safely retried, we have to send an API request to cancel the job in Github. Your users will see a cancelled job if there was an unrecoverable failure. Side note: We've asked Github to allow us to annotate the cancellation with a message so we can better understand why it was cancelled, but it's still pending: https://github.com/orgs/community/discussions/134326 (please up vote it!)

Expand Down

0 comments on commit 42a2b01

Please sign in to comment.