X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=scripts%2Finstall-openmano.sh;h=e40b570b91a3e98f448bbdd05913763b835c540e;hb=c53ebfa243b7cafadfd3526d8d8505b2ae10494b;hp=9e76b0df7fc6166fd59f72fdeace59890f6419ce;hpb=59f45266ae0e573d0d4e6dcfec04f4a715faeaf2;p=osm%2FRO.git diff --git a/scripts/install-openmano.sh b/scripts/install-openmano.sh index 9e76b0df..e40b570b 100755 --- a/scripts/install-openmano.sh +++ b/scripts/install-openmano.sh @@ -70,6 +70,7 @@ function db_exists() { } GIT_URL=https://osm.etsi.org/gerrit/osm/RO.git +GIT_OVIM_URL=https://osm.etsi.org/gerrit/osm/openvim.git DBUSER="root" DBPASSWD="" DBPASSWD_PARAM="" @@ -207,8 +208,8 @@ echo ' ################################################################# ##### INSTALL REQUIRED PACKAGES ##### #################################################################' -[ "$_DISTRO" == "Ubuntu" ] && install_packages "git screen wget mysql-server" -[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "git screen wget mariadb mariadb-server" +[ "$_DISTRO" == "Ubuntu" ] && install_packages "git make screen wget mysql-server" +[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "git make screen wget mariadb mariadb-server" if [[ "$_DISTRO" == "Ubuntu" ]] then @@ -261,6 +262,8 @@ echo ' #################################################################' [ "$_DISTRO" == "Ubuntu" ] && install_packages "python-yaml python-bottle python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests python-logutils libxml2-dev libxslt-dev python-dev python-pip" [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && install_packages "PyYAML MySQL-python python-jsonschema python-paramiko python-argcomplete python-requests python-logutils libxslt-devel libxml2-devel python-devel python-pip" +#The only way to install python-bottle on Centos7 is with easy_install or pip +[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && easy_install -U bottle #required for vmware connector TODO move that to separete opt in install script sudo pip install --upgrade pip @@ -269,8 +272,9 @@ sudo pip install progressbar sudo pip install prettytable sudo pip install pyvmomi -#The only way to install python-bottle on Centos7 is with easy_install or pip -[ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] && easy_install -U bottle +#requiered 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" @@ -284,9 +288,20 @@ if [[ -z $NOCLONE ]]; then #################################################################' su $SUDO_USER -c "git clone ${GIT_URL} ${OPENMANO_BASEFOLDER}" su $SUDO_USER -c "cp ${OPENMANO_BASEFOLDER}/.gitignore-common ${OPENMANO_BASEFOLDER}/.gitignore" - [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${OPENMANO_BASEFOLDER} checkout tags/v1.0.2" + [[ -z $DEVELOP ]] && su $SUDO_USER -c "git -C ${OPENMANO_BASEFOLDER} checkout tags/v1.1.0" fi +echo ' +################################################################# +##### INSTALLING OVIM LIBRARY ##### +#################################################################' +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" +make -C ${OPENMANO_BASEFOLDER}/openvim lite + echo ' ################################################################# ##### CREATE DATABASE ##### @@ -325,8 +340,14 @@ echo ' ################################################################# ##### INIT DATABASE ##### #################################################################' -su $SUDO_USER -c "${OPENMANO_BASEFOLDER}/database_utils/init_mano_db.sh -u mano -p manopw -d mano_db" || ! echo "Failed while initializing database" || exit 1 +su $SUDO_USER -c "${OPENMANO_BASEFOLDER}/database_utils/init_mano_db.sh -u mano -p manopw -d mano_db" || ! echo "Failed while initializing main database" || exit 1 +echo ' +################################################################# +##### CREATE AND INIT MANO_VIM DATABASE ##### +#################################################################' +# Install mano_vim_db after setup +su $SUDO_USER -c "${OPENMANO_BASEFOLDER}/openvim/database_utils/install-db-server.sh -U $DBUSER ${DBPASSWD_PARAM/p/P} -u mano -p manopw -d mano_vim_db" || ! echo "Failed while installing ovim database" || exit 1 if [ "$_DISTRO" == "CentOS" -o "$_DISTRO" == "Red" ] then