for House rental agreement : rent a flat, write agreement, attest it in nearest Baladya in your flat area ( http://www.baladiya.gov.qa/cui/index.dox?id=585&siteID=2) >>> then you have it :)

for Family Visa, please check
1- http://www.qatarserv.com/en/?p=37
2- http://www.qatarliving.com/visas-permits/posts/guidance-step-step
3- http://goo.gl/CofOHz