hyperoslo / capistrano-foreman Goto Github PK
View Code? Open in Web Editor NEWCapistrano tasks for foreman and upstart.
License: MIT License
Capistrano tasks for foreman and upstart.
License: MIT License
Hey. I'm using this script to deploy an application that uses sidekiq onto Ubuntu 14.04 (so that means by default I get Upstart, for better or for worse 😉). Upon invoking foreman:export
, I end up with an upstart script that ends in:
exec su - rails-assets -c 'cd /home/my-app-user/rails-apps/my-app/releases/20160311190512; # ...
On the README, in the USAGE section, it seems like you're suggesting that exporting the Procfile like this is a one time deal and need not be done on every deployment. Is that right? I did this, and of course it worked and I didn't actually examine the Upstart script which was generated. But then after 5 deploys, my sidekiq stopped existing 💥 ❗
Personally, at the least, I think this should have clearer documentation (which of course I will be happy to add). But also, do you think that maybe by default having it export the current
(symlinked) path would be more intuitive?
Hey,
I have had a look through the code/merge requests/issues and there does not seem to be a way to set concurrency settings anymore. I seen it was added, but seems to have been removed throughout some commits, and all references to it seem to have disappeared,
Does anyone have any ideas on how i would set up concurrency? For example, i have a queue which i wish to have 3 instances of the workers listening on it.
Thanks
set :foreman_export_path, '/etc/init/sites'
imagine application name is dashboard
script is put in /etc/init/sites/dashboard.conf etc
To run it, we must do sudo start sites/dashboard etc
But the capistrano-foreman gem when it tries to run a script, it is using sudo start dashboard (forgetting the sites), hence it doesn't ever work.
Am I interpreting something incorrectly?
DEBUG [d8b623df] Command: cd /home/deploy/note_house/current && /usr/bin/env rvmsudo foreman export upstart /etc/init/sites --app="note_house" --log="/home/deploy/note_house/shared/log"
DEBUG [d8b623df] /usr/bin/env:
DEBUG [d8b623df] foreman
DEBUG [d8b623df] : No such file or directory
DEBUG [d8b623df]
Hello, I'm using the master branch. When I run foreman:restart
, capistrano will hang when prompting for sudo password.
Should we use foreman_sudo
here?
https://github.com/hyperoslo/capistrano-foreman/blob/master/lib/capistrano/foreman.rb#L28
At the moment this does not work with Capistrano v3
Gem is trying to execute foreman with bundle exec foreman. Fails in my machine and the server. Executing only foreman in the terminal works fine. This is an issue related with my configuration?
/bundler-1.10.6/lib/bundler/rubygems_integration.rb:292:in `block in replace_gem': foreman is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
I am getting this error while deploying.
I use:
capistrano (3.2.1)
capistrano-bundler (1.1.3)
capistrano-rails (1.1.2)
capistrano-rvm (0.1.2)
NoMethodError: undefined method `to_sym' for ["foreman"]:Array
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:49:in `block (3 levels) in <top (required)>'
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:48:in `each'
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:48:in `block (2 levels) in <top (required)>'
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-3.2.1/lib/capistrano/dsl/task_enhancements.rb:12:in `block in after'
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-3.2.1/lib/capistrano/application.rb:15:in `run'
/home/user/.rvm/gems/ruby-2.1.2@my_app/gems/capistrano-3.2.1/bin/cap:3:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.1.2@my_app/bin/cap:23:in `load'
/home/user/.rvm/gems/ruby-2.1.2@my_app/bin/cap:23:in `<main>'
/home/user/.rvm/gems/ruby-2.1.2@my_app/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-2.1.2@my_app/bin/ruby_executable_hooks:15:in `<main>'
Could you make it work with following foreman plugin?
https://github.com/lzgo/foreman-export-initscript
thanks!
I'm noting this here as I'm running into it with Capistrano v3. Not sure the best way to solve it yet. But the foreman:restart
task won't restart newly exported configurations as they have never been started yet (can't restart a job that was never started). Here is a Server Fault question outlining the problem: http://serverfault.com/questions/497114/upstart-restart-command-doesnt-load-new-updated-job-config-solr.
I wonder if it might be better to have the foreman:restart
task do a stop then start?
foreman:export
currently exports only a single process of each type. For example, given a Procfile
with the following expressions…
web: thin start
worker: resque work
… only one of each process will be exported to upstart. We should facilitate for configuring the concurrency of each process.
IMO bundler should (and can) be optional, because it's possible to install foreman without bundler.
It looks like SHA b3a71e8 breaks installing from Bundler. If capistrano-foreman
is pulled from git before Capistrano is installed, it failed to require capistrano/version
. It looks like it is due to the Gemspec at https://github.com/hyperoslo/capistrano-foreman/blob/master/capistrano-foreman.gemspec#L1 which now requires Capistrano when the gemspec is read by Bundler.
Hi, thanks for the wonderful work on this gem!
I sometimes find myself in the position where I want to stop/start my sidekiq or web worker without taking down the whole enchilada, any way these tasks could be parameterized to allow for that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.