step for persiting metadata and tenant in mongo