foreman_memcache 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +21 -2
- data/foreman_memcache.yaml.example +10 -0
- data/lib/foreman_memcache.rb +7 -4
- data/lib/foreman_memcache/version.rb +1 -1
- metadata +35 -71
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cbbefb90e7fb2376dac8358db4376be0fc1f486e
|
4
|
+
data.tar.gz: 3be1ec3983151162337951b5789a13398017e6c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0cd5240136586e86feab97271db3f90c32f7595e78fd43af451a54183ca12960cc4b45d182a02977e85c1d25056ebfde5d2809308c16397575492d7dad112b50
|
7
|
+
data.tar.gz: 96901c5478292cda7d7f2c239c0cb9165e7e1188a4b0cafe4c1a89c141c923225b6609c552f13b04079b4163c63a704193b2ac78560009d861ab549ab69390c3
|
data/README.rdoc
CHANGED
@@ -5,6 +5,25 @@ Adds memcache support for foreman (http://theforeman.org).
|
|
5
5
|
This Foreman plugin allows to use memcache as a cache storaged and session information.
|
6
6
|
this is useful when you want to deploy foreman across multiple servers and / or speed up foreman cache performance.
|
7
7
|
|
8
|
-
You
|
8
|
+
You will need to install a memcached instance to use this plugin.
|
9
9
|
|
10
|
-
|
10
|
+
## Configuration
|
11
|
+
|
12
|
+
By default, the plugin will enable memcache-based caching pointing to memcached on the local host.
|
13
|
+
|
14
|
+
The memcache host(s) and options can be changed by adding settings to `/usr/share/foreman/config/settings.plugins.d/foreman_memcache.yaml`, or Foreman's own `settings.yaml`.
|
15
|
+
|
16
|
+
Example config file:
|
17
|
+
|
18
|
+
```yaml
|
19
|
+
:memcache:
|
20
|
+
:hosts:
|
21
|
+
- cache-1.example.com
|
22
|
+
- cache-2.example.com
|
23
|
+
:options:
|
24
|
+
:namespace: foreman
|
25
|
+
:expires_in: 86400
|
26
|
+
:compress: true
|
27
|
+
```
|
28
|
+
|
29
|
+
The :options hash contains settings as per the [Dalli configuration reference](https://github.com/mperham/dalli#configuration). The namespace will default to 'foreman' unless specified.
|
data/lib/foreman_memcache.rb
CHANGED
@@ -2,10 +2,13 @@ module ForemanMemcache
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
isolate_namespace ForemanMemcache
|
4
4
|
initializer "setup_memcache", :before => :initialize_cache do |app|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
args = [:dalli_store]
|
6
|
+
if (s = SETTINGS[:memcache])
|
7
|
+
Array.wrap(s[:hosts]).each { |h| args << h }
|
8
|
+
args << { :namespace => 'foreman' }.merge(s[:options] || {})
|
9
|
+
end
|
10
|
+
Rails.logger.info "memcached cache backend enabled: #{args}"
|
11
|
+
app.config.cache_store = args
|
9
12
|
end
|
10
13
|
|
11
14
|
initializer "setup_memcache", :after => :load_config_initializers do |app|
|
metadata
CHANGED
@@ -1,100 +1,64 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_memcache
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Ohad Levy
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
prerelease: false
|
22
|
-
name: rails
|
23
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 21
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 2
|
32
|
-
- 13
|
33
|
-
version: 3.2.13
|
34
|
-
type: :runtime
|
35
|
-
requirement: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
prerelease: false
|
11
|
+
date: 2013-09-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
38
14
|
name: dalli
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
48
20
|
type: :runtime
|
49
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
50
27
|
description: adds memcache support to foreman
|
51
|
-
email:
|
28
|
+
email:
|
52
29
|
- ohadlevy@gmail.com
|
53
30
|
executables: []
|
54
|
-
|
55
31
|
extensions: []
|
56
|
-
|
57
32
|
extra_rdoc_files: []
|
58
|
-
|
59
|
-
files:
|
33
|
+
files:
|
60
34
|
- lib/foreman_memcache.rb
|
61
35
|
- lib/foreman_memcache/version.rb
|
62
36
|
- lib/tasks/foreman_memcache_tasks.rake
|
63
37
|
- MIT-LICENSE
|
64
38
|
- Rakefile
|
65
39
|
- README.rdoc
|
40
|
+
- foreman_memcache.yaml.example
|
66
41
|
homepage: http://theforeman.org
|
67
42
|
licenses: []
|
68
|
-
|
43
|
+
metadata: {}
|
69
44
|
post_install_message:
|
70
45
|
rdoc_options: []
|
71
|
-
|
72
|
-
require_paths:
|
46
|
+
require_paths:
|
73
47
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
none: false
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 3
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
version: "0"
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
92
58
|
requirements: []
|
93
|
-
|
94
59
|
rubyforge_project:
|
95
|
-
rubygems_version:
|
60
|
+
rubygems_version: 2.0.7
|
96
61
|
signing_key:
|
97
|
-
specification_version:
|
62
|
+
specification_version: 4
|
98
63
|
summary: Adds memcache integeration to foreman
|
99
64
|
test_files: []
|
100
|
-
|