diff --git a/chef/cookbooks/moz-security-monkey/recipes/default.rb b/chef/cookbooks/moz-security-monkey/recipes/default.rb index 8769e97..747e0dd 100644 --- a/chef/cookbooks/moz-security-monkey/recipes/default.rb +++ b/chef/cookbooks/moz-security-monkey/recipes/default.rb @@ -7,13 +7,17 @@ bash "install_moz_security_monkey" do #user "#{node['security_monkey']['user']}" user "root" umask "022" - cwd "/root/moz-security-monkey/moz-security-monkey/" + cwd "/opt/moz-security-monkey/moz-security-monkey/" code <<-EOF #{$virtualenv}/bin/python setup.py install EOF action :run end +link '/opt/secmonkey/moz_manage.py' do + to '/opt/moz-security-monkey/moz-security-monkey/manage.py' +end + template "#{node['security_monkey']['basedir']}/supervisor/moz_security_monkey.ini" do mode "0644" source "supervisor/moz_security_monkey.ini.erb" @@ -51,7 +55,8 @@ execute "create certificate" do end file "/etc/cron.daily/certbot" do - content "/bin/certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start" > /var/log/certbot.log 2>&1\n" + # content "/bin/certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start" > /var/log/certbot.log 2>&1\n" + content "/bin/certbot renew --post-hook "service nginx restart" > /var/log/certbot.log 2>&1\n" mode "0755" end diff --git a/cloudformation/mozilla-security-monkey-app.json b/cloudformation/mozilla-security-monkey-app.json index fe2c941..deaa490 100644 --- a/cloudformation/mozilla-security-monkey-app.json +++ b/cloudformation/mozilla-security-monkey-app.json @@ -406,14 +406,13 @@ "python /tmp/set-chef-secrets.py /opt/chef/nodes/node.json", "git clone https://github.com/gene1wood/chef-security-monkey.git security-monkey && cd security-monkey", "git checkout 5c2e39632b6de40d3a1c3a4493d4268bce250186", - "cd ~", + "cd /opt", "git clone https://github.com/gene1wood/moz-security-monkey.git moz-security-monkey && cd moz-security-monkey", "git checkout HEAD", + "cd ~", "BERKSHELF_PATH=/root/.berkshelf HOME=/root berks install --berksfile=/root/security-monkey/Berksfile", "BERKSHELF_PATH=/root/.berkshelf HOME=/root berks vendor --berksfile=/root/security-monkey/Berksfile /opt/chef/cookbooks", - "ln -s /root/security-monkey /opt/chef/cookbooks/security-monkey", - "ln -s /root/moz-security-monkey/chef/cookbooks/moz-security-monkey /opt/chef/cookbooks/moz-security-monkey", - "ln -s /root/moz-security-monkey/moz-security-monkey/manage.py /opt/secmonkey/moz_manage.py", + "ln -s /opt/moz-security-monkey/chef/cookbooks/moz-security-monkey /opt/chef/cookbooks/moz-security-monkey", "chmod 755 /opt/chef", "chef-client -z -c /etc/chef/client.rb -j /opt/chef/nodes/node.json --force-logger", " "