Skip to content

Commit 0818e3b

Browse files
committed
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.
1 parent 9b5dca1 commit 0818e3b

File tree

5 files changed

+49
-98
lines changed

5 files changed

+49
-98
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See [Docker](#docker) and [Samples](#samples) sections to get started!
2323

2424
Join our [Discord server!](https://discord.gg/ahK7Vjr8We)
2525

26-
The current production version is [v0.6.0](https://github.com/olric-data/olric/tree/release/v0.5.0#olric-)
26+
The current production version is [v0.6.1](https://github.com/olric-data/olric/tree/release/v0.6)
2727

2828
### About renaming the module
2929

docker/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

docker/README.md

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -32,56 +32,61 @@ olric_1 | 2020/08/12 15:53:18 [DEBUG] memberlist: Stream connection from=17
3232
olric_1 | 2020/08/12 15:53:19 [ERROR] Join attempt returned error: no peers found => olric.go:2
3333
```
3434

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.
3636

3737
If Consul service works without any problem, you can visit [http://localhost:8500](http://localhost:8500) to monitor
3838
cluster health.
3939

4040
### Accessing to the cluster
4141

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.
4343

4444
```
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"
6777
```
6878

69-
Insert some keys:
79+
Let's taste the DMap:
7080

7181
```
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>
7388
```
7489

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-
8590
## Service discovery
8691

8792
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
9095
* [olric-nats-plugin](https://github.com/justinfx/olric-nats-plugin): Nats-backed service discovery,
9196
* [olric-cloud-plugin](https://github.com/olric-data/olric-cloud-plugin): Service discovery plugin for cloud environments (AWS, GKE, Azure and Kubernetes)
9297

93-
We use Consul plugin in this document:
98+
We use the Consul plugin in this document:
9499

95100
### Consul
96101

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
98103
[olric-consul-plugin](https://github.com/olric-data/olric-consul-plugin). Here is a simple payload for this setup:
99104

100105
```json
@@ -118,4 +123,4 @@ Consul is easy to use and proven way to discover nodes in a clustered environmen
118123
Consul dials this port to control the node. `Address`, `ID` and `Check.TCP` fields is being filled by the plugin. You can still
119124
give your own configuration values, if you know what you are doing.
120125

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.

docker/docker-compose.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
nginx:
53
image: nginx:latest
@@ -10,7 +8,8 @@ services:
108
- '3320:3320'
119

1210
consul:
13-
image: docker.io/bitnami/consul:1.11.4
11+
platform: linux/amd64
12+
image: public.ecr.aws/bitnami/consul:latest
1413
volumes:
1514
- consul_data:/bitnami/consul
1615
ports:
@@ -22,41 +21,15 @@ services:
2221
- '8600:8600/udp'
2322

2423
olric:
25-
image: docker.io/olricio/olric-consul-plugin:v0.5.0-beta.2
24+
platform: linux/amd64
25+
image: ghcr.io/olric-data/olric-consul-plugin:latest
2626
restart: on-failure
2727
volumes:
2828
- ${PWD}/olric-server-consul.yaml:/etc/olric-server.yaml:ro
2929
depends_on:
3030
- nginx
3131
- consul
3232

33-
nginx-dev:
34-
image: nginx:latest
35-
volumes:
36-
- ${PWD}/nginx-dev.conf:/etc/nginx/nginx-dev.conf:ro
37-
ports:
38-
- '3320:3320'
39-
40-
olric-dev:
41-
image: docker.io/olricio/olric-dev:latest
42-
restart: on-failure
43-
environment:
44-
- OLRIC_SERVER_CONFIG=/etc/olric-server-local.yaml
45-
- CGO_ENABLED=1
46-
command: bash -c "
47-
cd /go/src/github.com/olric-data/olric-consul-plugin &&
48-
go build -buildmode=plugin -o /usr/lib/olric-consul-plugin.so &&
49-
cd /go/src/github.com/olric-data/olric &&
50-
go build -v -o /go/bin/olric-server /go/src/github.com/olric-data/olric/cmd/olric-server/main.go &&
51-
/go/bin/olric-server -c /go/src/github.com/olric-data/olric/cmd/olric-server/olric-server-local.yaml"
52-
volumes:
53-
- ${PWD}/olric-server-consul.yaml:/etc/olric-server.yaml:ro
54-
- ../:/go/src/github.com/olric-data/olric
55-
- ../../olric-consul-plugin:/go/src/github.com/olric-data/olric-consul-plugin
56-
depends_on:
57-
- nginx-dev
58-
- consul
59-
6033
volumes:
6134
consul_data:
6235
driver: local

docker/nginx-dev.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)