Functions using E2E CLI
Introduction
The E2E CLI is a command-line tool developed by E2E Networks Ltd. It enables users to access and manage Functions directly from the command line.
E2E CLI Configuration and Setting up
E2E CLI
The E2E_CLI requires Python and PIP as pre-requisite for installation. To learn more about installing Python and PIP. click here <https://pip.pypa.io/en/stable/installation/>
__.
Open a terminal on your PC and execute the following command:
You have the option to add tokens via a file downloaded from the My Account UI.
After successfully installing the E2E CLI, you should enter the following command in your terminal to add an alias file:
e2e_cli alias add_file
Alternatively, you can type command in your terminal to add an alias:
e2e_cli alias add
After executing the command mentioned above, you will be prompted to provide your 'API key' and 'Auth Token' obtained from the E2E My Account portal. You can add any number of tokens on your system using the same command, ensuring that alias names are kept different. To know more kindly click on the link: Click Here <https://docs.e2enetworks.com/guides/create_API_access_token.html>
_
FaaS Commands
To get the list of Faas commands.
e2e_cli faas -h
List
To list all your Functions using the CLI, use the following command:
e2e_cli faas list
Init
To setup e2e functions on your system
e2e_cli faas init --name="<function_name>" --lang="<language_name>"
The memory and timeout can be modified in the yaml file which is created inside the folder after init command.
function:
limits:
memory: '512'
timeout: '15'
name: test
runtime: node
- Language options allowed are - node, python, csharp, ruby
- The option of memory are - 1024 MB.
- The range of timeout is from range 1 to 600 seconds.
Deploy
To create the e2e function
e2e_cli faas deploy --name="<function_name>"
Redeploy
To update the existing function. After making the changes in the code or function_config file, the existing function can be redeployed.
e2e_cli faas redeploy --name="<function_name>"
Destroy
To delete the function
e2e_cli faas destroy --name="<function_name>"