DIB: drop custom mirror elements
diskimage-builder supports a generic DIB_DISTRIBUTION_MIRROR that can replace all existing mirror elements Change-Id: Ia91dabf10e591f953440459edad35ebfc20c5890 Closes-Bug: #1703624
This commit is contained in:
parent
e37c0c7197
commit
d17dcea645
@ -101,7 +101,7 @@ CLOUD_INIT_DATASOURCES
|
||||
- Options: NoCloud, ConfigDrive, OVF, MAAS, Ec2, <others>
|
||||
- Reference: https://launchpad.net/cloud-init
|
||||
|
||||
BASE_OS_MIRROR
|
||||
DIB_DISTRIBUTION_MIRROR
|
||||
- URL to a mirror for the base OS selected
|
||||
- Default: None
|
||||
|
||||
|
@ -281,24 +281,12 @@ pushd $TEMP > /dev/null
|
||||
if [ "$AMP_BASEOS" = "ubuntu" ]; then
|
||||
AMP_element_sequence=${AMP_element_sequence:-"base vm ubuntu"}
|
||||
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND-ubuntu"
|
||||
if [ "$BASE_OS_MIRROR" ]; then
|
||||
AMP_element_sequence="$AMP_element_sequence apt-mirror"
|
||||
export UBUNTU_MIRROR="$BASE_OS_MIRROR"
|
||||
fi
|
||||
elif [ "$AMP_BASEOS" = "fedora" ]; then
|
||||
AMP_element_sequence=${AMP_element_sequence:-"base vm fedora selinux-permissive"}
|
||||
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
|
||||
if [ "$BASE_OS_MIRROR" ]; then
|
||||
AMP_element_sequence="$AMP_element_sequence fedora-mirror"
|
||||
export FEDORA_MIRROR="$BASE_OS_MIRROR"
|
||||
fi
|
||||
elif [ "$AMP_BASEOS" = "centos" ]; then
|
||||
AMP_element_sequence=${AMP_element_sequence:-"base vm centos7 selinux-permissive"}
|
||||
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
|
||||
if [ "$BASE_OS_MIRROR" ]; then
|
||||
AMP_element_sequence="$AMP_element_sequence centos-mirror"
|
||||
export CENTOS_MIRROR="$BASE_OS_MIRROR"
|
||||
fi
|
||||
elif [ "$AMP_BASEOS" = "rhel" ]; then
|
||||
AMP_element_sequence=${AMP_element_sequence:-"base vm rhel7 selinux-permissive"}
|
||||
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
|
||||
|
@ -21,7 +21,7 @@ commands = mkdir -p {toxinidir}/.amp_tox_test
|
||||
rm -rf {toxinidir}/.amp_tox_test
|
||||
|
||||
[testenv:docs]
|
||||
commands = doc8 README.rst ../elements/centos-mirror/README.rst ../elements/apt-mirror/README.rst ../elements/fedora-mirror/README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst
|
||||
commands = doc8 README.rst ../elements/haproxy-octavia/README.rst ../elements/root-passwd/README.rst
|
||||
|
||||
[testenv:bashate]
|
||||
commands = bashate diskimage-create.sh
|
||||
|
@ -1,3 +0,0 @@
|
||||
if [ -n "${UBUNTU_MIRROR:-}" ]; then
|
||||
echo "DEPRECATED WARNING: Use of apt-mirror element is deprecated. See http://docs.openstack.org/developer/diskimage-builder/elements/ubuntu/README.html and http://docs.openstack.org/developer/diskimage-builder/elements/apt-sources/README.html for alternate methods of setting an ubuntu mirror."
|
||||
fi
|
@ -1,16 +0,0 @@
|
||||
This element enables the use of a mirror for updating Ubuntu cloud images.
|
||||
Using a local mirror increases the speed of building the image.
|
||||
|
||||
Note: This element is deprectated in favor of the diskimage-builder methods
|
||||
for setting a mirror. See
|
||||
http://docs.openstack.org/developer/diskimage-builder/elements/ubuntu/README.html
|
||||
and
|
||||
http://docs.openstack.org/developer/diskimage-builder/elements/apt-sources/README.html
|
||||
for more information.
|
||||
|
||||
The Ubuntu mirror URL is specified by setting the 'UBUNTU_MIRROR' environment
|
||||
variable.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ export UBUNTU_MIRROR=http://<local mirror hostname>/<path to mirror>
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm /etc/apt/apt.conf.d/01proxy
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /etc/apt/apt.conf.d/
|
||||
touch /etc/apt/apt.conf.d/01proxy
|
||||
echo -e "Acquire::http { Proxy \"$UBUNTU_MIRROR\"; };" > /etc/apt/apt.conf.d/01proxy
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$UBUNTU_MIRROR" ]; then
|
||||
echo "You should specify parameter 'UBUNTU_MIRROR'"
|
||||
exit 2
|
||||
fi
|
@ -1,9 +0,0 @@
|
||||
This element enables the use of a mirror for updating CentOS cloud images.
|
||||
Using a local mirror increases the speed of building the image.
|
||||
|
||||
The CentOS mirror URL is specified by setting the 'CENTOS_MIRROR' environment
|
||||
variable.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ export CENTOS_MIRROR=http://<local mirror hostname>/<path to mirror>
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mv /opt/repos/* /etc/yum.repos.d/
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /opt/repos
|
||||
mv /etc/yum.repos.d/* /opt/repos/
|
||||
cat >> /etc/yum.repos.d/centos.repo <<EOF
|
||||
[Local-Repository]
|
||||
name=CentOS \$releasever - \$basearch - Local
|
||||
baseurl=$CENTOS_MIRROR
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
priority=1
|
||||
EOF
|
||||
yum makecache
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$CENTOS_MIRROR" ]; then
|
||||
echo "You should specify parameter 'CENTOS_MIRROR'"
|
||||
exit 2
|
||||
fi
|
@ -1,9 +0,0 @@
|
||||
This element enables the use of a mirror for updating Fedora cloud images.
|
||||
Using a local mirror increases the speed of building the image.
|
||||
|
||||
The Fedora mirror URL is specified by setting the 'FEDORA_MIRROR' environment
|
||||
variable.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ export FEDORA_MIRROR=http://<local mirror hostname>/<path to mirror>
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mv /opt/repos/* /etc/yum.repos.d/
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /opt/repos
|
||||
mv /etc/yum.repos.d/* /opt/repos
|
||||
cat >> /etc/yum.repos.d/fedora.repo <<EOF
|
||||
[Local-Repository]
|
||||
name=Fedora \$releasever - \$basearch - Local
|
||||
baseurl=$FEDORA_MIRROR
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
priority=1
|
||||
EOF
|
||||
yum makecache
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$FEDORA_MIRROR" ]; then
|
||||
echo "You should specify parameter 'FEDORA_MIRROR'"
|
||||
exit 2
|
||||
fi
|
@ -0,0 +1,14 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The diskimage-create script now supports generic download mirrors via the
|
||||
DIB_DISTRIBUTION_MIRROR environment variable, replacing the existing
|
||||
distribution-specific elements
|
||||
upgrade:
|
||||
- |
|
||||
For the diskimage-create script, the BASE_OS_MIRROR environment variable
|
||||
was renamed to DIB_DISTRIBUTION_MIRROR
|
||||
deprecations:
|
||||
- |
|
||||
These custom distribution mirror elements for the diskimage-script were
|
||||
removed: apt-mirror, centos-mirror, fedora-mirror
|
@ -82,7 +82,7 @@ Command syntax:
|
||||
.. line-block::
|
||||
|
||||
Environment variables supported by the script:
|
||||
BASE_OS_MIRROR - URL to a mirror for the base OS selected (-i).
|
||||
DIB_DISTRIBUTION_MIRROR - URL to a mirror for the base OS selected (-i).
|
||||
DIB_REPO_PATH - Path to the diskimage-builder repository (default: ../../diskimage-builder)
|
||||
ELEMENTS_REPO_PATH - Path to the /tripleo-image-elements repository (default: ../../tripleo-image-elements)
|
||||
DIB_ELEMENTS - Override the elements used to build the image
|
||||
|
Loading…
Reference in New Issue
Block a user