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 icrforpython 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:

icrforpython [-a] [-d] [-l] [-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.

icrforpython -a <IP Address>

The -a option is used to provide iCR for Python 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 for Python server. You must configure iCR for Python with the public IP address using this command.

As an example: icrforpython -a 192.1.2.123

icrforpython -d <directory-path>

The -d option is used to anchor iCR for Python 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.

As an example: icrforpython -d /home/projects

icrforpython -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 for Python (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.

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

icrforpython -v

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

icrforpython -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: icrforpython -vv


iCR for Python version 3.5.0

DevOps Release-0.0.1-Go 386cb2aa646b054c2dcb0676afcf07869d516b05
Engine Release-0.0.1 e846a9f90fbad68fc5cec89d81ebc6738acf9355
Navigator-Reviewer iCR-NavRev-1.0.0 aed26d8cf1b011586374f0ededb2c79f6d19d23d
Fixer-List main 59acd7deae7cc83ba6a374a2f999546be2363ec3
Container Release-0.0.1-Python f5e033fb0611f5b8dcd733e1e51022784d3e0a16

icrforpython -h / icrforpython ?

Displays the extended usage form for the icrforpython command:

icrforpython [-a] [-d] [-l] [-v] [-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                                  # output the current version
      -vv                                 # 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
              revert                      # go back to the previous version
              uninstall                   # remove the service and all associated files

icrforpython -c <cmd>

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

  1. icrforpython -c start

    This is the command that is used to start the iCR for Python 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: icrforpython. You will be prompted to change it once you access the Navigator.

  2. icrforpython -c stop

    The stop command is used to stop the running instance of iCR for Python. 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. icrforpython -c revert

    The revert command provides you with the capability to fall back to a previous version of iCR for Python. After using the sudo ./install script to install a new version of iCR for Python, iCR keeps the previous version available for fall back in case there is any reason why the new version may have an issue. Either installing a new version or reverting to the previous version keeps any previous results intact. If there is no previous version, the revert command will have no effect. You would need to use the uninstall command if you want to undo the complete installation.

  4. icrforpython -c uninstall

    There may be cases where you wish to remove iCR for Python entirely from your host system. If so, run the uninstall command. This 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 for Python, and you have kept your original package, you can re-install the service using the sudo ./install-icr command again.

Last updated