Modularize the upgrade logic out to scenarios