Update: This repo is no longer being actively developed. The gRPC-to-REST proxy for OTG is no longer required, as the functionality has been directly incorporated into the Ixia-c controller.
gRPC interface to configure and run Ixia-C traffic generator
Gitlab is not reachable from within lab network, hence please make sure that the intended system is outside lab network (for build to succeed).
-
Clone this project
git clone --recursive https://github.com/open-traffic-generator/otg-grpc.git cd otg-grpc/
-
For Production
# this stage will create an intermediate, untagged image; feel free to get rid of it afterwards docker build -t otg-grpc-server . # start container docker run -d --net=host otg-grpc-server --app-mode athena --target-host localhost --target-port 443 # [checkout more options] docker run -d --net=host otg-grpc-server help
-
For Development
# the project uses multi-stage build (defined in same Dockerfile) for both # dev and prod environment; # hence, to build dev image, you need to explicitly specify target `stage` docker build --target=dev -t otg-grpc-server:dev . # Start container and you'll be placed inside the project dir docker run -it --net=host otg-grpc-server:dev # [checkout more options] docker run -d --net=host otg-grpc-server:dev help
-
(Optional) Setup VSCode
After development container is ready,
- Install Remote Explorer Extension in VSCode
- Restart VSCode and choose
Containers
dropdown inRemote Explorer
- (Optional) If your container is on a remote machine, setup a password-less SSH against it and put following line inside VSCode settings:
"docker.host": "ssh://username@hostname"
- If you see the intended container listed, attach to it and change working directory to
/home/keysight/ixia-c/otg-grpc
- Allow it to install extensions and other tools when prompted
do.sh covers most of what needs to be done manually. If you wish to extend it, just define a function (e.g. install_deps()) and call it like so: ./do.sh install_deps
.
# start otg grpc server
./do.sh run
# run unit / benchmark / coverage tests against all packages
./do.sh unit
# get unit test deps, generate stubs, run tests
./do.sh art
# build otg grpc server docker image
./do.sh build