diff --git a/README.md b/README.md index 04d524f..a589920 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Nginx cluster configurator - ncc -Manages the local nginx configuration and replicates changes to a backup. +Quality of life script for nginx and dehydrated. ## Features @@ -18,18 +18,30 @@ Manages the local nginx configuration and replicates changes to a backup. * Create a guide how to use it to intrawiki * Teach everybody how to use it... -# Build - -Run `build.sh` on a linux(-ish) machine. The output is a tarball `ncc.tar`. - # Installation -* Extract `ncc.tar` to a location on the server -* Copy configuration `config` to `/etc/ncc` and modify to suit your environment -* Add `/etc/ncc/ncc-hook.sh` as a hook to your `dehydrated` installation -* Add `ncc` to your `PATH` -* Optionally add shell completion: - * Bash: `_NCC_COMPLETE=bash_source ncc > /etc/bash_completion.d/ncc && . /etc/bash_completion.d/ncc` +* Install dependencies: nginx, keepalived (optional i guess), rsync, ssh, python3 +* Install `ncc` through pip (or pipx) from this git repository +* Create a `ncc.yml` file (see `ncc.yml.sample`) +* Create a base nginx config (in `conf_dir`): + + It should look like this: + ``` + conf/ + nginx.conf + sites/ + ... + dehydrated/ + dehydrated.sh <= you need to download dehydrated from github.com/dehydrated-io/dehydrated + config <= you don't have to configure anything, i recommend using AUTO_CLEANUP=yes + ... + ``` +* Register to CA with dehydrated (`./dehydrated.sh --register --accept-terms`) +* Optional (for `new` command): Create a `templates` folder inside `conf_dir` and create some templates. +* Deploy once with a valid configuration (like a default http server that will + serve `/var/www/dehydrated`), so that dehydrated will be able to deploy + challenges. +* Done. # Usage @@ -41,16 +53,14 @@ Usage: ncc [OPTIONS] COMMAND [ARGS]... MUST BE RAN ON MASTER (will detect automatically) Options: - --skip-master-check - --help Show this message and exit. + --help Show this message and exit. Commands: - autossl Renew SSL certificates and replicate changes - delete Delete a service - edit Edit a service - list List exsiting services and domain names associated with them - new Create a new service - reload Replicate the local config and reload the nginx cluster + edit Edit a site + list List all sites and the files they are located in + new Create a new site + test Run nginx -t on the configuration + up Deploy the configuration to the cluster ``` # Contributions