Skip to content

Commit 4e4af95

Browse files
authored
docs: update development instruction in readme (#439)
1 parent c8255e8 commit 4e4af95

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,7 @@ Please make sure the following tools are installed on your machine.
316316
| Tool | Version | URL |
317317
| --- | --- | --- |
318318
| Docker | latest stable | https://docs.docker.com/engine/install/ |
319-
| Docker Compose | V2 | https://docs.docker.com/compose/reference/ |
320319
| Ruby | latest stable | https://www.ruby-lang.org/en/ |
321-
| Bundler | latest satble | https://bundler.io/ |
322320

323321
Please fork this repository and check out the codes.
324322

@@ -329,30 +327,23 @@ $ git remote add upstream https://github.com/redis-rb/redis-cluster-client.git
329327
$ git fetch -p upstream
330328
```
331329

332-
Please install libraries.
330+
Please do the following steps.
333331

334-
```
335-
$ bundle install --path=.bundle --jobs=4
336-
```
337-
338-
Please run Redis cluster with Docker.
332+
* Build a Redis cluster with Docker
333+
* Install gems
334+
* Run basic test cases
339335

340336
```
341337
## If you use Docker server and your OS is Linux:
338+
$ bundle config set path '.bundle'
339+
$ bundle install --jobs=$(grep process /proc/cpuinfo | wc -l)
342340
$ docker compose up
341+
$ bundle exec rake test
343342
344343
## else:
345-
$ HOST_ADDR=192.168.xxx.xxx docker compose -f compose.nat.yaml up
346-
$ DEBUG=1 bundle exec rake 'build_cluster[192.168.xxx.xxx]'
347-
348-
### When the above rake task is not working:
349-
$ docker compose -f compose.nat.yaml exec node1 bash -c "yes yes | redis-cli --cluster create --cluster-replicas 1 $(seq 6379 6384 | xargs -I {} echo 192.168.xxx.xxx:{} | xargs echo)"
350-
```
351-
352-
Please run basic test cases.
353-
354-
```
355-
$ bundle exec rake test
344+
$ docker compose --profile ruby up
345+
$ docker compose --profile ruby exec ruby bundle install
346+
$ docker compose --profile ruby exec ruby bundle exec rake test
356347
```
357348

358349
You can see more information in the YAML file for GItHub actions.

compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ services:
8484
interval: "5s"
8585
timeout: "3s"
8686
retries: 3
87+
profiles:
88+
- ruby

0 commit comments

Comments
 (0)