Installing iCR

It is quick and easy to get going on analyzing and automatically correcting programming errors in your projects. With your iCR subscription (either paid or a Test Drive trial subscription), you will have been sent a message with a zip file that contains everything that you need to install and run iCR. The zip file contains:

  1. EULA_for_iCR

    This is the End-User license which gives you the authority to use the iCR on your private platform. You must have read and accepted this prior to receiving and installing this package.

  2. install-icr

    This is the script used to install iCR for on your host system;

  3. icr

    This is the command used to manage your server after installation. Use it to start up your iCR service, update configuration values or even remove it from your host server completely;

  4. icr-compose.yml:

    This is a yml script that contains some Docker configuration information. It is used to make the Docker container installation go smoothly;

  5. SBOMs/

    This directory contains the Software Bill of Materials or SBoM files which identify all of the packages included in the iCR software. This is used to let you know what components are being included within the iCR Docker containers. There is one SBOM json file for each container used in iCR.

  6. license.json

    Your license will enable iCR to execute on any platform upon which it has been installed. The license manages usage through tracking consumption. If more than one platform is running iCR, they can share the license and the total consumption will be reduced as the analyses complete.

    Your license is enabled for a period of time and for a maximum number of OpenRefactory Bundled Lines of Code (OBLoCs). OBLoCs consist of only those executable lines of code that are actually used in the analysis. This means that whitespace and most comments are NOT counted against your licensed capacity. To get an estimate of a project’s OBLoC count, you can use the Linux utility cloc.

    Should you exhaust your OBLoC capacity, iCR will not be able to continue. In this case contact OpenRefactory to learn how to extend your license.

The examples in the guide will be using Linux as the reference platform. Support for platforms other than Linux will be supported in future releases. All of the installation and configuration shown in this section will be performed from a command line interface. So, your first step would be to SSH into your server and login.

Your Linux system must also be configured with two important packages:

  1. You must have the zip/unzip package. This is frequently already installed on your Linux distribution but, if not, you will need to install it since the files noted above are distributed in zip format;

  2. The iCR framework is designed to operate within a Docker environment. Docker allows you to install packages like iCR on your private Linux platform and know that it will be protected from other software on your system and your network.

    If you need to install Docker, please refer to the Docker installation instructions which can be found here: https://docs.docker.com/engine/install/.

NOTE: Once Docker is installed, you will want to follow the common practice of creating a User Group to allow Docker access without requiring root privileges for each user. To learn how to do that, please refer to this Docker post-install information. These instructions assume that you have done that so executing the icr commands will not require typing sudo before each command invocation.

Once your system is configured with the required packages you can install iCR.

To begin, from the command line, choose a directory to use for staging the installation. It can be any user directory. From there, unzip the file that was sent to you via email described above.

With the zip file expanded, install iCR using the install-icr command. This installation step will require root privileges so MUST be done using sudo. Run the command as follows:

sudo ./install-icr

The install-icr command uses information from the icr-compose.yml file to extract Docker images from DockerHub. For this reason, you MUST be connected to the Internet and be able to reach DockerHub for the installation to complete.

As the installation proceeds you will see a lot of messages from Docker tracking the installation from DockerHub. It should appear similar to the sequence shown below:

Once the Docker containers are installed, the installation script also sets up the icr command for you so that you can immediately use it to do any other confiuration that may be required.

As a check, you can use the docker images command to see the new icr containers:

cbedard@ops-icrdocs-cjb-dmnd:~$ docker images
REPOSITORY                         TAG       IMAGE ID       CREATED       SIZE
openrefactory/icr-unified-navrev   36        aa6684f02098   2 weeks ago   1.93GB
mongo                              6.0       0b496c33ce48   3 weeks ago   689MB
openrefactory/icr-python-iso       4.0.1     1313ad413aa7   3 weeks ago   2.85GB
openrefactory/icr-java-iso         4.0.1     843dcdf70a5c   3 weeks ago   1.54GB
openrefactory/icr-unified-navrev   4.0.1     18be29fd991f   3 weeks ago   1.9GB
openrefactory/icr-go-iso           4.0.1     c4ecbe3e3e9a   3 weeks ago   4.3GB
openrefactory/icr-worker           4.0.1     e2a565befdaf   3 weeks ago   1.1GB
cbedard@ops-icrdocs-cjb-dmnd:~$ 

Then, refer to the section Managing Your Service to see how to start your icr service.

Last updated