sliderule-provisioner is a command line tool for managing the lifecycle of SlideRule clusters. It can be used to deploy a stand-alone cluster or dedicated user capacity, extend or destroy a running cluster, check on its status and events, run the test runner against a branch, and obtain temporary AWS credentials for accessing SlideRule’s S3 data.
Quick Start¶
# Deploy user capacity with the typical settings
sliderule-provisioner deploy --node_capacity 5 --ttl 60 --user_service
# Check on it
sliderule-provisioner status --user_service
# Give it another hour
sliderule-provisioner extend --ttl 60 --user_service
# Tear it down when finished
sliderule-provisioner destroy --user_serviceUsage¶
sliderule-provisioner <command> [options]Command | Purpose |
|---|---|
Deploy a cluster (stand-alone or as user capacity) | |
Extend the time-to-live of a cluster | |
Destroy a cluster | |
Report the status of a cluster | |
List the stack events associated with a cluster | |
Report the metadata of all active clusters | |
Execute the test runner | |
Display information about the provisioner | |
Output shell commands that set temporary AWS credentials | |
Force re-authentication of your user account |
Run sliderule-provisioner --help for a list of commands, or sliderule-provisioner <command> --help for the options of a specific command.
Common Options¶
The following options are accepted by every command. They are attached to each subcommand, so they must appear after the command name:
Option | Default | Description |
|---|---|---|
|
| Domain of the SlideRule service to connect to. |
|
| Name of the cluster to operate on. |
| False | Operate on dedicated user capacity rather than a stand-alone cluster. |
| False | Turn on verbose log messages. Also causes errors to be raised with a full traceback (see Error Handling). |
|
| IANA time zone name (e.g. |
Command Reference¶
deploy¶
sliderule-provisioner deploy [options] [common options]Deploys a cluster, either stand-alone or as user capacity (when --user_service is supplied). The cluster remains running until its time-to-live expires or it is destroyed; use extend to keep it longer.
Option | Default | Description |
|---|---|---|
|
| Whether the cluster is publicly accessible. Must be the string |
|
| Number of nodes to deploy. |
|
| Time-to-live of the cluster. The default of 60 corresponds to one hour. |
|
| Version of SlideRule to deploy. |
Examples:
# deploy a private, single-node cluster running the unstable version for one hour
sliderule-provisioner deploy
# deploy a 4-node cluster named "mycluster" for two hours
sliderule-provisioner deploy --cluster mycluster --node_capacity 4 --ttl 120
# deploy dedicated user capacity
sliderule-provisioner deploy --user_service
# deploy a public cluster running a specific release
sliderule-provisioner deploy --is_public true --version v4.5.0extend¶
sliderule-provisioner extend [--ttl <int>] [common options]Extends the time-to-live of a running cluster.
Option | Default | Description |
|---|---|---|
|
| Amount of time to extend the cluster by. The default of 60 corresponds to one hour. |
Examples:
# extend the "developers" cluster by the default amount
sliderule-provisioner extend
# extend a specific cluster
sliderule-provisioner extend --cluster mycluster --ttl 120destroy¶
sliderule-provisioner destroy [common options]Destroys a cluster.
Examples:
# destroy the "developers" cluster
sliderule-provisioner destroy
# destroy the user's dedicated capacity
sliderule-provisioner destroy --user_servicestatus¶
sliderule-provisioner status [common options]Reports the status of a cluster. The output is a concise summary; fields that have no value are omitted, and times are displayed in the time zone given by --timezone.
Field | Description |
|---|---|
| Present only if the request failed. |
| Name of the cluster’s deployment stack. |
| Current status of the deployment stack. |
| When the cluster was created. |
| When the cluster will shut down automatically (see |
| Number of nodes currently running. |
| Version of SlideRule running on the cluster. |
| Whether the cluster is publicly accessible. |
| Number of nodes the cluster was deployed with. |
| For user capacity, the users of the service and their individual |
Examples:
# status of the "developers" cluster, with times shown in UTC
sliderule-provisioner status --timezone UTC
# status of the user's dedicated capacity
sliderule-provisioner status --user_serviceevents¶
sliderule-provisioner events [common options]Lists the stack events associated with a cluster. This is useful for following the progress of a deployment or diagnosing why one failed.
Examples:
sliderule-provisioner events --cluster myclusterreport¶
sliderule-provisioner report [--kind <str>] [common options]Reports the metadata of all active clusters. Each cluster is displayed using the same concise format as status, keyed by cluster name.
Option | Default | Description |
|---|---|---|
|
| The kind of report: a |
Examples:
# report on all active clusters
sliderule-provisioner report
# report with times shown in Pacific time
sliderule-provisioner report --timezone America/Los_Angelestest¶
sliderule-provisioner test [--branch <str>] [common options]Executes the test runner against a branch of the SlideRule source.
Option | Default | Description |
|---|---|---|
|
| Branch to test. |
Examples:
# run the tests on the main branch
sliderule-provisioner test
# run the tests on a feature branch
sliderule-provisioner test --branch my-featureinfo¶
sliderule-provisioner info [common options]Displays information about the provisioner itself.
Examples:
sliderule-provisioner infos3access¶
sliderule-provisioner s3access [common options]Obtains temporary AWS credentials and prints them as shell export commands. Rather than reading the output, use eval to set the credentials in your current shell environment:
eval "$(sliderule-provisioner s3access)"The following environment variables are set:
Variable | Description |
|---|---|
| Access key for the temporary credentials. |
| Secret key for the temporary credentials. |
| Session token for the temporary credentials. |
| When the credentials expire. Run the command again to obtain new ones. |
Examples:
# set credentials, then use the AWS CLI
eval "$(sliderule-provisioner s3access)"
aws s3 ls s3://<bucket>/
# just look at what would be set
sliderule-provisioner s3accessauthenticate¶
sliderule-provisioner authenticate [common options]Forces a fresh login of your user account, even if you already have valid credentials. Use it when switching accounts or if other commands report authentication errors.
Examples:
sliderule-provisioner authenticateAdditional Topics¶
Output Format¶
Results are printed to standard output as indented JSON. Commands that have nothing to return (for example s3access, which prints shell commands instead) print no JSON.
status and report present a concise summary of the cluster metadata, omitting empty fields and converting times to the --timezone you supply.
Error Handling¶
By default, errors are caught and reported as a single line:
Unhandled error: <message>Pass --verbose to raise the full exception and traceback instead, which is the best first step when troubleshooting.
Typical Private Cluster Workflow¶
# 1. Deploy
sliderule-provisioner deploy --cluster mycluster --node_capacity 2 --ttl 120
# 2. Watch it come up
sliderule-provisioner events --cluster mycluster
sliderule-provisioner status --cluster mycluster
# 3. Use it (e.g. with sliderule-cluster)
sliderule-cluster whoami --cluster mycluster
# 4. Extend if you need more time
sliderule-provisioner extend --cluster mycluster --ttl 60
# 5. Destroy when finished
sliderule-provisioner destroy --cluster mycluster