Create composite repositories

A composite repository contains a repository.config file that lists locations of other repositories.

Determine the types of repositories to use and the types of access for a repository. For more information about repository types and access, see Repositories.

A composite repository can list network, electronic software delivery (ESD), file, or composite repositories. To access a composite repository from an HTTP, HTTPS, or FTP server, all repositories must be network repositories.

We can use Packaging Utility to create a network repository from an ESD repository, see Copy packages in wizard mode.

Reasons to use composite repositories:

Procedure

  1. Create a directory for the composite repository. Directory examples:

    • Windows: C:\repository\composite
    • Linux, UNIX, IBM i, and IBM z/OS : /opt/repository/composite
    • OS X: /Applications/repository/composite
    • URL: http://my.server.com/repository/composite

  2. Create a text file with this name: repository.config, then save the file to the directory that we created for the composite repository.

  3. Add the following lines to the repository.config file:
    LayoutPolicy=Composite
    LayoutPolicyVersion=0.0.0.1
    repository.url.01=location_repository_A
    repository.url.02=location_repository_B
    repository.url.03=location_repository_C
    repository.url.04=location_repository_D
    The LayoutPolicy and LayoutPolicyVersion lines are required.

    The repository.url lines are locations for the repositories that you include in the composite repository. Make each repository.url line unique by adding a sequence number, for example, repository.url.01. The location of the repository can be a URL, an absolute path, or a relative path.

    Repository Location format Example Comment
    URL repository.url.01=http://my.server.com/product_A/repository/ We must use network repositories with the URL format.

    For more information about repository types, see Repositories.

    Absolute path Windows: repository.url.01=C:\\repositories\\repository_A\\

    Linux, UNIX, IBM i, and z/OS: repository.url.02=/opt/repositories/repository_B/

    OS X operating system: repoistory.url.03 = /Applications/repositories/repository_C

    If we use a backslash, we must escape this character using a second backslash: \\

    Relative path Windows: repository.url.01=..\repository_A\\

    Linux, UNIX, IBM i, and z/OS: repository.url.01=../repository_D/

    OS X: repoistory.url.01 = ../repository_B

    The path is relative to the location of the repository.config file.

  4. To use the composite repository, add the composite repository to the list of repositories.
Related reference:
  • Repositories
    Home