X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=scripts%2Finstall-openmano.sh;h=34eb6ee1e18e28aba0bfb8d2b1a94e02c2d47a89;hb=4da1c2408c40c7b55f9b0f04f799ead951f78ce4;hp=0110d75dd091adc347bfa61efc116b03f0fc9016;hpb=b36e75da99170c650c999ab2b985a14f3b9a7b5a;p=osm%2FRO.git diff --git a/scripts/install-openmano.sh b/scripts/install-openmano.sh index 0110d75d..34eb6ee1 100755 --- a/scripts/install-openmano.sh +++ b/scripts/install-openmano.sh @@ -77,6 +77,7 @@ function ask_user(){ GIT_URL=https://osm.etsi.org/gerrit/osm/RO.git GIT_OVIM_URL=https://osm.etsi.org/gerrit/osm/openvim.git +GIT_OSMIM_URL=https://osm.etsi.org/gerrit/osm/IM.git DBUSER="root" DBPASSWD="" DBPASSWD_PARAM="" @@ -249,8 +250,11 @@ then [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "python-boto" #TODO check if at Centos it exists 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 + [ "$_DISTRO" == "Ubuntu" ] && install_packages "python-novaclient python-keystoneclient python-glanceclient "\ + "python-neutronclient python-cinderclient python-openstackclient" + [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "python-devel" && easy_install \ + python-novaclient python-keystoneclient python-glanceclient python-neutronclient python-cinderclient \ + python-openstackclient #TODO revise if gcc python-pip is needed fi # [[ -z "$NO_PACKAGES" ]] if [[ -z $NOCLONE ]]; then @@ -270,23 +274,55 @@ if [[ -z $NOCLONE ]]; then fi fi su $SUDO_USER -c "git clone ${GIT_URL} ${BASEFOLDER}" + LATEST_STABLE_TAG=`git -C "${BASEFOLDER}" tag -l v[0-9].* | tail -n1` + [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${BASEFOLDER} checkout tags/${LATEST_STABLE_TAG}" su $SUDO_USER -c "cp ${BASEFOLDER}/.gitignore-common ${BASEFOLDER}/.gitignore" - [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${BASEFOLDER} checkout v2.0" fi +echo -e "\n"\ + "#################################################################\n"\ + "##### INSTALLING OSM-IM LIBRARY #####\n"\ + "#################################################################" +su $SUDO_USER -c "git -C ${BASEFOLDER} clone ${GIT_OSMIM_URL} IM" +LATEST_STABLE_TAG=`git -C "${BASEFOLDER}/IM" tag -l v[0-9].* | tail -n1` +# TODO remove comment when a stable version of IM were tagged +# [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${BASEFOLDER}/IM checkout tags/${LATEST_STABLE_TAG}" + +# Install debian dependencies before setup.py +if [[ -z "$NO_PACKAGES" ]] +then + [ "$_DISTRO" == "Ubuntu" ] && install_packages "tox debhelper python-bitarray" + # TODO check packages for CentOS and RedHat + [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "tox debhelper python-bitarray" + pip install stdeb pyangbind +fi +su $SUDO_USER -c "make -C ${BASEFOLDER}/IM all" +dpkg -i ${BASEFOLDER}/IM/deb_dist/python-osm-im*.deb ${BASEFOLDER}/IM/pyangbind/deb_dist/*.deb \ + ${BASEFOLDER}/IM/pyang/deb_dist/*.deb +rm -rf "${BASEFOLDER}/IM" +OSM_IM_PATH=`python -c 'import osm_im; print osm_im.__path__[0]'` || + ! echo "ERROR installing python-osm-im library!!!" >&2 || exit 1 + + echo -e "\n"\ "#################################################################\n"\ "##### INSTALLING OVIM LIBRARY #####\n"\ "#################################################################" su $SUDO_USER -c "git -C ${BASEFOLDER} clone ${GIT_OVIM_URL} openvim" -[[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${BASEFOLDER}/openvim checkout v2.0" +LATEST_STABLE_TAG=`git -C "${BASEFOLDER}/openvim" tag -l v[0-9].* | tail -n1` +[[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${BASEFOLDER}/openvim checkout tags/${LATEST_STABLE_TAG}" # Install debian dependencies before setup.py -[ "$_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 +if [[ -z "$NO_PACKAGES" ]] +then + [ "$_DISTRO" == "Ubuntu" ] && install_packages "libmysqlclient-dev" + #TODO check if that is the name in CentOS and RedHat + [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "libmysqlclient-dev" +fi make -C ${BASEFOLDER}/openvim lite rm -rf "${BASEFOLDER}/openvim" -OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'` +OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'` || + ! echo "ERROR installing python-lib-osm-openvim library!!!" >&2 || exit 1 if [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] then