Skip to content

Conversation

alexchumak
Copy link

It will restart the server in a rails-app layer only. And will only write
application.yml if it is a rails app that is being deployed.

Ran into this problem when created a utility instance that was running delayed jobs only and wasn't part of rails app layer. I needed to set env variables for the delayed job to work but application.yml wasn't being written because the instance wasn't part of rails-app layer.

It will restart the server in a rails-app layer only. And will only write
application.yml if it is a rails app that is being deployed.
@joeyAghion
Copy link
Owner

Sorry for the delay @alexchumak.

We use this cookbook for utility/worker instances as well, but we take a slightly different approach. The recipes are factored apart such that non-app server layers could implement their own custom recipe, analogous to the opsworks_custom_env::configure recipe, to define their own restart command and invoke the opsworks_custom_env::write_config recipe to write out the application.yml file.

In both cases, a custom cookbook is required. I think I prefer our approach, since the declarations end up in one location (rather than relying on a particular sequence of custom recipes being set for the layer).

Thoughts?

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

Successfully merging this pull request may close these issues.

2 participants