Deployment synchronization can be done using rsync, which is a file copying tool. These changes must be done in the manager node and in the same directory.
Create a file named
workers-list.txt, somewhere in your machine, that lists all the worker nodes in the deployment. The following is a sample of the file where there are two worker nodes.
Different nodes are separated by new lines.
If you have configured tenants in worker nodes, you need to add the
repository/tenantsdirectory of the worker node to the list to synchronize tenant space. For example, if the node
[email protected]needs to be synced with both the super tenant and the tenant space, the following two entries should be added to the
Create a file to synchronize the
<API-M_HOME>/repository/deployment/serverfolders between the manager and all worker nodes.
You must create your own SSH key and define it as the
pem_file. Alternatively, you can use an existing SSH key. For information on generating and using the SSH Keys, go to the SSH documentation. Specify the
manager_server_dirdepending on the location in your local machine. Change the
logs.txtfile path and the lock location based on where they are located in your machine.
Create a Cron job that executes the above file every minute for deployment synchronization. Do this by running the following command in your command line.
You can only run the Cron job on one given node (master) at a given time. If you switch the Cron job to another node, you must stop the Cron job on the existing node and start a new Cron job on the new node after updating it with the latest files.