-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing contrail-openstack.deb package's dependency and new file
for setup.sh exlcusively for 1604 based releases. Closes-Bug: #1659698 Change-Id: I1c0c23b87fcdb2e9014013b0f80c940667218119
- Loading branch information
Showing
4 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.