After you create a Smart Access Gateway (SAG) vCPE instance, you can run the script provided by Alibaba Cloud to deploy the SAG vCPE image on a host. This topic describes how to deploy an SAG vCPE image on a host.

Prerequisites

  • An SAG vCPE instance is created and the serial number and key of an SAG vCPE device are obtained. For more information, see Create an SAG vCPE instance.
  • Before you deploy the SAG vCPE image on a host, make sure that the host meets the requirements. For more information, see Prerequisites.

Descriptions of the script parameters

The script that is used to deploy the SAG vCPE image provides the following parameters.Details about the parameters
Parameter Description
-n (required) The serial number of the SAG vCPE device.
-k (required) The key of the SAG vCPE device.
-t (required) The service provider of the host where you want to install the SAG vCPE image. Valid values:
  • aliyun (default): deploys the SAG vCPE image on an Alibaba Cloud Elastic Compute Service (ECS) instance.
  • aws: deploys the SAG vCPE image on an Amazon Elastic Compute Cloud (EC2) instance.
  • azure: deploys the SAG vCPE image on a Microsoft Azure virtual machine (VM).
  • If you want to deploy the SAG vCPE image on an on-premises server, set the value to a string of letters except aliyun, ens, aws, or azure.
-v The virtual IP address when two SAG vCPE devices have the high availability feature enabled. The high availability feature is available only when the SAG vCPE image is deployed on an Alibaba Cloud ECS instance.
Note If you want to enable the high availability feature for two SAG vCPE devices, you must use the high-availability virtual IP address (HAVIP) feature provided by Alibaba Cloud. The HAVIP feature is in public preview. For more information, see HAVIP overview.
-w The name of the network interface controller (NIC) for the WAN port. Default value: eth0.

You can view the NIC name of the host by running the ifconfig or ip -br address command.

-u Uninstalls the SAG vCPE image.
-h Displays the help information about the script.
-p Upgrades the SAG vCPE image.
-c Checks the status of the host.
check Obtains the deployment status of the current host, the system information about the host, and the version of the SAG vCPE image.
ping The command that is used to test the network connectivity.
traceroute The traceroute command is used to determine the path that packets pass through when they access the destination.
mtr Provides the network connectivity diagnostics feature together with the ping and traceroute commands.

Deploy the SAG vCPE image

  1. Log on to the host and download the script to the /root directory.
    Notice
    • For more information about how to log on to the host, consult the service provider of the host.
    • You can also specify a custom path and download the script to the corresponding directory. In this case, make sure that you select the custom path when you run the script.
    • After you download the script, do not modify its content or name.
    • If your host is deployed in mainland China, run the following commands to download the script:
      wget -O /root/sag_vcpe_v2.3.0_deployment.sh https://sdwan-oss-shanghai.oss-cn-shanghai.aliyuncs.com/vcpe_vm/sag_vcpe_v2.3.0_deployment.sh
    • If your host is deployed outside mainland China, run the following commands to download the script:
      wget -O /root/sag_vcpe_v2.3.0_deployment.sh https://sdwan-oss-shanghai.oss-accelerate.aliyuncs.com/vcpe_vm/sag_vcpe_v2.3.0_deployment.sh
  2. Run the following command to grant the script executable permissions:
    chmod +x /root/sag_vcpe_v2.3.0_deployment.sh
  3. Run the script.
    You can run the script in the following ways:
    • Automatic

      If you enter the command in the CLI and specify parameters, the system automatically runs the deployment command. The following command shows an example:

      /root/sag_vcpe_v2.3.0_deployment.sh -n serial number -k key -t service provider  -w NIC name for WAN port                
    • Interactive
      If you enter the /root/sag_vcpe_v2.3.0_deployment.sh command without specifying parameters, interactive installation is used. In this case, you must manually enter the parameters as prompted by the system. Interactive installation
  4. When you run the script, the system automatically checks whether the deployment environment meets the requirements. If the deployment environment requires other components, the following prompt appears. In this case, enter yes and the system will automatically install the required components.
    Install the components
  5. If the deployment environment meets the requirements, the system automatically starts to deploy the SAG vCPE image. After the image is deployed, the following prompt appears.
    Deployed
  6. View the deployment result.
    After you deploy the SAG vCPE image, run the docker ps command to check whether the system has the following containers installed:View the deployment result

    If the system contains the preceding containers, it indicates that the SAG vCPE image is deployed. If not, it indicates that the SAG vCPE image is not deployed. In this case, submit a ticket to request technical support from Alibaba Cloud.