~niedbalski/charms/trusty/memcached/replication

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Jorge Niedbalski
  • Date: 2015-02-12 22:13:27 UTC
  • Revision ID: jorge.niedbalski@canonical.com-20150212221327-pubqhoqe1eq32hsa
[niedbalski] Added repcached support for enabling replication.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
The "3" in this case is an example, the `juju status memcached` will show you which machine number the service is running on so you can `juju ssh` to it.
20
20
 
 
21
# Replication
 
22
 
 
23
The charm uses the repcached patch ( http://repcached.lab.klab.org/ ), this patch has some limitations, as
 
24
the ability to just replicate between 2 nodes.
 
25
 
 
26
For enabling replication create a config.yaml file with the following content:
 
27
    ```yaml
 
28
    memcached:
 
29
        repcached: True
 
30
    ```
 
31
 
 
32
Then deploy a maximum of 2 units of memcached:
 
33
 
 
34
    juju deploy -n 2 config.yaml memcached
 
35
 
 
36
**Caution** : As per design limitations, If you try to add another unit of memcached, this new unit will be marked
 
37
as failed unless you decide to disable repcached by using `juju set repcached=false memcached` and re-deploy the
 
38
unit as standalone.
 
39
 
 
40
### Removing a unit
 
41
 
 
42
Removing one of the cluster units, means remove replication, please disable replication first
 
43
and then remove the unit safely.
 
44
 
 
45
    juju set repcached=false memcached
 
46
    juju remove-unit memcached/0
 
47
 
 
48
 
 
49
### Removing replication
 
50
 
 
51
For turning the replication support off on memcached, you need to run the following command:
 
52
 
 
53
    juju set repcached=false memcached
 
54
 
 
55
 
 
56
 
21
57
## Example Usage
22
58
 
23
59
This charm can be used with other charms, in particular make note of [these possible relations](https://jujucharms.com/fullscreen/search/precise/memcached-7/?text=memcached#bws-related-charms)
26
62
 
27
63
## Scale out Usage
28
64
 
29
 
You can 
 
65
You can
30
66
 
31
67
    juju add-unit memcached
32
68
 
33
 
To add more units. Memcached doesn't share load, it's very simple and the clients have the intelligence to know which server to pick. 
 
69
To add more units. Memcached doesn't share load, it's very simple and the clients have the intelligence to know which server to pick.
34
70
 
35
71
## Known Limitations and Issues
36
72