Installing Resilient circuits

To create an integration server on a Windows system, install the Resilient® Circuits framework which includes its dependent modules. Install Resilient circuits using one of the following procedures, depending on whether your integration server is connection the internet.

About this task

Complete the following steps to install and configure the Resilient Circuits framework if your integration server is connected to the internet. You install and configure Resilient Circuits as the integration user.

Procedure

  1. Install Resilient Circuits on your system as follows. This command might vary slightly depending on your version of Python.
    python –m pip3 install resilient-circuits
  2. When the installation is done, use the following command to list the packages that were installed:
    pip3 freeze

    The following is an example of the output:

    cachetools==2.1.0
    certifi==2019.6.16
    chardet==3.0.4
    circuits==3.2
    entrypoints==0.3
    filelock==3.0.12
    idna==2.8
    Jinja2==2.10.1
    keyring==19.0.2
    MarkupSafe==1.1.1
    PySocks==1.7.0
    pytz==2019.1
    pywin32==224
    pywin32-ctypes==0.2.0
    requests==2.22.0
    requests-mock==1.6.0
    requests-toolbelt==0.9.1
    resilient==32.0.186
    resilient-circuits==32.0.186
    setuptools-scm==3.3.3
    six==1.12.0
    stompest==2.3.0
    urllib3==1.25.3
    
  3. Create the app.config file, as follows:
    resilient-circuits config -c
  4. Open the app.config file in your text editor and replace the contents with the following settings. Your actual path names might be different:
    [resilient]
    host=localhost
    port=443
    email=resilient_account@example.com
    password=ResilientPassword
    org=Dev
    # componentsdir=c:\Users\Administrator\.resilient\components
    logdir c:\Users\Administrator\.resilient
    logfile=app.log
    loglevel=INFO
    

    For authentication, determine if you are using a user account or API key account then enter the actual email and password, or api_key_id and api_key_secret, but not both. See Editing the configuration file for details.

    Use the actual SOAR organization name for the org name.

    See Editing the configuration file for a detailed description of all the app.config settings, especially cafile if your SOAR Platform does not have a valid certificate.
    Note: If you edit the file with Notepad, please ensure that you save it as type All Files to avoid a new app being added to the filename, and use UTF-8 encoding.
  5. Start Resilient Circuits:
    resilient-circuits run
  6. Install Resilient Circuits service:
    resilient-circuits.exe service install
  7. When installed, you can update the service to start up automatically and run as a user account.

    It is recommended that you log in as whichever user account the service will run as to generate the config file and confirm that the app runs successfully with resilient-circuits.exe run before starting the service.

    Commands to start, stop, and restart the service are provided as well.
    resilient-circuits.exe service start
    resilient-circuits.exe service stop
    resilient-circuits.exe service restart
    
    Note: To run Resilient Circuits commands on a Windows system, use resilient-circuits.exe. For example, resilient-circuits.exe run rather than resilient-circuits run.

Installing Resilient circuits offline

Install Resilient circuits using this procedure only if your integration server does not have access to the Internet.

About this task

If you need to manually download the files using a Web browser, you can use a combination of the requirements.txt and downloading the packages from PyPi and IBM® Resilient GitHub. First, download the SOAR packages from GitHub or PyPi and then reference the requires.txt to find out what you then need to download. Then use PyPi to install the packages with the version specified for the correct operating system.

Procedure

  1. Make sure the Windows server you use to download Resilient Circuits has Python and the pywin32 library as described in Prerequisites.
  2. If the Windows server has the same operating system and version as the integration server, run the following command to download the required packages.
    pip3 download

    The pip download command is detailed in https://pip.pypa.io/en/stable/reference/pip_download/.

  3. If the Windows server does not have the same operating system and version as the integration server, use the platform option to enter the platform used by the integration server.
    pip3 download –-platform <platform>
  4. Create a directory to hold the packages and wheel (whl) files then change into that directory. For example:
    cd c:\temp_dir
    pip3 download resilient-circuits -d .
    
  5. Check the contents of the directory. For example:
    dir
     Volume in drive C has no label.
     Volume Serial Number is E650-0A06
    
    Directory of c:\temp_dir
    
    16/07/2019 17:08 <DIR> .
    16/07/2019 17:08 <DIR> ..
    16/07/2019 17:07 23,000 argparse-1.4.0-py2.py3-none-any.whl
    16/07/2019 17:07 12,047 cachetools-2.1.0-py2.py3-none-any.whl
    16/07/2019 17:07 157,119 certifi-2019.6.16-py2.py3-none-any.whl
    16/07/2019 17:07 133,356 chardet-3.0.4-py2.py3-none-any.whl
    16/07/2019 17:07 174,265 circuits-3.2.tar.gz
    16/07/2019 17:08 11,100 entrypoints-0.3-py2.py3-none-any.whl
    16/07/2019 17:07 7,576 filelock-3.0.12-py3-none-any.whl
    16/07/2019 17:07 58,594 idna-2.8-py2.py3-none-any.whl
    16/07/2019 17:07 124,883 Jinja2-2.10.1-py2.py3-none-any.whl
    16/07/2019 17:08 33,937 keyring-19.0.2-py2.py3-none-any.whl
    16/07/2019 17:07 16,575 MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl
    16/07/2019 17:07 16,506 PySocks-1.7.0-py3-none-any.whl
    16/07/2019 17:07 510,910 pytz-2019.1-py2.py3-none-any.whl
    16/07/2019 17:08 28,532 pywin32_ctypes-0.2.0-py2.py3-none-any.whl
    16/07/2019 17:07 57,952 requests-2.22.0-py2.py3-none-any.whl
    16/07/2019 17:07 22,916 requests_mock-1.6.0-py2.py3-none-any.whl
    16/07/2019 17:07 54,314 requests_toolbelt-0.9.1-py2.py3-none-any.whl
    16/07/2019 17:07 28,900 resilient-32.0.186.tar.gz
    16/07/2019 17:07 268,161 resilient_circuits-32.0.186.tar.gz
    16/07/2019 17:07 10,586 six-1.12.0-py2.py3-none-any.whl
    16/07/2019 17:07 38,103 stompest-2.3.0.tar.gz
    16/07/2019 17:07 150,942 urllib3-1.25.3-py2.py3-none-any.whl
     22 File(s) 1,940,274 bytes
     2 Dir(s) 20,978,794,496 bytes free
    

    In the example, you can see the wheel files listed with the versions. Many of these files are named none-any.whl which means they are applicable to all operating systems, but one is win_amd64.whl, which is version-specific.

  6. Download the setup tools. For example:
    cd c:\temp_dirpip download setuptools -d .
    pip3 download setuptools_scm -d .
    dir
      Volume in drive C has no label.
      Volume Serial Number is E650-0A06
    
     Directory of c:\temp_dir
    
    16/07/2019  17:25    <DIR>          .
     16/07/2019  17:25    <DIR>          ..
     16/07/2019  17:24           575,966 setuptools-41.0.1-py2.py3-none-any.whl
     16/07/2019  17:25            23,752 setuptools_scm-3.3.3-py2.py3-none-any.whl
                    2 File(s)        599,718 bytes
                    2 Dir(s)  20,977,459,200 bytes free
    
  7. Copy these files to the Integration Server system.
  8. At the integration server, change directory to where the files are installed and run the following commands to install the wheel files. Note that there are dependencies so some wheels need to be installed before others. For example:
    pip3 install setuptools_scm-3.3.3-py2.py3-none-any.whl -f . --no-index
    pip3 install setuptools-41.0.1-py2.py3-none-any.whl -f . --no-index
    
    pip3 install --no-index -f . stompest-2.3.0.tar.gz
    pip3 install --no-index -f . certifi-2019.6.16-py2.py3-none-any.whl
    pip3 install --no-index -f . urllib3-1.25.3-py2.py3-none-any.whl
    pip3 install --no-index -f . idna-2.8-py2.py3-none-any.whl
    pip3 install --no-index -f . chardet-3.0.4-py2.py3-none-any.whl
    pip3 install --no-index -f . requests-2.22.0-py2.py3-none-any.whl
    pip3 install --no-index -f . circuits-3.2.tar.gz
    pip3 install --no-index -f . pytz-2019.1-py2.py3-none-any.whl
    pip3 install --no-index -f . MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl
    pip3 install --no-index -f . Jinja2-2.10.1-py2.py3-none-any.whl
    pip3 install --no-index -f . PySocks-1.7.0-py3-none-any.whl
    pip3 install --no-index -f . filelock-3.0.12-py3-none-any.whl
    pip3 install --no-index -f . argparse-1.4.0-py2.py3-none-any.whl
    pip3 install --no-index -f . requests_toolbelt-0.9.1-py2.py3-none-any.whl
    pip3 install --no-index -f . six-1.12.0-py2.py3-none-any.whl
    pip3 install --no-index -f . requests_mock-1.6.0-py2.py3-none-any.whl
    pip3 install --no-index -f . cachetools-2.1.0-py2.py3-none-any.whl
    pip3 install --no-index -f . entrypoints-0.3-py2.py3-none-any.whl
    pip3 install --no-index -f . pywin32_ctypes-0.2.0-py2.py3-none-any.whl
    pip3 install --no-index -f . keyring-19.0.2-py2.py3-none-any.whl
    pip3 install --no-index -f . resilient-32.0.186.tar.gz
    pip3 install --no-index -f . resilient_circuits-32.0.186.tar.gz
    
  9. After you have downloaded all the wheels and packages, use the following command to check the requires.txt.
    cd c:\temp_dir
    pip3 download resilient-circuits -d .
    
  10. Open any of the tar.gz files, for example, resilient_circuits-32.0.186.tar.gz and change directory to resilient_circuits.egg-info. In that directory, open the requires.txt file to verify that you have all the required packages.
    For example:
    stompest>=2.3.0
    requests>=2.6.0
    circuits
    pytz
    jinja2>=2.10.0
    pysocks
    filelock>=2.0.5
    resilient>=29.0
    
    If you need to download the required packages, you could use a command such as the following:
    pip3 download -r resilient_circuits.egg-info\requires.txt -d c:\temp_dir

    This command could also be used to install any functions.