Skip to content
Snippets Groups Projects
Commit 920d756b authored by Mark Beierl's avatar Mark Beierl
Browse files

OSM Client Installation Fix


Updates stage 3 to present osmclient and IM debian packages.
Updates installer to also install pip requirements.txt if
those files are present from the osmclient .deb package

Fixes bug 1510

Change-Id: I9ee44b265615935fee6c869c6c3c261739370183
Signed-off-by: default avatarbeierlm <mark.beierl@canonical.com>
parent cd91a315
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,7 @@ function uninstall_lightweight() {
remove_stack osm_elk
fi
echo "Now osm docker images and volumes will be deleted"
# TODO: clean-up of images should take into account if other tags were used for specific modules
# TODO: clean-up of images should take into account if other tags were used for specific modules
newgrp docker << EONG
for module in ro lcm keystone nbi mon pol pla osmclient; do
docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module}:${OSM_DOCKER_TAG}
......@@ -339,6 +339,13 @@ function install_osmclient(){
sudo -H LC_ALL=C python3 -m pip install -U pip
sudo -H LC_ALL=C python3 -m pip install -U python-magic pyangbind verboselogs
sudo apt-get install -y python3-osm-im python3-osmclient
if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then
sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt
fi
if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
sudo -H LC_ALL=C python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
fi
#sed 's,OSM_SOL005=[^$]*,OSM_SOL005=True,' -i ${HOME}/.bashrc
#echo 'export OSM_HOSTNAME=localhost' >> ${HOME}/.bashrc
#echo 'export OSM_SOL005=True' >> ${HOME}/.bashrc
......@@ -578,11 +585,11 @@ function generate_docker_images() {
if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then
continue
fi
module_tag="${OSM_DOCKER_TAG}"
module_tag="${OSM_DOCKER_TAG}"
if [ -n "${MODULE_DOCKER_TAG}" ] && echo $TO_REBUILD | grep -q $module ; then
module_tag="${MODULE_DOCKER_TAG}"
fi
echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
sg docker -c "docker pull ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag}" || FATAL "cannot pull $module docker image"
done
else
......
......@@ -251,11 +251,15 @@ node("${params.NODE}") {
///////////////////////////////////////////////////////////////////////////////////////
// Create Devops APT repository
///////////////////////////////////////////////////////////////////////////////////////
sh "mv devops/pool/ pool"
sh "dpkg-sig --sign builder -k ${GPG_KEY_NAME} pool/devops/*"
sh "mkdir -p dists/${params.REPO_DISTRO}/devops/binary-amd64/"
sh "apt-ftparchive packages pool/devops > dists/${params.REPO_DISTRO}/devops/binary-amd64/Packages"
sh "gzip -9fk dists/${params.REPO_DISTRO}/devops/binary-amd64/Packages"
sh "mkdir -p pool"
for (component in [ "devops", "IM", "osmclient" ]) {
sh "ls -al ${component}/pool/"
sh "cp -r ${component}/pool/* pool/"
sh "dpkg-sig --sign builder -k ${GPG_KEY_NAME} pool/${component}/*"
sh "mkdir -p dists/${params.REPO_DISTRO}/${component}/binary-amd64/"
sh "apt-ftparchive packages pool/${component} > dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
sh "gzip -9fk dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
}
// create and sign the release file
sh "apt-ftparchive release dists/${params.REPO_DISTRO} > dists/${params.REPO_DISTRO}/Release"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment