1.1.0 • Published 2 years ago

subdeploy v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

npm.io

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
1.1.0

2 years ago

1.0.8-beta.9

2 years ago

1.0.8-beta.8

2 years ago

1.0.8-beta.7

2 years ago

1.0.8-beta.6

2 years ago

1.0.8-beta.1

2 years ago

1.0.8-beta.0

2 years ago

1.0.5-beta.0

2 years ago

1.0.8-beta.5

2 years ago

1.0.8-beta.4

2 years ago

1.0.8-beta.3

2 years ago

1.0.8-beta.2

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago