aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap-verify-perf-ligato.sh
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-01-06 21:20:18 +0000
committerPeter Mikus <pmikus@cisco.com>2018-01-06 21:23:59 +0000
commit6e25bb5e8b8bcc2a1f741892508a68aec7d791b9 (patch)
tree80510135bf45f089de32f3a3a0accfab67b5ebdb /bootstrap-verify-perf-ligato.sh
parentb5fe0fd9a4266773125cc4d4c1edaa1c1a8a1731 (diff)
Update vpp-agent version
- Fix small bug in kubectl get pods - Update vpp-agent release version - Add ability to recompile vpp-agent from VPP. This could eliminate issue in case of some API mismatch) Change-Id: Id9e8758017f3e5504e8a19b607b8ac37f26cf945 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'bootstrap-verify-perf-ligato.sh')
-rw-r--r--bootstrap-verify-perf-ligato.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/bootstrap-verify-perf-ligato.sh b/bootstrap-verify-perf-ligato.sh
index e11b5e77b3..6654972352 100644
--- a/bootstrap-verify-perf-ligato.sh
+++ b/bootstrap-verify-perf-ligato.sh
@@ -62,6 +62,7 @@ then
VPP_DEBS="$( readlink -f *.deb | tr '\n' ' ' )"
fi
+ dpkg -x vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb /tmp/vpp
# Temporary workaround as ligato docker file requires specific file name
rename -v 's/^(.*)-(\d.*)-deb.deb/$1_$2.deb/' *.deb
cd ${SCRIPT_DIR}
@@ -77,6 +78,7 @@ then
VPP_STABLE_VER="$( expr match $1 'vpp-\(.*\)-deb.deb' )"
# Move files to build-root for packing
for deb in ${VPP_DEBS}; do mv ${deb} vpp/build-root/; done
+ dpkg -x vpp/build-root/vpp_${VPP_STABLE_VER}.deb /tmp/vpp
else
echo "Unable to identify job type based on JOB_NAME variable: ${JOB_NAME}"
exit 1
@@ -119,10 +121,26 @@ sudo docker tag ligato/dev-vpp-agent:${VPP_AGENT_STABLE_VER}\
dev_vpp_agent:latest
sudo docker images
+# Start dev_vpp_agent container as daemon
+sudo docker run --rm -itd --name agentcnt dev_vpp_agent bash
+# Copy latest vpp api into running container
+sudo docker cp /tmp/vpp/usr/share/vpp/api agentcnt:/usr/share/vpp
+# Recompile vpp-agent
+sudo docker exec -i agentcnt \
+ script -qc '. ~/.bashrc; cd /root/go/src/github.com/ligato/vpp-agent && make generate && make install'
+# Extract vpp-agent
+rm -rf agent
+mkdir -p agent
+sudo docker cp agentcnt:/root/go/bin/vpp-agent agent/
+sudo docker cp agentcnt:/root/go/bin/vpp-agent-ctl agent/
+sudo docker cp agentcnt:/root/go/bin/agentctl agent/
+tar -zcvf ${SCRIPT_DIR}/../vpp-agent/docker/prod_vpp_agent/agent.tar.gz agent
+# Kill running container
+sudo docker rm -f agentcnt
+
# Build prod_vpp_agent docker image
cd ${SCRIPT_DIR}/../vpp-agent/docker/prod_vpp_agent/ &&\
mv ${SCRIPT_DIR}/vpp.tar.gz . &&\
- ./extract_agent_files.sh &&\
sudo docker build -t prod_vpp_agent --no-cache .
# Export Docker image
sudo docker save prod_vpp_agent | gzip > prod_vpp_agent.tar.gz