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:
- Provide one repository location for your users. The location of a composite repository can remain the same while the repositories listed in the composite repository can change locations. For example, add the location of the composite repository to a response file. To change the repositories that we use for the response file, edit the repository.config file for the composite repository. We do not need to change the location of the composite repository in the response file.
If we use remote repositories, a composite repository allows users to access one repository to obtain later versions of a package. For example, we create a composite repository for Product A. You update the repository.config file as later versions of Product A become available. Users access only the composite repository for Product A instead of accessing a new repository each time a version of Product A is released.
If we support multiple groups of users that use the same package, we can maintain one repository for the package but use a different composite repository for each group.
Procedure
Related reference:
- 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
- Create a text file with this name: repository.config, then save the file to the directory that we created for the composite repository.
- 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_DThe 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. - To use the composite repository, add the composite repository to the list of repositories.
Repositories
Home