Automatic application deployment in the cloud: From practice to theory and back