summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-19 09:58:24 +0000
committerGerrit Code Review <review@openstack.org>2017-06-19 09:58:24 +0000
commit2627e3c009b580ef7f28eb3814f019f456674b3f (patch)
tree64a46db8ed08f324f22a37ea33bc6ef0c4c3cfdd
parent359fb0c7b1c754ed5f5a7daabc9355ac2197c8c4 (diff)
parent0cba3b2ccdcb556eaf31e520ec97e4e624baa01e (diff)
Merge "Permit changing yum configuration in the base image"
-rw-r--r--docker/base/Dockerfile.j24
-rw-r--r--docker/base/yum.conf9
-rw-r--r--docker/macros.j22
-rw-r--r--releasenotes/notes/yum_conf-36fef802e8c003f1.yaml4
4 files changed, 18 insertions, 1 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 2f5b5ea..60603ec 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -40,6 +40,10 @@ RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version
40 && cat /tmp/kolla_bashrc >> /etc/bashrc \ 40 && cat /tmp/kolla_bashrc >> /etc/bashrc \
41 && sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/yum.conf 41 && sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/yum.conf
42 42
43{% block base_yum_conf %}
44COPY yum.conf /etc/yum.conf
45{% endblock %}
46
43#### BEGIN REPO ENABLEMENT 47#### BEGIN REPO ENABLEMENT
44{% set base_yum_repo_files = [ 48{% set base_yum_repo_files = [
45 ] %} 49 ] %}
diff --git a/docker/base/yum.conf b/docker/base/yum.conf
new file mode 100644
index 0000000..6714771
--- /dev/null
+++ b/docker/base/yum.conf
@@ -0,0 +1,9 @@
1[main]
2keepcache=0
3logfile=/var/log/yum.log
4exactarch=1
5obsoletes=1
6gpgcheck=1
7plugins=1
8installonly_limit=0
9skip_missing_names_on_install=False
diff --git a/docker/macros.j2 b/docker/macros.j2
index 8c323cd..3be0ef5 100644
--- a/docker/macros.j2
+++ b/docker/macros.j2
@@ -1,7 +1,7 @@
1{% macro install_packages(packages) -%} 1{% macro install_packages(packages) -%}
2{% if packages is defined and packages|length > 0 -%} 2{% if packages is defined and packages|length > 0 -%}
3 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%} 3 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%}
4 RUN yum --setopt skip_missing_names_on_install=False -y install {{ packages | join(' ') }} && yum clean all 4 RUN yum -y install {{ packages | join(' ') }} && yum clean all
5 {%- elif base_distro in ['debian', 'ubuntu'] -%} 5 {%- elif base_distro in ['debian', 'ubuntu'] -%}
6 {#- 6 {#-
7 debian_package_install is a utility method to build up an appropriate 7 debian_package_install is a utility method to build up an appropriate
diff --git a/releasenotes/notes/yum_conf-36fef802e8c003f1.yaml b/releasenotes/notes/yum_conf-36fef802e8c003f1.yaml
new file mode 100644
index 0000000..8998c3a
--- /dev/null
+++ b/releasenotes/notes/yum_conf-36fef802e8c003f1.yaml
@@ -0,0 +1,4 @@
1---
2features:
3 - Allow to configure yum settings, and provide a default yum.conf that is
4 overridable via the base_yum_conf jinja2 block.