I want to automate the remote deployment which currently I am doing manually.
The process includes
- Make the tar ball from certain folders
- SFTP to the remote server
- Rename the old folders
- Untar the new tar file
- Restart apache
The remote system is on the intranet and has no access to the outside internet
I want to know how can I transfer the file from my python script and then when the transfer is complete then log into ssh and do stuff. I am confused about how can I achieve that. On localhost and I can do all that but how can I do that on a remote host?
For simple&dirty work you can use fabric (This by no means say that you cannot use fabric to build serious product)
For heavy configuration routines, you'd better pick a CMS (e.g., ansible)