Deploy and use Compute Nest SaaS Boost, Deploy and use Compute Nest SaaS Boost
This topic describes how to deploy Compute Nest Software-as-a-Service (SaaS) Boost on an Elastic Compute Service (ECS) instance and in a Container Service for Kubernetes (ACK) cluster, and how to add an existing Compute Nest service to SaaS Boost for sale.
Billing
Compute Nest SaaS Boost is provided free of charge. Cloud resources are required for SaaS Boost deployment, which incur resource fees. For more information, see Cloud resource billing rules.
Prerequisites
A GitHub repository is created.
(Optional) An ACK cluster is created. For more information, see Create an ACK managed cluster or Create an ACK dedicated cluster (discontinued).
NoteYou can skip this step if you deploy SaaS Boost on Elastic Compute Service (ECS) instances.
A Compute Nest service is published. For more information, see Create a service and Publish a service.
ImportantThe Compute Nest service must be a fully managed or private service.
An Alibaba Cloud Resource Access Management (RAM) user (if used) is granted the required permissions on the following resources. For more information, see Grant permissions to a RAM user.
Procedure
Step 1: Prepare resources
Obtain the Alipay sandbox APPID, bound merchant account, and related keys and certificates that are used for payments in the testing environment.
ImportantTo ensure that your Alipay or WeChat service provider account can collect payments, you must test whether you can purchase the SaaS Boost service by using an Alipay sandbox account.
Log on to the Alipay Sandbox Open Platform.
NoteIf you do not create an Alipay sandbox account, follow the on-screen instructions to create one.
On the Sandbox page, configure and save the following parameters:
APPID
Bound merchant account (PID)
In the Development Information section, select System Default Key in the Interface Signing Method section based on your business requirements.
If you only want to try the SaaS Boost service, we recommend that you enable Public Key Mode.
If you want to test a service before publishing the service, enable Certificate Mode.
WarningThe default key provided by the sandbox uses the public key or certificate mechanism and the Rivest-Shamir-Adleman 2 (RSA2) algorithm to encrypt the interaction information between the applications and sandbox, securing interaction. If calls do not involve expenses or costs, we recommend that you use Public Key Mode to sign signatures. If calls involve expenses or costs, you must use Certificate Mode to sign signatures.
Certificate mode
Click View in the Certificate Mode section. Properly save the values of the following parameters:
Application Private Key
Application Public Key Certificate
Alipay Public Key Certificate
Alipay Root Certificate
Public key mode
Click View in the Public Key Mode section. Properly save the values of the following parameters:
Application Private Key
Alipay Public Key
Obtain the application ID, merchant ID, and related keys and certificates for Alipay or WeChat that are used in the production environment.
ImportantConfigure your payment environment based on your business requirements. Test the payment in the sandbox, and switch to the production environment only after the application works as expected.
Alipay
Log on to the Alipay Gobal Open Platform and integrate the Compute Nest service application prepared in the Prerequisites section of this topic with the platform. For more information, see Technical Integration Guide for Alipay Global Open Platform.
After the application is integrated with the Alipay platform, obtain the Alipay parameters for the production environment.
Obtain the application ID (APPID). For more information, see Obtain APPID.
Obtain the merchant ID (PID). For more information, see Obtain PID.
Obtain public keys and certificates. For more information, see View keys and certificates.
WarningThe first time you register the application, configure the signing method. For more information, see Set key signing method and Set certificate signing method.
If calls do not involve expenses or costs, use Public Key Mode to sign signatures. If calls involve expenses or costs, use Certificate Mode to sign signatures.
WeChat
Log on to the WeChat Pay Merchant Platform and integrate the Compute Nest service application prepared in the Prerequisites section of this topic with the platform. For more information, see Integration Guide.
After the application is integrated with the WeChat merchant application, apply for and configure all parameters required for the WeChat payment. For more information, see Parameter Application, Configure API key, and Download and Configure Merchant Certificates.
Obtain WeChat Pay parameters.
ImportantSaaS Boost supports WeChat Pay API v3. Make sure that the parameters you specify are for the production environment of WeChat Pay API v3.
Obtain the application ID (AppID) and merchant ID (mchid).
Obtain the API v3 key. For more information, see API v3 Key Introduction Document.
Apply for a merchant API certificate. For more information, see Private Key and Certificate.
Obtain the serial number of the merchant API certificate and merchant API private key certificate.
Log on to the WeChat Pay Merchant Platform and choose .
NoteThe serial number of the merchant API certificate is the number of the certificate, but not the certificate content.
Step 2: Deploy SaaS Boost
1. Create a personal SaaS Boost repository
Fork the SaaS Boost repository to your personal repository and obtain your personal repository URL (HTTPS).
Code directory:
.
├── boost.common # Toolkit
├── boost.front # Frontend code
├── boost.helm # Helm package code
├── boost.server # Service code
├── boost.serverless # Scheduled tasks or serverless part
├── docs # DocumentationCompute Nest SaaS Boost, a development tool and framework, has integrated many features that help quickly build, deploy, scale, and sell SaaS applications. Developers are required to fork the source code repositories to their personal repositories in the following scenarios:
User private parameter configuration: When a SaaS application is deployed, some sensitive or environment-specific static parameters are configured, such as network settings, payment keys, and database connection strings. Since these parameters are usually confidential and vary based on the developer environment, hard coding or storing them directly in the public SaaS Boost source code is inappropriate. Therefore, the SaaS Boost service automatically configures the static parameters provided by users to the personal repository during deployment.
Customization requirements: When using SaaS Boost, developers may encounter specific business scenarios or customer requirements (such as custom web pages) that require personalized adjustments or extensions to the framework. Forking the source code repositories allows developers to directly modify or add code in their personal repositories to adapt to the special requirements, without affecting the original SaaS Boost project.
2. Deploy and view service instances
Select the appropriate service instance creation process based on your deployment scenario.
ECS
Go to the SaaS Boost Deployment Service page in the Compute Nest console and click Official Use.
In Select Template, select ecs and select a deployment region.
In Pipeline Configuration, specify the parameters in the Create Enterprise and Create Connection sections and enter the repository URL from Create a personal SaaS Boost repository.
Select a value in the Payer Type section, an ECS instance type that you want to deploy, and the zone in which the instance resides.
Select or create a VPC and vSwitch.
NoteTo streamline parameter settings, we recommend you create a VPC and vSwitch.
Click Next, confirm that you agree to the terms of service, and click Create Now.
After the service instance is created, check whether the pipeline has been executed successfully.
Wait for the pipeline to complete. You can check the pipeline execution progress by accessing the Pipeline Access URL.
The pipeline runs successfully.
After successful deployment, on the service instance details page, click Public Endpoint to access the SaaS Boost instance.
ACK
Configure the ACK cluster.
Go to the Container Service for Kubernetes (ACK) console and select the ACK cluster you prepared in the Prerequisites section of this topic.
In the Basic Information section of the cluster, click Enable RRSA in the RRSA OIDC field to implement pod permission isolation.
Deploy SaaS Boost in Compute Nest.
Go to the SaaS Boost Deployment Service page in the Compute Nest console.
In the Select Template section, select ACK and select a deployment region.
In the ACK Cluster Configuration section, select the ACK cluster you prepared in the Prerequisites section of this topic and select Pod Security Role Identity Plugin.
In the Configuration of the Image section, specify the image URL.
To use the official SaaS Boost image, keep the default parameters.
To build your own image, use the jib maven plug-in.
NoteThe images are divided into
boost.server, which is the main service image, andboost.serverless, which is the scheduled task image.Sample image building script:
mvn compile com.google.cloud.tools:jib-maven-plugin:2.3.0:dockerBuild -Djib.to.image=aliyun-saas-boost-server:$VERSION
Click Next. On the check page, the system performs a dependency check. Then, click Create Now.
Go to the service instance page to view the deployment progress.
After successful deployment, on the service instance details page, click SaaS Boost public network access address to access the SaaS Boost instance.
Step 3: Configure merchant information
Log on to the Compute Nest console. In the left-side navigation pane, click Service Instance. On the Service Instance page, find the SaaS Boost service instance and click its ID.
On the Service Instance Details page, click the public endpoint to log on to SaaS Boost.
On the SaaS Boost instance page, click Manage Parameters. In the Merchant Information Management section, click Edit.
Specify the corresponding parameters as prompted and click Save.
Step 4: Create and bind a product in SaaS Boost
Create a product in SaaS Boost.
Log on to the Compute Nest console. In the left-side navigation pane, click Service Instance. On the Service Instance page, find the SaaS Boost service instance and click its ID.
On the Service Instance Details page, click the public endpoint to log on to SaaS Boost.
Go to the Products page and click Add to go to the Add Product page.
Specify the product information. The following table describes the main parameters.
Parameter
Description
Product Name
The name of the service for sale.
Compute Nest Service ID
Already interconnected with services in Compute Nest. You can select the product you want to sell.
Default Price
If no plan (parameter set) is available, the default price is used. Unit: Yuan, with two decimal places by default.
If your Compute Nest service has parameter sets, you must add the same parameter sets to the product.
Purchase Cycle Unit
The unit of the purchase cycle. Examples: year, month, and day.
Allowed Purchase Cycle
The cycle in which users are allowed to purchase the product.
Service Version
The default version of the Compute Nest service that is the latest published version.
Click Submit.
(Optional) Configure a parameter set for the SaaS Boost product.
Publish the product in SaaS Boost. On the Products page, click Publish for the corresponding product.
Step 5: Configure and test payment parameters
After you publish your service, complete the payment configuration to allow users to purchase the service on the sample service page when they access the SaaS Boost public URL.
1. Configure payment parameters (sandbox environment)
Regardless of whether you want to use Alipay or WeChat Pay in your production environment, you can use the Alipay sandbox environment for testing.
Configure parameters
Log on to the Compute Nest console. In the left-side navigation pane, click Service Instance. On the Service Instance page, find the SaaS Boost service instance and click its ID.
On the Service Instance Details page, click the public endpoint to log on to SaaS Boost.
On the SaaS Boost instance page, edit Payment Key Management. Click Manage Parameters and then Payment Key Management, then click Edit.
In the Alipay section, check Sandbox Environment and select Certificate or Key as the deployment method. Configure the content saved or downloaded from Alipay sandbox, and then click Save.
Test the Alipay sandbox payment
Log on to the Alipay sandbox.
Download the Android-based Alipay client sandbox from Alipay Sandbox Tools.
Configure Alipay parameters by using the parameters from the sandbox application. For more information, see the "Configure Alipay (Sandbox Environment)" topic.
Log on to the downloaded Android-based Alipay client sandbox by using the buyer information contained in the sandbox account.
Purchase a software product.
Select the software product you want to purchase on the sample service page.
Configure parameters based on your business requirements. Then, click Next: Confirm Order.
After you confirm the parameters, click Create Now to go to the order list page. Scan the quick response (QR) code with the Android-based Alipay sandbox to make the payment.
NoteSandbox payments do not involve real money and only simulate the transaction process.
After successful payment, the service instance page is displayed. Wait for the service instance deployment to complete, and then click the service Instance ID to view the instance overview.
If the Status is Running, the sales test is successful.
ImportantAfter you test with the sandbox, make sure to test sales again by using your official Alipay merchant account or WeChat merchant account.
2. Configure payment parameters in the production environment
Alipay
Configure parameters
Log on to the Compute Nest console. In the left-side navigation pane, click Service Instance. On the Service Instance page, find the SaaS Boost service instance and click its ID.
On the Service Instance Details page, click the public endpoint to log on to SaaS Boost.
On the SaaS Boost instance page, edit Payment Key Management. Click Manage Parameters and then Payment Key Management, then click Edit.
In the Alipay section, check Production Environment and Certificate or Key. Configure the application ID, merchant ID, and related keys and certificates obtained for Alipay, and then click Save.
WarningIf calls involve expenses or costs, use Certificate Mode to sign signatures.
Test Alipay payments
Purchase a service.
Select the software you want to purchase on the sample services page.
Configure parameters based on your business service requirements. Then, click Next: Confirm Order.
After you confirm the parameters, click Create Now to go to the order list page. Scan the QR code in the Alipay application to make the payment.
NoteSince production environment payment tests involve real payment, use a small amount such as CNY 0.01 for testing.
If the administrator has configured payment parameters for multiple payment methods, the payment page provides multiple payment methods for users to choose from.
After successful payment, the service instance page appears. Wait for the service instance deployment to complete, and then click the service Instance ID to view the instance overview.
If the Status is Running, the sales test is successful.
Configure parameters
Log on to the Compute Nest console. In the left-side navigation pane, click Service Instance. On the Service Instance page, find the SaaS Boost service instance and click its ID.
On the Service Instance Details page, click the public endpoint to log on to SaaS Boost.
On the SaaS Boost instance page, edit Payment Key Management. Click Manage Parameters and then Payment Key Management, then click Edit.
In the WeChat Pay section, select Production Environment and one of the Certificate and Key options. Configure the application ID, merchant ID, and related keys and certificates obtained for WeChat, and then click Save.
Test the WeChat payment
Purchase a software product.
Select the software product that you want to purchase on the sample services page.
Configure parameters based on the service requirements. After configuration is complete, click Next: Confirm Order.
After you confirm the parameters, click Create Now. The order list page is displayed. Scan the QR code in WeChat to make the payment.
NoteSince production environment payment tests involve real payment, use a small amount such as CNY 0.01 for testing.
If the administrator has configured payment parameters for multiple payment methods, the payment page provides multiple payment methods for users to choose from.
After successful payment, the service instance page is displayed. Wait for the service instance deployment to complete, and then click the service Instance ID to view the instance overview.
If the Status is Running, the sales test is successful.
Related operations
Modify or cancel the SaaS Boost product binding
Perform the following steps if you encounter product binding errors or want to change the binding configuration.
Only published Compute Nest services can be modified.
Find your Compute Nest service and click Modify Product Configurations.
Modify the original URL and product code.
NoteThe link must be in the strict URL format and end with a forward slash (
/). If you do not need to specify a specific port number, remove the port number from the URL. For example, changehttp://xx.xx.xx.com:9999/tohttp://xx.xx.xx.com/.To unbind the SaaS Boost product, click Unbind SaaS Boost Product.
Scheduled tasks
View information about timed-out orders, automatic transaction closures, and processing refund requests in scheduled tasks to help you better manage your SaaS Boost services.
ECS
Log on to the Compute Nest console, click Service Instance in the left-side navigation pane, select a service instance that you want to view, and then click the instance ID to go to the instance details page.
On the Overview tab, click Scheduled Task URL to go to the Function Compute console.
View the status of function compute executions.
ACK
Check ACK jobs to view the execution status.