CMS-4087 Introduce Repository

Added automatic init of repository if doesnt exist