Skip to content

Commit

Permalink
Fixing contrail-openstack.deb package's dependency and new file
Browse files Browse the repository at this point in the history
for setup.sh exlcusively for 1604 based releases.
Closes-Bug: #1659698

Change-Id: I1c0c23b87fcdb2e9014013b0f80c940667218119
  • Loading branch information
moghea committed Jan 27, 2017
1 parent f5fb8f0 commit 5d43847
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 15 deletions.
73 changes: 73 additions & 0 deletions build/setup_ubuntu1604.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#! /bin/bash

# backup old directories in case of upgrade
if [ -d /opt/contrail/contrail_install_repo ]; then
mkdir -p /opt/contrail/contrail_install_repo_backup
mv /opt/contrail/contrail_install_repo/* /opt/contrail/contrail_install_repo_backup/
fi

# copy files over
mkdir -p /opt/contrail/contrail_install_repo
cd /opt/contrail/contrail_install_repo; tar xvzf /opt/contrail/contrail_packages/contrail_debs.tgz

# create shell scripts and put to bin
mkdir -p /opt/contrail/bin

cd /opt/contrail/contrail_install_repo
DEBIAN_FRONTEND=noninteractive dpkg -i binutils_*.deb dpkg-dev_*.deb libdpkg-perl_*.deb make_*.deb patch_*.deb xz-utils_*.deb

cd /etc/apt/
# create repo with only local packages
datetime_string=`date +%Y_%m_%d__%H_%M_%S`
cp sources.list sources.list.$datetime_string
echo "deb file:/opt/contrail/contrail_install_repo ./" > local_repo

#modify /etc/apt/soruces.list/ to add local repo on the top
grep "^deb file:/opt/contrail/contrail_install_repo ./" sources.list

if [ $? != 0 ]; then
cat local_repo sources.list > new_sources.list
mv new_sources.list sources.list
fi

# Allow unauthenticated pacakges to get installed.
# Do not over-write apt.conf. Instead just append what is necessary
# retaining other useful configurations such as http::proxy info.
apt_auth="APT::Get::AllowUnauthenticated \"true\";"
grep --quiet "^$apt_auth" apt.conf
if [ "$?" != "0" ]; then
echo "$apt_auth" >> apt.conf
fi

#install local repo preferences from /opt/contrail/ to /etc/apt/
cp /opt/contrail/contrail_packages/preferences /etc/apt/preferences

#scan pkgs in local repo and create Packages.gz
cd /opt/contrail/contrail_install_repo
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
apt-get update

#install python-software-properties and curl
DEBIAN_FRONTEND=noninteractive sudo apt-get -y --force-yes --allow-unauthenticated install python-software-properties

# install base packages and fabric utils
DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes --allow-unauthenticated install contrail-fabric-utils
DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes --allow-unauthenticated install contrail-setup

#Use pip after installing contrail-fabric-utils
# install Fabric
pip install --upgrade --no-deps --index-url='' /opt/contrail/python_packages/Fabric-*.tar.gz

#disabled sun-java-jre and sun-java-bin prompt during installation, add oracle license acceptance in debconf
echo 'sun-java6-plugin shared/accepted-sun-dlj-v1-1 boolean true' | /usr/bin/debconf-set-selections
echo 'sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true' | /usr/bin/debconf-set-selections
echo 'sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true' | /usr/bin/debconf-set-selections
echo 'debconf shared/accepted-oracle-license-v1-1 select true' | sudo debconf-set-selections
echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | sudo debconf-set-selections

#sudo add-apt-repository -y cloud-archive:havana
#sudo add-apt-repository -y ppa:webupd8team/java
#sudo add-apt-repository -y ppa:nilarimogard/webupd8
#echo "deb http://www.apache.org/dist/cassandra/debian 11x main" | sudo tee /etc/apt/sources.list.d/cassandra.list
#curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add
#apt-get update
4 changes: 4 additions & 0 deletions common/debian/contrail-install-packages/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ ifeq ($(DISTRIB_RELEASE),14.04)
SETUP_FILE := $(SB_TOP)/tools/packaging/build/setup_ubuntu1404.sh
endif

ifeq ($(DISTRIB_RELEASE),16.04)
SETUP_FILE := $(SB_TOP)/tools/packaging/build/setup_ubuntu1604.sh
endif

ifeq ($(CONTRAIL_SKU),juno)
SETUP_FILE := $(SB_TOP)/tools/packaging/build/setup_ubuntu_juno.sh
endif
Expand Down
2 changes: 1 addition & 1 deletion common/debian/contrail-openstack/debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Build-Depends:
Package: contrail-openstack
Architecture: all
Maintainer: rrugge <rrugge@juniper.net>
Depends: python-contrail, openstack-dashboard, contrail-openstack-dashboard, glance, keystone, nova-api, nova-common, nova-conductor, nova-console, nova-scheduler, cinder-api, cinder-common, cinder-scheduler, mysql-server-wsrep, libssl0.9.8, contrail-setup, contrail-utils, memcached, nova-novncproxy, nova-consoleauth, python-m2crypto, haproxy (>=1.5.4-1ppa1~precise), apache2, libapache2-mod-wsgi, python-memcache, python-iniparse, python-qpid, euca2ools, nfs-common, supervisor, rabbitmq-server, contrail-nova-networkapi, qemu-utils
Depends: python-contrail, openstack-dashboard, glance, keystone, nova-api, nova-common, nova-conductor, nova-console, nova-scheduler, cinder-api, cinder-common, cinder-scheduler, mysql-client, mysql-wsrep-server-5.7, libssl1.0.0, contrail-setup, contrail-utils, memcached, nova-novncproxy, nova-consoleauth, python-m2crypto, haproxy, apache2, libapache2-mod-wsgi, python-memcache, python-iniparse, python-qpid, euca2ools, nfs-common, rabbitmq-server, heat-api, heat-api-cfn, heat-engine, heat-common, python-extras, python-heat, python-mimeparse, python-testtools, contrail-heat, contrail-nova-networkapi, barbican-api, barbican-worker
Section: contrail-openstack
Priority: extra
Description: Contrail Openstack composite debian package
14 changes: 0 additions & 14 deletions common/debian/contrail-openstack/debian/control.newton.in

This file was deleted.

0 comments on commit 5d43847

Please sign in to comment.