allow unauthenticated packages to be installed

Sometimes, trove image builds fail because of package authentication
issues. This is often times related to the inability to get to a key
server, and not indicative of anything more serious than that.

The (strongly discouraged in production use cases) workaround for this
is to pass the --allow-unauthenticated option to apt-get install.

I say 'Closes-Bug' below but I realize that this is a white lie. What
it fixes is only the Trove elements. The image build process uses
elements from other places (triple-o, for example). These can still
fail for the same reason.

There is a much bigger hammer that we can use if we need it, and that
is to throw the line 'APT::Get::AllowUnauthenticated "true";' into a
conf file in /etc/apt/apt.conf.d/.

If this hammer isn't big enough, we can revist later.

Change-Id: I009697332bb2a8e1e60b17c10944faed5c311da3
Closes-Bug:#1646856
This commit is contained in:
Amrith Kumar 2016-12-02 10:08:13 -05:00 committed by Amrith Kumar
parent 4f9c538f68
commit ae74cd056e
18 changed files with 37 additions and 37 deletions

View File

@ -4,16 +4,16 @@ set -ex
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy curl
apt-get --allow-unauthenticated install -qy curl
echo "deb http://debian.datastax.com/community stable main" >> /etc/apt/sources.list.d/cassandra.sources.list
curl -L http://debian.datastax.com/debian/repo_key | apt-key add -
apt-get update
apt-get install -qy openjdk-7-jdk expect python-dev
apt-get install -qy libxml2-dev ntp mc
apt-get install -qy libxslt1-dev python-pexpect
apt-get install -qy python-migrate build-essential
apt-get --allow-unauthenticated install -qy openjdk-7-jdk expect python-dev
apt-get --allow-unauthenticated install -qy libxml2-dev ntp mc
apt-get --allow-unauthenticated install -qy libxslt1-dev python-pexpect
apt-get --allow-unauthenticated install -qy python-migrate build-essential
apt-get install dsc21=2.1.* cassandra=2.1.* -qy
apt-get --allow-unauthenticated install dsc21=2.1.* cassandra=2.1.* -qy
# The Python Driver 2.0 for Apache Cassandra.
pip2 install cassandra-driver

View File

@ -2,7 +2,7 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy curl
apt-get install -qy libssl0.9.8
apt-get --allow-unauthenticated install -qy curl
apt-get --allow-unauthenticated install -qy libssl0.9.8
curl -O http://packages.couchbase.com/releases/2.2.0/couchbase-server-community_2.2.0_x86_64.deb
INSTALL_DONT_START_SERVER=1 dpkg -i couchbase-server-community_2.2.0_x86_64.deb

View File

@ -6,14 +6,14 @@ set -o xtrace
export DEBIAN_FRONTEND=noninteractive
# install the ppa-finding tool for ubuntu 12.0.4 release
apt-get install -y python-software-properties
apt-get --allow-unauthenticated install -y python-software-properties
add-apt-repository -y ppa:couchdb/stable
# update cached list of packages
apt-get update -y
# remove any existing couchdb binaries
apt-get remove -yf couchdb couchdb-bin couchdb-common
# install couchdb
apt-get install -yV couchdb
apt-get --allow-unauthenticated install -yV couchdb
# install curl to provide a way to interact with CouchDB
# over HTTP REST API
apt-get install -qy curl
apt-get --allow-unauthenticated install -qy curl

View File

@ -19,8 +19,8 @@ echo "127.0.0.1 ${host_name}" >> /etc/hosts
tar -xvzf /tmp/in_target.d/db2.tar.gz
# installing dependencies
apt-get install libaio1
apt-get install libstdc++6
apt-get --allow-unauthenticated install libaio1
apt-get --allow-unauthenticated install libstdc++6
# start the installation process. Accepts the default installation directory '/opt/ibm/db2/V10.5'
${DB2_PKG_LOCATION}/expc/db2_install -b /opt/ibm/db2/V10.5 -f sysreq -l ${DB2_PKG_LOCATION}/db2_install.log

View File

@ -7,4 +7,4 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get -y install ntp apparmor-utils
apt-get --allow-unauthenticated -y install ntp apparmor-utils

View File

@ -7,7 +7,7 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get -y install python-dev libxml2-dev libxslt1-dev python-setuptools \
apt-get --allow-unauthenticated -y install python-dev libxml2-dev libxslt1-dev python-setuptools \
python-pip python-sqlalchemy python-lxml \
python-routes python-eventlet python-webob \
python-pastedeploy python-paste python-netaddr \

View File

@ -4,4 +4,4 @@
set -e
set -o xtrace
apt-get install -y language-pack-en python-software-properties
apt-get --allow-unauthenticated install -y language-pack-en python-software-properties

View File

@ -5,4 +5,4 @@ set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get -y install mongodb-org=3.2.6
apt-get --allow-unauthenticated -y install mongodb-org=3.2.6

View File

@ -5,7 +5,7 @@ set -o xtrace
[ -n "${RELEASE}" ] || die "RELEASE must be set to either Precise or Quantal"
apt-get -y install software-properties-common
apt-get --allow-unauthenticated -y install software-properties-common
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

View File

@ -14,4 +14,4 @@ export DEBIAN_FRONTEND=noninteractive
if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then
PXB_VERSION_OVERRIDE="-22"
fi
apt-get -y install percona-toolkit percona-server-common-5.6 percona-server-server-5.6 percona-server-test-5.6 percona-server-client-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}
apt-get --allow-unauthenticated -y install percona-toolkit percona-server-common-5.6 percona-server-server-5.6 percona-server-test-5.6 percona-server-client-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}

View File

@ -31,7 +31,7 @@ exit \$?
_EOF_
apt-get -y install postgresql-9.4 postgresql-contrib-9.4 postgresql-server-dev-9.4
apt-get --allow-unauthenticated -y install postgresql-9.4 postgresql-contrib-9.4 postgresql-server-dev-9.4
###########################################
# Hack alert:
@ -50,19 +50,19 @@ git clone https://github.com/vmware/pg_rewind.git --branch REL9_4_STABLE
dev_pkgs="libreadline-dev libkrb5-dev libssl-dev libpam-dev libxml2-dev libxslt-dev libedit-dev libselinux1-dev bison flex"
apt-get install $dev_pkgs -y
apt-get --allow-unauthenticated install $dev_pkgs -y
# Unfortunately, on ubuntu, was not able to get pg_rewind to build
# outside of the pgsql source tree. Configure and compile postgres
# but only call make install against the contrib/pg_rewind directory
# so that support library is accessible to the server
cd $tmpdir/postgres
./configure
./configure
make
cd contrib/pg_rewind
make install
# Make the pg_rewind binary and the library used by the
# Make the pg_rewind binary and the library used by the
# pg_rewind stored procedures accessible
ln -s /usr/local/pgsql/bin/pg_rewind /usr/bin/pg_rewind
ln -s /usr/local/pgsql/lib/pg_rewind_support.so /usr/lib/postgresql/9.4/lib/pg_rewind_support.so
@ -75,5 +75,5 @@ apt-get remove -y $dev_pkgs
################################
# Install the native Python client.
apt-get -y install libpq-dev
apt-get --allow-unauthenticated -y install libpq-dev
pip2 install psycopg2

View File

@ -7,7 +7,7 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get -y install percona-xtradb-cluster-server-5.6 percona-xtradb-cluster-client-5.6 percona-xtrabackup
apt-get --allow-unauthenticated -y install percona-xtradb-cluster-server-5.6 percona-xtradb-cluster-client-5.6 percona-xtrabackup
# Don't auto start mysql (we'll start it up in guest)
update-rc.d mysql defaults

View File

@ -34,7 +34,7 @@ _EOF_
add-apt-repository -y ppa:chris-lea/redis-server
apt-get -y update
apt-get install -y redis-server
apt-get --allow-unauthenticated install -y redis-server
cat > "/etc/default/redis-server" << _EOF_
# Call ulimit -n with this argument prior to invoking Redis itself.

View File

@ -10,7 +10,7 @@ export DEBIAN_FRONTEND=noninteractive
# NOTE(vkmc): Using MariaDB repositories is required
# https://mariadb.com/kb/en/mariadb/installing-mariadb-deb-files/
apt-get -y install software-properties-common
apt-get --allow-unauthenticated -y install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu trusty main'
@ -25,8 +25,8 @@ apt-get -y update
if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then
PXB_VERSION_OVERRIDE="-22"
fi
apt-get -y install socat percona-xtrabackup${PXB_VERSION_OVERRIDE}
apt-get -y install libmariadbclient18 mariadb-server
apt-get --allow-unauthenticated -y install socat percona-xtrabackup${PXB_VERSION_OVERRIDE}
apt-get --allow-unauthenticated -y install libmariadbclient18 mariadb-server
cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_
[mysqld]

View File

@ -15,7 +15,7 @@ export DEBIAN_FRONTEND=noninteractive
if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then
PXB_VERSION_OVERRIDE="-22"
fi
apt-get -y install libmysqlclient18 mysql-server-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}
apt-get --allow-unauthenticated -y install libmysqlclient18 mysql-server-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}
cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_
[mysqld]

View File

@ -13,11 +13,11 @@ export DEBIAN_FRONTEND=noninteractive
dd if=/tmp/in_target.d/vertica.deb of=/vertica.deb
# Install base packages
apt-get install -qy build-essential bc iptables
apt-get install -qy curl sysstat pstack mcelog
apt-get install -qy python-dev g++ unixODBC unixODBC-dev dialog
apt-get install -qy dialog libbz2-dev libboost-all-dev libcurl4-gnutls-dev
apt-get install -qy openjdk-7-jdk
apt-get --allow-unauthenticated install -qy build-essential bc iptables
apt-get --allow-unauthenticated install -qy curl sysstat pstack mcelog
apt-get --allow-unauthenticated install -qy python-dev g++ unixODBC unixODBC-dev dialog
apt-get --allow-unauthenticated install -qy dialog libbz2-dev libboost-all-dev libcurl4-gnutls-dev
apt-get --allow-unauthenticated install -qy openjdk-7-jdk
# Install Vertica package
dpkg -i /vertica.deb

View File

@ -11,7 +11,7 @@ export DEBIAN_FRONTEND=noninteractive
add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
apt-get -y update
apt-get -y install mysql-client-5.6 mysql-server-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}
apt-get --allow-unauthenticated -y install mysql-client-5.6 mysql-server-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE}
cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_
[mysqld]

View File

@ -672,7 +672,7 @@ function install_test_packages() {
sudo -H $HTTP_PROXY curl http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
echo "deb http://packages.couchbase.com/ubuntu trusty trusty/main" | sudo tee /etc/apt/sources.list.d/couchbase-csdk.list
sudo -H $HTTP_PROXY apt-get update
sudo -H $HTTP_PROXY apt-get -y install libcouchbase-dev
sudo -H $HTTP_PROXY apt-get --allow-unauthenticated -y install libcouchbase-dev
sudo -H $HTTP_PROXY pip install --upgrade couchbase
fi
fi