Automatic-Update-Launcher - A general purpose updater for updating program binaries when update folder exists

Automatic Update Launcher

A general purpose updater for updating (web) applications server when update folder exists

What is this?

The Automatic update launcher only do one simple task, which is to upgrade your application to the latest version if it finds a later version of such application in the ./updates folder.

Its logic basically goes like this

  1. If updates/ folder exists
    1. Backup the old application files and data
    2. Copy the updates for application from updates folder to current folder
    3. Remove the updates folder
  2. Start the application
  3. Check for crash, if crash happens after update
    1. Restore the old application files and data
    2. Remove the backup folder
  4. Restart the whole process unless crash retry count > max allowed

Build

Require Go 1.17 or above

go mod tidy
go build

or just grab a copy from the release page.

Usage

Configure the launcher with launcher.json. See the example below

{
    "version":"1.0",
    "start":"helloworld*",
    "backup": ["./*.config","./*.exe"],
    "verbal": true,
    "resp_port": 25576,
    "max_retry": 3,
    "crash_time": 3
}
Key Usage
Version Launcher version
Start Start path, support wildcard, will start the first matching file
Backup Files to be backed up before updates, will put into app.old
Verbal Show launcher verbal message, use for debugs
Resp_port The port for response check in application. See "Check Launcher" section for more information
Max_retry Max retry before restoring from old application backup
Crash_time The time difference for start to exit is less than this value, the application is assume crashed

Check Launcher in Application

If your application needs to check if the launcher exists, you can create an HTTP GET request to the http://localhost://{resp_port}/chk endpoint to see if there are any response from the launcher. The launcher will response with a text message matching the pattern Launcher v" + launchConfig.Version

Owner
Toby Chui
Both Software and Hardware developer, focus in Cloud Desktop Environment, Web 3D, IoT and open source projects (`・ω・´)
Toby Chui
Similar Resources

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

Introduction General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game. Features Compatible with a

Aug 19, 2022

The missing package manager for golang binaries (its homebrew for "go install")

Bingo: The missing package manager for golang binaries (its homebrew for "go install") Do you love the simplicity of being able to download & compile

Oct 31, 2022

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions required!

A cross-platform package manager for the web! Add, remove, and manage different versions of web-distributed software binaries. No elevated permissions

Nov 21, 2022

Gola is a Golang tool for automated scripting purpose

Gola Gola is a Golang tool for automated scripting purpose. How To Install You can find the install script here. Example Configuration commands: - n

Aug 12, 2022

This simple service's purpose is to expose data regarding a vehicle fleet

A Small API This simple service's purpose is to expose data regarding a vehicle

Dec 16, 2021

Prevent Kubernetes misconfigurations from ever making it (again 😤) to production! The CLI integration provides policy enforcement solution to run automatic checks for rule violations. Docs: https://hub.datree.io

Prevent Kubernetes misconfigurations from ever making it  (again 😤) to production! The CLI integration provides policy enforcement solution to run automatic checks for rule violations.  Docs: https://hub.datree.io

What is Datree? Datree helps to prevent Kubernetes misconfigurations from ever making it to production. The CLI integration can be used locally or in

Jan 1, 2023

Testcontainers is a Golang library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.

When I was working on a Zipkin PR I discovered a nice Java library called Testcontainers. It provides an easy and clean API over the go docker sdk to

Jan 7, 2023

A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.

Grafana Dashboard Synchronization Backend Plugin A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instance

Dec 23, 2022

Docker Swarm Ingress service based on OpenResty with automatic Let's Encrypt SSL provisioning

Ingress Service for Docker Swarm Swarm Ingress OpenResty is a ingress service for Docker in Swarm mode that makes deploying microservices easy. It con

Jun 23, 2022
Aws asg updater - Update AMIs within AWS Auto Scaling groups automatically.

AWS Auto Scaling Groups Updater AWS Auto Scaling group is a great way of managing Amazon EC2 instances. AWS Auto Scaling group watches the correspondi

Oct 7, 2022
A general purpose cloud provider for Kube-Vip

kube-vip-cloud-provider The Kube-Vip cloud provider is a general purpose cloud-provider for on-prem bare-metal or virtualised environments. It's desig

Jan 8, 2023
General-purpose actions for test and release in Go

go-actions This repository provides general-purpose actions for Go. setup This action runs actions/setup-go with actions/cache. For example, jobs: l

Nov 28, 2021
Use this program to embed sh scripts in binaries

sh2bin Use this program to embed sh scripts in binaries. Feel free to fork this

Jan 4, 2023
A docker image and a launcher to run sasm on Windows and MacOS
A docker image and a launcher to run sasm on Windows and MacOS

Sasm-docker Sasm-docker simplifies the setup and use of SASM by running it inside a docker container and using x11 (X Window System) in order to displ

Nov 14, 2022
Lxc instance launcher and lxc instance management

This project consists of two components: lxc instance launcher. lxc instance management.

Dec 13, 2021
This action prints "true" if image is required to update based on the base image update.

container-image-updater This action prints "true" if image is required to update based on the base image update. Inputs Name Type Description base-ima

Apr 15, 2022
A live-updating version of the UNIX wc command.
A live-updating version of the UNIX wc command.

lwc A live-updating version of the UNIX wc command. Installation You can get a prebuilt binary for every major platform from the Releases page. Just e

Jul 26, 2022
Undock - Extract contents of a container image in a local folder
Undock - Extract contents of a container image in a local folder

About Undock is a CLI application that allows you to extract contents of a conta

Jan 4, 2023
Count total LoC in a given folder, recursively.

GoLoc A simple CLI tool to calculate the total LoC of a given directory. Usage goloc Flags Flag Description --use-gitignore Use your .gitignore file a

Apr 27, 2022