- Create a Vertica cluster on OpenStack Trove.
- Migrate some certain users and their tables to this newly created cluster from the cluster they currently sit on. This task can be broken down into following sequence tasks.
- Connect to the current Vertica cluster and export objects of those users into a sql file on the machine where the python program is executed.
- Transfer the sql file to the target Vertica cluster.
- Connect to the target Vertica cluster with the dbadmin credentials to create users and grant database privilege to them.
- Connect to the target Vertica cluster with each user's credentials to create their objects (schemas and tables) from sql file.
- Copy table data to the target Vertica cluster from the current Vertica cluster.
- troveclient: Call Trove Python API.
- python-vertica: Interact with Vertica server on the cluster.
- subprocess: Execute a command line on the local machine.
- paramiko: Execute a command line on the remote machine (i.e. virtual machines that host Vertica server on OpenStack)
3. As mentioned in the above section, one small task is to transfer sql file from the local machine to a remote machine (the target Vertica cluster). subprocess.check_call() is used.
This task requires the knowledge in the operating system, database system (i.e. Vertica), and Python. I am glad that I make it, since the growth always starts with small steps. There is still some space to optimize the code, which is what I will work on.