dkg-engine icon indicating copy to clipboard operation
dkg-engine copied to clipboard

Added mariadb support, Arch Linux support, always download latest fuseki, bug fix, checks added for node reinstallation, reduced verbosity

Open Valcyclovir opened this issue 3 years ago • 0 comments

Description

  • [x] Added MariaDB option as an alternative to MySQL

    • MariaDB replication performance is faster than MySQL
    • MariaDB is fully open source and supports a larger connection pool
    • For more comparisons, consult this link
  • [x] Added many options for sql installation

    • User can now choose between MySQL and MariaDB
      • Updating from MySQL to MariaDB is possible but not the other way around. However, since there is still a risk of migration issues, it is advised to stick to the same sql and migration is beyond the scope of this installer.
    • User can now validate their current sql password (if any)
    • User can check whether a operationaldb database exists and offers the option to remove or keep it
    • User can now update their current sql password
    • Added hidden password typing for security reasons and retyping password for confirmation
  • [x] Always install latest version of fuseki

    • Fuseki download would fail when new fuseki version is available. Added a workaround to always install the latest version available.
  • [x] Added several checks to avoid installer errors or file duplications on reinstalls

    • Checks whether otnode directory is present, offers the choice to remove or keep it
    • Checks whether a triplestore is installed, offers the choice to remove or keep it
  • [x] Added Arch Linux installation support.

    • The Arch Linux support still requires a file called archlinux to be added on the ~/ot-node/current/installer/data folder. I am missing rights to add this file. The content of that file would be: https://github.com/Valcyclovir/testnet/blob/main/archlinux
  • [x] Added several interactive sessions to let user decide to overwrite or keep existing node directory / triplestore / database

  • [x] Added instruction to source .bashrc and a list of added aliases at the end of installation

    • Current way to source .bashrc within the script will only source it within the subshell and will not work outside of it. source .bashrc will require manual intervention after the installation process
  • [x] Added publicIP to node config file for nodes behind a NAT

  • [x] Several installation text styling and code optimizations

  • [x] Reduced verbosity

    • the installation now works in 5 sections:
      • install prerequisites
      • install node directory
      • install triplestore
      • install sql
      • install node
    • Many other verbosity reduction across the script.

Codes are rearranged to their respective sections and put into functions to facilitate future changes.

A user who wishes to use the installer again for a reinstall should no longer encounter any errors - mainly operationaldb already exists error, or fuseki and ot-node directories already exist errors. Blazegraph.jar and aliases should also no longer replicate several times. The installer is now much more interactive giving the user more options and guidance with default values for each installation step. The user can now select specific parts to reinstall and skip the rest, such as reinstalling the ot-node directory only, changing from blazegraph to fuseki or any other future triplestore, upgrading from mysql to mariadb.

Fixes # (issue)

  • Fixed Blazegraph.jar duplications on each reinstall
  • Fixed installation error when operationaldb already exists from previous installation
  • Fixed fuseki and node directory already exist from previous installation
  • Fixed aliases duplications on reinstall
  • Fixed fuseki download fails when fuseki version updates

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] Test A
    • Tested several times choosing different installation options on a fresh Ubuntu 20.04 VM and a Ubuntu 22.04 VM.
  • [x] Test B
    • Tested on a preexisting node on Ubuntu 20.04
  • [x] Test C
    • Tested on Arch Linux based distribution EndeavourOS
  • [x] Test D
    • Several community members running different setups have engaged with the script and managed to get through the installation.

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

Valcyclovir avatar Aug 25 '22 18:08 Valcyclovir