CLI
Note: pi is based on
kubectl.
pi is a command line interface for running commands against Pi cloud. This overview covers pi syntax, describes the command operations, and provides common examples.
Install
We currently provides official CLI builds for Linux and Mac.
Linux x86
$ wget https://hyper-install.s3.amazonaws.com/pi.linux-amd64.tar.gz $ tar xzf pi.linux-amd64.tar.gz $ ./piMac OS X 10.7 (lion) or later
$ curl -O https://hyper-install.s3.amazonaws.com/pi.darwin-amd64.zip $ unzip pi.darwin-amd64.zip $ ./pi
Configure pi
In order for pi to find and access a Pi regiion, it needs a configuration file, which, by default, is located at ~/.pi/config.
//set credentials for user1(alias)
$ pi config set-credentials user1 --region=gcp-us-central1 --access-key="xxx" --secret-key="xxxxxx"
//set another credentials for user2(alias, default region is "gcp-us-central1" )
$ pi config set-credentials user2 --access-key="yyy" --secret-key="yyyyyy"
//select default user
$ pi config set-context default --user=user2
//delete credentials for user1
$ pi config delete-credentials user1
//view config
$ pi config view
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://*.hyper.sh:443
name: default
contexts:
- context:
cluster: default
namespace: default
user: user2
name: default
current-context: default
kind: Config
preferences: {}
users:
- name: user2
user:
access-key: yyy
region: gcp-us-central1
secret-key: yyyyyy
// config file:
$ cat ~/.pi/configOperations
Find more information at https://github.com/hyperhq/pi.
Basic Commands (Beginner):
createCreate a resource.
Basic Commands (Intermediate):
getDisplay one or many resourcesdeleteDelete resources by resources and namesrunRun a pod with particular image.nameName a resource
Troubleshooting and Debugging Commands:
describeShow details of a specific resource or group of resourceslogsPrint the logs for a container in a podexecExecute a command in a container
Other Commands:
configModify pi config fileshelpHelp about any commandinfoPrint region and user info
Usage: pi [flags] [options]
Use "pi --help" for more information about a given command. Use "pi options" for a list of global command-line options (applies to all commands).
Last updated