- Table of Contents
- Introduction
- Core Scripts
- Environment Configuration Helper
- Useful Spring Boot Modules
Simi Sandbox is a developer-friendly toolkit for remote server management — enabling file transfer, command execution, and automated dependency setup.
Back to Top
Automates uploading files from ASSETS_ROOT to mapped remote paths, according to
rules in PROPERTIES_FILE.
Prerequisites:
sshpassis installed locally.- Make sure the current bash file has execution privileges:
chmod +x scripts/cpfiles.sh - Configure server variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
Examples (run directly for easy start, using default settings):
-
./scripts/cpfiles.shCopies
example1.txtto the remote directory~/examples, and copiesexample2.txtandexample3.txtfromscripts/AAA/assets/exampledirto the remote directory~/examples/targetdiron the test server. -
./scripts/cpfiles.sh ./scripts/AAA/assets/example-env.shUse the specified env configuration to copy
example2.txtandexample3.txtfromscripts/AAA/assets/exampledirto the remote directory~/examples/targetdir2on the test server.
Usage:
-
./scripts/cpfiles.sh [<env.sh>]You can define script options in a specified
env.shto override the default options in this script.
Script Options (variables in this script):
- USE_RSYNC : (true/false) Use
rsyncfor uploading instead ofscp. - USE_SUDO : (true/false) If true, these commands will be executed with sudo privileges on the remote machine.
Reminder: With sudo,~points to/root, not the current user's home. - SILENT : (true/false) If true, disables all overwrite confirmation prompts (auto-approve).
- PROPERTIES_FILE : Copies the folder contents or files corresponding to the keys in the properties file to the remote directories specified by the values.
- ASSETS_ROOT : The base directory where the relative paths (keys) from PROPERTIES_FILE are located.
Global Environment Variables:
- ROOT : The absolute path of the scripts directory.
Back to Top
This script executes a local bash file on the remote server.
Prerequisites:
sshpassis installed locally.- Make sure the current bash file has execution privileges:
chmod +x scripts/execr.sh - Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
Examples (run directly for easy start, using default settings):
-
./scripts/execr.sh ./scripts/AAA/assets/example-bash.shExecute the bash file
./scripts/AAA/assets/example-bash.shon your remote server.
Usage:
-
./scripts/exec.sh <local-bash-file-path>The first parameter
<local-bash-file-path>is a local Bash file, which will be executed directly on the remote server.
Script Options (variables in this script):
-
USE_RSYNC : (true/false) Use 'rsync' for uploading instead of 'scp'.
-
USE_SUDO : (true/false) If true, the bash script will be executed with sudo privileges on the remote machine.
In sudo mode, the script is first copied to the remote server before execution.
In non-sudo mode, it is executed directly on the remote server via SSH.
Reminder: With sudo,~points to/root, not the current user's home. -
SILENT : (true/false) If true, disables all confirmation prompts (auto-approve).
-
LOCAL_BASH_FILE : Local bash file to execute
-
REMOTE_TMP_BASH_FILE : The local bash script will be uploaded to this path on the remote server.
-
REMOTE_WORK_PATH : The working directory on the remote server where the script will be executed.
Global Env:
- ROOT : The absolute path of scripts directory.
Back to Top
This script safely patches a remote file on a server using one of two modes:
- Upload a local file and replace a target remote file.
- Recover the original remote file from a backup.
Steps (in patch mode):
- Upload a local file (
LOCAL_FILE) to a temporary location (REMOTE_UPLOAD_FILE) on the remote server. - Backup the target remote file (
REMOTE_FILE) to a backup path (REMOTE_BACKUP_FILE). - Overwrite the remote target file (
REMOTE_FILE) with the uploaded file.
Steps (in recover mode):
- Overwrite the current remote file (
REMOTE_FILE) with the backup (REMOTE_BACKUP_FILE).
Prerequisites:
sshpassis installed locally.- Make sure the current bash file has execution privileges:
chmod +x scripts/patchr.sh - Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
- [Optional] Create a file
~/examples/example-patch-remote.txton your remote server for testing purposes.
Examples (run directly for easy start, using default settings):
-
./scripts/patchr.shPatch remote file
~/examples/example-patch-remote.txtwith the local filescripts/AAA/assets/example-patch.txt -
./scripts/patchr.sh recoverRecover from backup
Usage:
-
./scripts/patchr.shPatch remote file
-
./scripts/patchr.sh recoverRecover from backup
Script Options (variables inside this script):
-
LOCAL_FILE : Path to the local file that will be uploaded.
-
REMOTE_UPLOAD_FILE : Remote file path where the local file will be uploaded.
-
REMOTE_FILE : The original remote file to be backed up before overwriting.
-
REMOTE_BACKUP_FILE : Path where the backup of REMOTE_FILE will be stored.
-
USE_RSYNC : (true/false) If true, use 'rsync' for uploading; otherwise use 'scp'.
-
SILENT : (true/false) If true, suppresses all confirmation prompts (auto-approve).
-
USE_SUDO : (true/false) If true, these commands will be executed with sudo privileges on the remote machine.
Reminder: With sudo,~points to/root, not the current user's home.
Global Env:
- ROOT : The absolute path of scripts directory.
Docker is a platform that enables you to package, distribute, and run applications in lightweight, portable containers. It ensures consistency across different environments. Docker Compose is a tool that helps define and manage multi-container Docker applications using a simple YAML file, allowing you to easily configure and run multiple services together.
Back to Top
Prerequisites:
- Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
Commands:
-
./scripts/execr.sh ./scripts/docker/install.shRun this command in the current project directory to install Docker and Docker Compose.
Example Success Output:
... [INFO] Docker installed successfully: Docker version 28.3.2, build 578ccf6 ... [INFO] Docker Compose installed successfully: Docker Compose version v2.38.2 [INFO] Installation complete.
Docker Desktop is an easy-to-install application that enables developers to build, share, and run containerized applications on Windows and Mac.
Back to Top
Docker Desktop is an easy-to-install application that enables developers to build, share, and run containerized applications on Windows and Mac.
Prerequisites:
- Open the Command Prompt with administrator privileges and navigate to the project root directory.
Commands:
-
call scripts\docker\install.batInstall Docker Desktop locally on your Windows machine.
LocalStack is a fully functional local AWS cloud stack emulator.
Back to Top
Prerequisites:
- Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
- Docker and Docker Compose have been installed on the remote server. (see Docker and Docker Compose / Installing on a Remote Linux Host).
Commands:
-
./scripts/cpfiles.sh ./scripts/aws/cpfiles-env.shRely on cpfiles.sh to transfer
scripts/aws/assets/docker-compose.ymlto/opt/sandbox/awson the remote server. -
./scripts/execr.sh ./scripts/aws/localstack-start.shStart LocalStack Service.
-
./scripts/execr.sh ./scripts/aws/localstack-stop.shStop LocalStack Service.
MailHog is a lightweight, easy-to-use email testing tool that acts as a local SMTP server.
Back to Top
Prerequisites:
- Docker Desktop is installed and running locally. (see Docker Desktop / Installing on Local Windows).
Commands:
-
call scripts\mailhog\start.batInstall and run the MailHog Docker image.
-
call scripts\mailhog\stop.batStop the MailHog Docker image.
SMTP server: http://localhost:1025
Web UI: http://localhost:8025
RocksDB is a high-performance embedded key-value store developed by Facebook.
It's optimized for fast storage, supports transactions, and is widely used in systems requiring low-latency data access.
Back to Top
Prerequisites:
- Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
Commands:
-
./scripts/execr.sh ./scripts/rocksdb/install.shInstall RocksDB.
-
./scripts/execr.sh ./scripts/rocksdb/uninstall.shUninstall script for RocksDB
Typesense is an open-source, fast, and easy-to-use search engine designed for building instant, typo-tolerant search experiences. It provides a simple API to index and search your data with minimal setup.
Back to Top
Prerequisites:
- Configure variables in
scripts/AAA/config/server.sh:- REMOTE_HOST
- REMOTE_USER
- REMOTE_SSH_PORT (default: 22)
- REMOTE_PWD
Commands:
-
./scripts/execr.sh ./scripts/typesense/install.shInstall Typesense.
Checkout RequestResponseLoggingFilter.java for more details.
WebFlux filter for logging request and response information.
Logs method, URI, safe headers, and truncated body for requests.
Optionally logs status, safe headers, truncated body, and duration for responses
based on the 'logging.response.enabled' property.
Handles GET requests, ensures response body is preserved, and logs response once.
Does not log client IP.