Managing file type content
In orcharhino, you might require methods of managing and distributing SSH keys and source code files or larger files such as virtual machine images and ISO files. To achieve this, products in orcharhino include repositories for file types. This provides a generic method to incorporate arbitrary files in a product.
You can upload files to the repository and synchronize files from an upstream orcharhino Server.
When you add files to a file type repository, you can use the normal orcharhino 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 orcharhino Proxy Servers.
You must download the files on clients over HTTP or HTTPS by using curl -O.
You can create a file type repository in orcharhino Server only in a product, but there is flexibility in how you create the repository source. You can create an independent repository source in a directory on orcharhino Server, or on a remote HTTP server, and then synchronize the contents of that directory into orcharhino. This method is useful when you have multiple files to add to a orcharhino repository.
|
You can consume content from orcharhino without registering your hosts to orcharhino and/or without using |
Creating a local source for a file type repository
You can create a file type repository source, from a directory of files, on the base system where orcharhino is installed using Pulp Manifest. You can then synchronize the files into a repository and manage the file type content like any other content type.
Use this procedure to configure a repository in a directory on the base system where orcharhino is installed.
-
On your orcharhino Server, install the Pulp Manifest package:
$ dnf install pulp-manifest -
Create a directory that you want to use as the file type repository, such as:
$ mkdir -p /var/lib/pulp/local_repos/my_file_repo -
Add the parent folder into allowed import paths:
$ orcharhino-installer --foreman-proxy-content-pulpcore-additional-import-paths /var/lib/pulp/local_repos -
Add files to the directory or create a test file:
$ touch /var/lib/pulp/local_repos/my_file_repo/test.txt -
Create the Pulp Manifest:
$ pulp-manifest /var/lib/pulp/local_repos/my_file_repo -
Verify the manifest was created:
$ ls /var/lib/pulp/local_repos/my_file_repo PULP_MANIFEST test.txt
-
You can import your local source as a file type repository. Use the
file://URL scheme and the name of the directory to specify an Upstream URL, such asfile:///var/lib/pulp/local_repos/my_file_repo. -
If you update the contents of your directory, re-run Pulp Manifest and sync the repository in orcharhino. For more information, see Synchronizing repositories ad hoc.
Downloading files to a host from a file type repository by using orcharhino management UI
You can download files to a client over HTTPS using curl -O, and optionally over HTTP if the Unprotected option for repositories is selected.
-
You have a file type repository.
-
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 Importing the Katello root CA certificate by using browser in Configuring authentication for orcharhino users. -
An Organization Debug Certificate. For more information, see Creating an Organization Debug Certificate in Managing Organizations and Locations.
-
-
In the orcharhino management UI, navigate to Content > Products.
-
Select a product by name.
-
Select a file type repository by name.
-
Ensure to select the Unprotected checkbox to access the repository published through HTTP.
-
Copy the Published At URL.
-
On your client, download the file from orcharhino Server:
-
For HTTPS:
$ curl \ --cacert ./_katello-server-ca.crt \ --cert ./_My_Organization_key-cert.pem \ --remote-name \ https://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File -
For HTTP:
$ curl \ --remote-name \ http://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File
-
Downloading files to a host from a file type repository by using Hammer CLI
You can download files to a client over HTTPS using curl -O, and optionally over HTTP if the Unprotected option for repositories is selected.
-
You have a file type repository.
-
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 Importing the Katello root CA certificate by using command line in Configuring authentication for orcharhino users. -
An Organization Debug Certificate. For more information, see Creating an Organization Debug Certificate in Managing Organizations and Locations.
-
-
List the file type repositories:
$ hammer repository list --content-type file -
Display the repository information.
$ hammer repository info \ --name "My_Files" \ --organization-id My_Organization_ID \ --product "My_File_Product"If Unprotected is enabled, the output is similar to this:
Publish Via HTTP: yes Published At: https://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_File_Product_Label/My_Files_Label/If Unprotected is not enabled, the output is similar to this:
Publish Via HTTP: no Published At: https://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_File_Product_Label/My_Files_Label/ -
On your client, download the file from orcharhino Server:
-
For HTTPS:
$ curl \ --cacert ./_katello-server-ca.crt \ --cert ./_My_Organization_key-cert.pem \ --remote-name \ https://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File -
For HTTP:
$ curl \ --remote-name \ http://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product_Label/My_Repository_Label/My_File
-
Creating file type repositories for installation media for Ubuntu 26.04
You can use file type repositories to provide local installation media for Ubuntu. This allows you to provision hosts running Ubuntu 26.04 in disconnected environments.
To provision Ubuntu 26.04, you need to provide both the ISO image and the extracted ISO image on your orcharhino Server or the relevant orcharhino Proxy Server. This example uses orcharhino Server.
|
ATIX AG provides file type repositories for installation media. You can synchronize them to provision hosts in disconnected environments by using local installation media. For a list of upstream URLs, see Using file repositories for installation media for Debian/Ubuntu in the ATIX Service Portal. ATIX AG provides the following installation media as file type repository:
|
-
In the orcharhino management UI, navigate to Content > Products.
-
Click Create Product.
-
Enter a Name for your product.
-
Optional: Select a sync plan from the Sync Plan drop down menu.
-
Click Save to create the product.
-
On the Repositories tab of the previously created product, click New Repository.
-
Enter a Name for the repository.
If you use the file type repository as installation medium for offline installations, ATIX AG recommends adding
offline installation mediato indicate the offline installation capability, for example,Ubuntu 26.04 offline installation media. -
Select
fileas Type. -
Enter the Upstream URL from Using file repositories for installation media for Debian/Ubuntu in the ATIX Service Portal.
-
Click Save to create the repository.
-
On the Repositories tab, select your previously created repository and click Sync Now.
-
After you have synchronized the repository, navigate to Content > Products.
-
Select the previously created product.
-
On the Repositories tab, select the previously created repository.
-
Copy the Published At URL.
-
On your orcharhino Server, use the Published At URL from your synchronized file repository to download the ISO image:
$ wget --directory-prefix /tmp/ https://orcharhino.example.com/pulp/content/My_Organization_Label/Library/custom/My_Product/My_Repository/ubuntu-26.04-latest.iso -
Mount the ISO image:
$ mount ubuntu-26.04-latest.iso /mnt -
Provide the ISO image and the extracted directory under orcharhino.example.com/pub:
$ mkdir --parents /var/www/html/pub/installation_media/ubuntu/26.04-x86_64/ $ cp ubuntu-26.04-latest.iso /var/www/html/pub/installation_media/ubuntu/26.04-x86_64.iso $ cp --archive /mnt/* /var/www/html/pub/installation_media/ubuntu/26.04-x86_64/Ensure that the path in
/pub/matches the path in your Preseed default PXELinux Autoinstall template. -
Unmount and delete the ISO image:
$ umount /mnt/ $ rm --force ubuntu-26.04-latest.iso
-
Use
http://orcharhino.example.com/pub/installation_media/ubuntu/26.04-x86_64/to set up your installation media entry in orcharhino.
|
The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0"). |