Warning message

Log in to add comments or rate this document.

Satellite 6.3 Feature Overview: Custom File Type Repository

Updated 2018-02-21T16:04:08+00:00

Custom File Type repositories are a new feature of Satellite 6.3. This provides a method to use custom file types in a product and distribute custom files out to content hosts.
This is documented in the Satellite 6.3 Content Management Guide - much of this feature overview is taken directly from that guide.

Applications of the custom file type repository range from distributing SSH keys and source code files to larger files such as virtual machine images and ISO files.

You can upload files to the repository or synchronize it from an upstream Satellite Server. Once a file is in a custom file type repository, you can use the normal Satellite management functions such as adding a specific version to a Content View to provide version control and making the repository of files available on various Capsule Servers. Clients must download the files over HTTP or HTTPS using curl -O.

A file type repository can only be created in a custom product. This example creates a Product My File Product, and then creates a file type repository My Files within that product.

Creating a Custom File Type Repository

For Satellite Web UI Users:

  1. Create a Custom Product

    Navigate to Content > Products, click Create Product and enter the following details:

    • Name - The plain text name for the product. Enter 'My File Product'.
    • Label - An internal ID for the product. Red Hat Satellite 6 automatically completes this field based on what you have entered for Name.
    • GPG Key - The GPG Key for the entire product. You can leave this blank.
    • Sync Plan - A synchronization plan for the product. For example, the Example Plan created in the previous chapter.
    • Description - A plain text description of the product. Enter 'My files'.
  2. Create a File Type Repository

    Navigate to Content > Products. Click on the name of a Product, in this example 'My File Product'. On the Repositories tab, click New Repository and enter the following details:

    • Name - A plain text name for the repository. Enter 'My Files'.
    • Label - An internal ID for the repository. Red Hat Satellite 6 automatically completes this field based on what you have entered for Name.
    • Type - The content type of the repository. Select file.
    • Upstream URL - The URL of the upstream repository to use as a source. You can leave this blank if you plan to only upload files manually.
    • Verify SSL - Leave this option selected if you want to verify that the upstream repository’s SSL certificates are signed by a trusted CA. Alternatively, clear this check box.
    • Upstream Username - If required for authentication, enter the user name for the upstream repository. Clear this field if the repository does not require authentication.
    • Upstream Password - Enter the password for the upstream repository. Clear this field if the repository does not require authentication.
  3. Click Save to save this repository entry.

For CLI Users

  1. Create a Custom Product

    # hammer product create
    --name "My File Product"
    --sync-plan "Example Plan"
    --description "My files"
    --organization "ACME"
    

Optional Parameters

gpg-key gpg_key_name      | Key name to search by       
gpg-key-id gpg_key_id     | GPG key numeric identifier   
sync-plan sync_plan_name  | Sync plan name to search by 
sync-plan-id sync_plan_id | Sync plan numeric identifier
  1. Create a File Type Repository

    # hammer repository create
    --name "My Files" 
    --content-type "file" 
    --product "My File Product"
    --organization "ACME"
    

Optional Parameters

checksum-type sha_version             | Repository checksum, currently sha1 & sha256 are supported
download-policy policy_name           | Download policy for yum repos (either immediate, on_demand, or background).
gpg-key gpg_key_name                  | Key name to search by
gpg-key-id gpg_key_id.                | GPG key numeric identifier
mirror-on-sync boolean.               | Must this repo be mirrored from the source, and stale RPMs removed, when synced? Set to true or false, yes or no, 1 or 0.
publish-via-http boolean.             | Must this also be published using HTTP? Set to true or false, yes or no, 1 or 0.
upstream-username repository_username | Upstream repository user, if required for authentication
upstream-password repository_password | Password for the upstream repository user
url source_repo_url.                  | URL of the Source repository
verify-ssl-on-sync boolean            | Must Katello verify that the upstream URL’s SSL certificates are signed by a trusted CA? Set to true or false, yesor no, 1 or 0.

Uploading Files to a Custom File Type Repository

For Satellite Web UI Users:

  1. Navigate to Content > Products.
  2. Select a custom product by name. For example, 'My File Product'.
  3. Select a file type repository by name. For example, 'My Files'.
  4. Click Browse to search and select the file you want to upload.
  5. Click Upload to upload the selected file to Satellite Server.
  6. Visit the URL where the repository is published to see the file.

For CLI Users:

# hammer repository upload-content
--product "My File Product" 
--name "My Files" 
--organization "ACME" 
--path example_file

The --path option can indicate a file, a directory of files, or a glob expression of files. Globs must be escaped by single or double quotes.

Downloading Files From a Custom File Type Repository

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. If you followed the above Section on “Creating a Custom File Type Repository” then you should be set.
  • You know the name of the file you want to download to clients from the file type repository.
  • To use HTTPS you will need the following certificates on the client:
    1. The katello-server-ca.crt. Ensure you obtain this in a secure way. You can export it from your browser or download it over HTTPS from https://satellite.example.com/pub/.
    2. An Organization Debug Certificate. See Section 2.3 of the Content Management Guide, titled "Creating an Organization Debug Certificate" for more information.

For Satellite Web UI Users:

  1. Navigate to Content > Products.
  2. Select a custom product by name. For example, My File Product.
  3. Select a file type repository by name. For example, My Files.
  4. Check to see if Publish via HTTP is enabled. If it is not, you will need the certificates to use HTTPS.
  5. Copy the URL where the repository is published.

For Satellite CLI Users:

  1. List the file type repositories

    # hammer repository list --content-type file
    ---|----------|-----------------|--------------|----
    ID | NAME     | PRODUCT         | CONTENT TYPE | URL
    ---|----------|-----------------|--------------|----
    7  | My Files | My File Product | file         |
    ---|----------|-----------------|--------------|----
    
  2. Display the repository information

    # hammer repository info --name "My Files" --product "My File Product" --organization-id 1
    
  • If HTTP is enabled, the output will look something like this:

    Publish Via HTTP:   yes
    Published At:       http://satellite.example.com/pulp/isos/uuid/
    
  • If HTTP is not enabled, the output will look something like this:

    Publish Via HTTP:   no
    Published At:       https://satellite.example.com/pulp/isos/uuid/
    

On the client, use 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
    

In summary, this document demonstrated how to create custom file type repositories in Satellite 6.3.

Video

Satellite 6.3 Feature Overview: Custom File Type Repository Video
Satellite 6.3 Feature Overview: Custom File Type Repository Video

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.