Versions Compared

Key

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

...

From WhiteSource Support, obtain the latest WhiteSource Docker distribution artifacts - delivered as a tar.gz or zip file:

  • agent-4-gitlab-server-<version>.tar.gz

  • agent-4-gitlab-server-<version>.zip

...

Extract the downloaded file to an empty directory, creating the following folders:
wss-configuration: UI Configuration tool and related configuration file template
wss-gls-app: WhiteSource for GitLab application
wss-remediate: WhiteSource Remediate worker
wss-scanner: WhiteSource for GitLab scanner
build.sh/build.bat (Linux/Windows): The build script that will create the relevant Docker images.

...

Verify that the desired package managers will be installed on the wss-scanner Docker image:
The package managers installed by default are - Maven (3.5.4), npm, Bower, Yarn, Gradle, Pip, and Pip3.
If you want to scan a package manager not mentioned above, see Modifying the Scanner Dockerfile.

...

Build the docker images. A total of three images will be built: wss-gls-app, wss-scanner, and wss-remediate.
There are two options to build the Docker images:

  1. Using an executable script (recommended):

    • Windows - Run build.bat which is located in the main folder where you extracted the agent-4-gitlab-server zip file.

    • Linux - Run build.sh which is located in the main folder where you extracted the agent-4-gitlab-server tar.gz file.
      In order to ensure that the build succeeded, run the command docker images and check if the wss-gls-app, wss-gls-scanner, and wss-remediate images were created.

  2. Manually building the images:
    NOTE: If you selected option 4a (Using an executable script), skip this step.
    To run the steps of the build file manually, run the following commands directly:

    Code Block
    # For example:
    docker build -t wss-gls-app:<version> wss-gls-app/docker
    docker build -t wss-scanner:<version> wss-scanner/docker 
    docker build -t wss-remediate:<version> wss-remediate/docker

...

Stop and remove the old containers and images:

Code Block
# For example:
docker rm -f wss-gls-app wss-scanner wss-remediate
docker rmi wss-gls-app:<version> wss-scanner:<version> wss-remediate:<version>

...

  1. Open a separate browser tab or window and log in to WhiteSource.

  2. Navigate to the Integrate page of the WhiteSource application. Expand the WhiteSource for GitLab Server bar to view the following fields:

    • GitLab Server API URL: Your GitLab Server instance's API URL. For example: https://GitLabDevServer.com/api/v4

    • GitLab Webhook URL: The URL of the WhiteSource webhook handler (the same URL as the configured system hook).

    • GitLab Webhook Secret: The webhook secret you entered when creating the system hook (viewable when editing the system hook).

    • GitLab Personal Access Token: The @whitesource user's personal access token.

...

Run the UI configuration tool:
The UI Configuration tool enables you to configure the deployment file according to your specific configuration requirements. 

  1. Open the file index.html located inside the wss-configuration directory via a Chrome or Firefox Web browser. The WhiteSource Configuration Editor page is displayed.

  2. Load the template JSON configuration file by clicking Choose File and selecting the file located at wss-configuration/config/prop.json. The General tab appears in the Editor.

  3. Click the General tab and enter the Activation Key which you copied in the previous section.

  4. To display the Proxy tab, click the Advanced Properties checkbox on the Home tab. The default value of all the parameters is empty; leave a parameter blank to disable it. The parameters in the proxy tab are the following:
    Proxy Host: The HTTP proxy host.
    Proxy Port: The HTTP proxy port.
    Proxy Username: Proxy username (if applicable).
    Proxy Password: Proxy password (if applicable).

  5. Click Export, and save the JSON file with the name prop.json. This file will be used in the next sections.
    NOTE: You can export the JSON file at any time to allow the relevant professional in your organization to configure a specific section.

Run the containers with the new prop.json:

...

Run the wss-gls-app app container:

Code Block
docker run --name wss-gls-app --network my_bridge -p 9494:9494 -p 5678:5678 -v <path/to/config/directory>:/etc/usr/local/whitesource/conf wss-gls-app:<version>

# For example:
docker run --name wss-gls-app --network my_bridge -p 9494:9494 -p 5678:5678 -v c:/tmp/gls/:/etc/usr/local/whitesource/conf/ wss-gls-app:19.9.1.1

...

Run the wss-scanner scanner container:

Code Block
docker run --name wss-scanner-gls --restart=always --network my_bridge -p 9393:9393 -v <path/to/config/directory>:/etc/usr/local/whitesource/conf/ wss-scanner:<version>

# For example:
docker run --name wss-scanner-gls --restart=always --network my_bridge -p 9393:9393 -v c:/tmp/gls/:/etc/usr/local/whitesource/conf/ wss-scanner:19.9.1.1

Run the wss-remediate server container:

...

This page is available at: https://docs.mend.io/bundle/integrations/page/upgrading_mend_for_gitlab.html