One-Time Utility Execution

Run the delete_old_transaction_log.py script as a one-time job using the execute_on_pod.sh script in the MATRIXX Toolbox image and the docker run command.

The following example runs delete_old_transaction_log.py on a publishing pod selected at random from the pods in engine 1, sub-domain 1. The execute_on_pod.sh script makes 5 attempts to find a ready pod, pausing for 5 seconds between each attempt.

docker run --rm your_image_repository/matrixx-toolbox:version ./execute_on_pod.sh --mode random --labels mtx-class=engine,mtx-type=publ,engine=1,subdomain=1 --max-attempts 5 --sleep-time 15 su - mtx -c "delete_old_transaction_logs.py"

The following example initializes the Event Repository (outside of the Helm chart) on a ready pod chosen at random from the ready pods available on a mtx-0.mtx-svc.mongodb.svc.cluster.local host.

docker run --rm your_image_repository/matrixx-toolbox:version ./initialize_mongodb.sh --host mtx-0.mtx-svc.mongodb.svc.cluster.local --user admin --password password123

For more information about the execute_on_pod.sh script and other available utilities, see the discussion about the MATRIXX Toolbox image in MATRIXX Integration.