efs2

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 6 Imported by: 0

README

Efs2

Don't you wish you could configure a server as easily as creating a Docker image? Meet Efs2, A dead simple configuration management tool that is powered by stupid shell scripts.

Efs2 is an idea to combine the stupid shell scripts philosophy of fss with the simplicity of a Dockerfile.

PkgGoDev Go Report Card Build Status Coverage Status

Efs2 by Example: NGINX

Let's take a look at how easy it is to configure an NGINX server.

The Efs2file

An Efs2file powers efs2's configuration; much like a Dockerfile, this file uses a simple set of instructions to configure our target servers.

# Install and Configure NGINX

# Run apt-get update
RUN apt-get update --fix-missing && apt-get -y upgrade

# Install nginx
RUN apt-get install nginx

# Deploy Config files
PUT nginx.conf /etc/nginx/nginx.conf 0644
PUT example.com /etc/nginx/sites-available/example.com 0644

# Create a Symlink
RUN ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com

# Restart NGINX
RUN systemctl restart nginx

The above Efs2file showcases how simple the Efs2 instructions are. Our NGINX server is configured with two simple instructions RUN and PUT.

The RUN instruction is simple; it executes whatever command you provide. The PUT instruction uploads files. That's it, that's all the instructions included with Efs2. Simple but effective.

Remote Execution

Efs2 uses SSH to execute the instructions specified within the Efs2file. Just run the Efs2 command, followed by the target hosts.

$ efs2 host1.example.com host2.example.com
Command Line Options
  -v, --verbose   Enable verbose output
  -q, --quiet     Silence output
  -f, --file=     Specify an alternative Efs2File (default: ./Efs2file)
  -i, --key=      Specify an SSH Private key to use (default: ~/.ssh/id_rsa)
  -p, --parallel  Execute tasks in parallel
  -d, --dryrun    Print tasks to be executed without actually executing any tasks
      --port=     Define an alternate SSH Port (default: 22)
  -u, --user=     Remote host username (default: current user)
      --passwd    Ask for a password to use for authentication

Installation

Efs2 is simple to install, with the fastest method being to download one of our binary releases.

It is also possible to install Efs2 with Go.

go get -u github.com/madflojo/efs2

Efs2file's In the wild

Add your examples above!

TODO

  • Recursive Directory support for PUT
  • Packaging for brew
  • Templating for uploads

Contributing

Thank you for your interest in helping develop Efs2. The time, skills, and perspectives you contribute to this project are valued.

Please reference our Contributing Guide for details.

Documentation

Overview

Don't you wish you could configure a server as easily as creating a Docker image? Meet Efs2, A dead simple configuration management tool that is powered by stupid shell scripts.

Efs2 is an idea to combine the stupid shell scripts philosophy of fss with the simplicity of a Dockerfile.

# Install and Configure NGINX

# Run apt-get update
RUN apt-get update --fix-missing && apt-get -y upgrade

# Install nginx
RUN apt-get install nginx

# Deploy Config files
PUT nginx.conf /etc/nginx/nginx.conf 0644
PUT example.com /etc/nginx/sites-available/example.com 0644

# Create a Symlink
RUN ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com

# Restart NGINX
RUN systemctl restart nginx

Directories

Path Synopsis
Package app is the main runtime package for Efs2.
Package app is the main runtime package for Efs2.
Package config is the internal configuration used for Efs2.
Package config is the internal configuration used for Efs2.
Package parser is a parser for Efs2files.
Package parser is a parser for Efs2files.
Package ssh provides users with a simple interface for remote execution over SSH.
Package ssh provides users with a simple interface for remote execution over SSH.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL