How to allow HTTP traffic using chef cookbook?

Previously, I have installed nginx using chef cookbook. Then I did research about firewall rules. For allowing HTTP traffic I have below script.

firewall_rule 'http' do   port     80   protocol :tcp   position 1   command   :allow end 

But I am getting error

 NoMethodError: undefined method `firewall_rule' for cookbook: firewall, recipe: default :Chef::Recipe 

How can I resolve this? I did some research but no success.

Can we write a chef cookbook to enable epel repository on centos

I have configured 3 centos servers for chefworkstation, chefserver and chefclient. Now I want to install nginx using the cookbook. For that I have below script.

package 'nginx' do   action :install end 

This did not work because there were not enabled epel-release. Is there a way to enable epel repository before running above script?

Complex analysis cookbook? (Soft question)

After getting to the last part of complex analysis, our teacher had mentioned that to solve harder, more intricate looking complex analysis problems, there are usually “cookbook” methods for solving these problems, for example splitting up multiple piecewise contours with different function definitions based on their shapes or using special functions that transform into another function. Most research articles and even math stack exchange is good enough for these types of problems, but i was wondering if anyone knows of a cookbook, or a book with a set of methods specifically targeting complex valued functions (similar to how physicists have mathematical methods for physicists but broader), usually solving a complex integral? If this question is a duplicate, which i couldn’t find, please specifically note the book itself, thanks.