How do I use Memcached?
Scalarium has a build-in memcached role. Just add this role and add any instance. If you use a Rails applicaiton, Scalarium will automatically provide the application with a memcached.yml configuration file in the config directory. Just read the Memcached server and port out of this file, e.g. in you environment.rb or production.rb:
$ cat config/environment.rb
Rails::Initializer.run do |config|
...
memcache_yml = File.dirname(__FILE__) + "/memcached.yml"
memcache_config = YAML.load(File.read(memcache_yml))[RAILS_ENV || 'development']
config.cache_store = [:mem_cache_store, "#{memcache_config['host']}:#{memcache_config['port']}"]
end
If you don't use Rails, you can re-configure your application using the information in the Chef attribute tree. An example attribute node can be found here.
-
FAQ
-
Applications
-
Basics
-
Custom Instance Setup
-
Deployment
-
Security
-
Auto Healing
-
Tutorials
- Tutorial: Customizing your Scalarium Cloud using Chef
- Customizing your Scalarium Cloud using Chef: The Scalarium Lifecycle System
- Customizing your Scalarium Cloud using Chef: Cooking with Chef
- Customizing your Scalarium Cloud using Chef: Writing a Cookbook to set up Redis
- Customizing your Scalarium Cloud using Chef: Configuring Custom Cookbooks
- View all (4 more)
-
Load Based Auto Scaling
-
Time Based Auto Scaling
-
API