How to get the right runbook from server


I am deploying two web servers and one database server for my application. I use AWS cloud formation to deploy EC2 and chef-client and auto register to chef server, my question is :

how to the web server and database server can get the right Runbook or recipe automatically from chef server ?
how can i config the chef server ?

Thank you.