How to Promote a Slave to Master with CLI

To promote a Slave to Master without using Mashery Local Cluster Manager administrator, you can use Command Line Interface (CLI).

Copy the following code to a temporary file (for example, /tmp/promote_to_master.py):
import sys;
sys.path.append('/var/www/htdocs/service/mashery/cgi');
import Mashery;
Mashery.make_master()
Mashery.backup_mysql_server()
Then, execute the following command:
docker cp /tmp/promote_to_master.py ml-cm:/tmp
docker exec -it ml-cm python/tmp/promote_to_master.py