Install an OS designed to be scripted from the ground up, then use that to netinstall your routers. One of many possible expressions of this basic philosophy is
this article.
This is meant as inspiration, not prescription. No one here is going to design your automated deployment system for you and give it to you as a recipe meant to be followed slavishly. Take these ideas and work out what works for you.