Chore is a elegant and simple tool for executing common tasks on remote servers.

Chore

Chore is a tool for executing common tasks you run on your remote servers. You can easily setup tasks for deployment, commands, and more.

Installation

Download release binaries from here.

Initialize Example Config

Below command will generate example taskfile.yaml.

chore init

Writing Tasks

Defining Tasks

Tasks are the basic building block of Chore. Tasks define the shell commands that should execute on your remote servers when the task is invoked. For example, you might define a task that pull latest changes from git provider git pull origin master.

All of your tasks should be defined in an taskfile.yaml file. Here's an example to get you started:

servers:
  - [email protected]
  - [email protected]

tasks:
  - name: deploy
    run: 
      - cd /path/to/site
      - git pull origin main

Server Options

By default server will use default options for port and private key file path, but you're specify different options, see exmaple below.

#...
servers:
  - [email protected]@2222
  - [email protected]@2222@/home/user/.ssh/vps_id_rsa
#...

Local Tasks

You can force a script to run on your local computer by specifying the server's as localhost or 127.0.0.1

servers:
  - localhost # or 127.0.0.1

Variables

You can set common vairables which you can re-use in multiple tasks.

# ....
vars: 
  branch: main

tasks:
  - name: deploy
    run: 
      - cd /path/to/site
      - git pull origin $branch
# ...

Environment Variables

You can set the environment variables, all these env values will be exported before running task commands.

# ....
tasks:
  - name: deploy
    env:
        FOO: BAR
        BAR: FOO
    run: 
      - cd /path/to/site
      - git pull origin main
# ...

Buckets

Buckets group a set of tasks under a single, convenient name. For instance, a deploy bucket may run the update-code and install-dependencies tasks by listing the task names within its definition:

tasks:
  - name: pull-code
    run: 
      - cd /var/www/site
      - git pull origin main

  - name: install-dep
    run:
      - cd /var/www/site
      - yarn install

buckets: 
  - name: deploy
    tasks:
      - pull-code
      - install-dep

Running Tasks

To run a task or bucket that is defined in your application's taksfile.yaml file, execute Chore's run command, passing the name of the task or bucket you would like to execute. Chore will execute the task and display the output from your remote servers as the task is running:

chore run deploy

Parallel Execution

By default, tasks will be executed on each server serially. In other words, a task will finish running on the first server before proceeding to execute on the second server. If you would like to run a task across multiple servers in parallel, add the parallel option to your task declaration:

chore run deploy --parallel

Usage Reference

chore run --help

Run the tasks defined in Taskfile file.

Usage:
  chore run [flags]

Flags:
      --bucket            Run the bucket of tasks
      --continue          Continue running even if a task fails
      --dry-run           Dump Bash script for inspection
      --filename string   The name of the Commet file (default "taskfile.yaml")
  -h, --help              help for run
      --parallel          Run task concurrently on servers
      --path string       The path to the Commet.yaml file

LICENSE

The MIT License (MIT). Please see License File for more information.

Owner
Ahmed waleed
Fullstack LaravelPHP / Javascript / Golang developer, tailwind css lover, trying to be devops.
Ahmed waleed
Similar Resources

A small CLI tool to check connection from a local machine to a remote target in various protocols.

CHK chk is a small CLI tool to check connection from a local machine to a remote target in various protocols.

Oct 10, 2022

Command line tool makeing working with remote files esier.

Command line tool makeing working with remote files esier.

Jul 27, 2022

Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete.

yikes Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete. It also has commands to help store random notes a

Oct 7, 2021

Grit is an experimental personal task manager that represents tasks as nodes of a multitree

Grit is an experimental personal task manager that represents tasks as nodes of a multitree

Grit is an experimental personal task manager that represents tasks as nodes of a multitree, a class of directed acyclic graphs. The structure en

Jan 2, 2023

27 solved tasks on Golang (level 1)

golang-tasks-lvl1 Решение задач level# 1 (Golang) Запуск программы go run main.go Описание Проект состоит из файла main.go, директории с решением зада

Dec 3, 2021

Todo-cmd: an app you can add your tasks , edit or delete them

TODO CMD APP! 🧙‍♂️ Table of contents General info Update Requirements set-up usage General info todo-cmd is an app you can add your tasks , edit or d

Dec 13, 2021

Goodmorning - Daily do-nothing script to ensure daily tasks are reported

goodmorning Daily do-nothing script to ensure daily tasks are accomplished. Usag

Dec 31, 2021

Fast, realtime regex-extraction, and aggregation into common formats such as histograms, numerical summaries, tables, and more!

Fast, realtime regex-extraction, and aggregation into common formats such as histograms, numerical summaries, tables, and more!

rare A file scanner/regex extractor and realtime summarizor. Supports various CLI-based graphing and metric formats (histogram, table, etc). Features

Dec 29, 2022

Testing local and remote shell commands in Go

Testing local and remote shell commands in Go. This is an (intentionally simplified) example of how unix shell commands can be unit-tested in Go. The

Nov 30, 2021
Related tags
cTRL: a server for remote execution of pending tasks and commands in real time

Документация на русском: https://github.com/eltaline/ctrl/blob/master/README-RUS.md cTRL is a server written in Go language that uses a modified versi

Mar 3, 2022
A Go library and common interface for running local and remote commands

go-runcmd go-runcmd is a Go library and common interface for running local and remote commands providing the Runner interface which helps to abstract

Nov 25, 2021
Slack remote terminal - execute commands on remote host using slack slash command

slackRT Slack remote terminal - execute commands on remote host using slack slash command Installation Go to api.slack.com/apps and sign in and create

Jul 12, 2022
Waiton - Commandline for executing command and waiting on output

waiton Commandline for executing command and waiting on output Output of waiton

Feb 4, 2022
(Re-)Try executing a command till it succeeds.

Rtry (Re-)Trys executing a command till it succeeds. Note: Currently Only supports Unix Based systems. Installation Binary Download Checkout the relea

Feb 5, 2022
Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Jan 8, 2022
Tnbassist - A CLI tool for thenewboston blockchain to perform various mundane tasks like taking daily accounts backup

TNB Assist is a CLI (Command Line Interface) tool for thenewboston blockchain to perform various mundane tasks like taking daily accounts backup, computing statistics, etc easier.

Feb 14, 2022
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.

Read the docs at docs.gomplate.ca, chat with developers and community in the #gomplate channel on Gophers Slack gomplate is a template renderer which

Jan 5, 2023
CLI tool to convert many common document types to plane text.

Textify. CLI tool to convert many common document types to plane text. Goals. SO many different document types exist today. PDFs, EPUB books, Microsof

Nov 19, 2021
only for creates task and get all tasks from the db.

Todo Rest API This API only creates a task and get all tasks. Table of Contents: Getting Started Requirements Building with Docker API Endpoints and D

Dec 27, 2021