summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmrith Kumar <amrith@amrith.org>2016-12-02 10:08:13 -0500
committerAmrith Kumar <amrith@tesora.com>2016-12-20 06:48:53 -0500
commitae74cd056e72f894540bc17d594b9ca9a249f9a2 (patch)
tree5aa3fa3f7eb8e6b05606322ee90af889bdd5f3d2
parent4f9c538f682c0f7234110ec5d1abe933e4ab5bde (diff)
downloadtrove-ae74cd056e72f894540bc17d594b9ca9a249f9a2.tar.gz
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
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra12
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase4
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb6
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-db2/install.d/10-db24
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/install.d/05-base-apps2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-percona/install.d/30-mysql2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql10
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-pxc/install.d/30-mysql2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-redis/install.d/30-redis2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-trusty-mariadb/install.d/30-mariadb6
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-trusty-mysql/install.d/30-mysql2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica10
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-xenial-mysql/install.d/30-mysql2
-rwxr-xr-xintegration/scripts/trovestack2
18 files changed, 37 insertions, 37 deletions
diff --git a/integration/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra b/integration/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra
index aa9e24bf..54e34d68 100755
--- a/integration/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra
+++ b/integration/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase b/integration/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase
index 0dc67d8b..1303fdfd 100755
--- a/integration/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase
+++ b/integration/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb b/integration/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb
index 77871d3f..b53f7faa 100755
--- a/integration/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb
+++ b/integration/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-db2/install.d/10-db2 b/integration/scripts/files/elements/ubuntu-db2/install.d/10-db2
index 63bc3bf7..4495e95a 100755
--- a/integration/scripts/files/elements/ubuntu-db2/install.d/10-db2
+++ b/integration/scripts/files/elements/ubuntu-db2/install.d/10-db2
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-guest/install.d/05-base-apps b/integration/scripts/files/elements/ubuntu-guest/install.d/05-base-apps
index 5cd392b2..3a8cacfb 100755
--- a/integration/scripts/files/elements/ubuntu-guest/install.d/05-base-apps
+++ b/integration/scripts/files/elements/ubuntu-guest/install.d/05-base-apps
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep b/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
index 697d3610..c79ad877 100755
--- a/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
+++ b/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
@@ -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 \
diff --git a/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools b/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
index 1a8647f5..8360ddfc 100755
--- a/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
+++ b/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
@@ -4,4 +4,4 @@
set -e
set -o xtrace
-apt-get install -y language-pack-en python-software-properties \ No newline at end of file
+apt-get --allow-unauthenticated install -y language-pack-en python-software-properties \ No newline at end of file
diff --git a/integration/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb b/integration/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb
index 6a95d2f0..4ab5c349 100755
--- a/integration/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb
+++ b/integration/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key b/integration/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key
index 1538d61c..1345f508 100755
--- a/integration/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key
+++ b/integration/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-percona/install.d/30-mysql b/integration/scripts/files/elements/ubuntu-percona/install.d/30-mysql
index 5d5b4265..d5a8ac5b 100755
--- a/integration/scripts/files/elements/ubuntu-percona/install.d/30-mysql
+++ b/integration/scripts/files/elements/ubuntu-percona/install.d/30-mysql
@@ -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}
diff --git a/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql b/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql
index f3a107a4..d5b5f505 100755
--- a/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql
+++ b/integration/scripts/files/elements/ubuntu-postgresql/install.d/30-postgresql
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-pxc/install.d/30-mysql b/integration/scripts/files/elements/ubuntu-pxc/install.d/30-mysql
index ae658957..d9f2f427 100755
--- a/integration/scripts/files/elements/ubuntu-pxc/install.d/30-mysql
+++ b/integration/scripts/files/elements/ubuntu-pxc/install.d/30-mysql
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis b/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis
index 6930f519..84b091f1 100755
--- a/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis
+++ b/integration/scripts/files/elements/ubuntu-redis/install.d/30-redis
@@ -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.
diff --git a/integration/scripts/files/elements/ubuntu-trusty-mariadb/install.d/30-mariadb b/integration/scripts/files/elements/ubuntu-trusty-mariadb/install.d/30-mariadb
index 065c2f98..eba83c70 100755
--- a/integration/scripts/files/elements/ubuntu-trusty-mariadb/install.d/30-mariadb
+++ b/integration/scripts/files/elements/ubuntu-trusty-mariadb/install.d/30-mariadb
@@ -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]
diff --git a/integration/scripts/files/elements/ubuntu-trusty-mysql/install.d/30-mysql b/integration/scripts/files/elements/ubuntu-trusty-mysql/install.d/30-mysql
index d31292ec..887bda2f 100755
--- a/integration/scripts/files/elements/ubuntu-trusty-mysql/install.d/30-mysql
+++ b/integration/scripts/files/elements/ubuntu-trusty-mysql/install.d/30-mysql
@@ -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]
diff --git a/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica b/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica
index 2d50bc6a..bd2b72ac 100755
--- a/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica
+++ b/integration/scripts/files/elements/ubuntu-vertica/install.d/97-vertica
@@ -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
diff --git a/integration/scripts/files/elements/ubuntu-xenial-mysql/install.d/30-mysql b/integration/scripts/files/elements/ubuntu-xenial-mysql/install.d/30-mysql
index 9f0133f4..75ccdc66 100755
--- a/integration/scripts/files/elements/ubuntu-xenial-mysql/install.d/30-mysql
+++ b/integration/scripts/files/elements/ubuntu-xenial-mysql/install.d/30-mysql
@@ -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]
diff --git a/integration/scripts/trovestack b/integration/scripts/trovestack
index a25894f3..4f4ebfb9 100755
--- a/integration/scripts/trovestack
+++ b/integration/scripts/trovestack
@@ -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