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=6.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 22 not upgraded.
Need to get 5994 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://apt.openrefactory.com/public release/main amd64 icr amd64 6.0.0 [5994 kB]
Fetched 5994 kB in 1s (8689 kB/s)
Selecting previously unselected package icr.
(Reading database ... 90119 files and directories currently installed.)
Preparing to unpack .../archives/icr_6.0.0_amd64.deb ...
Docker is already installed.
Docker is already running.
Docker setup completed successfully.
Unpacking icr (6.0.0) ...
Setting up icr (6.0.0) ...
All directories created and permissions set successfully.
Pulling Docker image: openrefactory/icr-unified-navrev:6.0.0...
6.0.0: Pulling from openrefactory/icr-unified-navrev
00bcf30019d4: Pull complete
da460e881ac7: Pull complete
.
.
.
Docker images pull completed successfully!
Updating DEK
DEK has been set successfully
Scanning processes...
Scanning candidates...
Scanning linux images...
Restarting services...
systemctl restart chrony.service containerd.service cron.service hv-kvp-daemon.service irqbalance.service multipathd.service packagekit.service polkit.service rsyslog.service [email protected] ssh.service systemd-journald.service systemd-networkd.service systemd-resolved.service systemd-udevd.service walinuxagent.service
Service restarts being deferred:
/etc/needrestart/restart.d/dbus.service
systemctl restart docker.service
systemctl restart [email protected] systemctl restart networkd-dispatcher.service
systemctl restart systemd-logind.service
systemctl restart unattended-upgrades.service
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 6.0.0 84c16b4d3da3 30 hours ago 1.83GB
openrefactory/icr-rust-iso 6.0.0 b2680242b355 32 hours ago 1.37GB
openrefactory/icr-worker 6.0.0 be85568e7deb 7 days ago 1.1GB
mongo 6.0 dc1d1e453b13 5 weeks ago 749MB
openrefactory/icr-java-iso 5.1.0 5591500dc864 7 weeks ago 1.96GB
openrefactory/icr-python-iso 5.1.0 e06f45081ad3 2 months ago 2.54GB
openrefactory/icr-go-iso 5.1.0 70099e83b478 2 months ago 777MB
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 configuration 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.