Automate deployment

Automate deployment. Support both first deployment #137 and subsequent upgrades #138.

Might involve also partially:
 * reorganizing / simplyfing settings #146 
 * project template generator #149