Managing your service

With the files copied and the Docker image installed, you can begin to run the service. One of the items installed is the icr command script. This command is used to stop/start the service, update critical parameters used by the service and to uninstall the software if you need to do that. The usage model for the command is as follows:

icr [-a] [-d] [-l] [-p] [-v] [-vv] [-h] <arg> ? [-c <cmd>]

The options can be combined in a single command. However, the -c <cmd> should always go last since it is used to invoke server operations. We’ll be looking at each option in detail.

icr -a <IP Address>

The -a option is used to provide iCR with an IP address for the server. The default IP address for the server is determined using localhost. However, if you are using a cloud-based repository, such as GitHub, there needs to be a way for GitHub to reach the server from the cloud. In that case, you would need to provide a public IP address to allow GitHub to reach the iCR server. You must configure iCR with the public IP address using this command.

As an example: icr -a 192.1.2.123

icr -d <directory-path>

The -d option is used to anchor iCR with the point in your host file system where you plan to store projects for local access. While you may access GitHub, GitLab or Bitbucket to process repositories managed by those systems, you may also want to analyze and review projects resident in your local file system. You can also include directories that may be attached via a network attached storage and mounted into your file system. The default anchor point is the /home directory under which user directories are normally located within Linux. Entering icr -d without an argument will display the current anchor point being being used.

As an example: icr -d /home/projects

icr -l <license-key>

The -l option is used when there is a need to update or replace your activation license. The license is activated when you first run iCR (not when it was installed) and connect to the Navigator for the first time. Should your license become damaged or unusable, this is a way for us to provide you with a new license. Entering icr -l without an argument will display the current license being being used.

As an example: icr -l GHTG-WK9M-9HSK-J9OR

icr -p <port#>

Users connect to iCR via their browser. The norwser opensan https connection to the server via the IP addres or DNA name of their server. The pot usedby iCR, by default if TCP port 3001. Not all deployments will find this port acceptable and so the -p option is used to redirect iCR to use a different port for connection. Entering icr -p without an argument will display the current port being being used.

As an example, set the port to 5050: icr -p 5050

icr -v

It is sometimes important to know what version of iCR software is being run. This command displays the current version of the software.

icr -vv

This is the verbose form of the version command. This command displays the current version of the software along with details about the various components in a particular package. It can be useful of you need to report a problem to Openrefactory.

As an example: icr -vv

/Unified$ icr -vv
icr version 4.1.1
Engine Making rel-offline f8b7dc426b8e5791d908a84db6995a4df87c71fb
GO Engine staging-dev 5698177c5dd0ffe59103c5ce4e174baeeda37f5e
Java Engine rel-offline 0a17dc2808e6fbc10758be3490bfb3221f0deae4
Python Engine staging-dev 4eee0e365ec80bed2817b61bf1bfcfae6f04a7f3
Navigator-Reviewer playground-dev-offline 78926a456df5d95ea864323fb9eb1c45f6e1eede
Worker icr-Product-4.1.0-offline 3186b96e261ba5a6a427e521472c72a1c040ee85

icr -h / icr ?

Displays the extended usage form for the icr command:

icr [-a] [-d] [-l] [-v] [-p] [-vv] [-h] <arg> ? [-c <cmd>]
   Where:
        -a <IP_ADDRESS>                         # define the server's public IP address
        -d <MOUNT_DIR_PATH>                     # define a new root directory
        -l <LICENSE>                            # change the license key
        -v <VERSION>                            # output the current version
        -p <PORT>                               # change the icr port number
        -vv <VERBOSE>                           # output the current version and more details
        -h                                      # output this help
        ?                                       # output this help
        -c <cmd>
           Where <cmd>:
                start                           # start the service
                stop                            # stop the service
                uninstall                       # remove the service and all associated files
                offline                         # enable offline license
                online                          # enable online license

icr -c <cmd>

The previous options were used to update or change some configuration values. To actually operate iCR you use the -c <cmd> option. There are three specific values that can be used to control your server’s operation:

  1. icr -c start

    This is the command that is used to start the iCR server. It assumes that you have successfully installed the service on your host machine using install-icr. It starts the Docker image from scratch. The default passphrase will be used to access the Navigator for the first time. The default string is: icr. You will be prompted to change it once you access the Navigator.

  2. icr -c stop

    The stop command is used to stop the running instance of iCR. The Docker container is stopped and any activity in progress is interrupted. For example, if the service is stopped during an analysis, that analysis will be abandoned. All results from previous analyses, however, are still available and can be viewed again once the service is restarted using the start command.

  3. sudo icr -c uninstall

    There may be cases where you wish to remove iCR entirely from your host system. If so, run the uninstall command. Like the matching command for installation, removng an installation requires the use of sudo as applications are being removed. This command will remove all of the Docker information as well as the directories that were created as part of the install-icr process. All results from analyses will be removed. Please be certain that you want to remove everything if you decide to run this command. If you need to restore iCR, and you have kept your original package, you can re-install the service using the sudo ./install-icr command again.

  4. icr -c offline

    OpenRefactory already supports the strict protection of your IP by providing a server that can operate entirely within your development network on platforms that you own and control. However, it does rely upon Internet access for some outgoing requests. It uses a cloud service to update license state as well as use email servers for notifications. The Reviewer also provides links in its summaries to aid you in finding the supporting material for issues found and for potential fixes.

    But, sometimes, even Internet access may not be enabled. In such cases, many features may not work as intended although you may be able to get your critical analyses completed. If you need to operate without Internet access, this command is used to activate your license in offline mode. Contact OpenRefactory for more information about what to expect when operating in offline mode if running without the Internet is critical to your operation.

  5. icr -c online

    It may occur in some cases of offline use that, at some point, the organization determines that iCR can be enabled for Internet access. In such cases the online command reverts the server operation back to its "normal" mode of operation.

Last updated