This Bash script is designed for deploying JeMPI locally with various options. It performs tasks such as installing Docker, SDKMAN, Java, Maven, and SBT, setting up the environment configuration, creating a Docker registry, pulling and pushing Docker images, initializing the Docker Swarm, building the entire stack, rebooting, restarting, tearing down, Backup & Restore Databases and destroying JeMPI.
-
Set JEMPI_HOME Environment Variable:
Location of file - JeMPI/devops/linux/docker/deployment File Name - local-deployment.sh export JAVA_VERSION=21.0.1-tem JEMPI_CONFIGURATION_PATH=$JEMPI_HOME/JeMPI_Apps/JeMPI_Configuration/reference/config-reference.json
-
Run the Script:
This script must be run from the following path and will not work if executed from a different location. Location of file - JeMPI/devops/linux/docker/deployment bash local-deployment.sh
-
Select an Option:
- Option 1: Deploy JeMPI (For Fresh Start).
- Option 2: Build and Reboot.
- Option 3: Restart JeMPI.
- Option 4: Down JeMPI.
- Option 5: Backup Postgres & Dgraph.
- Option 6: Restore Postgres & Dgraph.
- Option 7: Destroy JeMPI (This process will wipe all data).
- Option 8: Install Prerequisites..
Backup:
- Backup Directory:
JeMPI/devops/linux/docker/docker_data/data/backups/postgres
- The backup process creates a folder with a timestamp, and inside it, SQL files are generated for each database.
Restore:
- Users need to enter the folder name of the backup directory for Postgres to initiate the restore process.
Backup:
- Backup Directory:
JeMPI/devops/linux/docker/docker_data/data/backups/dgraph
- Dgraph backup process creates a folder with a timestamp, and inside it generate the Json file of data.
Restore:
- Users need to enter the folder name of the backup directory for Dgraph
Check if Docker is installed and install it if not.
Installs SDKMAN, Java, Maven, and SBT using SDKMAN.
Sets up hostname and IP address in the Hosts file.
Navigate to the environment configuration directory, run environment configuration scripts, and Docker helper scripts.
Runs JeMPI configuration with the specified configuration file path.
Check if the Docker Swarm is running and initialize it if not.
Creates a Docker registry, pulls Docker images from the hub, and pushes them to the local registry.
Builds and reboots the entire JeMPI stack.
Creates a database, builds the entire JeMPI stack, and reboots.
- The script prompts for user input to select an option.
- Confirmations are requested for critical actions.
- Use Ctrl+Y for "Yes" confirmation to Destroy all systems.
- Customize the script as needed for your specific deployment requirements.