diff options
Diffstat (limited to 'bootstrap-verify-perf-ligato.sh')
-rw-r--r-- | bootstrap-verify-perf-ligato.sh | 20 |
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 |