Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

  1. 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

  2. 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.

  3. 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.

  4. 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:

      # 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
  5. Stop and remove the old containers and images:

    # For example:
    docker rm -f wss-gls-app wss-scanner wss-remediate
    docker rmi wss-gls-app:<version> wss-scanner:<version> wss-remediate:<version>
  6. Fill in the fields in WhiteSource Integrate Page to regenerate the Activation Key:

    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.

  7. 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.

  8. Run the containers with the new prop.json:

    1. Run the wss-gls-app app container:

      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
    2. Run the wss-scanner scanner container:

      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
    3. Run the wss-remediate server container:

      docker run --name remediate-server --restart=always --network my_bridge -e LOG_LEVEL=debug -p 8080:8080 -v <path/to/config/directory>/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:<version>
      
      # For example:
      docker run --name remediate-server --restart=always --network my_bridge -e LOG_LEVEL=debug -p 8080:8080 -v c:/tmp/gls/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:19.8.1
      
      
      # If port 8080 isn't available, you can use a different port by modifying the first port entry in the 'docker run' command. For example:
      # docker run --name remediate-server --network my_bridge -e LOG_LEVEL=debug -p 8082:8080 -v c:/tmp/gls/prop.json:/etc/whitesource/prop.json -v /tmp:/tmp wss-remediate:19.8.1
  • No labels