Ambari Reference Guide
Also available as:
PDF
loading table of contents...

Chapter 13. Configuring HDP Stack Repositories for Red Hat Satellite

As part of installing HDP Stack with Ambari, HDP.repo and HDP-UTILS.repo files are generated and distributed to the cluster hosts based on the Base URL user input from the Cluster Install Wizard during the Select Stack step. In cases where you are using Red Hat Satellite to manage your Linux infrastructure, you can disable the repositories defined in the HDP Stack .repo files and instead leverage Red Hat Satellite.

To disable the repositories created and distributed by Ambari in the .repo files:

  1. Before installing your cluster, on the Ambari Server host, browse to the following:

    /var/lib/ambari-server/resources/stacks/HDP/2.0.6/configuration

  2. Modify the cluster-env.xml file

    vi cluster-env.xml

  3. Search for the property name repo_suse_rhel_template (for RHEL/ CentOS /SLES), repo_ubuntu_template (for Ubuntu), or repo_debian_template (for Debian). For example:

    <name>repo_suse_rhel_template</name>

  4. Modify the <value> of the property to set the repository as disabled.

    <value>[{{repo_id}}-DISABLED]
    name={{repo_id}}-DISABLED
    {% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}
    path=/
    enabled=0
    gpgcheck=0</value>
  5. Save and exit.

  6. Restart the Ambari Server and proceed with your cluster install.

[Important]Important

You must configure Red Hat Satellite to define and enable the Stack repositories. Please refer to the Red Hat Satellite documentation for more information.

[Important]Important

When using RedHat Satellite or Spacewalk for repository management, it's very important to note that the name of the repository must match our HDP naming convention. When adding repositories, please ensure their names match those found in the .repo files. Example: HDP-2.2.4.2

[Note]Note

If you need to modify the template after cluster install, you can modify the property on cluster-env configuration using the Ambari REST API or the /var/lib/ambari-server/resources/scripts/configs.sh script. The example below shows setting the repo_suse_rhel_template property to "enabled=0" using the script.

configs.sh -u admin -p admin set ambari.server cluster.name cluster-env repo_suse_rhel_template "[{{repo_id}}-DISABLED]\nname={{repo_id}}-DISABLED\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=0\ngpgcheck=0"

where ambari.server is the Ambari Server hostname and cluster.name is the name of your cluster.