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 icrforgo
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:
icrforgo [-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.
icrforgo -a <IP Address>
The -a
option is used to provide iCR for Go 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 Go server. You must configure iCR for Go with the public IP address using this command.
As an example: icrforgo -a 192.1.2.123
icrforgo -d <directory-path>
The -d
option is used to anchor iCR for Go 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: icrforgo -d /home/projects
icrforgo -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 Go (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: icrforgo -l GHTG-WK9M-9HSK-J9OR
icrforgo -v
It is sometimes important to know what version of iCR for Go software is being run. This command displays the current version of the software.
icrforgo -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: icrforgo -vv
icrforgo -h / icrforgo ?
Displays the extended usage form for the icrforgo command:
icrforgo -c <cmd>
The previous options were used to update or change some configuration values. To actually operate iCR for Go you use the -c <cmd>
option. There are three specific values that can be used to control your server’s operation:
icrforgo -c start
This is the command that is used to start the iCR for Go 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:icrforgo
. You will be prompted to change it once you access the Navigator.icrforgo -c stop
The
stop
command is used to stop the running instance of iCR for Go. 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 thestart
command.icrforgo -c revert
The
revert
command provides you with the capability to fall back to a previous version of iCR for Go. After using thesudo ./install
script to install a new version of iCR for Go, 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, therevert
command will have no effect. You would need to use theuninstall
command if you want to undo the complete installation.icrforgo -c uninstall
There may be cases where you wish to remove iCR for Go 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 theinstall-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 Go, and you have kept your original package, you can re-install the service using thesudo ./install-icr
command again.
Last updated