All Projects → lazy-ants → remote-manager

lazy-ants / remote-manager

Licence: MIT license
This tool is intended for mass management and monitoring of remote servers. Getting information about the status of remote servers, analyze it, provide maintenance as easily as possible, extend for your needs.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to remote-manager

dashy
🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Stars: ✭ 7,103 (+26207.41%)
Mutual labels:  productivity
Jira-Hot-Linker
Jira Hot Linker
Stars: ✭ 36 (+33.33%)
Mutual labels:  productivity
Web Handover Handover
📋 국방업무공유체계 – 업무 인수인계 및 공유 플랫폼 (해군참모총장 수상작)
Stars: ✭ 13 (-51.85%)
Mutual labels:  productivity
pull-request-size
Applies labels to Pull Requests based on the total lines of code changed.
Stars: ✭ 98 (+262.96%)
Mutual labels:  productivity
CrackbookRevival
Chrome extension for discouraging the use of attention-sucking websites
Stars: ✭ 30 (+11.11%)
Mutual labels:  productivity
ZstdFortranLib
👨‍💻Zaak's 🧩(missing) 🏛Standard 🔬Fortran 📚Library 🚧(WIP)
Stars: ✭ 17 (-37.04%)
Mutual labels:  productivity
in-line-calculator
📟 an interface-less calculator for Windows
Stars: ✭ 44 (+62.96%)
Mutual labels:  productivity
zce-cli
A CLI tool for my personal productivity, Scaffolding tools move to zce/caz 👉
Stars: ✭ 36 (+33.33%)
Mutual labels:  productivity
MarvinAPI
API documentation for the Amazing Marvin productivity tool
Stars: ✭ 49 (+81.48%)
Mutual labels:  productivity
alfred-string-operations
Perform string operations to clipboard content
Stars: ✭ 70 (+159.26%)
Mutual labels:  productivity
fokus
Mobile application that helps kids complete their daily tasks under parental control
Stars: ✭ 21 (-22.22%)
Mutual labels:  productivity
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+4162.96%)
Mutual labels:  productivity
pc control
Remote control tool for laptop
Stars: ✭ 15 (-44.44%)
Mutual labels:  remote-control
workshop-sustainable-productivity
Workshop: the basics of stress, productivity, flow, focus, meditation and sustainability.
Stars: ✭ 20 (-25.93%)
Mutual labels:  productivity
World-Scribe
An Android app for fictional world-building
Stars: ✭ 31 (+14.81%)
Mutual labels:  productivity
omxremote
Remote control for omxplayer on raspberry pi
Stars: ✭ 13 (-51.85%)
Mutual labels:  remote-control
the-solo-developers-manifesto
This guide will help solo developers achieve what could be achieved by teams by God's mercy
Stars: ✭ 97 (+259.26%)
Mutual labels:  productivity
pinpoint
Keystroke launcher and productivity tool. macOS Spotlight and Alfred for Windows. Alternative to Wox.
Stars: ✭ 105 (+288.89%)
Mutual labels:  productivity
XTranslate
Easy translate text on web pages (chrome extension)
Stars: ✭ 64 (+137.04%)
Mutual labels:  productivity
eaf-linter
🤪 A linter, prettier, and test suite that does everything as-simple-as-possible.
Stars: ✭ 17 (-37.04%)
Mutual labels:  productivity

Remote Manager

Setup

0. Preparation

You need to install docker and optionally docker compose in order to use this tool.

1. Clone project

git clone [email protected]:lazy-ants/remote-manager.git
cd remote-manager

2. Initial setup

make init

or in case of updating in the future:

make update

3. Add server connection to the config

Open config.json with the editor of your choice and add server connections. It means "user@domain:port", however the port is optional.

4. Running configuration

With docker:

docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run app:validate-config

With docker-compose:

docker-compose run remote-manager ./run app:validate-config

Result

validate

5. Run you first command to see e.g. the server uptime

To test this setup run

With docker

docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run app:uptime

with docker composer:

docker-compose run remote-manager ./run app:uptime

Available commands

app:docker-compose-version

Get docket compose version

docker-compose

app:docker-prune

Prune old docker data

docker-prune

app:docker-ps

Show docker process status

docker-ps

app:kernel

Get server kernels

kernel

app:ls

Run ls command on all servers

Examples

  • app:ls default value, with -lha argumetns list the current directory
  • app:ls './ -la' list the current directory
  • app:ls '../ -la' list the up directory
  • app:ls '/ -la' list the root directory

ls

app:os

Get server OS

os

app:check-reboot

Checks whether a reboot is required Use option "--reboot" or "-r" to immediately reboot if required

reboot

app:system-info

  • note: [sudo required]
  • Get system information

system-info

app:ufw

  • note: [sudo required]
  • Get UFW status

system-info

app:upgrade

  • note: [sudo required]
  • Upgrade server packages

upgrade

app:uptime

Get server uptime

uptime

app:validate-config

Validate server instances config

validate

FAQ

Using tags

You can add to each server instance in the config.json tags, e.g.

{
  "instances": [
    {
      "name": "example.com",
      "connection-string": "[email protected]",
      "tags": "staging,client1"
    },
    {
      "name": "example.org",
      "connection-string": "[email protected]",
      "tags": "live,client1"
    },
    {
      "name": "example.net",
      "connection-string": "[email protected]",
      "tags": "staging,client3"
    }
  ]
}

and call every command with tags of servers you need:

app:uptime -t client1
app:uptime -t client2,staging

Login into console

If you want to login into the docker container:

reman-cli bash

Running command needed the sudo password

Prepare servers you want to manage:

First of all, you need a possibility to provide the sudo password in a secure way as an environment variable to your server (for sure in case you need the possibility of running commands with sudo). Therefore, On each server you want to manage edit

sudo nano /etc/ssh/sshd_config

add at the end of the config:

AcceptEnv PASSWORD

reload the sshd server e.g.

sudo service sshd reload

After that you either need to provide the sudo password in the .env.local file in case the most of your servers use the same sudo password or you can add in the config.json file in each configuration sectiona using the key "sudo-ppassword".

Adding aliases

In case you want to simplify using this tool you may want to add aliases.

In case you have OS specific options like "UseKeychain yes" on MacOS in your .ssh/config:

alias reman-cli='docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager'
alias reman-console='docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run'

Otherwise you can simple map the whole .ssh directory:

alias reman-cli='docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh:/root/.ssh remote-manager'
alias reman-console='docker run -it --rm -v "$PWD":/usr/src/remote-manager -v ~/.ssh:/root/.ssh remote-manager ./run'

Or if you prefer docker-compose:

alias reman-cli='docker-compose run remote-manager bash'
alias reman-console='docker-compose run remote-manager ./run'

Contributing

Remote Manager is an open source project. If you find bugs or have proposal please create issue or Pull Request

License

Copyright 2021 Lazy Ants

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].