Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Prerequisites 

  1. An authorized account to Google Cloud.
  2. Cloud SDK installed with the authorized account to Google Cloud.
  3.  Docker installed.
  4. Make sure Google Cloud SDK is your docker helper. If you didn't run it before, you can do that with the command
    gcloud auth configure-docker 
  5. Google Container Registry API in Cloud Console is enabled, and you can pull images from Google Container Registry
  6. User is already logged in the account in order to have access to cloud repositories:
    gcloud auth login

Download Unified Agent & Configuration File

Info
titleNotice on periodically fetching the Unified Agent

It is advised to use the below commands only once a week to download the latest version of the Unified Agent for performance reasons and not as part of every build. You can do this using a scheduler task, such as cron.

...

  1. Windows Using CURL
    1. Download CURL, and add it to your PATH environment variable.
    2. Open a new command prompt
    3. Run the following commands:

      Code Block
      languagejava
      titleWindows Using CURL
      curl -LJO "https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar"
      curl -LJO "https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config"


  2. Windows Using PowerShell
    1. Open a new command prompt
    2. Run the following commands:

      Code Block
      languagejava
      titleWindows Using PowerShell
      powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar $pwd\wss-unified-agent.jar 
      powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config $pwd\wss-unified-agent.config 


      Note

      Make sure that Background Intelligent Transfer Service (BITS) is enabled if you want to use PowerShell on Windows.


  3. Windows - Manual Download
    Download the following files manually using your web browser or any other download manager:
    https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
    https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config

  4. Linux/Unix
    Run the following commands from the Linux/Unix bash prompt :

    Code Block
    languagejava
    titleLinux/Unix Using CURL
    curl -LJO "https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar"
    curl -LJO "https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config"


Update Configuration File

Update the configuration file (wss-unified-agent.config) that you downloaded in step 2 according to your specific requirements.

Enable the relevant lines by removing the '#' symbol at the beginning of the lines. 

Related Parameters

ParameterInput default valuedescription
docker.gcr.enable true or falsefalseEnable/Disable google container registry resolving.
docker.gcr.accountaccount mailEmpty StringNot mandatory. Specifies which account to set active and work on, cloud SDK can have multiple logged in accounts but may have only one active.
One account is always active by default. Otherwise, commands will not work.
docker.gcr.repositoriesHost-Name/Project-IdEmpty List

A list of repositories separated by comma. If empty, it will use the default repository.

Example value:
gcr.io/whitesource-main,gcr.io/whitesource-johnsmith

Run the Unified Agent

Run the Unified Agent with the modified configuration file via this command:

Code Block
languagebash
titleRun FSA
java -jar wss-unified-agent.jar -apiKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx -c wss-unified-agent.config

Scanning Information

The scanner saves your required images and scans all the file system and installed packages.
It scans all the image layers, and handles archive files in the layers based on the value in the property 'archiveExtractionDepth'.

...