Using a local RedHat Satellite Spacewalk repository
Use the following API request to find the repository you are interested in updating for use with RedHat Satellite:
GET /api/v1/stacks/HDP/versions/2.6/repository_versions?fields=operating_systems/repositories/Repositories/base_url { "items" : [ { "href" : "http://localhost:8080/api/v1/stacks/HDP/versions/2.6/repository_versions/2", "RepositoryVersions" : { "id" : 2, "stack_name" : "HDP", "stack_version" : "2.6" }, "operating_systems" : [ { "OperatingSystems" : { "os_type" : "redhat6", }, "repositories" : [ { "Repositories" : { "base_url" : "http://baseurl", "repo_id" : "HDP-2.6", "repository_version_id" : 2, } }, { "Repositories" : { "base_url" : "http://baseurl1", "repo_id" : "HDP-UTILS-1.1.0.21", "repository_version_id" : 2, } } ] } ] } ] } ...
Note | |
---|---|
In the above API call, to change the repository to use RedHat Satellite, you should issue the following call. Of note: Find the ID from above out of the RepositoryVersions structure, attribute "id" Make sure the managed flag is set to false. This means Ambari is NOT managing the repositories. Set the ID and/or Name to match your channel. You must pass all repository structures. |
... PUT /api/v1/stacks/HDP/versions/2.6/repository_versions/2 { "operating_systems" : [ { "OperatingSystems" : { "ambari_managed_repositories": false, "os_type" : "redhat6", "stack_name" : "HDP", "stack_version" : "2.6" }, "repositories" : [ { "Repositories" : { "base_url" : "", "repo_id" : "MY-ID", "repo_name" : "MY_name" } }, { "Repositories" : { "base_url" : "", "repo_id" : "MY-UTILS", "repo_name" : "MY-UTILS_name" } } ] } ] }
* If LZO compression is going to be used in your cluster, see Configuring LZO Compression for more information.
<repository-info> <os family="redhat7"> <package-version>2_6_5_0_*</package-version> <repo><baseurl>https://archive.cloudera.com/p/HDP/2.x/2.6.5.0/centos7</baseurl> <repo> <baseurl>https://archive.cloudera.com/p/HDP/2.x/2.6.5.0/centos7</baseurl> <repoid>hdp_2.6.5.0</repoid> <reponame>HDP</reponame> <unique>true</unique> </repo> <repo><baseurl>https://archive.cloudera.com/p/HDP/2.x/2.6.5.0/centos7</baseurl> <repo> <baseurl>https://archive.cloudera.com/p/HDP-GPL/2.x/2.6.5.0/centos7</baseurl> <repoid>hdp_2.6_gpl</repoid> <reponame>HDP-GPL</reponame> <unique>true</unique> <tags> <tag>GPL</tag> </tags> </repo> <repo> <baseurl>https://archive.cloudera.com/p/HDP/2.x/2.6.5.0/centos7</baseurl> <repoid>hdp_utils_1.1.0.22</repoid> <reponame>HDP-UTILS</reponame> <unique>false</unique> </repo> </os> </repository-info>
After this change, the UI should appear as follows. Notice the ID change:
Next Step
More Information