Deploy Tool

The Deploy Tool is HUMAN’s setup assistant for installing, updating, and customizing an Enforcer. It guides you through the required steps, validates your inputs, and deploys the integration without you having to build the configuration manually. If you use a supported Enforcer framework, we highly recommend using the Deploy Tool to manage changes to your Enforcer whenever possible.

The Deploy Tool only works with the latest version of each Enforcer. It does not support downgrades or deployments on older versions.

Install an Enforcer

The Deploy Tool works together with the Enforcer’s enforcerConfig.json file, which has important information like your Application ID and remote authorization token already filled in, to quickly compile and set up your Enforcer configuration. You can download this file from the HUMAN Console > Platform Settings > Enforcers, clicking on the appropriate Enforcer, and clicking Download configuration file .

Each Enforcer framework has additional unique prerequisites that may be required while using the Deploy Tool. Refer to your Enforcer’s specific documentation for the full list of requirements.

Generally, after you prepare the unique prerequisites for your Enforcer, the installation follows this process:

1

Run the Deploy Tool

First, download and run the Deploy Tool. You can do this by either pulling a Docker image or running a script.

If you’re using Windows, you also need to complete additional steps to set up Docker:

  1. In your Windows search bar, search for and open Turn Windows features on or off.
  2. Find the Windows Hypervisor Platform feature and click its checkbox to enable it.
  3. Click OK to save your changes.
  4. Open Windows PowerShell as an Administrator.
  5. Copy and paste in C:\Windows\System32\wsl.exe --update --web-download, then hit Enter.
  1. Pull the Docker image by running:
$docker pull us-docker.pkg.dev/hmn-registry/docker-public/cdn-enforcer-deploy-tool
  1. Navigate to the directory where you saved enforcerConfig.json.
  2. Run the Deploy Tool with the following:
$docker run --rm -v $PWD:/app/local -it us-docker.pkg.dev/hmn-registry/docker-public/cdn-enforcer-deploy-tool
2

Deploy the Enforcer

After you run the Deploy Tool, you’ll be prompted with steps to deploy the Enforcer.

  1. When prompted, select the appropriate Enforcer framework and hit Enter.
$🚀 HUMAN CDN Enforcer Deploy Tool 🚀
$? Which platform do you want to deploy to? (Use arrow keys)
$ Fastly VCL
$ Cloudflare Workers
$ ...
  1. Follow the prompts that appear to complete the setup process.
  2. After you complete the setup, confirm that the displayed details are correct, then enter y to deploy the Enforcer.

Update an Enforcer version

The Deploy Tool automatically detects if you’re using an older version of an Enforcer and prompts you to update to the latest version whenever you attempt to deploy an Enforcer again. To update, simply rerun the Deploy Tool similarly to when you installed it:

  1. Run the Deploy Tool using your preferred method:

    In the same directory as enforcerConfig.json, run the following:

    $docker run --rm -v $PWD:/app/local -it us-docker.pkg.dev/hmn-registry/docker-public/cdn-enforcer-deploy-tool
  2. When prompted, select the appropriate Enforcer framework and hit Enter.

  3. Follow the prompts that appear. If you just want to update to the latest version, you can provide the same information as you did when you first installed the Enforcer.

  4. After you complete the setup, if an update is available, the Deploy Tool will display the new version and ask you to confirm that you want to deploy. Below is an example of what you might see for the Cloudflare Enforcer. To confirm and update, enter y.

$...
$ Found 1 existing routes for this worker.
$ Successfully prepared deployment plan.
$Before deployment, please ensure these details are correct:
$
$* HUMAN Enforcer Type: Cloudflare Workers
$* HUMAN Enforcer Version: 6.12.0 → 6.15.0 # The new version that the Deploy Tool will upgrade the Enforcer to
$* HUMAN Application ID: PX1234567
$...

Customize an Enforcer

Each Enforcer framework has its own configuration options that you can use to customize the Enforcer’s behavior. These configuration options are typically parameters that you can add directly to the enforcerConfig.json file or custom functions that need to be uploaded as separate files. You can use the Deploy Tool in both cases to deploy these changes to the Enforcer.

Refer to your Enforcer’s specific configuration documentation for a full list of supported customizations.

  1. Add your customizations to the enforcerConfig.json file.

  2. Run the Deploy Tool using your preferred method:

    In the same directory as enforcerConfig.json, run the following:

    $docker run --rm -v $PWD:/app/local -it us-docker.pkg.dev/hmn-registry/docker-public/cdn-enforcer-deploy-tool
  3. When prompted, select the appropriate Enforcer framework and hit Enter.

  4. Follow the prompts that appear. When you’re asked whether to use HUMAN’s default configuration or provide your own custom one, select Default and hit Enter. Below is an example of what you might see for the Cloudflare Enforcer.

$...
$ Successfully downloaded sample project repository.
$? Would you like to deploy a custom worker or use HUMAN's default bundle? (Use arrow keys)
>❯ Default
> Custom
  1. Follow the prompts that appear to complete the setup process.
  2. After you complete the setup, confirm that the displayed details are correct, then enter y to deploy the Enforcer.