Getting started (FC)

更新时间:
复制 MD 格式

File Storage NAS (NAS) integrates seamlessly with Function Compute. You can configure NAS on Function Compute services and applications to store training data in real time. You can also deploy a NAS browser in a Function Compute application to visually manage files on a NAS file system. This includes uploading, downloading, creating, deleting, and modifying files and folders. This topic describes how to deploy a NAS browser in Function Compute to visually manage a NAS file system.

Prerequisites

Step 1: Create a file system and obtain the mount target address

If you already have a file system, you can skip this step and obtain the mount target address from the file system list.

  1. Log on to the NAS console.

  2. In the File System Selection Guide table on the Overview page, click Create under General-purpose NAS.

  3. On the Create panel, configure the required parameters. For other parameters, you can use the default configurations.

    For more information about the parameters for creating a file system, see Parameter description for creating a file system.

    Parameter

    Description

    Region

    From the drop-down list, select China (Chengdu).

    Zone

    Select Chengdu Zone A.

    Protocol Type

    Select NFS.

    Note

    The NAS Browser application supports only the NFS protocol.

    Mount Target Type

    Select Virtual Private Cloud.

    Virtual Private Cloud

    Select a VPC network.

    Virtual Switch

    Select a vSwitch that is in the selected VPC.

  4. Click Buy Now and follow the prompts to complete the purchase.

  5. Return to the NAS console. In the navigation pane, choose File System > File System List.

  6. In the Actions column of the file system that you just created, click Mount. Then, copy the mount target address for later use.

    image.png

Step 2: Create and deploy the fc-nas-filemgr application

  1. Log on to the Function Compute console.

  2. Go to the fc-nas-filemgr application template.

  3. On the Create Application page, configure the required parameters as described in the following table. You can use the default values for the other parameters.

    Important

    This application template is contributed by the community and is not officially provided by Alibaba Cloud. Before you use this template, carefully read the application details to ensure the security and stability of the application.

    Parameter

    Example

    Description

    Deployment Type

    Direct Deployment

    • Deploy from Code Repository

      Push code to the specified repository to trigger a pipeline to deploy the application. To update the project later, you can push the code to the remote repository for a secure release.

    • Direct Deployment

      The code is directly deployed. To maintain or update the project later, you must manage function resources and manually configure capabilities such as continuous integration and continuous deployment (CI/CD).

      Direct deployment does not require repository authorization. The Function Compute platform does not store the sample code in a specified code repository. This method is intended only for a quick trial of the application.

    Role Name

    AliyunFCServerlessDevsRole

    • If you are logging on for the first time, click Go to Authorization to configure role permissions.

      image.png

    • If your role already has the required permissions, you do not need to perform this step.

      image.png

    Region

    China (Chengdu)

    Select the region where the NAS file system from Step 1 is located.

    NAS Mount Target Address

    19c8f64****-u****.cn-chengdu.nas.aliyuncs.com

    Select the mount target address of the NAS file system created in Step 1.

  4. Click Create and Deploy Default Environment.

    Wait a few minutes for the application to be deployed. You can then view the Region and Mount Target information for the NAS file system in the Resource Information section on the Environment Details tab.

    image.png

Step 3: Manage the NAS file system

  1. On the application details page, select the Environment Details tab.

  2. Click the domain name to the right of Endpoint to open the web-based NAS Browser page and manage the NAS file system.

    For example, you can create a test folder in the root directory and upload the test01.txt file to the root directory.

    Important

    The NAS browser does not support uploading empty files.

    1. Create a folder

      On the File Management page, click Create Folder. In the Create Folder dialog box, enter /test and click Create.

      image

    2. Upload a file

      On the File Management page, click Upload. In the Upload File dialog box, select the Multipart Upload tab. Drag the test01.txt file into the dialog box to upload it. The following figure shows a successful upload. Then, click Cancel.

      Important

      Do not refresh the page during the upload. This can cause the upload to fail.

      After the upload is complete, you can also click the image icon to the left of the root directory at the top of the page to refresh and view the file.

      image

    If you no longer need to use the fc-nas-filemgr application to manage NAS files, you can delete the application and the resources it created. Deleting the application does not affect the data stored in NAS.

    Click Applications. On the application details page, click Delete in the upper-right corner. Select the resources to delete and follow the on-screen instructions.

Related documents

FAQ