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.
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 on which you want to install the SAG vCPE image. Valid values:
|
-v | The 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. |
-w | The name of the NIC for the WAN port. Default value: eth0. You can view the NIC name of the host by running the |
-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 | Tests the network connectivity. |
traceroute | Determines 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
- 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
- Run the following command to make the script executable:
chmod +x /root/sag_vcpe_v2.3.0_deployment.sh
- 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
- InteractiveIf 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.
- Automatic
- 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.
- 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.
- 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:
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: