> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdc-10.2-data-optimizer/pdso-install-landing-page/pdso-install-in-hadoop-cluster/pdso-install-landing-page-hadoop-installation/installing-data-storage-optimizer-on-apache-ambari-cluster/step-4-link-the-mpack-on-the-apache-ambari-server.md). Agents can also search and read this documentation through its [MCP server](https://docs.pentaho.com/~gitbook/mcp).

# Step 4: Link the mpack on the Apache Ambari server

Once linked to the HDP stack, you can add the Data Optimizer file service to the cluster as if Data Optimizer is contained in the stack, using the Linux `curl` utility to create the link. You can perform this step on any Linux host with `curl` and network access to the Apache Ambari REST API.

1. Create the mpack link with the following `curl` command:

   ```
   curl -u <user>:<password> \
   http://<server>:<port>/api/v1/links/ \
   -H 'X-Requested-By: ambari' -X POST \
   -d '
   {
     "ExtensionLink": {
       "stack_name": "HDP", 
       "stack_version":"<hdp_stack_version>", 
       "extension_name": "ldo", 
       "extension_version": "1.0.0.0"
     }
   }'

   ```

   Where:

   * **`<user>:<password>`**

     Username and password for the Ambari administrator.
   * **`<server>:<port>`**

     Ambari server’s host name or IP, and the Ambari server’s port.
   * **`<hdp_stack_version>`**

     HDP stack version running on the cluster you are deploying Data Optimizer to. Typically, this is just the `major.minor version number`, for example, `3.1`. You can query this value from Ambari using the following command:

     ```
     curl -u <user>:<password> \
     http://<server>:<port>/api/v1/clusters/<cluster_name>/stack_versions

     ```
2. Verify the links were properly created by querying the Apache Ambari API as follows:

   ```
   curl -u
           <user>:<password> \ http://<server>:<port>/api/v1/links/
   ```

   You should get a response such as the following:

   ```
   {
     "href" : "http://<server>:<port>/api/v1/links/",
     "items" : [
       {
         "href" : "http://<server>:<port>/api/v1/links/1",
         "ExtensionLink" : {
           "extension_name" : "ldo",
           "extension_version" : "1.0.0.0",
           "link_id" : 1,
           "stack_name" : "HDP",
           "stack_version" : "3.1"
         }
       }
     ]
   }

   ```
3. Restart the Apache Ambari server.

   This refreshes Apache Ambari server’s stale memory cache so it recognizes the Data Optimizer extension.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pentaho.com/pdc-10.2-data-optimizer/pdso-install-landing-page/pdso-install-in-hadoop-cluster/pdso-install-landing-page-hadoop-installation/installing-data-storage-optimizer-on-apache-ambari-cluster/step-4-link-the-mpack-on-the-apache-ambari-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
