Skip to content

Commit

Permalink
Added new instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
vines26 committed Feb 14, 2024
1 parent c53c3b3 commit 4dcae3c
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ As with any C++ API, the header files are necessary for use.

`./racesdk/package/LINUX*/` will be `./racesdk/package/ANDROID*/` when building for Android.


## Testing using race-cli
See race-email channel README.md for examples

Expand All @@ -40,6 +39,7 @@ NOTE: see `FileSystem::makePluginInstallBasePath()` for path requirements of whe
NOTE: `--param hostname=localhost` does not work in this test. You can use the ip addresses reported from ifconfig on both nodes.
### server
```bash

docker run -it -v $(pwd):/code/ -v /tmp/:/tmp/ race-sdk:latest bash
cp -r /code/private-race-core/plugin-comms-twosix-cpp/kit/artifacts/linux-arm64-v8a-server/PluginCommsTwoSixStub/* /tmp/race/plugins/unix/arm64-v8a/PluginCommsTwoSixStub
ln -s /code/private-raceboat/build/LINUX_arm64-v8a/source/libraceboat.so /usr/local/lib/raceSdkCommon.so
Expand Down Expand Up @@ -74,3 +74,33 @@ cmake --build --preset=LINUX_x86_64 --target check_format -j

## APIs
See CommPluginDeveloperGuide.md in the `race-docs` repository for information about working with Comms plugins.


## Updated Running Instructions
Work-in-progress as we make small tweaks/improvements to the race-cli user experience.

___Preliminaries:___
This approach volume-mounts plugin(s) of the appropriate architecture, so "path/to/plugin" would look something like: `/your/path/to/race-core/plugin-comms-twosix-cpp/kit/artifacts/linux-arm64-v8a-server/` to use channels from PluginCommsTwoSixStub on an arm64-v8a host.

### Server:

```bash
docker run --rm -it --name=rbserv \
--network=rib-overlay-network --ip=10.11.1.2 \
-v /path/to/plugin:/kits \
raceboat:latest bash

echo "Hello from the Raceboat Server!" | race-cli --dir /kits -m --recv-reply --send-channel twoSixDirectCpp --recv-channel twoSixDirectCpp --param hostname="10.11.1.2" --param PluginCommsTwoSixStub.startPort=26262 --param PluginCommsTwoSixStub.endPort=26264
```

### Client:

```bash
docker run --rm -it --name=raceboat-client \
--network=rib-overlay-network --ip=10.11.1.3 \
-v /path/to/plugin:/kits \
raceboat:latest bash

echo "Hi, I'm the client!" | race-cli --dir /kits -m --send-recv --send-channel twoSixDirectCpp --recv-channel twoSixDirectCpp --param hostname="10.11.1.3" --param PluginCommsTwoSixStub.startPort=26262 --param PluginCommsTwoSixStub.endPort=26264 --send-address="{\"hostname\":\"10.11.1.2\",\"port\":26262}"

```

0 comments on commit 4dcae3c

Please sign in to comment.