I have explained all the steps here , see If it helps.
I am created this package and currently using it, fully automated, no user interaction required.