Skip to content

A CLI for running Github Actions workflows that launch and manage Autonomi networks

Notifications You must be signed in to change notification settings

maidsafe/ant-network-workflow-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Workflow Runner

A CLI for running Github Actions workflows that launch and manage Autonomi networks.

Prerequisites

  • Python 3.6 or higher
  • Github personal access token with permission to run workflows

Setup

  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate
  1. Install the package in development mode:
pip install -e .
  1. Set up your personal access token:
export WORKFLOW_RUNNER_PAT=your_github_token_here

Available Commands

There are several commands for managing network workflows. All commands support the following global options:

  • --debug: Enable debug logging
  • --branch: Specify the branch for the workflow (default: main)
  • --force: Skip confirmation prompts

Network Management Workflows

  • Launch a new network:
runner launch-network --path <workflow-inputs-file>
  • Destroy an existing network:
runner destroy-network --path <workflow-inputs-file>
  • Upscale an existing network:
runner upscale-network --path <workflow-inputs-file>

Listing Runs

  • List workflow runs:
runner ls [--details]
  • List deployments:
runner deployment ls [--details]

Deployments are created when the launch-network command is used.

Node Operation Workflows

  • Stop nodes:
runner stop-nodes --path <workflow-inputs-file>
  • Kill specific droplets:
runner kill-droplets --path <workflow-inputs-file>
  • Upgrade network nodes:
runner upgrade-network --path <workflow-inputs-file>
  • Upgrade node manager:
runner upgrade-node-man --path <workflow-inputs-file>

Telegraf Management Workflows

  • Start telegraf:
runner start-telegraf --path <workflow-inputs-file>
  • Stop telegraf:
runner stop-telegraf --path <workflow-inputs-file>

Other Operations

  • Update peer multiaddr:
runner update-peer --path <workflow-inputs-file>
  • Upgrade uploaders:
runner upgrade-uploaders --path <workflow-inputs-file>

Input Files

Workflows are launched using a set of inputs. For each command, there is an example input file. For whatever command you want to use, take the example file corresponding to the command and adapt it for your use case. Remove whatever optional inputs you don't want to use.

Examples can be found in the example-inputs directory:

  • launch_network.yml: Configuration for launching a new network
  • destroy_network.yml: Configuration for destroying a network
  • upgrade_network.yml: Configuration for upgrading network nodes
  • upgrade_node_man.yml: Configuration for upgrading the node manager
  • upgrade_uploaders.yml: Configuration for upgrading uploaders
  • upscale_network.yml: Configuration for upscaling a network
  • start_telegraf.yml: Configuration for starting telegraf
  • stop_telegraf.yml: Configuration for stopping telegraf
  • stop_nodes.yml: Configuration for stopping nodes

Each file contains detailed comments explaining the available options and their usage.

Database

The tool maintains a local SQLite database at ~/.local/share/safe/workflow_runs.db to track workflow runs and deployments.

About

A CLI for running Github Actions workflows that launch and manage Autonomi networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages