Switch ubuntu DIB to use AFS mirror in rackspace

We currently have an issue where we are installing newer packages at
image build time, then our AFS mirrors actually have downloaded. To
avoid problems in the gate, make sure we use the same source for both
image builds and test jobs.

Enable --allow-unauthenticated for APT packages.

Change-Id: I22e3cdcb903a905956fe24f329af1342e7f1089d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger
2017-10-12 11:23:53 -04:00
parent 297cd8cc53
commit 5d5fd62172
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,29 @@
#!/bin/bash
# Copyright 2017 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# NOTE(pabelanger): Because our AFS mirrors are not signed, we need to allow
# unauthenticated packages.
if [ -d "$TARGET_ROOT/etc/apt/apt.conf.d" ]; then
echo "APT::Get::AllowUnauthenticated \"true\";" | sudo tee $TARGET_ROOT/etc/apt/apt.conf.d/95allow-unauthenticated
fi
+4
View File
@@ -1077,6 +1077,8 @@ diskimages:
DIB_APT_LOCAL_CACHE: '0'
DIB_DISABLE_APT_CLEANUP: '1'
DIB_GRUB_TIMEOUT: '0'
DIB_DISTRIBUTION_MIRROR: 'http://mirror.dfw.rax.openstack.org/ubuntu'
DIB_DEBOOTSTRAP_EXTRA_ARGS: '--no-check-gpg'
DIB_DEBIAN_COMPONENTS: 'main,universe'
- name: ubuntu-xenial
elements:
@@ -1097,6 +1099,8 @@ diskimages:
DIB_APT_LOCAL_CACHE: '0'
DIB_DISABLE_APT_CLEANUP: '1'
DIB_GRUB_TIMEOUT: '0'
DIB_DISTRIBUTION_MIRROR: 'http://mirror.dfw.rax.openstack.org/ubuntu'
DIB_DEBOOTSTRAP_EXTRA_ARGS: '--no-check-gpg'
DIB_DEBIAN_COMPONENTS: 'main,universe'
- name: centos-7
elements: