Quick Start - Docker

Install CAST Imaging on a single Linux machine using Docker Compose and run your first analysis

Overview

This guide covers installing all CAST Imaging components on a single Linux machine using Docker, using default settings throughout. It is intended for POCs, demos and evaluation. For production deployments, distributed mode, or advanced configuration options see Installation on Linux via Docker.

Requirements

Step 1 - Obtain the installation media

$ curl -# -O -J "https://extend.castsoftware.com/api/package/download/com.castsoftware.imaging.all.docker/<version>?platform=linux_x64" -H "x-nuget-apikey: <api-key>" -H "accept: application/octet-stream"
  • Unzip the resulting file anywhere on your local disk.

Step 2 - Configure your installation

  • Open the configuration.conf file at the root of the unzipped files in a text editor.
  • For a single machine installation you only need to set one variable IMAGING_SERVICES_HOSTNAME, the hostname of your machine. Use hostname -f (FQDN) or hostname -I (IP address) to determine this and then set the variable:
IMAGING_SERVICES_HOSTNAME=<your-machine-hostname-or-ip>
  • Leave all other settings at their default values. See Installation variables for a full explanation of every option.

Step 3 - Make the installer executable

$ sudo chmod +x cast-imaging-install.sh

Step 4 - Run the installation

$ ./cast-imaging-install.sh all

This installs all components on the single machine. When complete, verify that 12 containers are running:

$ sudo docker ps

Step 5 - Set permissions on persistent volumes

Run the following command to ensure that the analysis-node container can access its persistent volumes:

$ sudo chown -R 0:0 /opt/cast/shared

Step 6 - Complete initial configuration

Browse to http://localhost:8090 to access CAST Imaging (or use your machine’s fully qualified domain name or IP address).

  • Log in using the default admin/admin credentials. You will be prompted to configure various options
  • Enter your licensing strategy. Choose either a Named Application strategy (where each application you onboard requires a dedicated license key entered when you perform the onboarding), or a Contributing Developers strategy (a global license key based on the number of users):

License key

CAST Extend settings

  • Browse to the URL below and ensure that you have one analysis-node and the imaging-viewer components listed:
http://localhost:8090/admin/services

Services

Step 7 - Onboard a simple application

Prepare your source code

Prepare a ZIP file containing the source code to onboard and analyze:

  • Create a temporary folder
  • Add your client code in one sub-folder
  • Add your database code in another sub-folder
  • Zip the two sub-folders into one single ZIP file

For example:

|---folder
    |---JEE
    |---SQL

Onboard your new application

Follow these steps to onboard your application:

  • Browse to http://localhost:8090/console
  • Click Add an application > Onboard an application
  • Enter a name for your application (1)
  • Click the upload button (2) to attach the ZIP file you created previously:

Onboard app

  • Click Run Scan (1) to begin the initial “fast scan” of your source code: this allows CAST to discover what is in the ZIP file and how to handle it during the analysis process:

Run scan

Start your analysis

When the ZIP file is scanned, results are automatically displayed.

  • Scroll to the bottom of the page
  • Check the panel at the bottom: if you have a green tick (1), you are good to go and you can start the analysis process (2):

Green tick

Consult your results

When the analysis is complete, browse to http://localhost:8090/console, and click Ready to view for your application:

Ready to view

The results of your application analysis will be displayed: use the left-hand panel, or double-click items in the “view” to navigate your application and the objects within it:

Results

Next steps