move all the config push code into common lib function