Skip to content

Commit

Permalink
Merge pull request #289 from calcium-machine/develop-catapult
Browse files Browse the repository at this point in the history
Update localDev base box and finalize iptables implementation.
  • Loading branch information
ssdevopsio committed Sep 19, 2015
2 parents 3b057bb + 1ef9104 commit 53f5c8b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 1.7.8
version: 1.8.0
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ Vagrant.configure("2") do |config|

# redhat localdev servers
config.vm.define "#{configuration["company"]["name"].downcase}-dev-redhat" do |config|
config.vm.box = "chef/centos-7.0"
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
config.vm.network "private_network", ip: configuration["environments"]["dev"]["servers"]["redhat"]["ip"]
config.vm.network "forwarded_port", guest: 80, host: configuration["environments"]["dev"]["servers"]["redhat"]["port_80"]
config.vm.provider :virtualbox do |provider|
Expand All @@ -1422,7 +1422,7 @@ Vagrant.configure("2") do |config|
config.vm.provision "shell", path: "provisioners/redhat/provision.sh", args: ["dev","#{repo}","#{configuration_user["settings"]["gpg_key"]}","apache","#{configuration_user["settings"]["software_validation"]}"]
end
config.vm.define "#{configuration["company"]["name"].downcase}-dev-redhat-mysql" do |config|
config.vm.box = "chef/centos-7.0"
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
config.vm.network "private_network", ip: configuration["environments"]["dev"]["servers"]["redhat_mysql"]["ip"]
config.vm.provider :virtualbox do |provider|
provider.memory = 512
Expand Down
2 changes: 1 addition & 1 deletion provisioners/redhat/apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo -e "\n==> completed in ($(($end - $start)) seconds)"

echo -e "\n\n\n==> Configuring IPTables"
start=$(date +%s)
#source /catapult/provisioners/redhat/modules/iptables.sh
source /catapult/provisioners/redhat/modules/iptables.sh
end=$(date +%s)
echo -e "\n==> completed in ($(($end - $start)) seconds)"

Expand Down
13 changes: 11 additions & 2 deletions provisioners/redhat/modules/iptables.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
redhat_ip="$(echo "${configuration}" | shyaml get-value environments.${1}.servers.redhat.ip)"
redhat_ip_private="$(echo "${configuration}" | shyaml get-value environments.${1}.servers.redhat.ip)"
if [ "${1}" == "dev" ]; then
redhat_ip="$(echo "${configuration}" | shyaml get-value environments.${1}.servers.redhat.ip)"
else
redhat_ip="$(echo "${configuration}" | shyaml get-value environments.${1}.servers.redhat.ip_private)"
fi

# establish default policies
sudo iptables --policy INPUT ACCEPT
sudo iptables --policy FORWARD ACCEPT
sudo iptables --policy OUTPUT ACCEPT
# remove all rules
sudo iptables --flush
# we're not a router
Expand Down Expand Up @@ -75,3 +82,5 @@ fi
sudo iptables --policy INPUT DROP
# output the iptables
sudo iptables --list
# persist the iptables rules and policies
sudo /sbin/service iptables save
2 changes: 1 addition & 1 deletion provisioners/redhat/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo -e "\n==> completed in ($(($end - $start)) seconds)"

echo -e "\n\n\n==> Configuring IPTables"
start=$(date +%s)
#source /catapult/provisioners/redhat/modules/iptables.sh
source /catapult/provisioners/redhat/modules/iptables.sh
end=$(date +%s)
echo -e "\n==> completed in ($(($end - $start)) seconds)"

Expand Down

0 comments on commit 53f5c8b

Please sign in to comment.