Merge "Use web repo with installed packages for image build"
This commit is contained in:
commit
64a003756b
@ -16,7 +16,7 @@ package_images: true
|
||||
overcloud_repo_paths:
|
||||
- "$(ls /etc/yum.repos.d/delorean*)"
|
||||
- "$(ls /etc/yum.repos.d/CentOS-Ceph-*)"
|
||||
- "$(ls /etc/yum.repos.d/gating.repo)"
|
||||
- "$(ls {{working_dir}}/web-gating.repo)"
|
||||
image_build_yaml_paths:
|
||||
- "/usr/share/tripleo-common/image-yaml/overcloud-images-centos7.yaml"
|
||||
- "/usr/share/tripleo-common/image-yaml/overcloud-images.yaml"
|
||||
|
@ -21,6 +21,7 @@ Role Variables
|
||||
* `ib_repo_image_inject`: false/true - where to inject and run repo install script on specified image (default: false)
|
||||
* `ib_repo_image_path`: path to image, in case of injecting repositories into the image
|
||||
* `ib_repo_host`: host where built repo exists, if it's not the same host where this roles runs
|
||||
* `ib_create_web_repo`: false/true - Create web accessible repository in directory with built packages (default: false)
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
@ -7,6 +7,7 @@ ib_repo_file_path: "{{ ib_repo_workdir}}/gating_repo.tar.gz"
|
||||
ib_repo_image_inject: false
|
||||
ib_repo_image_path: "{{ ib_repo_workdir }}/overcloud-full.qcow2"
|
||||
ib_gating_repo_enabled: true
|
||||
ib_create_web_repo: false
|
||||
# Configure host where gate_repo files exists, if it's not the host
|
||||
# where this role is executed
|
||||
# ib_repo_host:
|
||||
# ib_repo_host:
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
mkdir -p /opt
|
||||
pushd /opt
|
||||
@ -13,6 +14,22 @@ gpgcheck=0
|
||||
priority=1
|
||||
EOF
|
||||
|
||||
{% if ib_create_web_repo|bool %}
|
||||
ps -ef | grep -i python | grep SimpleHTTPServer | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
|
||||
pushd /opt/gating_repo
|
||||
iptables -I INPUT -p tcp --dport 8766 -j ACCEPT
|
||||
nohup python -m SimpleHTTPServer 8766 1>{{ working_dir }}/yum_mirror.log 2>{{ working_dir }}/yum_mirror_error.log &
|
||||
popd
|
||||
cat > {{ working_dir }}//web-gating.repo << EOF
|
||||
[gating-repo]
|
||||
name=Gating repository
|
||||
baseurl=http://localhost:8766/
|
||||
enabled={{ ib_gating_repo_enabled | bool | ternary('1', '0') }}
|
||||
gpgcheck=0
|
||||
priority=1
|
||||
EOF
|
||||
{% endif %}
|
||||
|
||||
{% if ib_gating_repo_enabled|bool %}
|
||||
yum --enablerepo="gating-repo" update -y
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user