Update chef recipe to use new manage.py

This commit is contained in:
Gene Wood 2017-07-07 14:25:07 -07:00
Родитель dd8b89cb34
Коммит 7629821f69
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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",
" "