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
ParameterDescription
-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 on which 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 other than aliyun, ens, aws, or azure.
-vThe virtual IP address when two SAG vCPE devices have the high availability feature enabled. The high availability feature is available only if 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 Overview of HAVIPs.
-wThe name of the 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.

-uUninstalls the SAG vCPE image.
-hDisplays the help information about the script.
-pUpgrades the SAG vCPE image.
-cChecks the status of the host.
checkObtains the deployment status of the current host, the system information about the host, and the version of the SAG vCPE image.
pingTests the network connectivity.
tracerouteDetermines the path that packets pass through when they access the destination.
mtrProvides 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.
    Important
    • 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 the Chinese mainland, 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 the Chinese mainland, 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 make the script executable:
    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. 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.
    The image is deployed.
  6. Query 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:Query the deployment result

What to do next

After you deploy the SAG vCPE image, you must complete network settings on Alibaba Cloud and for the host network before you can enable network communication. The network settings may vary with the host network. For more information, see the following topics: