Enterprise setup

Use the following instructions to install and configure Perforce TeamHub for Enterprise deployment.

Download the TeamHub Enterprise (hth-db and hth-web) packages specific to the host operating system from Perforce's package repositories.

Alternatively, use the Perforce's package repositories directly to install the packages instead of using the rpm -ivh or dpkg -i commands below.

Step 1: Before you begin

Confirm that you have met all of the following prerequisites before installing and configuring Perforce TeamHub:

Step 2: Install Perforce TeamHub DB

Install using repositories

Install the package itself as root (recommended). If you have downloaded the TeamHub package, see Install manually from a downloaded TeamHub package.

RHEL and CentOS

  1. Configure the Perforce repository if you have not already. See Configure the Perforce repository.
  2. Run the following command to install the TeamHub package:

    sudo yum install hth-db

Ubuntu

  1. Configure the Perforce repository if you have not already. See Configure the Perforce repository.
  2. Run the following commands to install the TeamHub package:

    sudo apt-get update
    sudo apt-get install hth-db

Install manually from a downloaded TeamHub package

Upload the hth-db package to the server designated for Database role, install the package itself as root:

RHEL and CentOS

rpm -ivh hth-db-X.X.X-stable.elX.x86_64.rpm

Ubuntu

dpkg -i hth-db_X.X.X_amd64.deb

Step 3: Configure Perforce TeamHub DB

Every installation, upgrade, or configuration adjustment in Perforce TeamHub will require the TeamHub Control utility to reconfigure TeamHub so the changes can take effect. To enable all required services after installation, run the following command:

sudo hth-ctl reconfigure

Step 4: Enable Enterprise mode

For Perforce TeamHub Web to communicate to TeamHub DB, configure MongoDB and Redis to accept authentication and remote connections.

Run the following command to create TeamHub MongoDB administrator and user credentials:

sudo su - hth
create_mongodb_users.sh
Remember the MongoDB credentials because they are also required to set up TeamHub web servers.

Next, reconfigure TeamHub DB for Redis authentication. Open the TeamHub Configuration file at /var/opt/hth/shared/hth.json, add the following lines to the JSON file, and update the credentials. The setting "is_cluster": true enables Enterprise mode:

{
  ... (snipped)
  "app" : {
    "is_cluster": true
  },
  ... (snipped)
  "redis": {
    "enable": true,
    "password": "Choose Redis password"
  },
  "mongodb": {
    "enable": true,
    "username": "Enter username of Perforce TeamHub MongoDB user",
    "password": "Enter password of Perforce TeamHub MongoDB user"
  },
  ... (snipped)
}

Finally, apply the changes by reconfiguring the TeamHub DB:

sudo hth-ctl reconfigure

Step 5: Install Perforce TeamHub

The computer you install the web components on must also meet the prerequisites. See Step 1: Before you begin.

Install using repositories

Install the package itself as root (recommended). If you downloaded the TeamHub package. See Install manually from a downloaded TeamHub package.

RHEL and CentOS

  1. Configure the Perforce repository if you have not already. See Configure the Perforce repository.
  2. Run the following command to install the TeamHub package:

    sudo yum install hth-web

Ubuntu

  1. Configure the Perforce repository if you have not already. See Configure the Perforce repository.
  2. Run the following commands to install the TeamHub package:

    sudo apt-get update
    sudo apt-get install hth-web

Install manually from a downloaded TeamHub package

Upload the hth-web package to the server designated for Web application role, install the package itself as root.

RHEL and CentOS

rpm -ivh hth-web-X.X.X-stable.elX.x86_64.rpm

Ubuntu

dpkg -i hth-web_X.X.X_amd64.deb

Step 6: Connect Perforce TeamHub Web to TeamHub DB

To change the default Company ID, administrator User ID, and password before completing installation, you must make the changes before you run the hth-ctl reconfigure control command for the first time. Otherwise, you can change the values after installation in company and user settings.

To change the default values now, run the following commands:

export HTH_INIT_COMPANY_NAME="<hth>"

export HTH_INIT_USERNAME="<administrator>"

export HTH_INIT_PASSWORD="<password>"

<hth> is the Company ID, <administrator> is the User ID, and <password> is the password.

Company ID and Username must be 2 - 100 characters and cannot contain spaces. Valid characters: A-Z, a-z, 0-9,-, _

Note: Do not reconfigure TeamHub Web yet. First, 'Turn' the server into a cluster node, and add the TeamHub DB credentials for it to connect to the TeamHub databases. Open the TeamHub Configuration file at /var/opt/hth/shared/hth.json and add the following lines to the JSON file and update credentials and hosts:

{
  ... (snipped)
  "app" : {
    "is_cluster": true
  },
  ... (snipped)
  "backend": {
        "db_host": "Enter IP address or hostname of Perforce TeamHub DB server",
        "db_port": "4002",
        "db_username": "Enter username of Perforce TeamHub MongoDB user",
        "db_password": "Enter password of Perforce TeamHub MongoDB user",
        "redis_host": "Enter IP address or hostname of Perforce TeamHub DB server",
        "redis_password": "Enter Redis password chosen on Perforce TeamHub DB server",
        "enable": true
  },
  ... (snipped)
}

Finally, apply the changes by reconfiguring TeamHub Web:

sudo hth-ctl reconfigure

Step 7: Bootstrap

At this stage Perforce TeamHub is installed and running, and can be accessed using hth as Company ID and admin as user ID and password (change them in company and user settings):

http://IP_ADDRESS_OF_YOUR_WEB_SERVER/login

However, the TeamHub instance needs to have a valid license before accessing the dashboard. The license can be managed in the TeamHub admin UI. See License for more information.

The TeamHub admin UI can be used to further configure the instance (at minimum, configuring hostname and mail settings are recommended). See Bootstrapping Perforce TeamHub for more information.