The best resource I know for learning how to write an ebook that serves a particular market and then promoting it in such a way that people will be compelled to buy it is Make Your Knowledge Sell. This is a downloadable ebook written by Ken Evoy and Monique Harris, two individuals who achieved incredible success with their ebooks, that takes you through every step of the process from outlining, to writing, to marketing your ebook. Even if you've already finished writing it, I recommend you read this resource. It is what I used to write my multiple award-winning book and ebook.