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 script file (extract_icr_pkg
) that will manage the installation of iCR. The script will use DockerHub to extract all needed files.
The message also included your license file (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
.
NOTE: 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 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.
To begin the installation process, from the command line, choose a directory to use for staging the installation. It can be any user directory. Place the extract_icr_pkg
script in that directory along with your your license file (license.json
). Make sure the extract_icr_pkg
script is executable by using:
sudo chmod +x ./extract_icr_pkg
Then execute the commmand: ./extract_icr_pkg [<local-registry>]
NOTE: Some installations may not permit direct access to DockerHub and use a private DockerHub repository. This allows organizations to scan the containers prior to installing them. If this is the case for your installation, the extact_icr_pkg
command takes an optional argument, [<local-registry>]
, which is the URL to your private DockerHub. Contact OpenRefactory for more information if this is something that you require.
Once extracted, you will see the following files in your installation directory:
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.
install-icr
This is the script used to install the iCR Docker containers onto your host platform;
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;
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;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.activation.req, reqgen
OpenRefactory supports running iCR in certain offline modes where access to the Internet is not permitted. Only some features are available in offline mode. The above files support managing license operation while in offline mode. Should you require running completely independently from the Internet, please contact OpenRefactory for information on what reduced fiunctionality occurs.
With the files extracted, install the iCR containers 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.
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.
As a check, you can use the docker images
command to see the new iCR containers:
Then, refer to the section Managing Your Service to see how to start your iCR service.
Last updated