# E2E CLI ## Introduction **E2E CLI** is a command line tool developed by E2E Networks Ltd. It is used to access and manage your account and E2E cloud services from the command line. With the E2E CLI, you can conveniently operate on Nodes, DBaaS, Buckets, as well as on Load Balancers directly from the command line. ## Getting Started ### How to use E2E CLI #### Create API Token 1. Please go to [‘MyAccount’](https://myaccount.e2enetworks.com/) and log in using the credentials set up at the time of creating and activating your E2E Networks [‘MyAccount’](https://myaccount.e2enetworks.com/). 2. After you log in to the E2E Networks **‘MyAccount’**, click on the **“API”** section on the left side of the MyAccount dashboard. ![API section](images/API-section.png) 3. Now create or download an API Token by clicking on the option shown in the right-top corner of the screen. ![Create/Download Token](images/create_download_token.png) #### Installing E2E CLI on your PC Currently, E2E CLI requires Python/pip for installation and operation on your system. Open a terminal on your PC and use the following command: ```bash pip install e2e-cli ``` ## Synopsis E2E CLI Commands in E2E CLI are as follows: ## E2E CLI Configuration and Setting Up After completing the above two steps, type the following command in your terminal: ## e2e_cli alias add After this give your API key and Auth Token obtained from e2e MyAccount portal in above previous steps. You can add any number of tokens on your system using above command, just keep alias names different. ![Add Alias](images/config__add.png) Alternatively, you can also add tokens/aliases via a file downloaded from the MyAccount UI. ![Add Alias via File](images/config__addfile.png) :::info Note macOS users can use the method mentioned above to add tokens. ::: ## E2E CLI viewing user_names/Alias on your system you can view all alias/user_name on the system using following command : **e2e_cli alias view** ![View Alias](images/config__view.png) ## E2E CLI set default user_names/Alias on your system you can set default alias/user_name on the system using following command : **e2e_cli alias set** ![Default Alias](images/alias_default.png) ## E2E CLI Deleting User_name/Alias/User Token You can delete a user/user token from system using following command : ## e2e_cli alias delete ![Delete Config](images/config__delete.png) ## Operating on Nodes/VM using CLI ## Creating Node/VMs using CLI You can Create/Launch Node or VM using following command : ## e2e_cli --alias node create inputs... Now, enter your node type and os needed as follows ![Node Create](images/node_create1.png) Here if desired you can give all manual inputs for OS and plan name Alternatively, you can enter Plan, and enter node name to launch your node as follows ![Node Create2](images/node_create2.png) ## Listing all Node/VMs using CLI You can get a list of all your Node or VM using following command : ## e2e_cli --alias node list ![Node List](images/node__list.png) ## Getting a specific Node/VMs using CLI You can get details of a specific Node or VM using following command : ## e2e_cli --alias node get inputs... Next you will have to enter the node ID as follows ![Get Node](images/node__get.png) ## Deleting Node/VMs using CLI You can Delete a Node or VM using following command : ## e2e_cli --alias node delete inputs... Next you will have to enter the ID of node, that you want to delete and give confirmation as follows ![delete Node](images/node__delete.png) ## Operating on DBaaS using CLI ## Creating DBaaS using CLI You can Create/Launch DBaaSusing following command : ## e2e_cli --alias dbaas create inputs... Now, enter your DB type and enter DB name needed as follows ![dbaas create ](images/Dbaas_create.png) Alternatively, select your Plan to launch your DBaaS as follows ## e2e_cli --alias dbaas create --auto... ![dbaas create 1](images/Dbaas__create1.png) ![dbaas create 2](images/Dbaas__create2.png) ## Listing all DBaaS using CLI You can get a list of all your DBaaS using following command : ## e2e_cli --alias Dbaas list ![dbaas list](images/Dbaas__list.png) ## Deleting DBaaS using CLI You can Delete a DBaaS using following command : ## e2e_cli --alias dbaas delete Next you will have to enter the ID of DBaaS, that you want to delete and give confirmation as follows ![dbaas delete](images/Dbaas__delete.png) ## Operating on Bucket using CLI ## Creating Bucket using CLI You can Create/Launch Bucket using following command : ## e2e_cli --alias bucket create inputs... Now, enter your bucket name as follows ![bucket create](images/bucket__create.png) ## Listing all Bucket using CLI You can get a list of all your Bucket using following command : ## e2e_cli --alias bucket list ![bucket list](images/bucket__list.png) ## Deleting Bucket using CLI You can Delete a Bucket using following command : ## e2e_cli --alias bucket delete inputs... Next you will have to enter the ID/name of bucket,, that you want to delete and give confirmation as follows ![bucket delete](images/bucket__delete.png) ## Performing action on Bucket using CLI You can performing action a Bucket using following command : Next you will have to enter the ID/name of bucket as follows, same for any other resource ![Action example](images/action_example.png) ## Operating on LoadBalancer using CLI ## Creating LoadBalancer using CLI You can Create/Launch LoadBalancer using following command : ## e2e_cli --alias lb create inputs... Now, enter your lb type and requirement needed as follows ![lb create ](images/lb_create1.png) Finally select your rules, and enter lb name to launch your LoadBalancer as follows ![lb create 2 ](images/lb_create2.png) ## Listing all LoadBalancer using CLI You can get a list of all your LoadBalancer using following command : ```bash e2e_cli --alias lb list ``` ![lb list](images/lb_list.png) ## Editing a specific LoadBalancer using CLI You can get details of a specific LoadBalancer using following command : ## e2e_cli --alias lb edit Next you will have to enter the lb ID as follows ![lb edit](images/lb_edit.png) ## Deleting LoadBalancer using CLI You can Delete a LoadBalancer following command : ## e2e_cli --alias lb delete Next you will have to enter the ID of LoadBalancer, that you want to delete and give confirmation as follows ![lb delete](images/lb_delete.png) ## E2E CLI Help you can always get help by using following command : ```bash ## e2e_cli -h ``` ## or ```bash ## e2e_cli [alias] [command] [sub-command] --help ``` ![e2e cli](images/e2e_cli_h.png) ![e2e cli alis command](images/e2e_cli[alias][command]_h.png) you can know about inputs required for a command by using following : ## e2e_cli [alias] [command] [sub-command] --info ![e2e cli alis command info](images/e2e_cli[alias][command]info.png) you can view man doc by : ## e2e_cli help ![man cli](images/man_cli.png) ## Automating your workflow you can automate your workflow/load in the following manners using CLI tool and python scripts as per your specifications ![automating work](images/automating_work.png) ---