How To Configure HDP Stack Repositories for Red Hat Satellite
To disable the repositories created and distributed by Ambari in the .repo files:
Before installing your cluster, on the Ambari Server host, browse to the following:
/var/lib/ambari-server/resources/stacks/HDP/2.0.6/configuration
Modify the cluster-env.xml file
vi cluster-env.xml
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>
Modify the <value> of the property by setting “enabled=0”. The .repo files will still be created and distributed by Ambari Server but the repositories will not be enabled.
Save and exit.
Restart the Ambari Server and proceed with your cluster install.
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 | |
---|---|
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 | |
---|---|
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 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. |