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

Installing Caliper Admin is a one-time step. To install it, run the command for your operating system in a terminal. This downloads the script, installs it as an executable named caliper_admin, and then runs it for the first time.

Operating System

Command to execute

Windows

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

Linux

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

OSX

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

During this 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.

Running Caliper Admin after installation

You only need the install command once. After installation, run the tool directly from any terminal by typing:

caliper_admin

On Linux and macOS, the installer places the executable at ~/.local/bin/caliper_admin. On most modern systems ~/.local/bin is already on your PATH, so the command above works right away. You may just need to open a new terminal (or reload your shell) the first time. If the command is not found, ~/.local/bin is not on your PATH. The installer prints a note when it detects this; add ~/.local/bin to your PATH to run caliper_admin from anywhere, or run it directly:

~/.local/bin/caliper_admin

On Windows, the executable is extracted into a caliper_admin folder in whatever directory you ran the install command from. Since a new PowerShell session usually starts in your home directory, this is typically ~/caliper_admin/caliper_admin.exe. The Windows installer does not add anything to your PATH, so run it directly from that folder:

~/caliper_admin/caliper_admin.exe

If you want to run caliper_admin from anywhere, add that folder to your PATH. This guide shows how to do so through the control panel, the process should look the same on Windows 10 and 11.

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: