Skip to main content

Yottab-Client is a command-line interface to interact with the Yottab server to create and manage workspaces and applications.

Project description

Yottab-CLI

Yottab-CLI is a command-line interface to interact with the Yottab server to create and manage workspaces and applications.

Installation

Use the package manager pip to install Yottab-CLI like below:

$ pip install yottab-cli

Usage

There are four main commands in Yottab-CLI. each one has its specific subcommands:

User

Before using operational commands such as workspace commands, You must first register (if you don't have an account) and then log in to your account.

Register your account

If you want register a new account do the following:

$ yb user register [-u | --username] <your-preferred-username>

Then the CLI prompt to enter and confirm your password. When registration is done you must see Registered successfully. like below:

$ yb user register -u yottabuser
Password:
Repeat for confirmation:
Registered successfully.
Log in to your account

If you want to log in to your account do the following:

$ yb user login [-u | --username] <your-username>

Then the CLI prompt to enter your password. If you log in successfully, you must see Logged in successfully. like below:

$ yb user login -u yottabuser
Password:
Logged in successfully.
Log out of your account

If you want to log out of your account do the following:

$ yb user logout
Logged out successfully.

Then the CLI prompt to enter your password. If you log out successfully, you must see Logged out successfully..

Workspace

For creating your desired applications, you need to have at least one workspace.

Create a workspace

$ yb workspace create [-n | --name] <workspace-name> [-p | --plan] <plan>

If workspace successfully is created, you must see the details of workspace.

$ yb create -n ybworkspace -p medium 
+-------------+---------+--------+
|    name     |  state  |  plan  |
+-------------+---------+--------+
| ybworkspace | pending | medium |
+-------------+---------+--------+

If you see Err: Not Enough Cash, you should charge your cash then try again.

Workspace details

To see the specific workspace state and the detail of its applications, do the following:

$ yb workspace detail [-w | --workspace] <workspace-name>

$ yb workspace detail -w ybworkspace
+-----------------+---------+--------+----------+--------------+
| worskspace_name |  state  |  plan  | app_name |    app_id    |
+-----------------+---------+--------+----------+--------------+
|   ybworkspace   | running | medium |  ybapp2  | cekoqmhnqa8b |
|        -        |    -    |   -    |  ybapp   | cekon6o41dfw |
+-----------------+---------+--------+----------+--------------+
Stop a workspace

If you want to stop running a workspace, do the following:

$ yb workspace stop [-w | --workspace] <workspace-name>

$ yb workspace stop -w ybworkspace
Workspace stopped successfully.

note: If you want to delete a workspace, you have to stop it first.

Restart a workspace

If you want to start running a stopped workspace, do the following:

$ yb workspace restart [-w | --workspace] <workspace-name>

$ yb workspace restart -w ybworkspace
Workspace restarted successfully.
Delete a workspace

If you want to delete a stopped workspace, do the following:

$ yb workspace delete [-w | --workspace] <workspace-name>

$ yb workspace restart -w ybworkspace
Workspace deleted successfully.
Workspaces list

If you want to see the workspaces list, do the following:

$ yb workspace detail -w ybworkspace
+-------------+---------+--------+
|    name     |  state  |  plan  |
+-------------+---------+--------+
| ybworkspace |  stop   | medium |
|    test     | running | medium |
+-------------+---------+--------+

App

To create your application, you must first view the product list and select the desired product.

Create an app

If you want to create an application based on a specific product, do the following:

$ yb app create [-n | --name] <app-name> [-id | --product-id] <product-id>

$ yb app create -n ybapp -id "wordpress-5-7-1-debian-10-r21"
App created successfully.
Apps list

If you want to view the applications list, do the following:

$ yb app list [-w | --workspace] <workspace-name>

$ yb app list -w ybworkspace
+--------+---------+--------------+-------------------------------+
| name   | state   | app_id       | product_id                    |
+--------+---------+--------------+-------------------------------+
| ybapp2 | running | cekoqmhnqa8b | wordpress-5-7-1-debian-10-r21 |
| ybapp  | running | cekon6o41dfw | wordpress-5-7-1-debian-10-r21 |
+--------+---------+--------------+-------------------------------+
Stop an app

If you want to stop running an application, do the following:

$ yb app create [-w | --workspace] <workspace-name> [-id | --app-id] <app-id>

$ yb app stop -w ybworkspace -id cejqh2xhk873
App stopped successfully.

note: If you want to delete an application, you have to stop it first.

Start an pp

If you want to start a stopped application, do the following:

$ yb app start [-w | --workspace] <workspace-name> [-id | --app-id] <app-id>

$ yb app start -w ybworkspace -id cejqh2xhk873
App started successfully.
Delete an app

If you want to delete a stopped application, do the following:

$ yb app delete [-w | --workspace] <workspace-name> [-id | --app-id] <app-id>

$ yb app delete -w ybworkspace -id cejqh2xhk873
App deleted successfully.

Product

Products list

If you want to view the list of Yottab products which are available in a specific workspace, do the following: $ yb product list [-w | --workspace] <workspace-name>

$ yb product list -w ybworkspace
+-------------------+--------------------------------+--------+
| name              | product_id                     | type   |
+-------------------+--------------------------------+--------+
| WordPress         | wordpress-5-7-1-debian-10-r21  | server |
| Redis (alpine)    | redis-alpine                   | server |
| RabbitMQ 2.8.22   | rabbitmq_3-8-22-debian-10-r7   | server |
| Prometheus 2.29.2 | prometheus_2-29-2-debian-10-r9 | server |
| PostgreSQL 13.3   | postgresql_13-3                | server |
| Nginx (alpine)    | nginx_1-21-1-alpine            | server |
| MongoDB (10.6.3)  | mongo_10-6-3-focal             | server |
| Memcached 1.6.10  | memcached_1-6-10-debian-10-r27 | server |
| Kafka 2.8.0       | kafka_2-8-0-debian-10-r94      | server |
| Jenkins 2.303.1   | jenkins_2-303-1-debian-10-r10  | server |
| GitLab CE         | gitLab_gitlab-ce-latest        | server |
| Elasticsearch     | elastic-7-12-0-debian-10-r2    | server |
+-------------------+--------------------------------+--------+

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yb-client-1.0.3.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file yb-client-1.0.3.tar.gz.

File metadata

  • Download URL: yb-client-1.0.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for yb-client-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d0589cf205c0f9f28fa3ed77545de05342bfb7be26877386e5b959a91f4f3900
MD5 96feffa7f3cba3769315e9464ed9c64f
BLAKE2b-256 79c1a191924653af049b9dceb9600c71dad0a0373003c4a7fedd45b323fe0e21

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page