GithubHelp home page GithubHelp logo

isabella232 / nonstop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leankit-labs/nonstop

0.0 0.0 0.0 210 KB

Bootstrapping service runner for nonstop

License: MIT License

JavaScript 100.00%

nonstop's Introduction

nonstop

Nonstop is a bootstrapper/service host that self-updates when new packages that match its configured parameters become available in the nonstop-index.

Configuration

Nonstop can be used either as a library or as a command line interface.

As a command, you can configure it via a bootstrap.json file and environment variables.

Note: environment variables take precendent over settings in the file.

Bootstrap file

Defaults are shown here. The index property provides information necessary to contact the package index. The package property allows you to specify filtering information for the package. You shouldn't need to set the architecture or platform as those are detected for you.

{
    "index": {
      "host": "localhost",
      "api": "/api",
      "frequency": 300000,
      "port": 4444,
      "ssl": false,
      "token": ""
    },
    "package": {
      "architecture": detected,
      "branch": "",
      "build": "",
      "owner": "",
      "platform": detected,
      "project": "",
      "releaseOnly": false,
      "version": "",
      "files": "./downloads"
    },
    service: {
      name: sysInfo.name,
      host: {
        ip: '',
        name: ''
      },
      port: {
        local: 9090,
        public: 9090
      },
      tolerance: 5000,
      failures: 1
    }
  }

Environment Variables

Group Variable Default
Index
INDEX_HOST "localhost"
INDEX_API "api"
INDEX_FREQUENCY 5000
INDEX_PORT 4444
INDEX_SSL false
INDEX_TOKEN ""
Package
PACKAGE_OWNER ``
PACKAGE_PROJECT ``
PACKAGE_BRANCH ``
PACKAGE_BUILD ``
PACKAGE_VERSION ``
PACKAGE__RELEASE_ONLY ``
PACKAGE_ARCHITECTURE detected
PACKAGE_PLATFORM detected
PACKAGE_FILES "./downloads"
service
SERVICE_NAME "service name"
SERVICE_HOST_NAME "service name"
SERVICE_HOST_IP "unspecified
SERVICE_PORT_LOCAL 9090
SERVICE_PORT_PUBLIC 9090
SERVICE_FAILURES 1
SERVICE_TOLERANCE 5000

Boot file - boot.yaml|boot.json

nonstop expects a boot file to be contained in any package it downloads which will provide the instructions for how it should start the packaged application. The files can be written in either JSON or YAML syntax.

The boot file consists of two sections: the service boot command and an optional pre-boot command set. The boot command simply tells nonstop how to start the packaged service while the optional pre-boot command set gets fed to drudgeon. Both the boot command and pre-boot commands are expressed using drudgeon's command syntax since it has a flexible means of supporting command and command set variation across platforms.

Note: these examples are super arbitrary and should not be used to infer how you would actually create steps for an actual thing.

JSON

{
  "boot": "node ./src/index.js",
  "preboot": {
    "one": {
      "win32": "gulp check-windows",
      "*": "gulp check"
    },
    "two": "node prep"
  }
}

YAML

boot: "node ./src/index.js",
preboot:
  one:
    win32: "gulp check-windows"
    *: "gulp check"
  two: "node prep"

nonstop's People

Contributors

arobson avatar dcneiner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.