Skip to content

Commit

Permalink
Merge pull request #642 from stackhpc/yoga-xena-merge
Browse files Browse the repository at this point in the history
yoga: xena merge
  • Loading branch information
markgoddard authored Sep 14, 2023
2 parents 18e4eb1 + 908d751 commit afcd80d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/stackhpc-container-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ jobs:
container-sync.yml \
--repo stackhpc/stackhpc-release-train \
--ref main \
-f filter="$filter"
-f filter="$filter" \
-f sync-new-images=false
env:
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}

Expand Down
32 changes: 31 additions & 1 deletion etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,18 @@ stackhpc_ubuntu_focal_repos:
- "deb {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/{{ openstack_release }} main"

# Whether to revert to the upstream mirrors in built Kolla container images.
stackhpc_kolla_clean_up_repo_mirrors: true

# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
kolla_build_blocks:
base_header: |
{% if kolla_base_distro in ['centos', 'rocky'] %}
RUN \
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
mkdir -p /etc/yum.repos.d.backup && \
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
{% endif %}
{% for repo in stackhpc_yum_repos %}
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
Expand All @@ -302,6 +309,10 @@ kolla_build_blocks:
{# fixme #}
{% if kolla_base_distro in ['centos', 'rocky'] %}
&& \
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
tar -czf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d . && \
{% endif %}
{% for repo in base_centos_repo_overrides_post_yum_list %}
sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
-e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
Expand All @@ -311,11 +322,30 @@ kolla_build_blocks:
{% endif %}
base_ubuntu_package_sources_list: |
RUN \
rm -f /etc/apt/sources.list && \
mv /etc/apt/sources.list{,.backup} && \
{% for repo in stackhpc_ubuntu_focal_repos %}
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
{% endif %}
{% endfor %}
footer: |
{% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
{% if kolla_base_distro == 'centos' %}
RUN \
tar -xzf /etc/yum.repos.d.backup/repos.tar.gz -C /etc/yum.repos.d && \
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/yum.repos.d; then \
echo "Found repository mirror in Yum repositories"; \
exit 1; \
fi && \
rm -rf /etc/yum.repos.d.backup/
{% else %}
RUN \
mv /etc/apt/sources.list.backup /etc/apt/sources.list && \
if grep -r '{{ stackhpc_repo_mirror_url }}' /etc/apt/sources.list; then \
echo "Found repository mirror in APT repositories"; \
exit 1; \
fi
{% endif %}
{% endif %}
bifrost_base_header: |
ADD additions-archive /
grafana_plugins_install: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Upstream package repository mirrors are now restored in Kolla container
images. This makes it possible to install or update packages for debugging
purposes.

0 comments on commit afcd80d

Please sign in to comment.