3yd.sh -utility tool for managing Bare-Metal installation deployments
Description
3yd.sh is a versatile Bash utility script designed to simplify the management of a standalone Kubernetes cluster and streamline Helm deployments. This tool is particularly useful for system administrators who need an efficient way to handle operations, maintenance, troubleshooting and app management.
Introduced with LTS release 24.5.
Cluster Management:
./3yd.sh ps
- show 3YD pods status./3yd.sh psa
show all pods status ( including Kubernetes system pods )./3yd.sh update_kube_config
- Use this whenkubectl
responds with connection refused./3yd.sh clear_container_images <version>
- delete container images from older/unused versions
e.g./3yd.sh clear_container_images 24.5.1
Deployment Management:
./3yd.sh start
- start the 3YD application stack. If the helm-chart is deployed, it will give an error../3yd.sh stop
- Stop and Uninstall the Application stack../3yd.sh upgrade
- Upgrade the Application stack. If it's already running, upgrade the application stack to match current configuration.
Note: this will uninstall of the helm chart, it will wait for 45 sec to allow all pods to be terminate, and then it will installorder-management
helm-chart../3yd.sh upgrade_from_chart_folder
- for customised charts, you should update from thechart/order-management/
directory instead of the defaultorder-management-*.tgz
Data migration:
./3yd.sh load_site <local_dump_directory> <domain name>
- Import a Site dump.
e.g./3yd.sh load_site ./local_dump_directory print.example.com
./3yd.sh bootstrap
- Setup a bare minimum application
e.g./3yd.sh bootstrap print.example.com adminUsername adminPassword adminEmailAddress
Helper functions
./3yd.sh db_shell
- Shell into the PSQL database to run raw SQL queries../3yd.sh button3d_shell
- Shell into the button3d container../3yd.sh reset_db
- Drop all tables in the DB. Used beforeload_site
. This is to be done with caution!./3yd.sh creaate_admin
- create an admin user interactively./3yd.sh reset_password
- change a user password interactively./3yd.sh help | h | -h | --help
- for help and readme e.g:
Usage: ./3yd.sh <subcommand> [additional options]...
Cluster Management:
ps
- show 3YD pods status
psa
- show all pods status ( including Kubernetes system pods )
update_kube_config
- Use this when kubectl responds with connection refused
Deployment Management:
start
- start the 3YD application stack. If the helm-chart is deployed, it will give an error.
stop
- Stop and Uninstall the Application stack.
upgrade
- Upgrade the Application stack.
Note: this will uninstall and install the helm deployment.
upgrade_from_chart_folder
- for customised charts,
use the chart/order-management/ directory instead of the default order-management-*.tgz
Data migration:
load_site
- Import a Site dump.
e.g ./3yd.sh load_site ./local_dump_directory print.example.com
bootstrap
- Setup a bare minimum application
e.g ./3yd.sh bootstrap print.example.com adminUsername adminPassword adminEmailAddress
Helper functions and troubleshooting
db_shell
- Shell into the PSQL database to run raw SQL queries.
button3d_shell
- Shell into the button3d container.
reset_db
- Drop all tables in the DB. Used beforeload_site. This is to be done with caution!
create_admin
- create an admin user interactively
reset_password <username>
- change a user password interactively
e.g ./3yd reset_password demo-user1
debug
- Collect a debug package with logs for 3YD support.
Offload the 3yd-debug-dump-$TIMESTAMP.tar.gz archive and
send it to support@3yourmind.com
Please Note:
Options in <> are mandatory, options in [] are optional
Contributing
Contributions are welcome! Please submit your request for any features, bug fixes, or enhancements at support@3yourmind.com