Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Add config_path param for unicorn resource #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hron
Copy link

@hron hron commented Apr 15, 2016

No description provided.

@dorongutman
Copy link

Can this be merged ?

@dorongutman
Copy link

@coderanger can this be merged please ?
You can see here the config file being passed as an argument to the cli unicorn command: https://unicorn.bogomips.org/unicorn_1.html

I cannot use unicorn (and therefor this cookbook) without passing it the config file.

@loren
Copy link

loren commented May 25, 2016

+1 I'm running into the same issue.

@coderanger
Copy link
Member

As a reminder: you can always make subclasses. No one should be blocked on this, just subclass my unicorn resource and make whatever changes you need. You can also use the poise_service_options helper to more explicitly override the command line for the generated service. +1s don't magically give me more time, and are not needed.

@dorongutman
Copy link

@coderanger as I asked before here and/or in the halite repo - since you're not using the normal/regular chef way of writing cookbooks, it's not that easy to make changes.
I've asked before - can you explain how will the subclassing work ? Don't I need Berkshelf to use the halite extension ?
If so - as I wrote in the halite repo - after following all the instructions and adding the `extension 'halite' to the berkshelf file, I'm getting an exception about the extension.

@loren
Copy link

loren commented May 26, 2016

I apologize @coderanger if I came across as impatient. I appreciate the work you have done on these cookbooks. I wasn't able to figure out how the subclassing would work, but your poise_service_options clue helped, so thank you.

@dorongutman, this is what I ended up doing to get it to work:

  unicorn
  poise_service_options '/srv/myapp' do
    command '/opt/ruby_build/builds/2.3/bin/ruby /opt/ruby_build/builds/2.3/bin/bundle exec /opt/ruby_build/builds/2.3/bin/ruby /srv/myapp/vendor/bundle/ruby/2.3.0/bin/unicorn -c config/unicorn.rb --port 8000 /srv/myapp/config.ru'
  end

@coderanger
Copy link
Member

Only semi-related but I wrote up a full example of using subclassing to fix this kind of issue without waiting for me https://gist.github.com/coderanger/962627150d3f3bd17bd2c8014260cee9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants