Installing iCR Using Debian apt Package Management
To install using the apt package manager, the first steps are to comfigure apt with information about where to locate the OpenRefactory iCR package(s) and to setup the proper security GPG credentials to permit apt to operate securely.
NOTE: It is assumed that any necessary support software, such as Docker, have already been installed on the server. Links to that are provided in the Installing iCR section.
NOTE: apt requires that you have superuser privileges in order to install new packages. So all commands will be preceded with the sudo directive.
Getting the GPG (GNU Privacy Guard) public key is the initial step. Run the following command to import the GPG public key so that apt can verify package integrity during installation:
sudo wget --quiet -O - https://apt.openrefactory.com/gpg-pubkey.asc | sudo tee /etc/apt/keyrings/gpg-pubkey.asc
With the GPG public key ready, the next step is to tell apt where to find the OpenRefactory repository containing the iCR packages. This is accomplished with the following command:
sudo wget -O /etc/apt/sources.list.d/icr.list https://apt.openrefactory.com/icr.list
You should see an output similar to:
--2024-11-15 23:05:08-- https://apt.openrefactory.com/icr.list
Resolving apt.openrefactory.com (apt.openrefactory.com)... 20.189.78.213
Connecting to apt.openrefactory.com (apt.openrefactory.com)|20.189.78.213|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 318 [application/octet-stream]
Saving to: ‘/etc/apt/sources.list.d/icr.list’
/etc/apt/sources.list.d/icr.list 100%[============================================================>] 318 --.-KB/s in 0s
2024-11-15 23:05:08 (229 MB/s) - ‘/etc/apt/sources.list.d/icr.list’ saved [318/318]
With the OpenrRefactory configuration set, make sure that the apt repository index is up to date by entering:
sudo apt update
NOTE: The steps above are only needed the first time that you install an iCR package from OpenRefactory. Once this confguration information is set on the current platform, future installations need only repeat the steps below.
Now you are ready to install your target iCR release package using this command:
sudo apt install icr=5.0.0
As apt installs the package(s) you will see progress similar to this:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
icr
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 7385 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://dev.apt.openrefactory.com 5.0.0/release amd64 icr amd64 5.0.0 [7385 kB]
Fetched 7385 kB in 1s (7193 kB/s)
Selecting previously unselected package icr.
(Reading database ... 89523 files and directories currently installed.)
Preparing to unpack .../icr_5.0.0_amd64.deb ...
Docker is already installed.
Docker is already running.
Docker setup completed successfully.
Unpacking icr (5.0.0) ...
Setting up icr (5.0.0) ...
Creating directory /etc/icr/condata...
Setting permissions 777 on /etc/icr/condata...
Creating directory /etc/icr/projects...
Setting permissions 777 on /etc/icr/projects...
Directory /etc/icr/script already exists. Adjusting permissions...
Setting permissions 777 on /etc/icr/script...
Creating directory /etc/icr/meta-run-info...
Setting permissions 777 on /etc/icr/meta-run-info...
All directories created and permissions set successfully.
Pulling Docker image: openrefactory/icr-unified-navrev:5.0.0...
5.0.0: Pulling from openrefactory/icr-unified-navrev
ce74ebb8b164: Pull complete
b8e768465934: Pull complete
.
.
.
Docker images pull completed successfully!
Updating DEK in /etc/icr/script/.env...
DEK has been set successfully in /etc/icr/script/.env.
Scanning processes.
Scanning linux images...
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
With iCR installed you can check that the system is ready by making sure that all of the Docker containers are present. Use this command to see all the registered Docker images: docker images
You should see the following images displayed:
REPOSITORY TAG IMAGE ID CREATED SIZE
openrefactory/icr-unified-navrev 5.0.0 c1b5bedbc355 15 hours ago 1.94GB
openrefactory/icr-python-iso 5.0.0 436009669c96 44 hours ago 2.52GB
openrefactory/llm-middleware 1.0.0 dbed893d6b8a 3 days ago 1.23GB
openrefactory/icr-go-iso 5.0.0 cfc8e7d6b0ac 4 days ago 764MB
openrefactory/icr-java-iso 5.0.0 7d8c947f8090 4 days ago 1.94GB
mongo 6.0 a1ed927d524d 3 weeks ago 716MB
openrefactory/icr-worker 4.2.0 54f53a62b303 5 months ago 1.1GB
Once the Docker containers are installed, the installation also sets up the icr command for you so that you can immediately use it to do any other confiuration that may be required. How to use the icr command is outlined in the following section Managing your Service. The required End User License Agreement (EULA) must be reviewed. It is assumed that going forward with using iCR implies that you have read and accepted the EULA. You can find the EULA along with the complete SBOM for all of the libraries included in iCR in the /usr/share/icr-release directory.
If there becomes a reason for you to require iCR to be removed from your platform, you may do so using the following command: sudo apt remove icr
NOTE: If you decide to remove the iCR package, please be aware that deleting the package will ALSO delete the results of any analyses that were completed in the past and all historical data will be removed.
With iCR correctly installed, you will need to configure it before you can begin analyzing your projects. This is covered in the following section: Managing Your Service.