Skip to content

Build Provisioner From Source

Install .NET SDK

The HIRS .NET Provisioner requires the .NET SDK version 10 or later. Please follow the instructions from Microsoft for installing the .NET SDK on your system.

Tip

If you are on a RHEL or Rocky, you can use:

sudo dnf install dotnet-sdk-10.0

Tip

After installing the .NET SDK, you must restart your terminal for the environment variables to get updated.

Build the Provisioner Packages

Most of the build commands for HIRS .NET Provisioner work the same way whether they are run from Windows or Linux. Location of where these commands are run matters. The directory the command should be run from is included in each section below.

  1. Checkout HIRS from Github
    git clone --recurse-submodules https://github.com/nsacyber/HIRS.git 
    
    For an existing clone, run git submodule update --init from the repository root.
  2. restore to retrieve all dependencies required for building or testing source code
    cd <HIRS repository>/HIRS_Provisioner.NET/
    dotnet restore 
    
  3. Build and Run Unit Tests
    dotnet test 
    
  4. Packaging uses the HIRS repository's Gradle wrapper from the repository root.

    ./gradlew -p HIRS_Provisioner.NET release
    
    .\gradlew.bat -p HIRS_Provisioner.NET release
    

    Both commands produce an RPM and DEB for linux-x64. The Windows command will additionally produce an MSI for win-x64.

    To build the ACA and Provisioner packages together from the repository root, run:

    ./gradlew clean release
    
    On Windows, the same command will build the provisioner MSI.

Info

After building, you'll find package files under the provisioner project folder.

cd HIRS_Provisioner.NET/build/distributions/

Install the Provisioner Package

To install the Provisioner package, see the Provisioner install section.

Installation Directory

The Provisioner is installed to the following directory:

/usr/share/hirs

C:\Program Files(x86)\HIRS_Provisioner.NET