# Configuring HPE Morpheus Enterprise Distributed Worker

## Prerequisites

Ensure you have addressed the following:

- All the prerequisites listed in [Installing HPE HVM Two-Node Clusters](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-4C188E35-2B22-4F0C-873E-E81C0EA8A553.html)
- [Adding HPE Morpheus Enterprise Distributed Worker to HPE Morpheus Manager](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-732825F8-2C00-4F17-93B6-620C17338120.html)
- Ensure you have deployed the HPE Morpheus Enterprise Distributed Worker by installing the HPE Morpheus Enterprise Distributed Worker package using your Linux distribution package manager.

## About this task

Configure the HPE Morpheus Enterprise Distributed Worker to HPE Morpheus Manager to establish connection with the HPE Morpheus Manager.

## Procedure

1. Open the `/etc/morpheus/morpheus-worker.rb` configuration file and update the following fields:

   ```
   ```
   worker_url 'https://<worker-ip-or-fqdn>'  
   worker['appliance_url'] = 'https://<morpheus-manager-ip-or-fqdn>'  
   worker['worker_key'] = '<Use the API key generated after adding HPE Morpheus Enterprise Distributed Worker to HPE Morpheus Manager>'
   ```
   ```

   NOTE

   By default, the `worker['worker_key'] = 'DISTRIBUTED WORKER KEY (OPTIONAL)'` line is commented out. Remove the `#` character at the beginning of that line. Then comment out or delete `worker['apikey'] = 'API KEY FOR THIS GATEWAY'`.
2. Reconfigure HPE Morpheus Enterprise Distributed Worker:

   ```
   ```
   sudo morpheus-worker-ctl reconfigure
   ```
   ```
3. Verify that the command completes successfully.
