15.5. Downloading Files to a Host From a Custom File Type Repository in Red Hat Satellite
You can download files to a client over HTTPS using curl -O
, and optionally over HTTP if the Publish via HTTP repository option is selected.
Prerequisites
- You have a custom file type repository. See 「Creating a Custom File Type Repository in Red Hat Satellite」 for more information.
- You know the name of the file you want to download to clients from the file type repository.
To use HTTPS you require the following certificates on the client:
-
The
katello-server-ca.crt
. For more information, see Installing the Katello Root CA Certificate in the Administering Red Hat Satellite guide. - An Organization Debug Certificate. See 「Creating an Organization Debug Certificate」 for more information.
-
The
Procedure
To download files to a host from a custom file type repository, complete the following procedure:
- In the Satellite web UI, navigate to Content > Products.
- Select a custom product by name.
- Select a file type repository by name.
- Check to see if Publish via HTTP is enabled. If it is not, you require the certificates to use HTTPS.
- Copy the URL where the repository is published.
For CLI Users
List the file type repositories.
# hammer repository list --content-type file ---|----------|-----------------|--------------|---- ID | NAME | PRODUCT | CONTENT TYPE | URL ---|----------|-----------------|--------------|---- 7 | My Files | My File Product | file | ---|----------|-----------------|--------------|----
Display the repository information.
# hammer repository info --name "My Files" --product "My File Product" --organization-id 1
If HTTP is enabled, the output is similar to this:
Publish Via HTTP: yes Published At: http://satellite.example.com/pulp/isos/uuid/
If HTTP is not enabled, the output is similar to this:
Publish Via HTTP: no Published At: https://satellite.example.com/pulp/isos/uuid/
On the client, enter a command in the appropriate format for HTTP or HTTPS:
For HTTP:
# curl -O satellite.example.com/pulp/isos/uuid/my_file
For HTTPS:
# curl -O --cert ./Default\ Organization-key-cert.pem --cacert katello-server-ca.crt satellite.example.com/pulp/isos/uuid/my_file