Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ratis-assembly/src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,29 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../ratis-shell/target/</directory>
<outputDirectory>ratis-shell/lib/shell</outputDirectory>
<fileMode>755</fileMode>
<includes>
<include>ratis-shell-*-jar-with-dependencies.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../ratis-shell/src/main/bin</directory>
<outputDirectory>ratis-shell/bin</outputDirectory>
<fileMode>755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../ratis-shell/src/main/libexec</directory>
<outputDirectory>ratis-shell/libexec</outputDirectory>
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../ratis-shell/src/main/conf</directory>
<outputDirectory>ratis-shell/conf</outputDirectory>
<fileMode>644</fileMode>
</fileSet>
</fileSets>
</assembly>
25 changes: 23 additions & 2 deletions ratis-docs/content/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ Ratis-shell is the command line interface of Ratis.
> Ratis-shell is currently only **experimental**.
> The compatibility story is not considered for the time being.

## Availability
| Version | Available in src tarball? | Available in bin tarball? |
| :------: | :-----------------------: | :-----------------------: |
| < 2.3.0 | No | No |
| 2.3.0 | Yes | No |
| \> 2.3.0 | Yes | Yes |

## Setting up the ratis-shell

### Setting up from a source tarball
Download the Ratis source tarball from https://ratis.apache.org/downloads.html .
Note that ratis-shell is available starting from version 2.3.0.
Extract the source tarball to a destination directory `<DST_DIR>`
Expand All @@ -41,12 +49,25 @@ $ mvn -DskipTests -Prelease -Papache-release clean package assembly:single

Extract the ratis-shell tarball.
```
$ tar -C <DST_DIR>/ratis-shell -xzf ratis-assembly/target/apache-ratis-<VERSION>-shell.tar.gz
$ mkdir <DST_DIR>/ratis-shell
$ tar -C <DST_DIR>/ratis-shell -xzf ratis-assembly/target/apache-ratis-<VERSION>-shell.tar.gz --strip-component 1
```

### Setting up from a binary tarball
Download the Ratis bin tarball from https://ratis.apache.org/downloads.html .
Note that the bin tarball of Ratis version 2.3.0 or earlier does not contain ratis-shell.
The bin tarball of later versions will contain ratis-shell.
Extract the bin tarball to a destination directory `<DST_DIR>`
```
$ tar -C <DST_DIR> -zxvf apache-ratis-<VERSION>-bin.tar.gz apache-ratis-<VERSION>/ratis-shell
$ cd <DST_DIR>
$ mv apache-ratis-<VERSION>/ratis-shell .
$ rmdir apache-ratis-<VERSION>/
```

Export the `RATIS_SHELL_HOME` environment variable and add the bin directory to the `$PATH`.
```
$ export RATIS_SHELL_HOME=<DST_DIR>/ratis-shell/apache-ratis-<VERSION>
$ export RATIS_SHELL_HOME=<DST_DIR>/ratis-shell
$ export PATH=${RATIS_SHELL_HOME}/bin:$PATH
```

Expand Down