blob: 8e54f29bedc3dd975d04a809e7d19c8ebee2e08a [file] [log] [blame]
garciadeblasa1fc4572017-04-24 19:08:21 +02001#!/bin/bash
2#
3# Copyright 2016 Telefónica Investigación y Desarrollo, S.A.U.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# Authors:
18# - Gerardo Garcia - gerardo.garciadeblas@telefonica.com
19#
20
21HERE=$(realpath $(dirname $0))
22OSM_JENKINS=$(dirname $HERE)
23. $OSM_JENKINS/common/all_funcs
24
25# SET YOUR MDG repository name here
26export OSM_MDG=RO
27OSM_load_config
28
29# Installation starts here
30apt-get update
31
32apt-get -y install python-pip
33pip install --upgrade pip
34pip install pyvcloud
35pip install progressbar
36pip install prettytable
37pip install pyvmomi
38
39#Dependencies below will be installed directly from packages and must be removed
40#apt-get -y install libmysqlclient-dev libssl-dev libffi-dev mysql-client
41#apt-get -y install python-yaml python-bottle python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests python-logutils
42#apt-get -y install python-cinderclient python-glanceclient python-keystoneclient python-neutronclient python-novaclient python-mysqldb python-yaml
43#apt-get -y install python-boto
44
45#Release ONE
garciadeblas765e1362017-04-26 23:52:41 +020046#curl https://osm-download.etsi.org/repository/osm/debian/ReleaseONE/OSM%20ETSI%20Release%20Key.gpg |apt-key add -
47#add-apt-repository -y "deb https://osm-download.etsi.org/repository/osm/debian/ReleaseONE unstable RO openvim"
garciadeblasa1fc4572017-04-24 19:08:21 +020048#add-apt-repository -y "deb https://osm-download.etsi.org/repository/osm/debian/ReleaseONE stable RO openvim"
49
50#Release TWO
garciadeblas765e1362017-04-26 23:52:41 +020051curl https://osm-download.etsi.org/repository/osm/debian/ReleaseTWO/OSM%20ETSI%20Release%20Key.gpg |apt-key add -
52add-apt-repository -y "deb https://osm-download.etsi.org/repository/osm/debian/ReleaseTWO stable RO openvim"
garciadeblasa1fc4572017-04-24 19:08:21 +020053
54apt-get update
55apt-get -y install python-lib-osm-openvim
56apt-get -y install python-osm-ro
57
58OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'` || FATAL "lib-osm-openvim was not properly installed"
59OSMRO_PATH=`python -c 'import osm_ro; print osm_ro.__path__[0]'` || FATAL "osm-ro was not properly installed"
60
61${OSMRO_PATH}/database_utils/install-db-server.sh --updatedb || FATAL "osm-ro db installation failed"
62${OSMLIBOVIM_PATH}/database_utils/install-db-server.sh -u mano -p manopw -d mano_vim_db --updatedb || FATAL "lib-osm-openvim db installation failed"
63service osm-ro restart
64
65RC=$?
66INFO "done, RC=$RC"
67exit $RC
68
69