Before installing or updating ShiftLeft Ocular, make sure you have met all requirements. In addition, for large applications, you may want to optimize ShiftLeft Ocular performance through the appropriate combination of memory and disk sizes.
Note: Do not make any changes to any directories, except the installation and policy directories.
Once you have installed or updated ShiftLeft Ocular, you start ShiftLeft Ocular.
The process of installing ShiftLeft Ocular is:
Unzip the Ocular distribution ZIP file provided by ShiftLeft, by issuing the following command
$ unzip ocular-distribution-[version].zip
[version] is the actual version number of the distribution file.
Enter the password you received from ShiftLeft. The folder
ocular-distribution is created.
Navigate to the folder
ocular-distribution. From there, for Linux and MacOS X run the installer using the
./install.sh command. For the Windows OS, run the installing using the command
.\install.ps1 and then follow the prompt.
If you don't have permission, first use the command
chmod +x install.sh and then run the installer again.
Identify where you want to install ShiftLeft Ocular (defaults to
~/bin/ocular on Linux and MacOS X, and to
C:\Users\$USERNAME\bin\ocular on Windows).
Code analysis can require lots of memory, and unfortunately, the JVM does not pick up the available amount of memory by itself. While tuning Java memory usage is a discipline in its own right, it is usually sufficient to specify the maximum available amount of heap memory using the JVM's
-Xmx flag. The easiest way to achieve this globally is by setting the environment variable
_JAVA_OPTS as follows:
$N is the amount of memory in gigabytes. You can add this line to your shell startup script, e.g.,
Refer to the article Memory Size Recommendations for more information.
You can determine your current version of ShiftLeft Ocular by using the
version command. To update ShiftLeft Ocular:
Repeat steps 1 - 4 from above.
Specify how you want the update to proceed. Enter either
y to replace an existing ShiftLeft Ocular installation,
nto not replace the existing installation,
Ato install all ShiftLeft Ocular files,
N to install no ShiftLeft Ocular files, or
r to rename the installation directory.