0.1.3 • Published 8 months ago

sr2 v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

SR_2

Simple runner for your scripts

GitHub repo

Utility allows to create simple interface for command execution to avoid long time onboarding

You can set road map of your app run and just run sr2 interfase

Installation

  npm i -g sr2

To use with ui web interface

  npm i -g sr2 sr2_ui

Link to the npm page of sr2_ui

Usage/Examples

To work with sr2 util you need to create sr2.json file

Example:

{
  "script 1": "echo script 1",
  "hello world": ["echo hello", "echo world"],
  "section": {
    "section script 1": "echo script 1",
    "section 1": {
      "section 1 script 1": "echo section 1 script 1",
      "section 1 script 2": "echo section 1 script 2"
    },
    "section script 2": "echo script 2"
  }
}

Run sr2 inside the folder with sr2.json file

image

Example with docker instalation instruction:

sr2.json file:

{
  "instalation": {
    "CentOS": {
      "remove old": "sudo yum remove docker \\ docker-client \\ docker-client-latest \\ docker-common \\ docker-latest \\ docker-latest-logrotate \\ docker-logrotate \\ docker-engine",
      "install": [
        "sudo yum install -y yum-utils",
        "sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo",
        "sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
      ],
      "start and verify": ["sudo systemctl start docker", "sudo docker run hello-world"]
    },
    "Ubuntu": {
      "remove old": "sudo apt-get remove docker docker-engine docker.io containerd runc",
      "install": [
        "sudo apt-get update", 
        "sudo apt-get install ca-certificates curl gnupg",
        "sudo install -m 0755 -d /etc/apt/keyrings",
        "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg",
        "sudo chmod a+r /etc/apt/keyrings/docker.gpg",
        "echo \\ \"deb [arch=\"$(dpkg --print-architecture)\" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \\ \"$(. /etc/os-release && echo \"$VERSION_CODENAME\")\" stable\" | \\ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null",
        "sudo apt-get update",
        "sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
      ],
      "start and verify": "sudo docker run hello-world"
    }
  },
  "post-instalation": {
    "create group and add user": ["sudo groupadd docker", "sudo usermod -aG docker $USER"],
    "run hello-world": "docker run hello-world"
  }
}

Result view:

image

image

0.1.2

12 months ago

0.1.3

8 months ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago