The Telco Cloud Operations deploy tool is compatible with jq version 1.6. There are two ways to install jq. The preferred way to is to use yum. The alternative is using wget. Both ways are documented.

Yum Installation (Recommended)

Procedure

  1. Run the following command and enter y when prompted. (You will see Complete! upon sucessful installation.)
    $ yum install jq
    Loaded plugins: changelog, fastestmirror, langpacks, priorities, product-id, search-disabled-repos, subscription-manager
    You need to be root to perform this command.
    [worker@butler-worker deploy-tool]$ sudo yum install jq
    Loaded plugins: changelog, fastestmirror, langpacks, priorities, product-id, search-disabled-repos, subscription-manager
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    Determining fastest mirrors
    epel/x86_64/metalink                                                                                                      |  18 kB  00:00:00    
     * base: centos-distro.1gservers.com
     * epel: mirror.sfo12.us.leaseweb.net
     * extras: mirrors.sonic.net
     * updates: linux.mirrors.es.net
    CentOS-Base-Internal                                                                                                      | 3.6 kB  00:00:00    
    CentOS-Extras-Internal                                                                                                    | 3.4 kB  00:00:00    
    CentOS-Updates-Internal                                                                                                   | 3.0 kB  00:00:00    
    base                                                                                                                      | 3.6 kB  00:00:00    
    docker-ce-edge                                                                                                            | 3.5 kB  00:00:00    
    docker-ce-stable                                                                                                          | 3.5 kB  00:00:00    
    epel                                                                                                                      | 4.7 kB  00:00:00    
    extras                                                                                                                    | 2.9 kB  00:00:00    
    updates                                                                                                                   | 2.9 kB  00:00:00    
    (1/15): CentOS-Base-Internal/group_gz                                                                                     | 155 kB  00:00:00    
    (2/15): CentOS-Extras-Internal/primary_db                                                                                 | 166 kB  00:00:00    
    (3/15): base/7/x86_64/group_gz                                                                                            | 153 kB  00:00:00    
    (4/15): CentOS-Base-Internal/primary_db                                                                                   | 5.3 MB  00:00:01    
    (5/15): docker-ce-edge/x86_64/updateinfo                                                                                  |   55 B  00:00:00    
    (6/15): CentOS-Updates-Internal/primary_db                                                                                | 9.8 MB  00:00:01    
    (7/15): docker-ce-edge/x86_64/primary_db                                                                                  |  48 kB  00:00:01    
    (8/15): docker-ce-stable/x86_64/primary_db                                                                                |  44 kB  00:00:00    
    (9/15): epel/x86_64/group_gz                                                                                              |  95 kB  00:00:00    
    (10/15): docker-ce-stable/x86_64/updateinfo                                                                               |   55 B  00:00:00    
    (11/15): epel/x86_64/updateinfo                                                                                           | 1.0 MB  00:00:00    
    (12/15): extras/7/x86_64/primary_db                                                                                       | 194 kB  00:00:00    
    (13/15): base/7/x86_64/primary_db                                                                                         | 6.1 MB  00:00:02    
    (14/15): updates/7/x86_64/primary_db                                                                                      | 2.1 MB  00:00:01    
    (15/15): epel/x86_64/primary_db                                                                                           | 6.8 MB  00:00:02    
    Resolving Dependencies
    --> Running transaction check
    ---> Package jq.x86_64 0:1.6-2.el7 will be installed
    --> Processing Dependency: libonig.so.5()(64bit) for package: jq-1.6-2.el7.x86_64
    --> Running transaction check
    ---> Package oniguruma.x86_64 0:6.8.2-1.el7 will be installed
    --> Finished Dependency Resolution
     
     
    Dependencies Resolved
     
     
    =================================================================================================================================================
     Package                             Arch                             Version                               Repository                      Size
    =================================================================================================================================================
    Installing:
     jq                                  x86_64                           1.6-2.el7                             epel                           167 k
    Installing for dependencies:
     oniguruma                           x86_64                           6.8.2-1.el7                           epel                           181 k
     
     
    Transaction Summary
    =================================================================================================================================================
    Install  1 Package (+1 Dependent package)
     
     
    Total download size: 348 k
    Installed size: 1.0 M
    Is this ok [y/d/N]: y
    Downloading packages:
    (1/2): jq-1.6-2.el7.x86_64.rpm                                                                                            | 167 kB  00:00:00    
    (2/2): oniguruma-6.8.2-1.el7.x86_64.rpm                                                                                   | 181 kB  00:00:00    
    -------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                            654 kB/s | 348 kB  00:00:00    
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : oniguruma-6.8.2-1.el7.x86_64                                                                                                  1/2
      Installing : jq-1.6-2.el7.x86_64                                                                                                           2/2
      Verifying  : oniguruma-6.8.2-1.el7.x86_64                                                                                                  1/2
      Verifying  : jq-1.6-2.el7.x86_64                                                                                                           2/2
     
     
    Installed:
      jq.x86_64 0:1.6-2.el7                                                                                                                         
     
     
    Dependency Installed:
      oniguruma.x86_64 0:6.8.2-1.el7                                                                                                                
     
     
    Complete!
  2. Verify the installation by running:
    $ jq --version
    jq-1.6

    If the command does not work, you may have to install the EPEL repository, then run the following command. Enter y when prompted.

    $ sudo yum install epel-release
    Loaded plugins: changelog, fastestmirror, langpacks, priorities, product-id, search-disabled-repos, subscription-manager
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    Loading mirror speeds from cached hostfile
     * base: centos-distro.1gservers.com
     * epel: mirror.sfo12.us.leaseweb.net
     * extras: mirrors.sonic.net
     * updates: linux.mirrors.es.net
    Resolving Dependencies
    --> Running transaction check
    ---> Package epel-release.noarch 0:7-11 will be updated
    ---> Package epel-release.noarch 0:7-12 will be an update
    --> Finished Dependency Resolution
     
     
    Dependencies Resolved
     
     
    =================================================================================================================================================
     Package                                 Arch                              Version                         Repository                       Size
    =================================================================================================================================================
    Updating:
     epel-release                            noarch                            7-12                            epel                             15 k
     
     
    Transaction Summary
    =================================================================================================================================================
    Upgrade  1 Package
     
     
    Total download size: 15 k
    Is this ok [y/d/N]: y
    Downloading packages:
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    epel-release-7-12.noarch.rpm                                                                                              |  15 kB  00:00:04    
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : epel-release-7-12.noarch                                                                                                      1/2
      Cleanup    : epel-release-7-11.noarch                                                                                                      2/2
      Verifying  : epel-release-7-12.noarch                                                                                                      1/2
      Verifying  : epel-release-7-11.noarch                                                                                                      2/2
     
     
    Updated:
      epel-release.noarch 0:7-12                                                                                                                    
     
     
    Complete!
     
    $ sudo yum install jq
    Loaded plugins: changelog, fastestmirror, langpacks, priorities, product-id, search-disabled-repos, subscription-manager
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    Loading mirror speeds from cached hostfile
     * base: centos-distro.1gservers.com
     * epel: mirror.sfo12.us.leaseweb.net
     * extras: mirrors.sonic.net
     * updates: linux.mirrors.es.net
    Resolving Dependencies
    --> Running transaction check
    ---> Package jq.x86_64 0:1.6-2.el7 will be installed
    --> Finished Dependency Resolution
     
     
    Dependencies Resolved
     
     
    =================================================================================================================================================
     Package                        Arch                               Version                                Repository                        Size
    =================================================================================================================================================
    Installing:
     jq                             x86_64                             1.6-2.el7                              epel                             167 k
     
     
    Transaction Summary
    =================================================================================================================================================
    Install  1 Package
     
     
    Total download size: 167 k
    Installed size: 381 k
    Is this ok [y/d/N]: y
    Downloading packages:
    jq-1.6-2.el7.x86_64.rpm                                                                                                   | 167 kB  00:00:00    
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : jq-1.6-2.el7.x86_64                                                                                                           1/1
      Verifying  : jq-1.6-2.el7.x86_64                                                                                                           1/1
     
     
    Installed:
      jq.x86_64 0:1.6-2.el7                                                                                                                         
     
     
    Complete!

    wget Installation (Alternative)

  3. Download the package from the link and run the following command:
    https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
    $ wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
    --2020-06-21 15:54:38--  https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
    Resolving github.com (github.com)... 192.30.255.112
    Connecting to github.com (github.com)|192.30.255.112|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/5101141/6387d980-de1f-11e8-8d3e-4455415aa408?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200621%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200621T225318Z&X-Amz-Expires=300&X-Amz-Signature=7a70537f9b23cde0c04104fb2017ceaa4490d95bf440ac9cbd851e8e892e2651&X-Amz-SignedHeaders=host&actor_id=0&repo_id=5101141&response-content-disposition=attachment%3B%20filename%3Djq-linux64&response-content-type=application%2Foctet-stream [following]
    --2020-06-21 15:54:38--  https://github-production-release-asset-2e65be.s3.amazonaws.com/5101141/6387d980-de1f-11e8-8d3e-4455415aa408?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200621%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200621T225318Z&X-Amz-Expires=300&X-Amz-Signature=7a70537f9b23cde0c04104fb2017ceaa4490d95bf440ac9cbd851e8e892e2651&X-Amz-SignedHeaders=host&actor_id=0&repo_id=5101141&response-content-disposition=attachment%3B%20filename%3Djq-linux64&response-content-type=application%2Foctet-stream
    Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.130.115
    Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.130.115|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3953824 (3.8M) [application/octet-stream]
    Saving to: ‘jq’
     
     
    100%[=======================================================================================================>] 3,953,824   6.02MB/s   in 0.6s  
     
     
    2020-06-21 15:54:39 (6.02 MB/s) - ‘jq’ saved [3953824/3953824]
  4. Run the following commands to install wget:
    $ chmod +x ./jq
     
    $ sudo cp jq /usr/bin
  5. Verify the installation:
    $ jq --version
    jq-1.6

What to do next

Install cURL