Skip to content

iyampaul/tape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tape: Tiny Action Processing Engine

Setup

  1. Clone the repository

    git clone <repo-url>
    cd tape
  2. Install Go (if running locally)

    • Requires Go 1.22 or newer.
  3. Install dependencies:

    go mod tidy
  4. Edit config.yml to match your environment (ports, paths, etc).

  5. Update action packages

Running TAPE

Local

  1. Build package
    make build
  2. Run TAPE
    make run
  3. Check initialized actions and keys
    cat ./logs/event.log

Docker

  1. Update docker-compose.yml and Dockerfile

    • If TLS is enabled: Key and cert filenames must match the config.yml
    • Default port bind is 8080 => 443, modify as needed
  2. Build the Docker Image

    make docker-build
  3. Execute TAPE container

    make docker-up
    • This will start the app, mount configs, actions, logs, and files.
    • The app will be available on the port specified in docker-compose.yml (default: 8080).

Actions

  • Each action must have a unique route
  • generate_keys (keygen for core actions) enables or disables authentication and generates a key for the action. If disabled, they key won't be required.

Core Actions

  • Core actions are built-in and configured in config.yml.
  • Schema:
        enabled:              # bool
        method:               # string
        keygen:               # bool
        input:                # bool
        data:                 # string
        output_write:         # bool
        output_file:          # string
        route:                # string
        description:          # string

Core Action: Log

  • Writes the incoming request out to event log.

Custom Actions

Example Action

name: "whoami"
description: "Show current user"
route: "whoami"
method: POST
generate_keys: true
action: "/usr/bin/whoami"
accept_input: false
output_write: true
output_file: "whoami.log"

Test / Validation

Example cURL command to reach a TAPE instance:

curl -k -X POST https://<ip_address>:<port>/<route>/<key> -H "Content-Type: application/json" -d '{"data": "test message"}

About

Tiny Action Processing Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published