From 601b88e2c5dabaa7fe2035c7e433d2da5b860c4b Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Wed, 2 Oct 2019 17:50:23 +0530 Subject: 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 Change-Id: Id40b02960f71a7f9183d9a53955e2483117fb9e2 --- tools/docker/prepare.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 tools/docker/prepare.sh (limited to 'tools/docker/prepare.sh') 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 -- cgit 1.2.3-korg