Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
feat(appserver): Switched default appserver from unicorn to puma
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Unicorn is no longer a default appserver, in favor of Puma. If you have a working
instances which were relying on that, you have to either set `app['appserver']['adapter'] =
'unicorn'` in your stack/layer JSON file, or switch the app server in your application
  • Loading branch information
ajgon committed Sep 14, 2016
1 parent bf59aef commit 0e72200
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -171,7 +171,7 @@ Configuration parameters for the ruby application server. Currently `Puma`,
`Thin` and `Unicorn` are supported.

* `app['appserver']['adapter']`
* **Default:** `unicorn`
* **Default:** `puma`
* **Supported values:** `puma`, `thin`, `unicorn`, `null`
* Server on the application side, which will receive requests from webserver
in front. `null` means no appserver enabled.
Expand Down
3 changes: 2 additions & 1 deletion attributes/default.rb
Expand Up @@ -37,7 +37,7 @@
# appserver
## common

default['defaults']['appserver']['adapter'] = 'unicorn'
default['defaults']['appserver']['adapter'] = 'puma'
default['defaults']['appserver']['application_yml'] = false
default['defaults']['appserver']['dot_env'] = false
default['defaults']['appserver']['preload_app'] = true
Expand All @@ -51,6 +51,7 @@
default['defaults']['appserver']['thread_max'] = 16

## thin

default['defaults']['appserver']['max_connections'] = 1024
default['defaults']['appserver']['max_persistent_connections'] = 512

Expand Down
6 changes: 3 additions & 3 deletions spec/unit/recipes/deploy_spec.rb
Expand Up @@ -131,7 +131,7 @@
solo_node.set['deploy'] = { 'a1' => {}, 'a2' => {} }
solo_node.set['applications'] = ['a1']
end.converge(described_recipe)
service_a1 = chef_run.service('unicorn_a1')
service_a1 = chef_run.service('puma_a1')

expect(chef_run).to create_directory('/srv/www/a1/shared')
expect(chef_run).to create_directory('/srv/www/a1/shared/config')
Expand All @@ -141,8 +141,8 @@
expect(chef_run).to create_directory('/srv/www/a1/shared/sockets')
expect(chef_run).to create_directory('/srv/www/a1/shared/vendor/bundle')
expect(chef_run).to create_template('/srv/www/a1/shared/config/database.yml')
expect(chef_run).to create_template('/srv/www/a1/shared/config/unicorn.conf')
expect(chef_run).to create_template('/srv/www/a1/shared/scripts/unicorn.service')
expect(chef_run).to create_template('/srv/www/a1/shared/config/puma.rb')
expect(chef_run).to create_template('/srv/www/a1/shared/scripts/puma.service')
expect(chef_run).to create_template('/etc/nginx/sites-available/a1.conf')
expect(chef_run).to create_link('/etc/nginx/sites-enabled/a1.conf')
expect(service_a1).to do_nothing
Expand Down

0 comments on commit 0e72200

Please sign in to comment.