💜 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.
bash <(wget -qO- https://raw.githubusercontent.com/runag/runag/main/deploy.sh) [commands...]
bash <(curl -Ssf https://raw.githubusercontent.com/runag/runag/main/deploy.sh) [commands...]
add user/repo
run [function_name [function_arguments]]
# 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
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
You may load Rùnag into your interactive bash terminal or in your scripts with the . runag
or source runag
command.
Please refer to the source code for now.
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.
Could be set to "true"
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"
.
Path to the control socket.
By default rùnag will use "${HOME}/.ssh/control-socket.%C"
.
To disable ControlPersist
set this to "no"
.
By default rùnag will use 600
seconds.
Remote directory to run script in.
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"
.
Could be set to "true"
Host name, for example "example.com"
.
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.
Could be set to "true"
Port number. By default rùnag will not provide any port number so ssh could use it's defaults.
Integer (could be float but that depends on your sleep
command implementation).
Seconds, integer
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.
Additional SSH arguments, array of strings, for example ("-i" "keyfile")
.
Umask for remote commands
User name. By default rùnag will not provide any user name so ssh could use it's defaults.
Please check CONTRIBUTING file for details.