heavy_script

Bash script for managing Truenas SCALE applications, automatically update applications, backup applications datasets, open a shell for containers.

GPL-3.0 License

Stars
381

Bot releases are hidden (Show)

heavy_script - v2.5.0

Published by Heavybullets8 12 months ago

[Features]

  • Implemented helm command for starting Truecharts applications (official apps still utilize IX's API)
    • Resolves slow startup issues and ensures correct replica count on startup (CNPG Apps)
  • Verify apps existence prior to starting, stopping, restarting, and mounting (if app name was supplied by user)

[Bugfixes]

  • Resolved issue where applications occasionally entered post-processing in the STOPPED state, triggering a rollback
    • Now validates STOPPED state and attempts to start the application if necessary (Impact mainly on non-Truecharts Apps)
heavy_script - v2.4.1

Published by Heavybullets8 about 1 year ago

[Bugfixes]

  • Increase timeout for stopping apps to 250 seconds, from 150
  • Properly handle stopping and starting non-truecharts applications
  • Expand pull_replicas function to properly grab replicas from all application types
heavy_script - v2.4.0

Published by Heavybullets8 about 1 year ago

[Features]

  • Starting an app with HeavyScript will now unmount the app if it's mounted.
  • CNPG database dumps no longer stop deployments by default, allowing for continuous operation.

[Refactor]

  • The CNPG dump process has been refined to keep deployments running.
  • Opt-in to stop deployments during the dump using the stop_before_dump option in the config.ini file.
  • Your config files should have automatically updated to have this new section.
heavy_script - v2.3.1

Published by Heavybullets8 about 1 year ago

[Bugfixes]

  • Fix lifecycle operations during db dumps
  • Better error handing for db dumps

[Misc]

  • Change output of Backup Function to better differentiate between Snapshots and Database backups
heavy_script - v2.3.0

Published by Heavybullets8 about 1 year ago

[Features]

  • Directly specify an application using heavyscript pvc --mount/--unmount APPNAME.
  • Use ALL for unmounting all applications (not valid for --mount).
  • Unmount individual applications

[Logic Updates]

  • On command execution, all PVCs within a namespace will be mounted without individual selection, since the app remains inactive anyway.
  • Refined unmounting: target a specific application or opt for ALL to unmount all.
  • Removed the option to choose a pool, since that made no difference anyway, and caused unnecessary complications.

[Examples]
heavyscript pvc --unmount photoprism
heavyscript pvc --unmount ALL
heavyscript pvc --mount photoprism

[Notes]

  • Users can of course still see the menu if they decide not to pass an application name to --mount or --unmount or even pvc

[Bugfix]

  • Typo #128
    @thomaslaw
heavy_script - v2.2.0

Published by Heavybullets8 about 1 year ago

[Bugfixes]

  • DB Dump Handling: Introduced fixes to manage spaces in pool names for database dumps. #123.
  • Fixed --restart not producing an error when the application does not exist, or was not actually restarted

[Features]

  • Snapshot Management: Automated removal of snapshots that block updates. #124.
  • APT Flag Update: Create a --disable-apt flag to close down permissions of whats enabled in --apt #125.
  • App Handler Enhancement: Improved the app handler for simultaneous operations on multiple apps. EX: heavyscript app --stop ALL / heavyscript app --start nextcloud prometheus sonarr radarr #126.
  • Pod Interaction Upgrade: Introduced direct shell access and log viewing for pods. EX: heavyscript pod --shell nextcloud #127.
heavy_script - v2.1.3

Published by Heavybullets8 over 1 year ago

[Bugfixes]

  • Add CNPG condition to filtered apps check.
    • Fixes attempted rollbacks on CNPG applications during updates
heavy_script - v2.1.2

Published by Heavybullets8 over 1 year ago

[Bugfixes]

  • Suppress errors
  • Better verbose message for time to become active in update function
  • Abort "scale" jobs when starting applications
    • Fixes errors when starting various applications

[Contributions]
@malcolmcdixon

  • Helped me solve the lifecycle issues and handle abort operations logic

Lockszmith (on Discord)

  • Provided insight into the API and useful commands for finding the correct jobs to properly abort
heavy_script - v2.1.1

Published by Heavybullets8 over 1 year ago

[Bug Fix]

  • Start CNPG app if stopped during backup
  • Correctly use the stopAll for cnpg applications
heavy_script - v2.1.0

Published by Heavybullets8 over 1 year ago

  • Stop/Start with new stopAll checkbox in Truecharts, charts.
  • Improve message for heavyscript mount
  • Suppress false error after exiting container shell
  • Add in error message for when an applications fails to enter the desired state even after a rollback
  • Fix restart app function to accept multiple deployments
  • Typo @ctag
heavy_script - v2.0.2

Published by Heavybullets8 over 1 year ago

[Bugfix]

  • Do not exit if always auto update is set in the config and no other arguments are called.
heavy_script - v2.0.1

Published by Heavybullets8 over 1 year ago

[Hotfix]
-Independently assign replica values to each deployment in a namespace

    • Fixes CNPG that have multiple deployments, which returned multiple values when the current_replicas function was called
heavy_script - v2.0.0

Published by Heavybullets8 over 1 year ago

[Breaking Changes]

  • Command line was changed, meaning all cron jobs will need to be changed.
    • I understand the inconvenience of breaking changes, but this was necessary to break apart the large script.
  • Checkout the Github README for the new command line
  • Alternatively, type heavyscript --help to see the new sub functions, you can also type --help on any sub-function
    • heavyscript update -h
    • This will show the help page specific to the update sub function

[Features]

  • New config file for storing defaults of the script.
  • CNPG apps databases are backed up
  • Enable apt, kube API, helm, have all been added
  • Start, Stop, Restart have been updated to accept app names as an argument E.g.
    • heavyscript app --start authelia
  • All Flags now have long and short options
  • Show app/chart versions when an application has a pending major update

[Bugfixes]

  • pod shell and logs now can handle multi-replica applications
  • Stop app function can now handle CNPG applications
    • CNPG applications deployments will be scaled down, but still show ACTIVE in the GUI.
heavy_script - v1.10.0

Published by Heavybullets8 over 1 year ago

[Feature]

  • Restrict major version updates with --self-update unless --major is specified

To prepare for the upcoming major update, I have modified the --self-update behavior. Now, updating to a new major HeavyScript version requires the explicit use of the --major flag.

The new CLI is under development and can be found on the "args" branch. It will remain there until it's fully developed and tested. Feel free to test it out.

heavy_script - v1.9.0

Published by Heavybullets8 over 1 year ago

[Feature]

  • Add --dns -v option to show all pods of a namespace rather than just the main.

[Misc]

  • Add in allowed.sh file for possible future solution to cnpg and operator pods
heavy_script - v1.8.1

Published by Heavybullets8 over 1 year ago

(#88)

  • Introduce timeouts for CLI commands in the update function to prevent infinite execution when an app is unstoppable.

  • Fix the replica count variable in the start app function for better accuracy.

  • Exclude stopping Prometheus instances as they have proven to be impossible to stop during testing.

    • Prometheus cannot be mounted, stopped during an update, or rolled back
    • If you have the knowledge to fix this, reach out to me.
  • Force the script to finish downloading, then start executing (#87) @stdedos

  • heavyscript script updates (#86) @stdedos

heavy_script - v1.8.0

Published by Heavybullets8 over 1 year ago

[Features]

  • Add pool capacity in mount selection
    • Not that it really matters
  • Add Truenas SCALE v23 version of cli prune command
  • Add support for new Truecharts Postgres back-end

[Improvements]

  • Refactor DNS
  • Add a Utils folder where common function calls will be placed
  • Add a To-Do list to the Readme
  • Pressing "Enter" defaults to "No" for the "would you like to ... again" prompt
  • Replica count determines whether an application is submitted to post processing now
    • It is a better way to future proof more "external services"/"Cert Manager" type applications that cannot be scaled.

[Bugfixes]

  • Fix typos (#80) @neoestremi
heavy_script - v1.7.0

Published by Heavybullets8 over 1 year ago

[Features]

  • Add color to DNS and Mount headers
  • Alternate colors in mount selection
  • Add Start app function
    • This does properly scale to the chosen replica amount in your chart config.

[Refactor]

  • Refactor app management file

[Bugfix]

  • Fetch all git information when entering self update function
    • Solves the issue where if a branch is deleted, it will only change to the latest local branch, rather than remote branch
heavy_script - v1.6.1

Published by Heavybullets8 over 1 year ago

[Bugfix]

  • Change to a proper gray color for the $gray variable, and the alternated color in DNS output (#69)
heavy_script - v1.6.0

Published by Heavybullets8 over 1 year ago

[Features]

  • Restart container image updates (applications that do not have a version change)

    • They are not restarted by default. Which means the update was not actually applied
    • Alternatively, turn off container image updates with --ignore-img
      ** WARNING: These updates are not sent to post processing, since they do not have a version to rollback to, there's no point.
    • So it's up to you if you'd like to take that risk. I have personally never had an application fail after a container image update, but its up to you.
  • Alternate Colors in DNS output, for better readability

  • --self-update will now change to the latest tag if the branch was deleted

  • The one line install has changed to source .rc files so heavyscript can be used immediately

  • Added --stop-app --restart-app --delete-app, they all open a menu to do what you'd expect.

    • These can also be accessed with the menu

[Bugfixes]

  • Users with spaces in their pool names can now properly restore, and mount.

  • Undo option in script create (update apps) has been fixed

  • All direct comparisons have been changed to if statements, this will fix the error with non 0 exit codes occurring on a successful backup etc.