π§° Administrative Tools
πOverview
Administrative Tools Are Linux bash script installed in each component at a directory of the following structure
The Tools Perform functions As below:
π οΈ Update & Rollback Scripts
Update scripts are used to pull and apply the latest version of a component from a versioned list stored on Amazon S3. The update process checks if the currently installed version is outdated and only performs an update when necessary.
Rollback scripts are designed to revert any changes made during the update process. This ensures that the component can return to a known working state if an update fails or causes issues.
Note
Updates will automatically store a local copy or archeived backup for rollbacks if needed
πΎBackup Scripts
Backup scripts are responsible for archiving critical server configuration and storing it in a structured way under the /backup directory.
π» Shell Scripts
Shell scripts provide CLI interfaces to interact with running services, such as databases, Docker containers, or other system components. These scripts securely inject credentials using environment secrets or configuration management tools.
π§ Utility Scripts
Utility scripts are designed to automate recurring or essential maintenance operations. These scripts are typically run on a schedule (e.g., via cron) or triggered by system events, and can modify configurations or manage system resources proactively.
Note
Some Script are for Background Tasks or to support the action of other scripts. These will not be discussed in this section.
π EdgeHit Controller Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/edgehit/EdgeHit-Controller/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |
πΎ Backup Scripts
| Script Name | Description |
|---|---|
db-backup.sh |
Stores a PostgreSQL database backup (gzip) at /usr/local/edgehit/EdgeHit-Controller/bak/db/ |
db-restore.sh |
Restores the PostgreSQL database from a previously stored backup. |
π» Shell Scripts
Note
In test Environment, you can you the deployed Adminer and P3x to access the Databases in a more user-friendly way isntead of using CLI view.
| Script Name | Description |
|---|---|
acme.sh |
Opens a shell session inside the acme container. |
EdgeHit-Controller-shell.sh |
Opens a shell inside the API server container. |
edgehit-gui-shell.sh |
Opens a shell inside the GUI server container. |
psql.sh |
Opens a Postgre-CLI inside the PostgreSQL container. |
redis-cli.sh |
Opens a Redis-CLI inside the Redis (default) container. |
configdb-cli.sh |
Opens a Redis-CLI inside inside the Redis (config-db) container. |
clickhouse-client.sh |
Opens a Clickhouse-CLI inside the ClickHouse container. |
π§ Utility Scripts
| Script Name | Description |
|---|---|
__clickhouse-drop_unused_tables.sh |
Drops unused tables from ClickHouse. |
clickhouse-schedule-once.sh |
Triggers a scheduled task manually on ClickHouse. |
acme-add-domain.sh |
Adds a new domain to the ACME SSL certificate setup. |
pg_dump.sh |
Creates a PostgreSQL dump into STDOUT of current terminal. |
π EdgeHit Scripts
Note
EdgeHit includes many scripts located in subdirectories under /usr/local/*. This is because EdgeHit is installed directly on the host system rather than using a container-based approach.
However, administrators only need to use the scripts located in the directory below, as these act as entry points and internally chain to other necessary scripts.
Tip
There are no rollback script in EdgeHit as it is not based on container installation
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
pkg-upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
pkg-info |
Print EdgeHit installation information |
pkg-clean-install.sh |
Perform a clean installation via removing the existing EdgeHit package and re-install |
π§ Utility Scripts
| Script Name | Description |
|---|---|
upgrade-geoip2.sh |
Update Geo-IP Service Component in EdgeHit. Will also check for EdgeHit DNS server role and chain load the corresponding script to upgrade this component in EdgeHit DNS |
svc-all.sh |
Restart all system serviced registered by EdgeHit. Will also Restart EdgeHit DNS related service if EdgeHit DNS server role is detected |
π» Shell Scripts
important note
Shell Scripts in EdgeHit are stored in different locations due to direct host system based installation. Below shows the full path to each script under /usr/local/loadproxy/.
| Script Name | Description |
|---|---|
EdgeHit-cache-db/bin/EdgeHit-cache-db-cli.sh |
Opens a Redis-CLI to Redis (cache-db) local instance. |
EdgeHit-config-db/bin/EdgeHit-config-db-cli.sh |
Opens a Redis-CLI to Redis (config-db) local instance. |
EdgeHit-unbound/bin/unbound-control.sh |
Opens a Shell inside the Unbound container. |
π EdgeHit DNS Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/loadproxy/EdgeHit-DNS/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |
π§ Utility Scripts
| Script Name | Description |
|---|---|
upgrade-ip2.sh |
Upadate Geo-IP Service Component in EdgeHit DNS via checking latest version from s3 bucket |
π Prometheus Server Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/edgehit/prometheus/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |
π» Shell Scripts
| Script Name | Description |
|---|---|
acme.sh |
Opens a shell session inside the acme container. |
π§ Utility Scripts
Tip
The edge-target.sh is used in Provision Add Load Proxy as Prometheus Target
| Script Name | Description |
|---|---|
acme-add-domain.sh |
Adds a new domain to the ACME SSL certificate setup. |
edge-target.sh |
Adds target configuration to the Node job in Prometheus COnfig, which uses the Load-Proxy HTTP-AUTH value |
πͺ§ LoadUp-CP Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/loadup/loadup-cp/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |
πΎ Backup Scripts
| Script Name | Description |
|---|---|
db-backup.sh |
Stores a MySQL database backup (gzip) at /usr/local/loadup/loadup-cp/bak/db/ |
db-restore.sh |
Restores the MySQL database from a previously stored backup. |
π» Shell Scripts
| Script Name | Description |
|---|---|
acme.sh |
Opens a shell session inside the acme container. |
loadup-api-shell.sh |
Opens a shell session inside the API server container. |
mysql.sh |
Opens a MySql-CLI session inside the mysql container. |
redis-cli.sh |
Opens a Redis-CLI session inside the redis container. |
π§ Utility Scripts
| Script Name | Description |
|---|---|
acme-add-domain.sh |
Adds a new domain to the ACME SSL certificate setup. |
mysqldump.sh |
Creates a MySQL dump into STDOUT of current terminal |
π· LoadUp-Worker Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/loadup/loadup-worker/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |
π» Shell Scripts
| Script Name | Description |
|---|---|
redis-cli.sh |
Opens a Redis-CLI session inside the redis container. |
π AnyCast-HealthCheck Scripts
Note
Unlike any other component, Anycast-HealthChecker is not installed at /usr/local. It does not have Update Or Rollback Script. Instead, the Update and Rollback is done manually via running the installation script, as the installation script contain cleanup and update feature.
These Scripts are available in
π§ Utility Scripts| Script Name | Description |
|---|---|
dns-healthcheck.sh |
Sends DNS Request to local GDNSD Process to check EdgeHit DNS Status. |
http-healthcheck.sh |
Sends HTTP Request to local NGINX Process to check EdgeHit Status |
Note
The Script above is invoked automatically by registered system service anycast-healthchecker, users rarely need to execute them
π©Ί DNS-HealtchCheck Scripts
These Scripts are available in
π οΈ Update & Rollback Scripts
| Script Name | Description |
|---|---|
upgrade.sh |
Pulls the latest version from S3 and performs an update if new version is available. |
backup.sh |
Creates a snapshot (gzip) of the current configuration at /usr/local/loadup/loadup-worker/bak/full/ |
rollback.sh |
Reverts the system to the previous stable version using the backup. |