github vmstan/gravity-sync v3.1.0
3.1.0

latest releases: v4.0.7, v4.0.6, v4.0.5...
3 years ago

The Container Release

The premise of this release was to focus on adding better support for Docker container instances of Pi-hole. This release also changes a lot of things about the requirements that Gravity Sync has always had, which were not running as the root user, and requiring that the script be run from the user's home directory. Those two restrictions are gone.

You can now use a standard Pi-hole install as your primary, or your secondary. You can use a Docker install of Pi-hole as your primary, or your secondary. You can mix and match between the two however you choose. You can have Pi-hole installed in different directories at each side, either as standard installs or with container configuration files in different locations. Overall it's much more flexible.

Docker Support

  • Only the official Pi-hole managed Docker image is supported. Other builds may work, but they have not been tested.
  • If you are using a name for your container other than the default pihole in your Docker configuration, you must specify this in your gravity-sync.conf file.
  • Smart Sync, and the associated push/pull operations, now will send exec commands to run Pi-hole restart commands within the Docker container.
  • Your container configuration must expose access to the virtual /etc/pihole location to the host's file system, and be configured in your gravity-sync.conf file.

Example: if your container configuration looked something like like -v /home/vmstan/etc-pihole/:/etc/pihole then the location /home/vmstan/etc-pihole would need to be accessible by the user running Gravity Sync, and be configured as the PIHOLE_DIR (or RIHOLE_DIR) in your gravity-sync.conf file.

Installation Script

  • Detects the running instance of default Pi-hole Docker container image, if standard Pi-hole lookup fails. Pi-hole must still be installed prior to Gravity Sync.
  • Changes detection of root vs sudo users, and adapts commands to match. You no longer need to avoid running the script as root.
  • Only deploys passwordless SUDO components if deemed necessary. (i.e. Not running as root.)
  • Now automatically runs the local configuration function on the secondary Pi-hole after execution.
  • Deploys script via git to whatever directory the installer runs in, instead of defaulting to the user's $HOME directory.
  • Gravity Sync no longer requires that it be run from the user's $HOME directory.

Configuration Workflow

  • Overall, a simpler configuration function, as the online installer now checks for the dependencies prior to execution.
  • New users with basic Pi-hole installs will only be prompted for the address of the primary (remote) Pi-hole, an SSH user and then the SSH password to establish a trusted relationship and share the keyfiles.
  • Automatically prompts on during setup to configure advanced variables if a Docker installation is detected on the secondary (local) Pi-hole.
  • Advanced users can set more options for non-standard deployments at installation. If you are using a Docker deployment of Pi-hole on your primary (remote) Pi-hole, but not the system running Gravity Sync, you will need to enter this advanced mode when prompted.
  • Existing users with default setups should not need to run the config utility again after upgrading, but those with custom installs (especially existing container users) should consider it to adopt new variable names and options in your config files.
  • Creates a BASH environment alias to run the command gravity-sync from anywhere on the system. If you use a different shell (such as zsh or fish) as your default this may need to be added manually.

New Variables

  • REMOTE_FILE_OWNER variable renamed RILE_OWNER for consistency.
  • RIHOLE_DIR variable added to set different Pi-hole directory for remote host than local.
  • DOCKER_CON and ROCKER_CON variables added to specify different names for local and remote Pi-hole Docker containers.
  • PH_IN_TYPE and RH_IN_TYPE variables allow you to to either standard or Docker deployments of Pi-hole, per side.
  • DOCKER_BIN and ROCKER_BIN variables allow you to set non-standard locations for Docker binary files, per side.
  • Adds all variables to gravity-sync.conf.example for easy customization.

Removals

  • Support for sshpass has been removed, the only valid authentication method going forward will be ssh-key based.
  • If you've previously configured Gravity Sync using sshpass you will need to run ./gravity-sync.sh config again to create a new configuration file.

Bug Killer

  • Lots of long standing little buggles have been squashed.

Branding

  • I made a logo.

Don't miss a new gravity-sync release

NewReleases is sending notifications on new releases.