Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
/ subdeploy Public archive

Sudeploy is a tool that allows you to deploy a service to multiple instances with a single request via subscription model.

Notifications You must be signed in to change notification settings

laftel-team/subdeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subdeploy

Sudeploy is a tool that allows you to deploy a service to multiple instances with a single request via subscription model.

Installation

$ npm install -g subdeploy
$ subdeploy --help

Architecture

Subdeploy provides two type of instances.

  • Core: The core instance opens up a webserver with an API endpoint and websocket.
  • Client: The client instance connects to the core server with websocket.

After establishing the connection between the core and the clients, you can invoke every clients to perform a specific task by making a request to the core.

Configuration

Configure following environment variables:

  • SUBDEPLOY_PORT: port to listen on core server
  • SUBDEPLOY_HOST: host of the core server
  • SUBDEPLOY_KEY: key to authorize requests

Environment variables can also be set on .env file of pwd.

Create deploy script files inside deploy-scripts directory.

Sample script

#!/bin/sh
cd "$(dirname "$0")"
cd ../
echo Hello World

Make sure that the script is executable.

$ chmod +x deploy-scripts/update

CLI

To read the help for CLI commands, run:

$ subdeploy --help

Starting an instance

$ subdeploy start core
$ subdeploy start client

Stopping an instance

$ subdeploy stop core
$ subdeploy stop client

Check status of the instances

$ subdeploy status

Check logs of the instance

$ subdeploy log core
$ subdeploy log client

Invoke deploy script

$ subdeploy invoke $scriptName

About

Sudeploy is a tool that allows you to deploy a service to multiple instances with a single request via subscription model.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published