Managing your service

With iCR installed, you can begin to analyze your projects after completing some basic configuration using the icr command which was installed along with your package. This command is used to configure some essential parameters, stop/start the service, and set up other options. The usage statement 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.

But, before you can start using your server, there are 2 important configuration values that need to be established. The first concerns the license that you received from OpenRefactory. The license enables iCR for the duration and OBLoCs capacity that you purchased from OpenRefactory. It must be set before analyses can proceed. Establish your license by entering: icr -l <Your license key>

where <Your license key> is the string that you received from OpenRefactory. It will look something like this: GHTG-WK9M-9HSK-J9OR.

The second value which needs to be set is the string which tells iCR the URL that you will be giving to your users to access iCR. That command will look like: icr -a "<URL-String>"

where <URL-String> is the URL entered information the browser to access your iCR server. For example, if you assigned the server a URL of iCR-for-all.mycompany.com, then the command would be: icr -a "icr-for-all.mycompany.com"

If you do not assign a URL to the server, you may also simply use its IP address directly as, for example: icr -a 192.1.2.123

NOTE: OAuth is required to authorize access to your server as covered in the User Guide. It is essential that the URL or IP address that you set here matches the callback address in the OAuth configuration.

Below are the details for each of the individual icr commands.

icr -a <URL-String>

The -a option is used to provide iCR with the URL to the server. If you are using a cloud-based repository, such as GitHub, there needs to be a way for GitHub to access the iCR server from the cloud, so you need to provide a public address to allow GitHub to reach the iCR server. You must configure iCR with the URL that you assigned for th server. If you have not assigned a specific URL, you may use the server's IP address. Entering icr -a without an argument will display the current URL being used.

As an example: icr -a "icr-for-all.mycompany.com"

or: 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 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 initiaite your first analysis. Should your license expire due to the tie limit being reached or capacity exceeded, OPenRefactory can update your license and add additional time or capacity. However, if there is a ned to repalce the license or wwhen setting the license following package installation, then the license is set using this command. Entering icr -l without an argument will display the current license 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 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 product version 4.2.0
icr engine version 4.2.0 
icr nav-rev version 4.2.0
Worker iCR-Product-4.2.0 

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
                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. 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.

  4. 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