Configuring the CLI¶
In this guide, you will learn how to download and configure the Carbyne Stack CLI that can be used to interact with a virtual cloud from the command line.
-
Install the CLI using:
export CLI_VERSION=0.4.1 curl -o cs.jar -L https://github.com/carbynestack/cli/releases/download/cli-v$CLI_VERSION/cli-$CLI_VERSION.jar
-
Export the IP addresses of the Istio Ingress Gateways from the deployment tutorial:
export APOLLO_FQDN="172.18.1.128.sslip.io" export STARBUCK_FQDN="172.18.2.128.sslip.io"
-
Next, configure the CLI to talk to the virtual cloud you just deployed by creating a matching CLI configuration file in
~/.cs
using:mkdir -p ~/.cs cat <<EOF | envsubst > ~/.cs/config { "prime" : 198766463529478683931867765928436695041, "r" : 141515903391459779531506841503331516415, "noSslValidation" : true, "trustedCertificates" : [ ], "providers" : [ { "amphoraServiceUrl" : "http://$APOLLO_FQDN/amphora", "castorServiceUrl" : "http://$APOLLO_FQDN/castor", "ephemeralServiceUrl" : "http://$APOLLO_FQDN/", "id" : 1, "baseUrl" : "http://$APOLLO_FQDN/" }, { "amphoraServiceUrl" : "http://$STARBUCK_FQDN/amphora", "castorServiceUrl" : "http://$STARBUCK_FQDN/castor", "ephemeralServiceUrl" : "http://$STARBUCK_FQDN/", "id" : 2, "baseUrl" : "http://$STARBUCK_FQDN/" } ], "rinv" : 133854242216446749056083838363708373830 } EOF
Alternatively, you can use the CLI tool itself to do the configuration by providing the respective values (as seen above in the HEREDOC) when prompted using:
java -jar cs.jar configure
You can verify that the configuration works by fetching telemetry data from castor using:
Attention
Replace
<#>
with either1
for theapollo
cluster or2
for thestarbuck
cluster.java -jar cs.jar castor get-telemetry <#>
Warning
Before actually using the Carbyne Stack Virtual Cloud please make sure that enough correlated randomness has been generated by Klyshko in the background. You can verify that this is the case by fetching telemetry data via
java -jar cs.jar castor get-telemetry 1
For the next part of the tutorial, it is recommended to wait until Klyshko has generated at least one batch of tuples for each tuple type.