You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Function management
Creating tasks
Copy page
Download PDF
Creating tasks
Tasks help users manage one-time script execution tasks, such as executing test scripts, data synchronization, data cleaning, and GPU inference/training. Serverless tasks handle asynchronous invocation requests in task mode, track and persist the status of each task stage, and provide rich task control and observability capabilities. This applies to long-running, compute-intensive scenarios. This topic describes how to create a task.​
Prerequisites​
  • veFaaS has been activated.​
  • Cross-service authorization has been completed if you use veFaaS for the first time.​
  • Code development has bee completed locally. For details, refer to Native runtime.​
  • (Optional) To upload code via TOS, store the code ZIP file in TOS in advance. For specific operations, see Getting started with TOS.​
  • (Optional) If you need to upload code from your on-premises computer or via TOS, make sure that the code Zip file is not encrypted and its size does not exceed 256 MiB.​
  • (Optional) If you need to access a VPC, make sure that the VPC service of Volcano Engine has been activated, and a VPC, subnets, and security groups have been created in the region where the function is to be deployed. For details, see Creating VPCs, Creating subnets, and Creating security groups.​
  • (Recommended) If you need to view function logs, make sure that TLS has been activated. If you need to use a custom logging project to handle function logs, ensure that the project and topics have already been created. For details, see Creating log projects and Creating log topics.​
  • (Optional) If you need to manage function resources by using projects, create a project in advance. For specific operations, see Creating projects.​
Limits​
When you deploy a function by using a container image:​
  • The container image must be pushed to a Volcano Engine CR instance that is deployed in the same region as the function.​
  • After the function is created, you must wait for the image synchronization to complete before releasing the function.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation bar, select the target region.​
  1. In the left navigation bar, click Function > Function management. On the Function page, click Create function.​
  1. On the Select function creation method page, click Task function > Create Task function. Specify the parameters based on the following descriptions.​
  • Basic information​
  • ​
    Parameter​
    Description​
    Function name​
    Specify a custom name for the function. Function names cannot be repeated within the same account. After a function name is created, it cannot be modified.​
    Description​
    Enter a description for the function. You can leave this field empty.​
    ​
  • Function code​
  • ​
    Parameter​
    Description​
    Deployment method​
    You can select one of the following deployment methods based on your business requirements.​
    • Image: Deploy the function by using a container image.​
    tip​
    Public images are contributed by community developers. veFaaS does not maintain them. If you encounter issues during software usage, provide feedback to the community.​
    • CR: Select a specific image for deployment from Volcano Engine CR. You can filter out a specific image by instance, namespace, and repository type (public or private).​
    • When you select an image from Container Registry, veFaaS automatically obtains the configurations of the image, including the startup command and environment variables. You can specify whether to apply the configurations of the selected image to the function.​
    • Public image: An out-of-the-box preset image of veFaaS.​
    • Code package​
    tip​
    The code Zip file must not be encrypted and must not exceed 256 MiB in size.​
    • Function template: The built-in, ready-to-use code templates provided by veFaaS. Click Code preview to view the resource files and code details included in the current template. Select an appropriate code template based on your business requirements.​
    • Upload code locally: Upload a locally developed ZIP file.​
    • Upload from TOS: In the upload area, select the target bucket and ZIP file.​
    Runtime​
    Select a runtime environment for the function code. In this scenario, only Native runtime is supported.​
    Webserver mode​
    No. It is used to execute the one-time task script specified by the user. The script does not need to include an HTTP server and does not expose any ports. Set the port number to -1. After the task script is executed, it automatically exits. veFaaS determines whether the task succeeds based on whether the exit code of the script is 0. If a task execution times out, veFaaS forcibly terminates the task process.​
    Startup command​
    Enter the start command of the program.​
    • When the deployment method is set to Image, if you need to specify a script file, use an absolute path and make sure that the script has executable permissions. If you do not enter a script, the /opt/application/run.sh script is executed by default.​
    • When the deployment method is set to Code, if you need to specify a script file, use a relative path from the code package root directory and make sure that the script has executable permissions. If you do not enter a script, the script ./run.sh in the root directory of the code package will be executed by default.​
    ​
  • Advanced settings​
  • Asynchronous tasks are enabled by default and cannot be disabled. For more parameter details, see Configuring functions.​
  1. Click Create to create the function.​
What to do next​
Release the code and configuration of the function. For detailed operations, see Releasing functions.​
​
Last updated: 2026.08.19 14:06:06