Caliper Admin

The Caliper SDK setup process varies depending on several variables including operating systems, access levels, firewalls, and more. The Caliper Admin script simplifies all of this, automatically determining the software and configurations that your environment needs to use the SDK. This includes performing the following steps:

  • Installing the required software, such as the Caliper SDK and Python.

  • Configuring environment variables and software settings.

  • Retrieving the required dependencies.

Setup

To download and install the Caliper Admin script, run the correct command for your operating system in a terminal. This downloads the script, then automatically installs and runs it.

During the initial execution, the script will prompt you to log in and set your stack. The login uses your Q2 Developer Portal username and the API token you created earlier.

Operating System

Command to execute

Windows

(Invoke-WebRequest -Uri https://cdn.q2developer.com/sdk/caliper_admin/v0.3.2/windows/install_windows.ps1).Content | Invoke-Expression

Linux

source <(curl -s https://cdn.q2developer.com/sdk/caliper_admin/v0.3.2/linux/install_linux)

OSX

source <(curl -s https://cdn.q2developer.com/sdk/caliper_admin/v0.3.2/osx/install_osx)

Commands

The following options are available with this script:

  • Login — log in using a different account and API token. After login, the API token is stored at ~/.antilles/cognito_token.

  • Python — installs the selected Python version on Linux. On Windows and macOS, this instead provides a link to download the selected Python version.

  • Status — provides the following stack metadata information:

    • OS information

    • Caliper Admin metadata

    • SDK environment

    • Q2Developer account details

    • Installed Python versions and paths

    • Git path

  • Memcached — starts or stops the Memcached service. Turning this on allows for local data caching.

  • Set Stack — selects the development stack to use. This also generates a script to set environment variables upon shell startup. The generated script is stored at ~/.antilles/sdk_env_vars.sh.

  • Code — sets up your coding environment by cloning a repository. You can also build a Python virtual environment.

Note

Scripts generated for Windows require setting a PowerShell execution policy to execute. Run the following command in PowerShell to set this: Set-ExecutionPolicy Bypass -Scope Process

Source code

Q2 has made the source code for Caliper Admin public so that you can validate its security and functionality. You can access it here: