Skip to content

Commit d051fa6

Browse files
committed
Start Chaos Runner 0.0.3
1 parent de1b93f commit d051fa6

2 files changed

Lines changed: 33 additions & 21 deletions

File tree

chaos-runner/README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@
55
A simple java program that can start 1 or more NATS Servers and then add chaos,
66
by taking one of them down on a delay and bringing it back up after a downtime.
77

8-
**Current Release**: N/A
9-
  **Current Snapshot**: 0.0.2-SNAPSHOT
8+
**Current Release**: 0.0.2
9+
  **Current Snapshot**: 0.0.3-SNAPSHOT
1010
  **Gradle and Maven** `io.synadia:chaos-runner`
1111

1212
[Dependencies Help](https://github.com/synadia-io/orbit.java?tab=readme-ov-file#dependencies)
1313

14-
## Usage
14+
## Uber Jar
1515

16-
The easier way to use is to just get the chaos-runner source directory from this repo and build it yourself via the
17-
```
18-
gradle uberJar
19-
```
20-
task from inside the chaos-runner folder, and then run the program from a command line with arguments.
21-
Alternatively you can run a program like the [ChaosRunnerExample](src/examples/java/io/synadia/examples/ChaosRunnerExample.java)
16+
The project builds an Uber Jar that contains the compiled code for the Chaos Runner and the Nats Server Runner.
17+
You can get this jar in 2 ways.
18+
19+
1. Download the release: [chaos-runner-0.0.2-uber.jar](https://repo1.maven.org/maven2/io/synadia/chaos-runner/0.0.2/chaos-runner-0.0.2-uber.jar)
20+
21+
2. Build from the source. Get the entire chaos-runner source from this Orbit repo,
22+
and from the chaos-runner project directory and run `gradle uberJar`
23+
The Uber Jar `chaos-runner-0.0.2-SNAPSHOT-uber.jar` will appear in the `build/libs/` directory
24+
(relative to the `chaos-runner` project directory.)
2225

2326
## Command Line Arguments
2427

@@ -33,12 +36,14 @@ Alternatively you can run a program like the [ChaosRunnerExample](src/examples/j
3336
| `--dir <path>` | The working dir. Used as the parent dir for JetStream storage directories. | _temp_ |
3437
| `--nojs` | Do not run the server with JetStream. JetStream is on by default. | JetStream |
3538
| `--random` | Take the servers down randomly. Default is Round Robin. | Round Robin |
36-
| `--port` | The starting port. | 4220 |
39+
| `--port` | The starting server port. | 4220 |
3740
| `--listen` | The starting listen port for clusters. | 4230 |
3841

39-
Regarding ports. Given any starting port, the system automatically figures the ports for the other nodes.
40-
For example for 3 nodes, if the starting port is 4220, other ports are 4221 and 4222.
41-
If the listen port is 4230, the other listen ports are 4231 and 4232
42+
#### Regarding ports
43+
Given any starting port, the system automatically figures the ports for the other nodes.
44+
For example for 3 nodes:
45+
* if the starting server port is 4220, the other ports are 4221 and 4222.
46+
* if the listen port is 4230, the other listen ports are 4231 and 4232
4247

4348
![Artifact](https://img.shields.io/badge/Artifact-io.synadia:chaos--runner-00BC8E?labelColor=grey&style=flat)
4449
[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -48,15 +53,23 @@ If the listen port is 4230, the other listen ports are 4231 and 4232
4853

4954
## Command Line Examples
5055

51-
Assuming you have just run gradle from the command line inside the chaos-runner directory...
52-
5356
```
54-
java -cp build/libs/chaos-runner-0.0.2-uber.jar io.synadia.chaos.ChaosRunner --delay 4000 --initial 10000 --cname mycluster --prefix myserver
57+
java -cp <Path-To>/<Jar-Name> io.synadia.chaos.ChaosRunner --delay 4000 --initial 10000 --cname mycluster --prefix myserver
58+
java -cp <Path-To>/<Jar-Name> io.synadia.chaos.ChaosRunner --servers 1 --delay 4000 --initial 10000
5559
```
5660

57-
```
58-
java -cp build/libs/chaos-runner-0.0.2-uber.jar io.synadia.chaos.ChaosRunner --servers 1 --delay 4000 --initial 10000
59-
```
61+
#### Path-To and Jar-Name
62+
1\.If you downloaded the Uber Jar release:
63+
* the `<Path-To>` will be wherever you stored the file.
64+
* The `<Jar-Name>` will be `chaos-runner-0.0.2-uber.jar`.
65+
66+
2\. If you build it yourself:
67+
* the `<Path-To>` will be relative to the `chaos-runner` directory in `build/libs`
68+
* the `<Jar-Name>` will be `chaos-runner-0.0.2-SNAPSHOT-uber.jar`.
69+
70+
## Other ways to run...
71+
72+
Alternatively you can run a program like the [ChaosRunnerExample](src/examples/java/io/synadia/examples/ChaosRunnerExample.java) from an ide.
6073

6174
---
6275
Copyright (c) 2025 Synadia Communications Inc. All Rights Reserved.

chaos-runner/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
id 'signing'
1414
}
1515

16-
def jarVersion = "0.0.2"
16+
def jarVersion = "0.0.3"
1717
group = 'io.synadia'
1818

1919
def isMerge = System.getenv("BUILD_EVENT") == "push"
@@ -127,7 +127,6 @@ tasks.register('sourcesJar', Jar) {
127127
}
128128

129129
tasks.register ('uberJar', Jar) {
130-
version = version.replace("-SNAPSHOT", "")
131130
archiveClassifier.set('uber')
132131
from sourceSets.main.output
133132
dependsOn configurations.runtimeClasspath

0 commit comments

Comments
 (0)