Skip to content

Commit

Permalink
Merge pull request #113 from engineyard/FB-830-env-vars-memcached
Browse files Browse the repository at this point in the history
[FB-830] Enable memcached recipe with EY_MEMCACHED_ENABLED
  • Loading branch information
Dimitris authored Sep 2, 2019
2 parents 80bfe47 + 85090f1 commit a2d173f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions cookbooks/ey-base/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@

# custom recipes
depends 'redis'
depends 'memcached'
4 changes: 4 additions & 0 deletions cookbooks/ey-base/recipes/custom.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if fetch_env_var(node, "EY_REDIS_ENABLED") =~ /^TRUE$/i
include_recipe 'redis'
end

if fetch_env_var(node, "EY_MEMCACHED_ENABLED") =~ /^TRUE$/i
include_recipe 'memcached'
end
3 changes: 2 additions & 1 deletion cookbooks/memcached/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
# Install memcached on a utility instance named 'memcached'
#memcached['install_type'] = 'NAMED_UTILS'
memcached['utility_name'] = 'memcached'
memcached['install_type'] = 'NAMED_UTILS'

# Install memcached on all app instances, or on a solo instance
memcached['install_type'] = 'ALL_APP_INSTANCES'
# memcached['install_type'] = 'ALL_APP_INSTANCES'

# Amount of memory in MB to be used by memcached
memcached['memusage'] = 1024
Expand Down
6 changes: 2 additions & 4 deletions cookbooks/memcached/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
# Recipe:: default
#

if node['memcached']['perform_install']
include_recipe "memcached::install"
include_recipe "memcached::configure"
end
include_recipe "memcached::install"
include_recipe "memcached::configure"

0 comments on commit a2d173f

Please sign in to comment.