tacticalrmm icon indicating copy to clipboard operation
tacticalrmm copied to clipboard

Improvements to the installation script

Open sarog opened this issue 2 years ago • 3 comments

This first PR is part of a series of changes to refactor the installation script. It maintains its original functionality and does not break or go against the current method of installing TRMM.

Some of the changes in this PR include:

  1. Standardize variable names and abstract them as much as possible.
  2. Modularize script logic & flow by creating functions to eliminate duplicate code.
  3. Apply a consistent formatting style.
  4. Log installation to a file for troubleshooting purposes. ✅
  5. Eliminate the requirement of adding the tacticalrmm user to sudo. ✅

The long-term goals for modernizing the script are as follows:

  1. Improve code readability and allow some customization by the sysadmin.
  2. Allow automated installs for quick deployments (e.g. ./install.sh -args).
  3. Eliminate useless third-party dependencies, such as lsb-release.
  4. Branch out configuration files into separate files.
  5. Make the scripts portable so TRMM can be used on other operating systems besides Linux (and avoid bashism).

sarog avatar Jun 16 '22 18:06 sarog

Codecov Report

Merging #1176 (06d9fa2) into develop (7ac9af1) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 06d9fa2 differs from pull request most recent head 091aedc. Consider uploading reports for the commit 091aedc to get more accurate results

@@           Coverage Diff            @@
##           develop    #1176   +/-   ##
========================================
  Coverage    82.26%   82.26%           
========================================
  Files          113      113           
  Lines         7487     7487           
========================================
  Hits          6159     6159           
  Misses        1328     1328           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Jun 16 '22 19:06 codecov[bot]

There's already a previous PR in the works for major modifications to the install script.

Working on the same install.sh in different directions is going to have one path have to re-write/fix. Might want to see about collaboration working together on this...or the devs will have to pick a winner in the end

silversword411 avatar Jun 17 '22 03:06 silversword411

I'm aware of the previous contribution and open to collaborate, although our long-term goals are conflicting from the looks of it. I'm working to slim down the installer and make it portable without having to rely on additional components or dependencies. This means avoiding dialogs and keeping it simple. In my opinion, the installer is a one-time script to deploy TRMM, not a Swiss Army knife to manage the instance.

I prefer the project's lead developers choose what matters to them. It's also understandable if they do not wish to accept any contributions to the installer or related scripts at this time.

sarog avatar Jun 17 '22 13:06 sarog

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 19 '22 10:11 CLAassistant