From aa1044b005cdf20270274376228b7e203d79ddd2 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Fri, 21 Apr 2017 07:12:17 +0200 Subject: [PATCH] Fix RO install from source Change-Id: I1829e1671698fc90fe941d21753c6881956bad58 Signed-off-by: garciadeblas --- database_utils/migrate_mano_db.sh | 2 +- scripts/install-openmano.sh | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/database_utils/migrate_mano_db.sh b/database_utils/migrate_mano_db.sh index ba8a8294..e32d6ebd 100755 --- a/database_utils/migrate_mano_db.sh +++ b/database_utils/migrate_mano_db.sh @@ -93,7 +93,7 @@ shift $((OPTIND-1)) OPENMANO_VER="$1" if [ -z "$OPENMANO_VER" ] then - OPENMANO_VER=`${DIRNAME}/../openmanod.py -v` + OPENMANO_VER=`${DIRNAME}/../openmanod -v` OPENMANO_VER=${OPENMANO_VER%%-r*} OPENMANO_VER=${OPENMANO_VER##*version } echo " Detected openmano version $OPENMANO_VER" diff --git a/scripts/install-openmano.sh b/scripts/install-openmano.sh index 9eda0470..3c47712d 100755 --- a/scripts/install-openmano.sh +++ b/scripts/install-openmano.sh @@ -127,7 +127,7 @@ fi #Discover Linux distribution #try redhat type [ -f /etc/redhat-release ] && _DISTRO=$(cat /etc/redhat-release 2>/dev/null | cut -d" " -f1) -#if not assuming ubuntu type +#else assuming ubuntu type [ -f /etc/redhat-release ] || _DISTRO=$(lsb_release -is 2>/dev/null) if [ "$_DISTRO" == "Ubuntu" ] then @@ -178,8 +178,7 @@ else OPENMANO_BASEFOLDER=$(dirname $HERE) fi - -if [[ -z "$NO_PACKAGES" ]] +if [[ -z "$NO_PACKAGES" ]] #if (UPDATE REPOS) then echo ' ################################################################# @@ -193,9 +192,9 @@ echo ' && sudo rpm -ivh epel-release-7-5.noarch.rpm && sudo yum install -y epel-release && rm -f epel-release-7-5.noarch.rpm [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && sudo yum repolist -fi +fi #if (UPDATE REPOS) -if [[ -z "$NO_PACKAGES" ]] +if [[ -z "$NO_PACKAGES" ]] #if (INSTALL DEPENDENCIES) then echo ' ################################################################# @@ -203,10 +202,9 @@ echo ' #################################################################' [ "$_DISTRO" == "Ubuntu" ] && install_packages "git make screen wget mysql-client" [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "git make screen wget mariadb-client" +fi #if (INSTALL DEPENDENCIES) - - -if [[ -z "$NO_PACKAGES" ]] +if [[ -z "$NO_PACKAGES" ]] #if (PYTHON PACKAGES AND PIP PACKAGES) then echo ' ################################################################# @@ -224,14 +222,14 @@ sudo pip install progressbar sudo pip install prettytable sudo pip install pyvmomi -#requiered for AWS connector +#required for AWS connector [ "$_DISTRO" == "Ubuntu" ] && install_packages "python-boto" [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "python-boto" #TODO check if at Centos it exist with this name, or PIP should be used #install openstack client needed for using openstack as a VIM [ "$_DISTRO" == "Ubuntu" ] && install_packages "python-novaclient python-keystoneclient python-glanceclient python-neutronclient python-cinderclient" [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "python-devel" && easy_install python-novaclient python-keystoneclient python-glanceclient python-neutronclient python-cinderclient #TODO revise if gcc python-pip is needed -fi #[[ -z "$NO_PACKAGES" ]] +fi #if (PYTHON PACKAGES AND PIP PACKAGES) if [[ -z $NOCLONE ]]; then echo ' @@ -250,12 +248,10 @@ echo ' su $SUDO_USER -c "git -C ${OPENMANO_BASEFOLDER} clone ${GIT_OVIM_URL} openvim" [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${OPENMANO_BASEFOLDER}/openvim checkout master" # Install debian dependencies before setup.py -#[ "$_DISTRO" == "Ubuntu" ] && install_packages "git" -#[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "git" +[ "$_DISTRO" == "Ubuntu" ] && install_packages "libmysqlclient-dev" +[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "libmysqlclient-dev" #TODO check if that's the name in CentOS and RedHat make -C ${OPENMANO_BASEFOLDER}/openvim lite - - if [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] then echo ' -- 2.25.1