7.5.2. Mirroring Packages
188.8.131.52. Getting Started
Follow the instructions in Environment Preparation if you have not done that yet.
The following steps must be done on the container hosting system unless you have nested container capabilities in your build container.
184.108.40.206. Install Bolt
See the documentation at puppetlabs/bolt to install bolt on your system.
220.127.116.11. Create the Pulp Cloning System
git clone https://github.com/simp/bolt-pulp3 cd bolt-pulp3 rvm use system # You can skip this if not using RVM /opt/puppetlabs/bolt/bin/bolt module install --force /opt/puppetlabs/bolt/bin/gem install --user -g gem.deps.rb /opt/puppetlabs/bolt/bin/bolt plan run pulp3::in_one_container # Wait a few minutes for the service to get fully started
18.104.22.168. Clone the Packages
This uses a configuration file from the target version of SIMP that you are going to build.
You will either need to download the file from simp/simp-core or clone the repository and checkout the git tag that you wish to build.
For example, if you are going to build CentOS 8 for SIMP 6.6.0:
curl -O https://raw.githubusercontent.com/simp/simp-core/6.6.0-1/build/distributions/CentOS/8/x86_64/bolt_pulp3_config.yaml ./slim-pulp-repo-copy.rb -f bolt_pulp3_config.yaml
You can change the
url keys in the packages YAML file if you wish to use
22.214.171.124.1.1. Repo Clone Hangs
Occasionally, there are issues with the upstream repos that require the pulp container to be restarted.
The most common one is when the clone process hangs and continually prints that
it is in status
If this occurs:
podman stop pulp podman start pulp # Wait a few minutes for the service to get fully started ./slim-pulp-repo-copy.rb -f build/6.6.0/CentOS/8/x86_64/repo_packages.yaml
126.96.36.199.1.2. Updated YAML file
If you have updated your YAML file, you will need to flush and re-clone the repositories so that you don’t pull stale packages.
To do this:
rm -rf output ./slim-pulp-repo-copy.rb -f build/6.6.0/CentOS/8/x86_64/repo_packages.yaml -d
188.8.131.52. Copy the Repo Contents
Once the clone process has completed, you need to copy the cloned packages out of the repository for use in the rest of the build process.
To do so:
cd output ./_slim_repos.*reposync.sh
184.108.40.206. Copy the Packages Into the Build Container
You now need to copy the files into the build container for use during the build process.
podman cp _download_path/ simp_build_centos8:/tmp podman exec -it simp_build_centos8 chown -R build_user:build_user /tmp/_download_path
220.127.116.11. (Optional) Cleanup
When you are done with the pulp container, you may want to reclaim the space on your system.
To do this, run the following:
cd bolt-pulp3 /opt/puppetlabs/bolt/bin/bolt plan run pulp3::in_one_container::destroy