Comment 2 for bug 1804412

Revision history for this message
Changcheng Intel (liuc-intel) wrote :

I'm using below ways to run "download_mirror.sh"

1. get stx-tools
cd $HOME
git clone https://git.starlingx.io/stx-tools
cd stx-tools
git checkout -b erich_base 1d2ecbb0be2

2. apply below patch
nstcc1@nstcloudcc1:stx-tools$ git diff
diff --git a/centos-mirror-tools/Dockerfile b/centos-mirror-tools/Dockerfile
index eb1f457..28569b2 100644
--- a/centos-mirror-tools/Dockerfile
+++ b/centos-mirror-tools/Dockerfile
@@ -4,13 +4,13 @@ FROM centos:7.4.1708

 WORKDIR /localdisk

-#ENV http_proxy "http://your.actual_http_proxy.com:your_port"
-#ENV https_proxy "https://your.actual_https_proxy.com:your_port"
+ENV http_proxy "http://child-prc.intel.com:913"
+ENV https_proxy "https://child-prc.intel.com:913"
 #ENV ftp_proxy "http://your.actual_ftp_proxy.com:your_port"

-#RUN echo "proxy=$http_proxy" >> /etc/yum.conf && \
-# echo -e "export http_proxy=$http_proxy\nexport https_proxy=$https_proxy\n\
-#export ftp_proxy=$ftp_proxy" >> /root/.bashrc
+RUN echo "proxy=$http_proxy" >> /etc/yum.conf && \
+ echo -e "export http_proxy=$http_proxy\nexport https_proxy=$https_proxy\n\
+export ftp_proxy=$ftp_proxy" >> /root/.bashrc

 RUN yum install -y epel-release sudo vim-enhanced net-tools git \
         /usr/bin/yumdownloader rpm-build rpm-sign deltarpm wget bind \

3. build docker image
cd centos-mirror-tools
docker build --build-arg https_proxy=http://child-prc.intel.com:913 --build-arg http_proxy=http://child-prc.intel.com:913 --tag $USER:centos-mirror-repository -f Dockerfile .

4. run docker image into the container
docker run -it --name $USER-centos-mirror-repository --volume $(pwd):/localdisk $USER:centos-mirror-repository

5. execute below command in the container
bash download_mirror.sh

6. result:
[root@90104f541da1 logs]# wc -l *
      0 K1_failmoved_url_centos.log
      0 K1_rpms_found_centos.log
      0 K1_rpms_missing_centos.log
      0 K1_srpms_found_centos.log
      0 K1_srpms_missing_centos.log
     46 L1_failmoved_url_3rdparties.log
   5306 L1_failmoved_url_centos.log
    394 L1_failmoved_url_centos3rdparties.log
      0 L1_rpms_found_3rdparties.log
      0 L1_rpms_found_centos.log
      0 L1_rpms_found_centos3rdparties.log
      0 L1_rpms_missing_3rdparties.log
      0 L1_rpms_missing_centos.log
      0 L1_rpms_missing_centos3rdparties.log
     23 L1_srpms_found_3rdparties.log
   1936 L1_srpms_found_centos.log
    148 L1_srpms_found_centos3rdparties.log
      0 L1_srpms_missing_3rdparties.log
      0 L1_srpms_missing_centos.log
      0 L1_srpms_missing_centos3rdparties.log
    590 all_i686.txt
   9858 otherfiles_centos_download.log
      1 rpm-gpg-key-missing.txt
     80 rpms_3rdparties_download_L1.log
    490 rpms_centos3rdparties_download_L1.log
      2 rpms_centos_download_K1.log
   6735 rpms_centos_download_L1.log
  57768 tarballs_download.log
  83377 total

I've uploaded all logs into erich_base_v1.tar.bz2