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

This will display the GPG key:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBGbsAx8BDADOP/VrCdJCpM8W38kKCavfTOV2ECy2OcFmj2G7FSRL6aGyQ/Zp
dPk86UHr4XIA980szhyQj15lpU3kZAfIdB0Gsdhh3O0sqVkh1NVuQ9Kupae/Wn5Z
xOatrY+5cE8UoPNTPkL2tencUlRS7G5e9a3QkFJ+mJIBrS8Au4G3BtaYgIWprnla
VnCVpkLWytspvMgrOkM65Q1isaOmitYyFBQJHt9gruoL0z0ZuXRgvXwZD0/NeaXW
A1N7jr6NRSlnd38FCW3qzRF8J9D2IGSgBOn0xGGlIp3VUbfjmeFpQVthWxm9R/bs
vndJszkq3h5EkzyOhO26lOotAb4N7RTGw5zW78H76Tk7++Ndaj2bGzRzNq5TuYPd
MsJDUb+flXui+o74pWb1eIEY/72dbhfftkGizlBGrgrGPm2steKBrTi9Djm7+tNQ
ytL57Eqtr9Wqo4ALH01v2lky2pvJn09oZrrG1dwA72LNh+uRna7Wp3X0q501L8QT
IOvLTF+FwRck2nkAEQEAAbQqb3BlbnJlZmFjdG9yeSA8cmVzZWFyY2hAb3BlbnJl
ZmFjdG9yeS5jb20+iQHUBBMBCgA+FiEEsXsnKYuVi7h/68YU0r0hCeSf5UsFAmbs
Ax8CGwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ0r0hCeSf5Ut8
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hYhBLF7JymLlYu4f+vGFNK9IQnk
n+VLBQJm7AMfAhsMBQkDwmcAAAoJENK9IQnkn+VLCC8L/AjboPTOUp7nIZYAPdvR
lFE+PeF72XwwF1Twtk6s5rKgi+9/d2LiZJ/IYECOw4xhgBa3KnIS9JWeGQwXTyrc
TuY+BmFByAgHbakOPvgX98zz3+BOqbmlg/d2immtOzCpHiQ+hEeEywl4AAZPiqGM
jmxQVQ87chpyplQ59/Cd1g5HUGWID9uP2p4H7X8jjLuZqvprkZ6krXFh6mK0NjNV
8kWFOMDuhA1tikyJfRgi+FAMzamdBdLDMeRcOC0F++lxBIzPegsGg3FFjCc6uH1T
VWlLIeFm6kjJXf+aGxyCl0ZPrmHYRmTHjGhKC5FHvVm3/BolXQzqH0XEtcsWsPuE
Sh71HYxZZEAc9BAIlobzGn3SzZ9CtvZZ80bpEHXuC+TNETCJpRXGEkSXaPzvascm
VRDepn4uNEuYh84xGnGBWbKkKI/0obp9uZ7QzFXOVIH6JeKva8TGvefRJEFxq2Xa
6SZrgw009J4Ew9qnf78ISeBXK5gANRp7lB60u8wKy3yq0w==
=+77U
-----END PGP PUBLIC KEY BLOCK-----

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

Output like this will be displayed:

Hit:1 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:5 https://download.docker.com/linux/ubuntu jammy InRelease [48.8 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2150 kB]
Get:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1135 kB]
Get:8 https://apt.openrefactory.com 4.2.0 InRelease [1655 B]       
Get:9 https://apt.openrefactory.com 4.2.0 InRelease [1663 B]                 
Get:10 https://dev.apt.openrefactory.com 4.2.0-dev InRelease [1745 B]        
Fetched 3723 kB in 1s (3615 kB/s)           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.

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=4.2.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 4.2.0/development amd64 icr amd64 4.2.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_4.2.0_amd64.deb ...
Docker is already installed.
Docker is already running.
Docker setup completed successfully.
Unpacking icr (4.2.0) ...
Setting up icr (4.2.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:4.2.0...
4.2.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   4.2.0        c1b5bedbc355   15 hours ago   1.94GB
openrefactory/icr-python-iso       4.2.0        436009669c96   44 hours ago   2.52GB
openrefactory/llm-middleware       1.0.0        dbed893d6b8a   3 days ago     1.23GB
openrefactory/icr-go-iso           4.2.0        cfc8e7d6b0ac   4 days ago     764MB
openrefactory/icr-java-iso         4.2.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.

Last updated