summaryrefslogtreecommitdiffstats
path: root/tools/docker/prepare.sh
diff options
context:
space:
mode:
authorSridhar Rao <sridhar.rao@spirent.com>2019-12-04 15:42:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-12-04 15:42:26 +0000
commita94395daf8d3312659b56a306ea64960a2cdd64a (patch)
tree2ddabdffb8b215aa7f6f0afce3c8df21eeb75a11 /tools/docker/prepare.sh
parent7f98a9cdf06b03e5b16828677ecd7daccdc4b5ad (diff)
parent601b88e2c5dabaa7fe2035c7e433d2da5b860c4b (diff)
Merge "Tools: Deployment and TestControl Containers"opnfv-9.0.0stable/iruya
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