Skip to main content
Version: 1.1

Offline installation

For environments where internet access is limited or restricted, you can install and run Axiomatics Policy DevOps (APD) in offline or local mode.

Offline mode

APD typically downloads necessary libraries from Maven Central and the Axiomatics Maven S3 bucket. In environments without internet access, such as air-gapped networks, you can eliminate this dependency. Complete all actions that require internet access before moving your machine to the air-gapped environment. Then, install APD in offline mode.

Before you start, make sure you have JDK/JRE version 17 or later and Git installed.

  1. Clone the APD project from GitHub. If you don’t have access to a machine with unrestricted internet access or Git, inform Axiomatics as described in the next step, and they will provide the necessary files as part of the deliverable.

    git clone https://github.com/axiomatics/axiomatics-policy-devops
    note

    Alternatively, you can download the repo contents as a ZIP fileOpens in a new tab.

  2. Contact Axiomatics through the Support portalOpens in a new tab to request the Maven repository clone. Specify your preferred delivery method, such as a secure third-party file-sharing service or an HTTPS download link for transfer to an offline machine.

    info

    The repository clone is a ZIP file, approximately 250 MB, containing JAR and POM files.

  3. Copy the ZIP contents into the root of your ALFA Git project. If prompted, overwrite gradle-wrapper.properties.

  4. Verify the following:

    • ALFA_PROJECT_ROOT/lib/ exists and contains the local Maven repository and its subfolders.
    • ALFA_PROJECT_ROOT/gradle/wrapper/gradle-7.x.y-bin.zip exists.
    • In ALFA_PROJECT_ROOT/gradle/wrapper/gradle-wrapper.properties the key distributionUrl no longer points to a HTTPS URL but to the local file gradle-7.x.y-bin.zip.
  5. Make sure APD runs in offline mode by executing a task, such as:

    gradlew test 

    If the installation is successful, you should see:

    Running in offline mode using local repository at $PATH/axiomatics-policy-devops\lib

Committing offline mode changes

Committing offline mode changes will add approximately 250 MB of binaries to your ALFA Git repository. This practice violates Git best practices and can negatively impact the performance of your central build server, as this data must be checked out for every build.

Therefore, it is recommended to avoid committing these changes and instead add them to the .gitignore file.

Local mode

Local mode eliminates the need for internet access but requires intranet (corporate) network access. In this mode, your software/artifacts server (Artifactory, Nexus, etc.) hosts and provides the JAR files.

  1. Import the Axiomatics Maven clone you received to your software/artifacts server.

  2. Reconfigure the APD Gradle project by adding your corporate repositories. Add your corporate repository first within each repositories { block in the repository sections of the following files:

    • buildSrc/build.gradle
    • buildSrc/src/main/groovy/axiomatics-policy-devops.gradle.
    note

    The specific method for adding your repository depends on your organization's setup. Consult your support team for guidance.

You can also host the Gradle distribution on a local software server. Upload the distribution to your server and update distributionUrl in gradle/wrapper/gradle-wrapper.properties to reference it.