Apache Ambari Installation
Also available as:
PDF
loading table of contents...

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]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"
          }
        }
      ]
    }
  ]
}

After this change, the UI should appear as follows. Notice the ID change:

Next Step

Install Options

More Information

Setting up an Internet Proxy Server for Ambari

Using a Local Repository