I found a good article on making money from writing ebooks at
The article describe how to find topic for ebook, make money from ebook by adding affiliate link to the ebook. The more people read the ebook,you will get more traffic to your web site or affiliate web sites.
One of the important things is never link directly to affiliate web site, always link to them through your web site so you can change the destination later if you wish to do so.
The post also describe how to get readers for you ebook by submitting it to ebook directory web sites. This take some time, but if you spend some time on doing this, you will see good result over time.