From 9f5e6d69bc565bcfa529a036731ebaf06226559c Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Fri, 22 Apr 2022 10:20:08 +0200 Subject: [PATCH] Update local-build.sh to fix check of existing qhttp and provide more help Change-Id: Icc23f4dd1f0eaa09b930d1403175fac2eeaf9f14 Signed-off-by: garciadeblas --- tools/local-build.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tools/local-build.sh b/tools/local-build.sh index 9c402722..ce686c8d 100755 --- a/tools/local-build.sh +++ b/tools/local-build.sh @@ -88,6 +88,34 @@ OPTIONS: install-osm perform full installation of Charmed OSM from registry start-robot start the Robot test container and leave you at prompt update-install update Charmed OSM with new module container + +A typical use could be the following: + +Let's assume that we have different repos cloned in the folder workspace: + + cd workspace + git clone https://osm.etsi.org/gerrit/osm/devops + git clone https://osm.etsi.org/gerrit/osm/NBI + git clone https://osm.etsi.org/gerrit/osm/LCM + git clone "https://osm.etsi.org/gerrit/osm/RO + git clone "https://osm.etsi.org/gerrit/osm/common + git clone "https://osm.etsi.org/gerrit/osm/IM + git clone "https://osm.etsi.org/gerrit/osm/N2VC + +First we install a light HTTP server to serve the artifacts: + + devops/tools/local-build.sh --install-qhttpd + +Then we generate the artifacts (debian packages) for the different repos: common, IM, N2VC, RO, LCM, NBI + + devops/tools/local-build.sh --module common,IM,N2VC,RO,LCM,NBI stage-2 + +Then new docker images are generated locally with the tag "devel" (e.g.: opensourcemano/lcm:devel): + + devops/tools/local-build.sh --module RO,LCM,NBI stage-3 + +Finally, the deployment of OSM will have to be updated to use the new docker images. + EOF } @@ -140,7 +168,7 @@ function install_microstack() { function install_qhttpd() { sudo snap install qhttp - EXISTING_PID=$(ps auxw | grep "http.server 11480" | grep -v grep | awk '{print $2}') + EXISTING_PID=$(ps auxw | grep "http.server $HTTPPORT" | grep -v grep | awk '{print $2}') if [ ! -z $EXISTING_PID ] ; then kill $EXISTING_PID fi -- 2.25.1