GithubHelp home page GithubHelp logo

dpickford / runag Goto Github PK

View Code? Open in Web Editor NEW

This project forked from runag/runag

0.0 0.0 0.0 562 KB

💜 A shell library to deploy workstations and simple servers

License: Apache License 2.0

Shell 100.00%

runag's Introduction

Rùnag

💜 Rùnag is an attempt to make a shell-only library to deploy linux/macos/windows workstations and servers. Shell is used partially as a way to solve bootstrap problem having a freshly installed system and partially as an exercise in stoicism.

It probably won't help you to deploy some complex setups, but it can configure a pretty solid workstation and bootstrap some simple servers.

You are now looking at the repository which mostly contains a standard library. For the examples of what could be accomplished with the library please check "rùnagfiles", that resides in other repositories:

  • 💚 Rùnagfile to configure a workstation. It creates a computer that could be used for daily pursuits without much of an additional configuration and setup. It installs and configures software, identities and keys, configures a scheduled backup.

One-liner to deploy rùnag an a new machine

Linux

bash <(wget -qO- https://raw.githubusercontent.com/runag/runag/main/deploy.sh) [commands...]

MacOS

bash <(curl -Ssf https://raw.githubusercontent.com/runag/runag/main/deploy.sh) [commands...]

Commands:

add user/repo
run [function_name [function_arguments]]

Offline install

# create offline install
mkdir runag-offline-install && cd runag-offline-install
runag offline_runag_install::create_or_update

# install from it
bash deploy-offline.sh

Rùnagfile

You could make a file called runagfile and then run runag to execute commands from it. You could also have a directory called runagfile that must contain an index.sh file. You could organise the rest of the files in that directory at your convenience.

Possible rùnagfile locations are:

# in current working directory
./runagfile.sh
./runagfile/index.sh

# in users home directory
~/.runagfile.sh
~/.runagfile/index.sh

# inside of the collection of rùnagfiles that were added to a rùnag installation
~/.runag/runagfiles/*/index.sh

Interactive use or use in scripts besides rùnagfiles

You may load Rùnag into your interactive bash terminal or in your scripts with the . runag or source runag command.

API docs

Please refer to the source code for now.

Rùnag core

General utility

Interfacing with OS anv VMs

Managment of keys, passwords, and other secrets

Development

Networking and access to remote systems

API access to cloud services

Application deployment

Desktop applications

Miscellaneous tools

Environment variables

General

RUNAG_BIN_PATH

That variable is here to help you to generate scripts or systemd units that might need to use rùnag. Anywhere you put rùnag, the variable will reflect it actual location. If you put rùnag into your home directory them value will be "${HOME}/.runag/bin". You could use that file as an executable or you could source that file in your scripts.

RUNAG_VERBOSE

Could be set to "true"

SSH-related variables

REMOTE_CONTROL_MASTER

Session sharing is enabled by default in rùnag (except when running on Windows). By default ControlMaster will be set to "auto". To disable session sharing, set this to "no".

REMOTE_CONTROL_PATH

Path to the control socket. By default rùnag will use "${HOME}/.ssh/control-socket.%C".

REMOTE_CONTROL_PERSIST

To disable ControlPersist set this to "no". By default rùnag will use 600 seconds.

REMOTE_DIR

Remote directory to run script in.

REMOTE_ENV

Space-separated list of environment variable names, to be set in remote script with the values present in the calling rùnag instance at the moment of ssh call. For any provided names (or for absence of them), rùnag will internaly add "RUNAG_VERBOSE".

REMOTE_FORWARD_AGENT

Could be set to "true"

REMOTE_HOST

Host name, for example "example.com".

REMOTE_IDENTITY_FILE

Path to identity file, for example "${HOME}/.ssh/id_ed25519". By default rùnag will not provide any identity file path so ssh could use it's defaults.

REMOTE_KEEP_TEMP_FILES

Could be set to "true"

REMOTE_PORT

Port number. By default rùnag will not provide any port number so ssh could use it's defaults.

REMOTE_RECONNECT_DELAY

Integer (could be float but that depends on your sleep command implementation).

REMOTE_RECONNECT_TIME_LIMIT

Seconds, integer

REMOTE_SERVER_ALIVE_INTERVAL

Will set ServerAliveInterval. By default rùnag will set "20" as ServerAliveInterval. You could set this to "0" to tell ssh to disable server alive messages. You could set this to "no" then rùnag will not set that variable at all, thus ssh could potentially use a value from your ssh config file.

REMOTE_SSH_ARGS

Additional SSH arguments, array of strings, for example ("-i" "keyfile").

REMOTE_UMASK

Umask for remote commands

REMOTE_USER

User name. By default rùnag will not provide any user name so ssh could use it's defaults.

License

Apache License, Version 2.0.

Contributing

Please check CONTRIBUTING file for details.

runag's People

Contributors

drizzleword 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.