After you create an SAG vCPE instance, use the script provided by Alibaba Cloud to deploy the SAG vCPE image on your host.
Prerequisites
-
You have created an SAG vCPE instance and obtained its serial number and key. For more information, see Create an SAG vCPE instance.
-
Before you deploy the SAG vCPE image on your host, ensure that the host meets the environment requirements. For more information, see Environment requirements.
Script parameters
The SAG vCPE image deployment script accepts the following parameters and commands:
Usage: deploy.sh [command] [options]
SAG-VCPE install tool 2021.06
Options:
-u run uninstall process
-h print this help message and exit
-P update an existing installation
-C run service state check
-w traffic ingress interface(default eth0)
-t platform, available platform:ens/aliyun/aws
-n sag-sn, get sn from user console platform
-k sag-key, get key from user console platform
-v ha-vip, get ha_vip from user console platform
Commands:
ping the standard ping command
traceroute the standard traceroute command
mtr the standard mtr command
check display main information
|
Parameter |
Description |
|
-n (Required) |
The serial number of the SAG vCPE instance. |
|
-k (Required) |
The key of the SAG vCPE instance. |
|
-t (Required) |
The platform where the SAG vCPE image is deployed. Valid values:
|
|
-v |
The virtual IP address for High Availability (HA) between two SAG vCPE instances. This feature is supported only on the Note
To enable HA, you must use Alibaba Cloud HAVIP. The HAVIP product is in public preview. For more information, see High-Availability Virtual IP (HAVIP). |
|
-w |
The name of the nic for the wan port. The default value is eth0. You can run the |
|
-u |
Uninstalls the SAG vCPE image. |
|
-h |
Displays the help message for the script. |
|
-P |
Upgrades the SAG vCPE image. |
|
-C |
Checks the running status of the host. |
|
check |
Displays the deployment status, host system information, and SAG vCPE image version. |
|
ping |
Tests network connectivity. |
|
traceroute |
Traces the path that packets take to a destination. |
|
mtr |
Combines the features of ping and traceroute to diagnose network connectivity. |
Deploy the SAG vCPE image
-
Log in to the host and download the script to the /root directory.
Important-
For information about how to log in to the host, contact your host provider.
-
You can download the script to a custom directory. If you do, make sure to use the custom path in subsequent commands.
-
After downloading the script, do not modify its content or name.
-
If your host is deployed in a region in the Chinese mainland, run the following command 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 in a region outside the Chinese mainland, run the following command 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
-
-
Make the script executable.
chmod +x /root/sag_vcpe_v2.3.0_deployment.sh -
Run the script.
You can run the script in one of the following two modes:
-
Automatic mode
If you specify the parameters in the command line, the system automatically runs the deployment command. The following is a sample command:
/root/sag_vcpe_v2.3.0_deployment.sh -n <serial_number> -k <key> -t <platform> -w <wan_nic_name> -
Interactive mode
If you run the
/root/sag_vcpe_v2.3.0_deployment.shcommand without specifying parameters, the script runs in interactive mode. You must enter the parameters based on the prompts in the terminal.Missing dependency packages docker , are you sure want to install these packages? [yes|no] >>> yes 2021-07-28 09:47:28 INFO: Download the vcpe installation package 2021-07-28 09:47:29 INFO: Unzip package ########################################## [100%] input the sn:sagexxx3jr input the key:X8Sxxx25ssFM7yg== input the traffic ingress:eth0 input platform(ens/aliyun/aws):ens input ha_vip(default none):none Generating init config as following: Specify traffic ingress interface: eth0 Specify platform: ens Specify sag sn: sagexxx3jr Specify sag key: X8SxxxssFM7yg== Specify ha vip: none Specify package path: /tmp/sag_install 2021-07-28 09:48:02 INFO: Install vcpe
-
-
The script automatically checks whether the deployment environment meets the requirements. If some required components are not installed, the following prompt appears. Enter yes, and the system automatically installs the components.
Missing dependency packages python3 telnet vim traceroute sshpass mtr docker inotify wget netifaces==0.10.9, are you sure want to install these packages? [yes|no] [no] >>> -
If the environment meets the requirements, the script deploys the SAG vCPE image and displays the following confirmation message.
2021-07-28 10:00:40 INFO: Install complete, please wait for few minutes to check state ============================================================================================== -
Verify the deployment result.
After a successful deployment, run the
docker pscommand and verify that the output includes the following two containers:[root@iZbp11vxxx wx8Z ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0b8xxx92c vsag-core "sh -c 'ln -s /lib..." 4 minutes ago Up 4 minutes vsag-core fbexxx432 centos:7 "/sbin/init" 4 minutes ago Up 4 minutes vsag-manager-base [root@iZbp11xxx x8Z ~]#
Next steps
After deploying the SAG vCPE image, configure networking in Alibaba Cloud and on the host's network to establish connectivity. The required configuration varies by environment. Use the following end-to-end tutorials as examples: