You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove Olric development Docker setup and simplify configs
Deleted the Dockerfile, related services, and configs used for development with Docker. Simplified Docker Compose configurations, updated images, and adjusted documentation to reflect these changes. This streamlines the setup while focusing on production usage.
olric_1 | 2020/08/12 15:53:19 [ERROR] Join attempt returned error: no peers found => olric.go:2
33
33
```
34
34
35
-
You can modify `olric-consul.yaml` file to try different configuration options.
35
+
You can modify `olric-server-consul.yaml` file to try different configuration options.
36
36
37
37
If Consul service works without any problem, you can visit [http://localhost:8500](http://localhost:8500) to monitor
38
38
cluster health.
39
39
40
40
### Accessing to the cluster
41
41
42
-
`nginx` service exposes port `3320` to access the cluster.
42
+
`nginx` service exposes port `3320` to access the cluster. You can list the cluster members with `CLUSTER.MEMBERS` command.
43
43
44
44
```
45
-
$ olric-stats -a localhost:3320 -m
46
-
This member: 172.18.0.4:3320
47
-
ID: 6755975864422107140
48
-
Birthdate: 1627807789014433806
49
-
50
-
Cluster coordinator: 172.18.0.5:3320
51
-
ID: 17571271894830874512
52
-
Birthdate: 1627807787904657773
53
-
54
-
All members:
55
-
56
-
Member: 172.18.0.6:3320
57
-
ID: 1896808979412278355
58
-
Birthdate: 1627807788577374417
59
-
60
-
Member: 172.18.0.5:3320
61
-
ID: 17571271894830874512
62
-
Birthdate: 1627807787904657773
63
-
64
-
Member: 172.18.0.4:3320
65
-
ID: 6755975864422107140
66
-
Birthdate: 1627807789014433806
45
+
$ redis-cli -p 3320
46
+
127.0.0.1:3320> CLUSTER.MEMBERS
47
+
1) 1) "172.18.0.9:3320"
48
+
2) (integer) 1745597203895069302
49
+
3) "true"
50
+
2) 1) "172.18.0.10:3320"
51
+
2) (integer) 1745597204061500052
52
+
3) "false"
53
+
3) 1) "172.18.0.11:3320"
54
+
2) (integer) 1745597204182767469
55
+
3) "false"
56
+
4) 1) "172.18.0.3:3320"
57
+
2) (integer) 1745597204275319219
58
+
3) "false"
59
+
5) 1) "172.18.0.6:3320"
60
+
2) (integer) 1745597204337977552
61
+
3) "false"
62
+
6) 1) "172.18.0.4:3320"
63
+
2) (integer) 1745597204369791844
64
+
3) "false"
65
+
7) 1) "172.18.0.12:3320"
66
+
2) (integer) 1745597204385693552
67
+
3) "false"
68
+
8) 1) "172.18.0.7:3320"
69
+
2) (integer) 1745597204523284927
70
+
3) "false"
71
+
9) 1) "172.18.0.13:3320"
72
+
2) (integer) 1745597204665281636
73
+
3) "false"
74
+
10) 1) "172.18.0.8:3320"
75
+
2) (integer) 1745597208386416971
76
+
3) "false"
67
77
```
68
78
69
-
Insert some keys:
79
+
Let's taste the DMap:
70
80
71
81
```
72
-
olric-benchmark -a 127.0.0.1:3320 -T put -r 1000 -s msgpack
82
+
$ redis-cli -p 3320
83
+
127.0.0.1:3320> DM.PUT test my-key my-value
84
+
OK
85
+
127.0.0.1:3320> DM.GET test my-key
86
+
"my-value"
87
+
127.0.0.1:3320>
73
88
```
74
89
75
-
### Develop & Test with Docker Compose
76
-
77
-
In order to test your local changes in a containerized environment, just run the following command:
78
-
79
-
```
80
-
docker-compose up olric-dev
81
-
```
82
-
83
-
`olric-dev` container includes Delve debugger.
84
-
85
90
## Service discovery
86
91
87
92
Olric provides a service discovery subsystem via a plugin interface. We currently have three service discovery plugins:
@@ -90,11 +95,11 @@ Olric provides a service discovery subsystem via a plugin interface. We currentl
90
95
*[olric-nats-plugin](https://github.com/justinfx/olric-nats-plugin): Nats-backed service discovery,
91
96
*[olric-cloud-plugin](https://github.com/olric-data/olric-cloud-plugin): Service discovery plugin for cloud environments (AWS, GKE, Azure and Kubernetes)
92
97
93
-
We use Consul plugin in this document:
98
+
We use the Consul plugin in this document:
94
99
95
100
### Consul
96
101
97
-
Consul is easy to use and proven way to discover nodes in a clustered environment. Olric discover the other nodes via
102
+
Consul is easy to use and a proven way to discover nodes in a clustered environment. Olric discover the other nodes via
98
103
[olric-consul-plugin](https://github.com/olric-data/olric-consul-plugin). Here is a simple payload for this setup:
99
104
100
105
```json
@@ -118,4 +123,4 @@ Consul is easy to use and proven way to discover nodes in a clustered environmen
118
123
Consul dials this port to control the node. `Address`, `ID` and `Check.TCP` fields is being filled by the plugin. You can still
119
124
give your own configuration values, if you know what you are doing.
120
125
121
-
Please check out `olric-consul.yaml` to see how to create an Olric cluster with Consul.
126
+
Please check out `olric-server-consul.yaml` to see how to create an Olric cluster with Consul.
0 commit comments