Configuring repositories and proxy settings for the installUtility command

In the repositories.properties file, you can configure how the installUtility command accesses local directory-based repositories, instances of the Liberty Asset Repository Service, and the Liberty Repository.

About this task

The installUtility command can access the following repositories:
  • The Liberty Repository, a public IBM®-hosted repository that is accessible through the internet. For more information, see Liberty Repository.
  • The Liberty Asset Repository Service, an open source service that you can use to create an on-premises repository that is remotely accessible behind the firewall of an enterprise. For more information, see the WASdev/tool.lars project on GitHub.
  • Local directory-based repositories, which you create by using the installUtility download action or by downloading the wlp-featureRepo-<version>.zip file, which contains all applicable features and addons. For more information, see Downloading assets using the installUtility command.

Both the installUtility command and the featureManager command use the same configuration properties file, repositories.properties. The proxy settings are shared, but the repository settings are used only by the installUtility command. To manage assets and complete repository-based installation, find, or uninstallation operations, use the installUtility command instead of the featureManager command.

Tip: You can download or install assets from a single local directory-based repository by specifying the repository on the --from option. No additional configuration in the repositories.properties file is required. For more information, see installUtility command.
To access the Liberty Repository with limited internet access or through a firewall, ensure that you have access to the following hosts and ports:
  • public.dhe.ibm.com on port 443
  • asset-websphere.ibm.com on port 443
Note: The installUtility command supports only proxy servers with HTTP/HTTPS protocols.

Procedure

  1. Optional: When you first configure the repository or proxy settings, you can run the installUtility viewSettings command to output a configuration template for the repositories.properties file.

    Copy the template into a new properties file at ${wlp.install.dir}/etc/repositories.properties. The properties file must be in ASCII format for all platforms.

  2. Define the settings in the ${wlp.install.dir}/etc/repositories.properties file.

    If you copied the template from the installUtility viewSettings command, modify the template by changing the example repository and proxy settings to refer to your environment. Lines that begin with a number sign (#) are not processed.

    • To disable access to the Liberty Repository, set the useDefaultRepository property to false. The Liberty Repository is enabled by default and is the last repository that is accessed when you install or download assets.
      useDefaultRepository=false
    • To define a repository, add a property as repoName.url=url or repoName.url=file_path. Each repository name must be unique.

      The defined repositories are accessed in the order that they are specified in the repositories.properties file.

      For Windows platforms
      dev-rep.url=http://dev.repo.ibm.com:9080/ma/v1
      local-rep2.url=file:///c:/IBM/localrepo2
      local-rep3.url=C:\IBM\localrepo3
      local-rep4.url=C:\IBM\localrepo4.zip
      For UNIX platformsFor LINUX platformsFor z/OS platformsFor Solaris platformsFor HP UNIX platforms
      dev-rep.url=http://dev.repo.ibm.com:9080/ma/v1
      local-rep2.url=file:///usr/IBM/localrepo2
      local-rep3.url=/usr/IBM/localrepo3
      local-rep4.url=/usr/IBM/localrepo4.zip
    • If a repository requires a user name and password, set the properties repoName.user=userId and repoName.userPassword=password.
      If a user name and password are required and they are not set, you receive a prompt to provide them. For enhanced security, encode the password by using the securityUtility encode action. For more information, see Liberty: securityUtility command.
      dev-rep.user=myname                            
      dev-rep.userPassword={aes}AH5NLyd7DfGb12pK17Pw+
    • If your system requires access to the Liberty Repository or an instance of the Liberty Asset Repository Service through a proxy server, set the proxyHost, proxyPort, proxyUser, and proxyPassword proxy properties.

      For enhanced security, encode the value of the proxyPassword property by using the securityUtility encode action. If you do not set the user name and password, you receive a prompt to provide them.

      For example:
      proxyHost=my.proxy.server.ibm.com
      proxyPort=9080
      proxyUser=myname
      proxyPassword={aes}AH5NLyd7DfGb12pK17Pw+
  3. Save the changes to the repositories.properties file.
  4. Review the repository and proxy settings by running the installUtility viewSettings command.
    When you run the installUtility viewSettings command, the repository and proxy configuration is automatically validated. To view detailed validation messages, run the command with the --viewValidationMessages option.
    >installUtility viewSettings
    
    installUtility Settings
    ----------------------------------------------------------------------
    Properties File: c:\wlp\etc\repositories.properties
    Default Assets Repository: IBM WebSphere Liberty Repository
    Use Default Repository: True
    
    Properties File Validation
    ----------------------------------------------------------------------
    Validation Results: The properties file successfully passed the 
    validation.
    
    Configured Repositories
    ----------------------------------------------------------------------
    Name: dev-rep
    Location: http://dev.repo.ibm.com:9080/ma/v1
    User Name: myname
    Password: <Unspecified>
    
    Proxy Settings
    ----------------------------------------------------------------------
    Proxy Server: my.proxy.server.ibm.com
    Port: 9080
    User Name: myname
    Password: ********
  5. Test the repository connection by running the installUtility testConnection command.
    If you do not set the user name and password, you receive a prompt to provide them.
    >installUtility testConnection
    Testing the connection to all configured repositories...
    This process might take several minutes to complete.
    
    Configured Repositories
    ----------------------------------------------------------------------
    Name: dev-rep
    Location: http://dev.repo.ibm.com:9080/ma/v1
    Status: Successfully connected to the configured repository.
    Name: IBM WebSphere Liberty Repository (Default Assets Repository)
    Status: Successfully connected to the configured repository. 
    You can test all configured repositories in the repositories.properties file at once by running the installUtility testConnection command with no repoName specified. The repository name for the Liberty Repository is default. To test the connection to the Liberty Repository, run the following command:
    installUtility testConnection default

What to do next

You can use the installUtility command to search for assets and install or download them from the configured repositories.