banner



How To Access And Upload Files In Existing Repositories

YUM Back up is Platform Independent!

Artifactory'southward RPM metadata calculation is based on pure Java.

It does non rely on the beingness of the createrepo binary or on running external processes on the host on which Artifactory is running.

When enabled, the metadata calculation is triggered automatically by some actions, and tin can also be invoked manually past others. Either manner, the metadata produced is served to YUM clients.

Automatic

RPM metadata is automatically calculated:

  1. When deploying, removing, copying, and moving an RPM file.
  2. When performing content import (both organisation and repository imports).
Manual

You can manually invoke RPM metadata adding:

  1. By selecting the local repository in the Tree Browser and clickingRecalculate Index in theActions menu.
  2. Via Artifactory's Residual API.

Metadata calculation cleans upwards RPM metadata that already existed equally a outcome of manual deployment or import. This includes RPM metadata stored as SQLite database files.

Indexing the File List

The filelists.xml  metadata file of an RPM repository contains a list of all the files in each package hosted in the repository. When the repository contains many packages, reindexing this file as a effect of interactions with the YUM client can be resource intensive causing a degradation of functioning. Therefore, from version 5.4, reindexing this file is initially disabled when an RPM repository is created. To enable indexing filelists.xml , fix the Enable File Listing Indexing checkbox.

Note that the filelists.xml  metadata file for a virtual repository may not be complete (i.e. it may not actually list all the files it aggregates) if any of the repositories it aggregates practice not have file listing enabled. Note that if indexing of the filelists.xml file is disabled, it is not possible to search for a file using the YUM client to determine which bundle wrote the queried file to the filesystem.


Configuration

To create an RPM local repository, in the Administration  module go to Repositories  | Repositories | Local, click New Local Repository andselect RPM every bit the Package Type .

Local Repositories

To enable automated RPM metadata calculation on a local RPM repository, in theRPM Settings section of theBasic settings screen, setAutomobile-calculate RPM Metadata.

Field Clarification
RPM Metadata Folder Depth

Informs Artifactory under which level of directory to search for RPMs and save therepodata directory.

Past default this value is 0 and refers to the repository's root binder. In this example, Artifactory searches the unabridged repository for RPMs and saves therepodata directory at$REPO-Key/repodata .

Using a dissimilar depth is useful in cases where generating metadata for a repository separates its artifacts by name, version and architecture. This volition let you to create multiple RPM repositories nether the same Artifactory RPM repository.

For case:
If the repository layout is similar to that shown below and y'all want to generate RPM metadata for every artifact divided past name, set theDepth to1 and therepodata directory is saved at REPO_ROOT/ARTIFACT_NAME/repodata  :

REPO_ROOT/$ARTIFACT_NAME/$ARTIFACT_VERSION/$ARCHITECTURE/FILE_NAME - or - rpm-local/foo/i.0/x64/foo-ane.0-x64.rpmm

When changing the configured depth of existing repository, packages indexed in the old depth might need to be re-indexed or moved to a new depth to exist available in the new configured depth, and YUM clients might need to change their configuration to point to the new depth.depth.

Auto-summate RPM Metadata
 When set, RPM metadata adding is automatically triggered by the actions described higher up.
Enable File List Indexing
When gear up, RPM metadata calculation will likewise include indexing the filelists.xml metadata file.
RPM Group File Names

A comma-separated listing of YUM group files associated with your RPM packages.

Note that at each level (depth), the repodata directory in your repository may contain a different group file name, however each repodata directory may contain just i group metadata file (multiple groups should be listed as different tags inside the XML file. For more details, see YUM Documentation).

Remote Repositories

Artifactory remote repositories support RPMs out-of-the-box, and there no demand for any special configuration needed in order to piece of work with RPMs in a remote repository.

All you demand to do ispoint your YUM customer at the remote repository, and yous are ready to utilize YUM with Artifactory.

To define a remote repository to proxy an RPM remote repository, follow the steps below:

  1. In theAdministration module underRepositories  | Repositories | Remote, clickNew Remote Repository to create a new remote repository.
  2. Set theRepository Keyvalue, and specify the URL to the remote repository in theURLfield as displayed below.
  3. Click Save & Stop.
  4. Dorsum in the Awarding | Artifactory | Artifacts module, in theTree Browser, select the repository. Note that in the Tree Browser, the repository proper name is appended with -cache.
  5. ClickSet up Me Upward and copy the value of the baseurl  tag.
  6. Side by side, create the /etc/yum.repos.d/ targetCentos.repo  file andpaste the following configuration into it :

    [targetCentos] proper noun=targetCentos baseurl=http://localhost:8081/artifactory/targetCentos/ enabled=1 gpgcheck=0

Virtual Repositories

A Virtual Repository defined in Artifactory aggregates packages from both local and remote repositories.
This allows you to access both locally hosted RPM packages and remote proxied RPM repositories from a single URL defined for the virtual repository.
To ascertain a virtual YUM repository, from the Administration module, go toRepositories | Repositories | Virtual, set theBundle Typeto beRPM,and select the underlying local and remote RPM repositories to include in theBasicsettingstab.

To let deploying packages to this repository, prepare the Default Deployment Repository.


Artifactory supports using a GPG key to sign RPM metadata for authentication by the YUM customer.

To generate a pair of GPG keys and upload them to Artifactory, see Managing Signing Keys.


Installing RPM Packages Using Yum

After configuring the rpm-local  repository in Artifactory, you need to configure your local motorcar to install software packages from it by executing the post-obit steps:

  1. Edit the artifactory.repo  file with root privileges

    sudo vi /etc/yum.repos.d/artifactory.repo
  2. Paste the following configuration into the artifactory.repo  file:

    [Artifactory] name=Artifactory baseurl=http://localhost:8081/artifactory/rpm-local/ enabled=one gpgcheck=0

At present, every RPM file deployed to the root of the rpm-local  repository can be installed using:

yum install <package_name>

Deploying RPM Packages

Once yous have configured your local motorcar to install RPM packages from your RPM local repository, you may also deploy RPM packages to the aforementioned repository using the UI or using the REST API.

Through the Residual API y'all besides have the option to deploy by checksum or deploying from an archive.

For example, to deploy an RPM package into a repository chosen rpm-local you could apply the following:

curlicue -u<USERNAME>:<PASSWORD> -XPUT http://localhost:8080/artifactory/rpm-local/<PATH_TO_METADATA_ROOT> -T <TARGET_FILE_PATH>

where PATH_TO_METADATA_ROOT specifies the path from the repository root to the deploy binder.


Deploying RPM Modules to Your Local Repository

You tin can deploy RPM modules to the repodata folder using the modules.yaml file which contains all the desired modules and so continue to trigger a repository index to update the repomd.xml and other metadata files with the modules information.

  1. You tin perform the upload directly in the JFrog Platform UI or using the following command.

    gyre -u <USERNAME>:<Password> -XPUT "http://localhost:8081/artifactory/rpm-local/<PATH_TO_REPODATA_FOLDER>/modules.yaml -T <TARGET_MODULES_FILE_PATH>"
  2. Trigger the reindex by running the Summate YUM Repository Metadata API.

YUM Groups

A YUM grouping is a set of RPM packages collected together for a specific purpose. For example, you might collect a set of "Development Tools" together as a YUM group.

A group is specified past adding a group XML file tosame directory every bit the RPM packages included in it. The grouping file contains the metadata of the group including pointers to all the RPM files that make up the grouping.

Artifactory supports attaching a YUM Group file to the YUM calculation essentially mimicking thecreaterepo -grand command.

A grouping file can also be created by running the post-obit command:

sudo yum-groups-manager -n "My Group" --id=mygroup --save=mygroups.xml --mandatory yum glibc rpm

Attaching a YUM Group

The process of attaching YUM group metadata to a local repository is elementary:

  1. Create an XML file in the groups format used past YUM. You can either just type it out manually using whatever text editor, or run theyum-groups-managing director command fromyum-utils.
  2. Deploy the created group file to the repodata  folder.
    Artifactory will automatically perform the following steps:
    • Create the corresponding .gz  file and deploy it next to the deployed group XML file.
    • Invoke a YUM calculation on the local repository.
    • Attach the grouping information (both the XML and the .gz  file) to the repomd.xml  file.
  3. Make sure the group file names are listed in theYUM Grouping File Namesfield nether the Basic tab of the repository configuration. This tells Artifactory which files should be attached as repository group information.

YUM Group Commands

The following tabular array lists some useful YUM group commands:

Control Description

yum groupinstall <Group ID>

Install the YUM group. The grouping must be deployed to the root of the YUM local repository.

yum groupremove <Group ID>

Remove the RPM grouping

yum groupupdate <Group ID>

Update the RPM group. The group must be deployed to the root of the YUM local repository.

yum groupinfo <Group ID>

List the RPM packages inside the grouping.

yum grouplist | more

Listing the YUM groups

Setting Grouping Properties

YUM grouping properties tin be fix  in the /etc/yum.config  file as follows:

Setting Allowed values Description
overwrite_groups 0 or 1

Determines YUM's behavior if two or more than repositories offer package groups with the aforementioned proper name.

If set to 1 then the group packages of the last matching repository will be used.

If set up to 0 then the groups from all matching repositories will be merged together equally ane large group.

groupremove_leaf_only 0 or 1

Determines YUM'southward behavior when the groupremove control is run.

If prepare to 0 (default) then all packages in the group will be removed.

If set to one then only those packages in the group that aren't required by another packet will be removed.

enable_group_conditionals 0 or one

Determines whether YUM will allow the use of conditionals packages.

If set to 0 and then conditionals are not immune

If set to 1 (default) parcel conditionals are immune.

group_package_types optional, default, mandatory Tells YUM which type of packages in groups will be installed when groupinstall is called. Default is: default, mandatory

Yum Authentication

Proxy Server Settings

If your arrangement uses a proxy server every bit an intermediary for Cyberspace access, specify theproxy settings in /etc/yum.conf. If the proxy server also requires authentication, you also demand to specify the proxy_username , and proxy_password settings.

proxy=<proxy server url>  proxy_username=<user> proxy_password=pass          

If yous utilise the yum plugin (yum-rhn-plugin) to access the ULN, specify theenableProxy andhttpProxysettings in /etc/sysconfig/rhn/up2date. In addition, If the proxy server requires authentication, you also need to specify theenableProxyAuth,proxyUser, andproxyPassword settings as shown below.

enableProxy=1 httpProxy=<proxy server url>  enableProxyAuth=one proxyUser=<user> proxyPassword=<password>

SSL Setting

YUM supports SSL from version 3.2.27.

To secure a repository with SSL, execute the post-obit steps:

  • Generate a private primal and certificate using  OpenSSL.
  • Define your protected repository in a .repo  file every bit follows:

    [protected] name = SSL protected repository baseurl=<secure repo url> enabled=1 gpgcheck=1 gpgKey=<URL to public key> sslverify=i sslclientcert=<path to .cert file> sslclientkey=<path to .key file>

    where:
    gpgkey  is a URL pointing to the ASCII-armored GPG cardinal file for the repository . This selection is used if YUM needs a public key to verify a package and the required key has non been imported into the RPM database.
    I
    f this selection is set, YUM will automatically import the key from the specific URL. You will exist prompted earlier the key is installed unless theassumeyes choice is set.


Using Yum Variables

Yous can use and reference the following built-in variables in yum  commands and in all YUM configuration files (i.east. /etc/yum.conf  and all .repo  files in the /etc/yum.repos.d/  directory):

Variable Description
$releasever
This is replaced with the package'due south version, as listed indistroverpkg. This defaults to the version of the redhat-release package.
$arch
This is replaced with your system's compages, as listed byos.uname() in Python.
$basearch
This is replaced with your base architecture. For example, if$arch=i686 so$basearch=i386

The following code cake is an example of how your /etc/yum.conf  file might expect:

[primary] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=one gpgcheck=ane plugins=1 installonly_limit=3 [comments abridged]

Viewing Individual RPM Information

Yous can view all the metadata that annotates an RPM by choosing it in Artifactory's tree browser and selecting theRPM Info tab:

Metadata Fields as Properties

The corresponding RPM metadata fields are automatically added equally properties of an RPM antiquity in YUM repositories accessed through Artifactory:

  • rpm.metadata.name

  • rpm.metadata.arch

  • rpm.metadata.version

  • rpm.metadata.release

  • rpm.metadata.epoch

  • rpm.metadata.group

  • rpm.metadata.vendor

  • rpm.metadata.summary

Backdrop can be used for searching and other functions. For more details come across Property Sets.


Scout the Screencast

Watch this short screencast to learn how easy information technology is to host RPMs in Artifactory.

Source: https://www.jfrog.com/confluence/display/JFROG/RPM+Repositories

Posted by: thomascolore41.blogspot.com

0 Response to "How To Access And Upload Files In Existing Repositories"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel