openshift/openshift-extras — pull request #390 by Miciah (2014-06-25 00:50:38+00:00)
Title: openshift.ks: Stop using lokkit

Declare `firewall_allow` as an associative array at the bottom of openshift.ks. Set protocol:port rules (e.g., udp:53) in this associative array wherever previously lokkit was used.

Add `configure_firewall` function, which disables lokkit and writes a basic ruleset to `/etc/sysconfig/iptables`.

Add `configure_firewall_add_rules`, which iterates over `${firewall_allow[@]}` and adds ACCEPT rules to `/etc/sysconfig/iptables` for the rules defined in `${firewall_allow[@]}`.

`configure_host`: Call `configure_firewall`.

`configure_openshift`: Call `configure_firewall_add_rules`.

`restart_services`: Restart the iptables service to pick up rules added to `/etc/sysconfig/iptables`.