diff --git a/vagrant/cookbooks/openstack-validator/recipes/default.rb b/vagrant/cookbooks/openstack-validator/recipes/default.rb index 60423d1..9f86dde 100644 --- a/vagrant/cookbooks/openstack-validator/recipes/default.rb +++ b/vagrant/cookbooks/openstack-validator/recipes/default.rb @@ -1,5 +1,6 @@ package 'redis-server' package 'python-pip' +package 'tmux' bash 'Install python dependencies' do code 'pip install -r requirements.txt' @@ -7,10 +8,14 @@ bash 'Install python dependencies' do end bash 'Run application' do - code 'killall /usr/bin/python' - code 'echo "webui: gunicorn --error-logfile /tmp/webui.log --log-level debug ostack_validator.webui:app --bind 0.0.0.0:8000" > ProcfileHonchoLocal' - code 'echo "worker: celery worker --app=ostack_validator.celery:app" >> ProcfileHonchoLocal' - code 'honcho -f ProcfileHonchoLocal start &' + code <<-EOS + echo "webui: gunicorn --log-level debug ostack_validator.webui:app --bind 0.0.0.0:8000" > ProcfileHonchoLocal + echo "worker: celery worker --app=ostack_validator.celery:app" >> ProcfileHonchoLocal + if ! tmux has-session -t dev; then + tmux new-session -d -s dev "honcho -f ProcfileHonchoLocal start" + fi + EOS + user 'vagrant' cwd '/vagrant' end