×
Community Blog Deploying a BeeGo Application on Function Compute

Deploying a BeeGo Application on Function Compute

This article covers the deployment of a Beego Application on Function Compute using the Alibaba Cloud management console.

By Ankit Mehta

What Is Function Compute?

Alibaba Cloud offers Function as a Service (FaaS), where operations and maintenance are a cloud provider's responsibility, so companies and developers can focus on the code.

Alibaba Cloud Function Compute (FC) is a Platform as a Service (PaaS) solution to support microservices and web applications. Function Compute provides integration with other Alibaba Cloud services, such as Virtual Private Cloud (VPC), Object Storage Service (OSS), ApsaraDB for RDS, and others.

Which Programming Languages Are Supported?

Function Compute supports leading programming languages, such as Node.Js, Java, Go, PHP, Python, and .Net Core. In addition to this list, a docker container-based application deployment is also possible.

Go programming language adoption is rising in many financial institutions due to its stability, low resource consumption, and compatibility. Alibaba Cloud supports the Beego and Gin frameworks on Function Compute natively.

Deploying a Beego Application on Function Compute

The following step-by-step guide explains how to deploy a Beego application on Function Compute using the Alibaba Cloud management console:

  • Step 1: Log in to your Alibaba Cloud account, go to the Function Compute console, and select the Region where you want to deploy your application.

Note: Function Compute requires authorization to activate the service when you access it for the first time. Therefore, you need to use a master payer/root account to initiate the Function Compute the first time:

1

  • Step 2: Click on the Application Center section on the right navigation bar:

2

  • Step 3: Click on Beego from the Go box as your web application framework:

3

  • Step 4: You are going to create your web application. For that, provide the Application Name and the Description. Then, select Use Template Application and click Beego. Skip all the other options and click Deploy.

Note: The deployment process can take up to 15 minutes to complete.

4

  • Step 5: After the application is created, you can view the Events section with all the details about the creation of the resources by clicking View Events.

5

Essentially, Alibaba Cloud uses the Resource Orchestration Service (ROS) in the backend to deploy the Function Compute stack. The Events section provides the stack deployment log:

6

  • Step 7: The Overview section provides details such as:

    • Number of requests
    • Number of errors
    • Average response time
    • Average memory consumption
    • Application URL

7

Click on the Domain Name URL. It will lead you to the deployed web application:

8

Additional Features Provided by Function Compute

Resources Overview

You can view all the deployed components by navigating to the Resources section and clicking on the Settings tab:

  • Function Compute: This includes all the configurations required to run a function.
  • Domain Name: A temporary domain name where users can validate the function
  • Log Service (SLS): All the logs related to the deployed function can be found there.

9

Export Function

The Export Function button provides a facility to download existing source code. Users can import the exported source to the new function or with modifications to update the existing function.

10

Monitoring Resources

The Monitoring section provides extended analytics of the deployed function, including invocations, memory, running time, errors, and more:

11

Logging

The Logs section contains all application logs that can be filtered by hours, days, weeks, or months:

12

Deployment

The Deployment section gives you the ability to deploy the newer version of the function by clicking the Publish button and importing the source code. Note: It is preferred to export the function as mentioned in the previous steps. Then, modify it, and import it again.

13

The following steps are required to import the modified code:

  • Select the modified source code folder
  • Upload the code package
  • Provide version number
  • Provide a description (optional)
  • Select the Canary Release Weight. (With the canary release, users can validate the application with a limited number of users. If the newer version of the application works, users can send 100% traffic to the new function.)

14

Additional Settings

The Settings section provides application settings details. Users can modify the start command settings if needed.

15

0 0 0
Share on

Alibaba Cloud Community

875 posts | 198 followers

You may also like

Comments

Alibaba Cloud Community

875 posts | 198 followers

Related Products