When installing the meshlet as a service, a command script will also be installed to allow you to issue commands to all meshlets installed on the same virtual machine. This way you don't have to individually start, stop or check the status of each meshlet individually.
NOTE: Encrypting configuration fields must be done as a separate step when the meshlet isn't running. Encrypting it while the meshlet is running will cause the encrypted fields to not be read properly.
Prerequisites
Each meshlet on the machine must be installed with the Multitenant Meshlet as a Service installation script.
Commands
The following commands can be executed:
For any meshlet installed using the Multitenant Meshlet as a Service installation script, you will be able to run commands against all the meshlets on the same machine installed as services with the installation script.
Open up a Command Prompt
To execute any of these commands, open up a Command Prompt and run as an Administrator. For example, type cmd in the Windows search window and right-click on Command Prompt and select Run as administrator.
Then go to where the installation script was extracted to where you will find the all-meshlet-service.bat script that you can use to issue commands against all meshlets on the machine installed as services.
Commands
NOTE: Encrypting meshlet configuration fields is not supported by the all-meshlet-service.bat to run against all meshlets since the script will not know where all the meshlets are installed. You will have to encrypt configuration fields for each meshlet following encrypting meshlet configuration fields.
To check the status of all meshlets (to see if they're running or not as services):
all-meshlet-service.bat status
To stop all the meshlets from running as services:
all-meshlet-service.bat stop
NOTE: Stopping all the meshlets will try to stop all of them even if they're not running. If a meshlet is not running as a service, an error message will be displayed and the process will continue on for the remaining meshlets.
To start running all the meshlets as services:
all-meshlet-service.bat start
NOTE: Starting all the meshlets will try to start all of them even if they're already running. If a meshlet is already running as a service, an error message will be displayed and the process will continue on for the remaining meshlets.
To restart all the meshlets as services:
all-meshlet-service.bat status
To uninstall all the meshlets as services:
all-meshlet-service.bat status
NOTE: This will only uninstall each meshlet's service (for running in the background) since the script will not know where all the meshlets are installed. The meshlets remain installed on the machine if you want to run any of them manually in the foreground.
For any meshlet installed using the Multitenant Meshlet as a Service installation script, you will be able to run commands against one installed meshlet service that will be applied to all the meshlets on the same machine also installed with the installation script.
These commands are issued using sudo /etc/init.d/psp-meshlet-<meshlet_service_name> where <meshlet_service_name> is the name as specified in the installation of one of the meshlets on the machine as a service.
Using the example psp-meshlet-jira-change-prod meshlet installed from Multitenant Meshlet as a Service installation script, the following commands can be run in your terminal against any one meshlet that will apply to all meshlets installed as a service on the machine.
NOTE: On occasion the terminal may get stuck running the command against the last meshlet (because of how Linux holds onto commands running applications in the background and issuing multiple commands at the same time) in which case you can press CTRL+C to return back to the terminal window prompt. This will not stop any action executed with the below commands.
To check the status of all meshlets (to see if they're running or not as services):
sudo /etc/init.d/psp-meshlet-jira-change-prod status-all
To stop all the meshlets from running as services:
sudo /etc/init.d/psp-meshlet-jira-change-prod status-all
NOTE: Stopping all the meshlets will try to stop all of them even if they're not running. This may take some time if you have a large number of meshlets on the machine as this command will try to forcibly stop each meshlet's process from running.
To start running all the meshlets as services:
sudo /etc/init.d/psp-meshlet-jira-change-prod start-all
NOTE: Since we won't know which meshlets are running and starting up a meshlet that's already running will cause errors with the newly started meshlet connecting to Perspectium MBS (because of conditions limiting one meshlet exclusive access to a queue), the start-all command will stop all meshlets first and then start them. This is similar to doing a restart-all for the meshlets and may take some time if you have a large number of meshlets on the machine.
To restart all the meshlets as services:
sudo /etc/init.d/psp-meshlet-jira-change-prod restart-all
To uninstall all the meshlets:
sudo /etc/init.d/psp-meshlet-jira-change-prod uninstall-all
NOTE: This will uninstall files for each meshlet as specified in Install / Uninstall and Run Multitenant Meshlet as a Service.
To encrypt the configuration file of each meshlet:
sudo /etc/init.d/psp-meshlet-jira-change-prod encrypt-all <config_folder>
where <config_folder> is the relative path for the meshlet configuration file (application-dev.yml) that must be the same in all meshlets.
For example, if your meshlets are installed as follows:
/opt/perspectium-meshlet-s1/
/opt/perspectium-meshlet-s2
/opt/perspectium-meshlet-s3
And in each meshlet directory, there is a config/application.dev.yml, then the relative path is config/application.dev.yml and is the same for all meshlets. In this case you would run the command:
sudo /etc/init.d/psp-meshlet-jira-change-prod encrypt-all config/application-dev.yml
It is recommended you make a backup of the meshlet configuration file before you encrypt.