tools/centos-mirror-tools
Scott Little 7014502056 failed to pass extra_args
Problem:
download_mirror -n should never use sudo. A recent download attempt
failed using L1 match criteria, and progressed to the backup K1 match
criteria. Then it did so, the following error is seen....

 start 2nd round of downloading Binary RPMs with K1 match criteria...
 using logs/L1_rpms_missing_centos.log as the download name lists
 2018-11-29_1331
 sudo: no tty present and no askpass program specified

Solution:
   Pass ${rpm_downloader_extra_args} to $rpm_downloader under the
'2nd round of downloading' branch

Closes-Bug: 1806094
Change-Id: I832d1b0af7e600e5fa635d9e3c317a9caa303f88
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-11-30 12:23:20 -05:00
..
rpm-gpg-keys Add missing key for CentOS Virtualization. 2018-08-16 15:26:41 -05:00
stx_mirror_scripts StarlingX mirror bug fixes 2018-11-07 11:26:18 -05:00
yum.repos.d Enable starlingx mirror 2018-11-02 13:33:00 -04:00
Dockerfile Split and move repo data files to yum.repo.d subdirectory. 2018-08-07 16:48:16 -04:00
README.rst Modify README in create mirror steps 2018-10-24 03:39:07 +00:00
dl_other_from_centos_repo.sh Enable starlingx mirror 2018-11-02 13:33:00 -04:00
dl_rpms.sh failmoved logs polluted by non-errors 2018-11-19 16:27:57 -05:00
dl_tarball.sh restapi-doc wadl based package removal 2018-11-12 04:16:44 -06:00
download_mirror.sh failed to pass extra_args 2018-11-30 12:23:20 -05:00
make_stx_mirror_yum_conf.sh Enable starlingx mirror 2018-11-02 13:33:00 -04:00
mirror-check.sh Check for releasever in yum.conf before grepping 2018-09-06 11:18:28 -04:00
other_downloads.lst Add build tools 2018-06-08 17:01:43 -05:00
rpms_3rdparties.lst Uprev python-docker from 2.4.2 to 3.3.0 2018-11-20 14:50:39 -06:00
rpms_centos.lst Refactor patches for rabbitmq-server package 2018-11-29 01:27:26 +00:00
rpms_centos3rdparties.lst refactor audit 2018-11-16 02:21:03 +00:00
show_imported_rpm_gpg_keys.sh Add build tools 2018-06-08 17:01:43 -05:00
starlingx_add_pkgs.sh Merge "Split and move repo data files to yum.repo.d subdirectory." 2018-08-08 16:25:51 +00:00
tarball-dl.lst Merge "restapi-doc wadl based package removal" 2018-11-23 21:53:03 +00:00
url_utils.sh Enable starlingx mirror 2018-11-02 13:33:00 -04:00
utils.sh failmoved logs polluted by non-errors 2018-11-19 16:27:57 -05:00
utils_tests.sh Refactor on dl_rpms.sh 2018-09-10 09:57:39 -05:00
yum.conf.sample yum.conf.sample: Add example yum.conf 2018-09-13 13:56:39 -07:00

README.rst

Create mirror for StarlingX

Step 0 - Build the container

Build the docker image on your Linux host (with Docker supported). NOTE: if necessary you might have to set http/https proxy in your Dockerfile before building the docker image below.

$ docker build -t <your_docker_image_name>:<your_image_version> -f Dockerfile .

Step 1 - Run the container

The container shall be run from the same directory where the other scripts are stored.

$ docker run -it -v $(pwd):/localdisk <your_docker_image_name>:<your_image_version>

The container can also be run the following way, so the download_mirror.sh runs automatically without having to enter the container and the step 2can be simplified.

$ docker run -it -v $(pwd):/localdisk <your_docker_image_name>:<your_image_version> download_mirror.sh

As /localdisk is defined as the workdir of the container, the same folder name should be used to define the volume. The container will start to run and populate a logs and output folders in this directory. The container shall be run from the same directory where the other scripts are stored.

step 2 - Run the download_mirror.sh script

Once inside the container run the downloader script

$ ./download_mirror.sh

NOTE: in case there are some downloading failures due to network instability (or timeout), you should download them manually, to assure you get all RPMs listed in "rpms_from_3rd_parties.lst" and "rpms_from_centos_repo.lst".

step 3 - Copy the files to the mirror

After all downloading complete, copy the download files to mirror.

$ mkdir -p <your_mirror_folder>/ $ cp -r output/stx-r1/ <your_mirror_folder>/

In this case <your_mirror_folder> can be whatever folder you want to use as mirror.

step 4 - Tweaks in the StarlingX build system.

NOTE: step below is not needed if you've synced the latest codebase.

Go into StarlingX build system (another container which hosts cgcs build system), and follow up below steps:

Debugging issues

The download_mirror.sh script will create log files in the form of centos_rpms_*.txt. After the download is complete, it's recommended to check the content of these files to see if everything was downloaded correctly.

A quick look into these files could be:

$ cd output/ $ cat missing

In this case, there shoudn't be any package in the "missing" files.