Chapter 6. Importing Content
Chapter 6. Importing Content This chapter outlines how you can import different types of custom content to Satellite. If you want to import RPMs, Files, or different content types to Satellite, it is done with largely the same procedures in this chapter. For example, you can use the following chapters for information on specific types of custom content but the underlying procedures are the same: Chapter 13, Managing ISO Images Chapter 14, Managing Custom File Type Content 6.1. Using Products and Repositories in Satellite Both Red Hat content and custom content in Satellite have similarities: The relationship between a product and its repositories is the same and the repositories still require synchronization. custom products require a subscription for clients to access, similar to subscriptions to Red Hat Products. Satellite creates a subscription for each custom product you create. Red Hat Content is already organized into Products. For example, Red Hat Enterprise Linux Server is a Product in Satellite. The repositories for that Product consist of different versions, architectures, and add-ons. For Red Hat repositories, products are created automatically after enabling the repository. For more information, see Section 6.5, "Enabling Red Hat Repositories" . Other custom content can be organized into Products however you want. For example, you might create an EPEL (Extra Packages for Enterprise Linux) product and add an "EPEL 7 x86_64" repository to it. For more information about creating and packaging RPMs, see the RPM Packaging Guide in the Red Hat Enterprise Linux documentation. 6.2. Importing Custom SSL Certificates Before you synchronize custom content from an external source, you might need to import SSL certificates into your custom product. This might include client certs and keys or CA certificates for the upstream repositories you want to synchronize. If you require SSL certificates and keys to download RPMs, you can add them to Satellite. To use the CLI instead of the Satellite web UI, see the CLI procedure . Procedure In the Satellite web UI, navigate to Content > Content Credentials . In the Content Credentials window, click Create Content Credential . In the Name field, enter a name for your SSL certificate. From the Type list, select SSL Certificate . In the Content Credentials Content field, paste your SSL certificate, or click Browse to upload your SSL certificate. Click Save . CLI procedure Copy the SSL certificate to your Satellite Server: Or download the SSL certificate to your Satellite Server from an online source: Upload the SSL Certificate to Satellite: 6.3. Creating a Custom Product Create a custom product so that you can add repositories to the custom product. To use the CLI instead of the Satellite web UI, see the CLI procedure . Procedure In the Satellite web UI, navigate to Content > Products , click Create Product . In the Name field, enter a name for the product. Satellite automatically completes the Label field based on what you have entered for Name . Optional: From the GPG Key list, select the GPG key for the product. Optional: From the SSL CA Cert list, select the SSL CA certificate for the product. Optional: From the SSL Client Cert list, select the SSL client certificate for the product. Optional: From the SSL Client Key list, select the SSL client key for the product. Optional: From the Sync Plan list, select an existing sync plan or click Create Sync Plan and create a sync plan for your product requirements. In the Description field, enter a description of the product. Click Save . CLI procedure To create the product, enter the following command: 6.4. Adding Custom RPM Repositories Use this procedure to add custom RPM repositories in Satellite. To use the CLI instead of the Satellite web UI, see the CLI procedure . The Products window in the Satellite web UI also provides a Repo Discovery function that finds all repositories from a URL and you can select which ones to add to your custom product. For example, you can use the Repo Discovery to search http://yum.postgresql.org/9.5/redhat/ and list all repositories for different Red Hat Enterprise Linux versions and architectures. This helps users save time importing multiple repositories from a single source. Support for Custom RPMs Red Hat does not support the upstream RPMs directly from third-party sites. These RPMs are used to demonstrate the synchronization process. For any issues with these RPMs, contact the third-party developers. Procedure In the Satellite web UI, navigate to Content > Products and select the product that you want to use, and then click New Repository . In the Name field, enter a name for the repository. Satellite automatically completes the Label field based on what you have entered for Name . Optional: In the Description field, enter a description for the repository. From the Type list, select yum as type of repository. Optional: From the Restrict to Architecture list, select an architecture. If you want to make the repository available to all hosts regardless of the architecture, ensure to select No restriction . Optional: From the Restrict to OS Version list, select the OS version. If you want to make the repository available to all hosts regardless of the OS version, ensure to select No restriction . Optional: In the Upstream URL field, enter the URL of the external repository to use as a source. Satellite supports three protocols: http:// , https:// , and file:// . If you are using a file:// repository, you have to place it under /var/lib/pulp/sync_imports/ directory. If you do not enter an upstream URL, you can manually upload packages. Optional: Check the Ignore SRPMs checkbox to exclude source RPM packages from being synchronized to Satellite. Select the Verify SSL checkbox if you want to verify that the upstream repository's SSL certificates are signed by a trusted CA. Optional: In the Upstream Username field, enter the user name for the upstream repository if required for authentication. Clear this field if the repository does not require authentication. Optional: In the Upstream Password field, enter the corresponding password for the upstream repository. Clear this field if the repository does not require authentication. Optional: In the Upstream Authentication Token field, provide the token of the upstream repository user for authentication. Leave this field empty if the repository does not require authentication. From the Download Policy list, select the type of synchronization Satellite Server performs. For more information, see Section 6.7, "Download Policies Overview" . From the Mirroring Policy list, select the type of content synchronization Satellite Server performs. For more information, see Section 6.10, "Mirroring Policies Overview" . Optional: In the Retain package versions field, enter the number of versions you want to retain per package. Optional: In the HTTP Proxy Policy field, select an HTTP proxy. From the Checksum list, select the checksum type for the repository. Optional: You can clear the Unprotected checkbox to require a subscription entitlement certificate for accessing this repository. By default, the repository is published through HTTP. Optional: From the GPG Key list, select the GPG key for the product. Optional: In the SSL CA Cert field, select the SSL CA Certificate for the repository. Optional: In the SSL Client cert field, select the SSL Client Certificate for the repository. Optional: In the SSL Client Key field, select the SSL Client Key for the repository. Click Save to create the repository. CLI procedure Enter the following command to create the repository: Continue to synchronize the repository . 6.5. Enabling Red Hat Repositories If outside network access requires usage of an HTTP Proxy, configure a default HTTP Proxy for your server. See Adding a default HTTP Proxy To select the repositories to synchronize, you must first identify the product that contains the repository, and then enable that repository based on the relevant release version and base architecture. For Red Hat Enterprise Linux 8, you must enable both AppStream and BaseOS repositories. Repository Versioning The difference between associating Red Hat Enterprise Linux operating system with either 7 Server repositories or 7. X repositories is that 7 Server repositories contain all the latest updates while Red Hat Enterprise Linux 7. X repositories stop getting updates after the minor version release. Note that Kickstart repositories only have minor versions. For Red Hat Enterprise Linux 8 Clients To provision Red Hat Enterprise Linux 8 clients, you require the Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMS) and Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) repositories. For Red Hat Enterprise Linux 7 Clients To provision Red Hat Enterprise Linux 7 clients, you require the Red Hat Enterprise Linux 7 Server (RPMs) repository. Procedure In the Satellite web UI, navigate to Content > Red Hat Repositories . To find repositories, either enter the repository name, or toggle the Recommended Repositories button to the on position to view a list of repositories that you require. In the Available Repositories pane, click a repository to expand the repository set. Click the Enable icon to the base architecture and release version that you want. CLI procedure To search for your product, enter the following command: List the repository set for the product: Enable the repository using either the name or ID number. Include the release version, for example, 7Server and base architecture, for example, x86_64 . For example: 6.6. Synchronizing Repositories Procedure In the Satellite web UI, navigate to Content > Products and select the product that contains the repositories that you want to synchronize. Select the repositories that you want to synchronize and click Sync Now . To view the progress of the synchronization in the Satellite web UI, navigate to Content > Sync Status and expand the corresponding product or repository tree. CLI procedure Synchronize an entire Product: Synchronize an individual repository: The synchronization duration depends on the size of each repository and the speed of your network connection. The following table provides estimates of how long it would take to synchronize content, depending on the available Internet bandwidth: Single Package (10Mb) Minor Release (750Mb) Major Release (6Gb) 256 Kbps 5 Mins 27 Secs 6 Hrs 49 Mins 36 Secs 2 Days 7 Hrs 55 Mins 512 Kbps 2 Mins 43.84 Secs 3 Hrs 24 Mins 48 Secs 1 Day 3 Hrs 57 Mins T1 (1.5 Mbps) 54.33 Secs 1 Hr 7 Mins 54.78 Secs 9 Hrs 16 Mins 20.57 Secs 10 Mbps 8.39 Secs 10 Mins 29.15 Secs 1 Hr 25 Mins 53.96 Secs 100 Mbps 0.84 Secs 1 Min 2.91 Secs 8 Mins 35.4 Secs 1000 Mbps 0.08 Secs 6.29 Secs 51.54 Secs Create a sync plan to ensure updates on a regular basis. See Section 6.18, "Creating a Sync Plan" . 6.6.1. Synchronizing All Repositories in an Organization Use this procedure to synchronize all repositories within an organization. Procedure To synchronize all repositories within an organization, run the following Bash script on your Satellite Server: ORG=" My_Organization " for i in USD(hammer --no-headers --csv repository list --organization USDORG --fields Id) do hammer repository synchronize --id USD{i} --organization USDORG --async done 6.7. Download Policies Overview Red Hat Satellite provides multiple download policies for synchronizing RPM content. For example, you might want to download only the content metadata while deferring the actual content download for later. Satellite Server has the following policies: Immediate Satellite Server downloads all metadata and packages during synchronization. On Demand Satellite Server downloads only the metadata during synchronization. Satellite Server only fetches and stores packages on the file system when Capsules or directly connected clients request them. This setting has no effect if you set a corresponding repository on a Capsule to Immediate because Satellite Server is forced to download all the packages. The On Demand policy acts as a Lazy Synchronization feature because they save time synchronizing content. The lazy synchronization feature must be used only for yum repositories. You can add the packages to Content Views and promote to life cycle environments as normal. Capsule Server has the following policies: Immediate Capsule Server downloads all metadata and packages during synchronization. Do not use this setting if the corresponding repository on Satellite Server is set to On Demand as Satellite Server is forced to download all the packages. On Demand Capsule Server only downloads the metadata during synchronization. Capsule Server fetches and stores packages only on the file system when directly connected clients request them. When you use an On Demand download policy, content is downloaded from Satellite Server if it is not available on Capsule Server. Inherit Capsule Server inherits the download policy for the repository from the corresponding repository on Satellite Server. 6.8. Changing the Default Download Policy You can set the default download policy that Satellite applies to repositories that you create in all organizations. Depending on whether it is a Red Hat or non-Red Hat custom repository, Satellite uses separate settings. Changing the default value does not change existing settings. Procedure In the Satellite web UI, navigate to Administer > Settings . Click the Content tab. Change the default download policy depending on your requirements: To change the default download policy for a Red Hat repository, change the value of the Default Red Hat Repository download policy setting. To change the default download policy for a custom repository, change the value of the Default Custom Repository download policy setting. CLI procedure To change the default download policy for Red Hat repositories to one of immediate or on_demand , enter the following command: To change the default download policy for a non-Red Hat custom repository to one of immediate or on_demand , enter the following command: 6.9. Changing the Download Policy for a Repository You can set the download policy for a repository. Procedure In the Satellite web UI, navigate to Content > Products . Select the required product name. On the Repositories tab, click the required repository name, locate the Download Policy field, and click the edit icon. From the list, select the required download policy and then click Save . CLI procedure List the repositories for an organization: Change the download policy for a repository to immediate or on_demand : 6.10. Mirroring Policies Overview Mirroring keeps the local repository exactly in synchronization with the upstream repository. If any content is removed from the upstream repository since the last synchronization, with the synchronization, it will be removed from the local repository as well. You can use mirroring policies for finer control over mirroring of repodata and content when synchronizing a repository. For example, if it is not possible to mirror the repodata for a repository, you can set the mirroring policy to mirror only content for this repository. Satellite Server has the following mirroring policies: Additive Neither the content nor the repodata is mirrored. Thus, only new content added since the last synchronization is added to the local repository and nothing is removed. Content Only Mirrors only content and not the repodata. Some repositories do not support metadata mirroring, in such cases you can set the mirroring policy to content only to only mirror the content. Complete Mirroring Mirrors content as well as repodata. This is the fastest method. This mirroring policy is only available for Yum content. 6.11. Changing the Mirroring Policy for a Repository You can set the mirroring policy for a repository. Procedure In the Satellite web UI, navigate to Content > Products . Select the product name. On the Repositories tab, click the repository name, locate the Mirroring Policy field, and click the edit icon. From the list, select a mirroring policy and click Save . 6.12. Uploading Content to Custom RPM Repositories You can upload individual RPMs and source RPMs to custom RPM repositories. You can upload RPMs using the Satellite web UI or the Hammer CLI. You must use the Hammer CLI to upload source RPMs. Procedure In the Satellite web UI, click Content > Products . Click the name of the custom product. In the Repositories tab, click the name of the custom RPM repository. Under Upload Package , click Browse... and select the RPM you want to upload. Click Upload . To view all RPMs in this repository, click the number to Packages under Content Counts . CLI procedure Enter the following command to upload an RPM: Enter the following command to upload a source RPM: When the upload is complete, you can view information about a source RPM by using the commands hammer srpm list and hammer srpm info --id srpm_ID . 6.13. Configuring SELinux to Permit Content Synchronization on Custom Ports SELinux permits access of Satellite for content synchronization only on specific ports. By default, connecting to web servers running on the following ports is permitted: 80, 81, 443, 488, 8008, 8009, 8443, and 9000. Procedure On Satellite, to verify the ports that are permitted by SELinux for content synchronization, enter a command as follows: To configure SELinux to permit a port for content synchronization, for example 10011, enter a command as follows: 6.14. Recovering a Corrupted Repository In case of repository corruption, you can recover it by using an advanced synchronization, which has three options: Optimized Sync Synchronizes the repository bypassing RPMs that have no detected differences from the upstream RPMs. Complete Sync Synchronizes all RPMs regardless of detected changes. Use this option if specific RPMs could not be downloaded to the local repository even though they exist in the upstream repository. Verify Content Checksum Synchronizes all RPMs and then verifies the checksum of all RPMs locally. If the checksum of an RPM differs from the upstream, it re-downloads the RPM. This option is relevant only for yum repositories. Use this option if you have one of the following errors: Specific RPMs cause a 404 error while synchronizing with yum . Package does not match intended download error, which means that specific RPMs are corrupted. Procedure In the Satellite web UI, navigate to Content > Products . Select the product containing the corrupted repository. Select the name of a repository you want to synchronize. To perform optimized sync or complete sync, select Advanced Sync from the Select Action menu. Select the required option and click Sync . Optional: To verify the checksum, click Verify Content Checksum from the Select Action menu. CLI procedure Obtain a list of repository IDs: Synchronize a corrupted repository using the necessary option: For the optimized synchronization: For the complete synchronization: For the validate content synchronization: 6.15. Adding an HTTP Proxy Use this procedure to add HTTP proxies to Satellite. You can then specify which HTTP proxy to use for Products, repositories, and supported compute resources. Prerequisites Your HTTP proxy must allow access to the following hosts: Host name Port Protocol subscription.rhsm.redhat.com 443 HTTPS cdn.redhat.com 443 HTTPS *.akamaiedge.net 443 HTTPS cert.console.redhat.com (if using Red Hat Insights) 443 HTTPS api.access.redhat.com (if using Red Hat Insights) 443 HTTPS cert-api.access.redhat.com (if using Red Hat Insights) 443 HTTPS If Satellite Server uses a proxy to communicate with subscription.rhsm.redhat.com and cdn.redhat.com then the proxy must not perform SSL inspection on these communications. To use the CLI instead of the Satellite web UI, see the CLI procedure . Procedure In the Satellite web UI, navigate to Infrastructure > HTTP Proxies and select New HTTP Proxy . In the Name field, enter a name for the HTTP proxy. In the URL field, enter the URL for the HTTP proxy, including the port number. If your HTTP proxy requires authentication, enter a Username and Password . Optional: In the Test URL field, enter the HTTP proxy URL, then click Test Connection to ensure that you can connect to the HTTP proxy from Satellite. Click the Locations tab and add a location. Click the Organization tab and add an organization. Click Submit . CLI procedure On Satellite Server, enter the following command to add an HTTP proxy: If your HTTP proxy requires authentication, add the --username name and --password password options. For further information, see the Knowledgebase article How to access Red Hat Subscription Manager (RHSM) through a firewall or proxy on the Red Hat Customer Portal. 6.16. Changing the HTTP Proxy Policy for a Product For granular control over network traffic, you can set an HTTP proxy policy for each Product. A Product's HTTP proxy policy applies to all repositories in the Product, unless you set a different policy for individual repositories. To set an HTTP proxy policy for individual repositories, see Section 6.17, "Changing the HTTP Proxy Policy for a Repository" . Procedure In the Satellite web UI, navigate to Content > Products and select the checkbox to each of the Products that you want to change. From the Select Action list, select Manage HTTP Proxy . Select an HTTP Proxy Policy from the list: Global Default : Use the global default proxy setting. No HTTP Proxy : Do not use an HTTP proxy, even if a global default proxy is configured. Use specific HTTP Proxy : Select an HTTP Proxy from the list. You must add HTTP proxies to Satellite before you can select a proxy from this list. For more information, see Section 6.15, "Adding an HTTP Proxy" . Click Update . 6.17. Changing the HTTP Proxy Policy for a Repository For granular control over network traffic, you can set an HTTP proxy policy for each repository. To use the CLI instead of the Satellite web UI, see the CLI procedure . To set the same HTTP proxy policy for all repositories in a Product, see Section 6.16, "Changing the HTTP Proxy Policy for a Product" . Procedure In the Satellite web UI, navigate to Content > Products and click the name of the Product that contains the repository. In the Repositories tab, click the name of the repository. Locate the HTTP Proxy field and click the edit icon. Select an HTTP Proxy Policy from the list: Global Default : Use the global default proxy setting. No HTTP Proxy : Do not use an HTTP proxy, even if a global default proxy is configured. Use specific HTTP Proxy : Select an HTTP Proxy from the list. You must add HTTP proxies to Satellite before you can select a proxy from this list. For more information, see Section 6.15, "Adding an HTTP Proxy" . Click Save . CLI procedure On Satellite Server, enter the following command, specifying the HTTP proxy policy you want to use: Specify one of the following options for --http-proxy-policy : none : Do not use an HTTP proxy, even if a global default proxy is configured. global_default_http_proxy : Use the global default proxy setting. use_selected_http_proxy : Specify an HTTP proxy using either --http-proxy proxy-name or --http-proxy-id proxy-ID . To add a new HTTP proxy to Satellite, see Section 6.15, "Adding an HTTP Proxy" . 6.18. Creating a Sync Plan A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can create a sync plan and assign products to the plan. To use the CLI instead of the Satellite web UI, see the CLI procedure . Procedure In the Satellite web UI, navigate to Content > Sync Plans and click New Sync Plan . In the Name field, enter a name for the plan. Optional: In the Description field, enter a description of the plan. From the Interval list, select the interval at which you want the plan to run. From the Start Date and Start Time lists, select when to start running the synchronization plan. Click Save . CLI procedure To create the synchronization plan, enter the following command: View the available sync plans for an organization to verify that the sync plan has been created: 6.19. Assigning a Sync Plan to a Product A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can assign a sync plan to products to update content regularly. To use the CLI instead of the Satellite web UI, see the CLI procedure . Procedure In the Satellite web UI, navigate to Content > Products . Select a product. On the Details tab, select a Sync Plan from the drop down menu. CLI procedure Assign a sync plan to a product: 6.20. Assigning a Sync Plan to Multiple Products Use this procedure to assign a sync plan to the products in an organization that have been synchronized at least once and contain at least one repository. Procedure Run the following Bash script: ORG=" Your_Organization " SYNC_PLAN="daily_sync_at_3_a.m" hammer sync-plan create --name USDSYNC_PLAN --interval daily --sync-date "2023-04-5 03:00:00" --enabled true --organization USDORG for i in USD(hammer --no-headers --csv --csv-separator="|" product list --organization USDORG --per-page 999 | grep -vi not_synced | awk -F'|' 'USD5 != "0" { print USD1}') do hammer product set-sync-plan --sync-plan USDSYNC_PLAN --organization USDORG --id USDi done After executing the script, view the products assigned to the sync plan: 6.21. Limiting Synchronization Concurrency By default, each Repository Synchronization job can fetch up to ten files at a time. This can be adjusted on a per repository basis. Increasing the limit may improve performance, but can cause the upstream server to be overloaded or start rejecting requests. If you are seeing Repository syncs fail due to the upstream servers rejecting requests, you may want to try lowering the limit. CLI procedure 6.22. Importing a Custom GPG Key When clients are consuming signed custom content, ensure that the clients are configured to validate the installation of packages with the appropriate GPG Key. This helps to ensure that only packages from authorized sources can be installed. Red Hat content is already configured with the appropriate GPG key and thus GPG Key management of Red Hat Repositories is not supported. To use the CLI instead of the Satellite web UI, see the CLI procedure . Prerequisites Ensure that you have a copy of the GPG key used to sign the RPM content that you want to use and manage in Satellite. Most RPM distribution providers provide their GPG Key on their website. You can also extract this manually from an RPM: Download a copy of the version specific repository package to your client system: Extract the RPM file without installing it: The GPG key is located relative to the extraction at etc/pki/rpm-gpg/RPM-GPG-KEY- EXAMPLE-95 . Procedure In the Satellite web UI, navigate to Content > Content Credentials and in the upper-right of the window, click Create Content Credential . Enter the name of your repository and select GPG Key from the Type list. Either paste the GPG key into the Content Credential Contents field, or click Browse and select the GPG key file that you want to import. If your custom repository contains content signed by multiple GPG keys, you must enter all required GPG keys in the Content Credential Contents field with new lines between each key, for example: Click Save . CLI procedure Copy the GPG key to your Satellite Server: Upload the GPG key to Satellite: 6.23. Restricting Custom Repositories to RHEL 9 in Satellite Procedure In the Satellite web UI, navigate to Content > Products . Select the product that contains the repository sets that you want to restrict. In the Repositories tab, click the repository that you want to restrict. From the Restrict to OS list, select the operating system to include Red Hat Enterprise Linux operating systems for their corresponding Red Hat Enterprise Linux repositories. Click Save to submit your change.
scp My_SSL_Certificate root@satellite.example.com:~/. wget -P ~ http:// upstream-satellite.example.com /pub/katello-server-ca.crt hammer content-credential create --content-type cert --name " My_SSL_Certificate " --organization " My_Organization " --path ~/ My_SSL_Certificate hammer product create --name " My_Product " --sync-plan " Example Plan " --description " Content from My Repositories " --organization " My_Organization " hammer repository create --arch " My_Architecture " --content-type "yum" --gpg-key-id My_GPG_Key_ID --name " My_Repository " --organization " My_Organization " --os-version " My_OS_Version " --product " My_Product " --publish-via-http true --url My_Upstream_URL hammer product list --organization " My_Organization " hammer repository-set list --product "Red Hat Enterprise Linux Server" --organization " My_Organization " hammer repository-set enable --name "Red Hat Enterprise Linux 7 Server (RPMs)" --releasever "7Server" --basearch "x86_64" --product "Red Hat Enterprise Linux Server" --organization " My_Organization " hammer product synchronize --name " My_Product " --organization " My_Organization " hammer repository synchronize --name " My_Repository " --organization " My_Organization " --product " My Product " ORG=" My_Organization " for i in USD(hammer --no-headers --csv repository list --organization USDORG --fields Id) do hammer repository synchronize --id USD{i} --organization USDORG --async done hammer settings set --name default_redhat_download_policy --value immediate hammer settings set --name default_download_policy --value immediate hammer repository list --organization-label My_Organization_Label hammer repository update --download-policy immediate --name " My_Repository " --organization-label My_Organization_Label --product " My_Product " hammer repository upload-content --id Repository_ID --path /path/to/example-package.rpm hammer repository upload-content --content-type srpm --id Repository_ID --path /path/to/example-package.src.rpm semanage port -l | grep ^http_port_t http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 semanage port -a -t http_port_t -p tcp 10011 hammer repository list --organization " My_Organization " hammer repository synchronize --id My_ID hammer repository synchronize --id My_ID --skip-metadata-check true hammer repository synchronize --id My_ID --validate-contents true hammer http-proxy create --name proxy-name --url proxy-URL:port-number hammer repository update --id repository-ID --http-proxy-policy policy hammer sync-plan create --name "Red Hat Products 2" --description "Example Plan for Red Hat Products" --interval daily --sync-date "2016-02-01 01:00:00" --enabled true --organization " My_Organization " hammer sync-plan list --organization " Default Organization " hammer product set-sync-plan --name " Product_Name " --sync-plan " Sync_Plan_Name " --organization " My_Organization " ORG=" Your_Organization " SYNC_PLAN="daily_sync_at_3_a.m" hammer sync-plan create --name USDSYNC_PLAN --interval daily --sync-date "2023-04-5 03:00:00" --enabled true --organization USDORG for i in USD(hammer --no-headers --csv --csv-separator="|" product list --organization USDORG --per-page 999 | grep -vi not_synced | awk -F'|' 'USD5 != "0" { print USD1}') do hammer product set-sync-plan --sync-plan USDSYNC_PLAN --organization USDORG --id USDi done hammer product list --organization USDORG --sync-plan USDSYNC_PLAN hammer repository update --download-concurrency 5 --id Repository_ID --organization " My_Organization " wget http://www.example.com/9.5/example-9.5-2.noarch.rpm rpm2cpio example-9.5-2.noarch.rpm | cpio -idmv -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFy/HE4BEADttv2TCPzVrre+aJ9f5QsR6oWZMm7N5Lwxjm5x5zA9BLiPPGFN 4aTUR/g+K1S0aqCU+ZS3Rnxb+6fnBxD+COH9kMqXHi3M5UNzbp5WhCdUpISXjjpU XIFFWBPuBfyr/FKRknFH15P+9kLZLxCpVZZLsweLWCuw+JKCMmnA =F6VG -----END PGP PUBLIC KEY BLOCK----- -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFw467UBEACmREzDeK/kuScCmfJfHJa0Wgh/2fbJLLt3KSvsgDhORIptf+PP OTFDlKuLkJx99ZYG5xMnBG47C7ByoMec1j94YeXczuBbynOyyPlvduma/zf8oB9e Wl5GnzcLGAnUSRamfqGUWcyMMinHHIKIc1X1P4I= =WPpI -----END PGP PUBLIC KEY BLOCK----- scp ~/etc/pki/rpm-gpg/RPM-GPG-KEY- EXAMPLE-95 root@satellite.example.com:~/. hammer content-credentials create --content-type gpg_key --name " My_GPG_Key " --organization " My_Organization " --path ~/RPM-GPG-KEY- EXAMPLE-95