aboutsummaryrefslogtreecommitdiffstats
path: root/tools/docker/prepare.sh
diff options
context:
space:
mode:
authorSridhar K. N. Rao <sridhar.rao@spirent.com>2019-10-02 17:50:23 +0530
committerSridhar K. N. Rao <sridhar.rao@spirent.com>2019-12-01 09:02:14 +0530
commit601b88e2c5dabaa7fe2035c7e433d2da5b860c4b (patch)
tree45d7336a3fc71907c19720127d154f8c44aa673a /tools/docker/prepare.sh
parentb984a2f40bec349c802b631a69526590b34bd5de (diff)
Tools: Deployment and TestControl Containers
This patch add containerization of VSPERF support. The patch facilitates creation of 4 containers: 1. Interactive Deployment 2. Auto Deployment 3. Interactive TestControl 4. Auto TestControl. The patch also includes a minimal client to work with interactive containers. The docs folder provides detailed documentation. Fixed pylint errors in libs folder. Removed proto built python files, and added the build process in prepare.sh. Stability improvements for Auto versions of deployment and testcontrol. Enhance client with 'mode' feature, where client can run either to do only deploy/only test or both. Add sample configuration file for client Fixed few typos - as suggested by AL. JIRA: VSPERF-594 Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com> Change-Id: Id40b02960f71a7f9183d9a53955e2483117fb9e2
Diffstat (limited to 'tools/docker/prepare.sh')
-rwxr-xr-xtools/docker/prepare.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/docker/prepare.sh b/tools/docker/prepare.sh
new file mode 100755
index 00000000..7afdbd6b
--- /dev/null
+++ b/tools/docker/prepare.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#This script will used to prepare local host to use vsperf client and containers.
+
+#first change the permission for prepare.sh file
+chmod a+x prepare.sh
+
+#Install python3 for local host
+sudo apt-get install python3
+
+#Install python3-pip
+sudo apt-get install python3-pip
+
+#Install grpcio, grpcio-tools and configparser
+pip3 install grpcio==1.4.0 grpcio-tools==1.4.0 configparser
+
+# Build .proto to create python library
+cd libs/proto && python3 -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. vsperf.proto
+sed -i 's/import vsperf_pb2 as vsperf__pb2/from . import vsperf_pb2 as vsperf__pb2/g' vsperf_pb2_grpc.py
+cd ../..
+
+#copy libs/proto and libs/utils in deployment and testcontrol container at appropriate location.
+cp -r libs/proto deployment/interactive/controller/vsperf/proto
+cp -r libs/utils deployment/interactive/controller/vsperf/utils
+cp -r libs/proto testcontrol/interactive/controller/vsperf/proto
+cp -r libs/utils testcontrol/interactive/controller/vsperf/utils
+
+#copy libs/utils into deployment and testcontrol auto container at appropriate location.
+cp -r libs/utils deployment/auto/controller/vsperf/utils
+cp -r libs/utils testcontrol/auto/controller/vsperf/utils
+
+#copy libs/proto into client
+cp -r libs/proto client/proto