Manual deployment of auto scaling on AliCloud
Following is a sample configuration for deploying Auto Scaling on AliCloud:
- Create a scaling group in the AliCloud console.
- Create a scaling configuration in the AliCloud console.
- Create scaling rules in the AliCloud console.
- Configure a FortiGate-VM in the Auto Scaling group as the primary member.
- Scale out a new FortiGate-VM, configure it as a secondary member, and synchronize the configuration from the primary to the secondary FortiGate-VM.
- Run diagnose commands to confirm that Auto Scaling is functioning.
To create a scaling group in the AliCloud console:
- Log into the AliCloud console.
- Go to Auto Scaling > Scaling Groups > Create Scaling Group.
- Set the following parameters for the Auto Scaling group:
- Scaling Group Name: Enter a name for the scaling group. The sample configuration is named FGT-ASG.
- Maximum Instances: Enter the maximum number of instances that can comprise the group. In the sample configuration, four (4) is the maximum number.
- Minimum Instances: Enter the minimum number of instances that can comprise the group. In the sample configuration, one (1) is the minimum number.
- Instance Configuration Source: Leave at the default value.
- Network Type: Leave at the default value, which is VPC.
- Select the VPC and VSwitch as desired.
- Click OK.
To create a scaling configuration in the AliCloud console:
- After creating an Auto Scaling group, AliCloud displays a popup for creating a new scaling configuration before activating Auto Scaling. In the popup, click Create Now.
- Select the instance type.
- Select the desired FortiGate-VM image.
- Ensure that Assign Public IP is selected.
- Select the desired security group.
- Click Next: System Configurations.
- (Optional) set the key pair.
- Preview the scaling configuration, then click Create and Enable Configuration.
- Go to Auto Scaling > Scaling Groups to ensure that AliCloud has created the Auto Scaling group and that the first FortiGate-VM has been automatically launched under the group.
To create scaling rules in the AliCloud console:
- In Auto Scaling > Scaling Groups, click the group name.
- Click Scaling Rules from the right-side menu.
- In the Create Scaling Rule dialog, enter a scaling rule name.
- Configure an action. In the sample configuration, the scaling rule is configured to add one (1) FortiGate-VM instance.
- Enter a cool down time, then click Create Scaling Rule. You could also configure another scaling rule which can be executed to remove one (1) FortiGate-VM instance.
To configure a FortiGate-VM in the Auto Scaling group as the primary member:
- Log into the FortiGate-VM.
- Run the following commands in the CLI to enable Auto Scaling and configure this FortiGate-VM as the primary member of the Auto Scaling group:
config system auto-scale
set status enable
set role master
set sync-interface "port1"
set psksecret xxxxxx
end
To scale out a new FortiGate-VM, configure it as a secondary member, and synchronize the configuration:
- In Auto Scaling > Scaling Groups, click the group name, then execute the scaling rule created earlier. AliCloud creates a new FortiGate-VM instance.
- Log into the new FortiGate-VM.
- Run the following commands in the CLI to enable Auto Scaling and configure this FortiGate-VM as the secondary member of the Auto Scaling group. The
master-ip
value should be the primary FortiGate-VM's private IP address:config system auto-scale
set status enable
set role slave
set sync-interface "port1"
set master-ip 192.168.1.204
set psksecret xxxxxx
end
The secondary FortiGate-VM will be synced with the primary FortiGate-VM. The secondary FortiGate-VM can receive configurations from the primary FortiGate-VM.
To run diagnose commands:
You can run the following diagnose
commands to determine if the primary and secondary FortiGate-VMs are able to synchronize configurations:
FortiGate-VM64-ALION~AND # diag deb app hasync -1
slave's configuration is not in sync with master's, sequence:0
slave's configuration is not in sync with master's, sequence:1
slave's configuration is not in sync with master's, sequence:2
slave's configuration is not in sync with master's, sequence:3
slave's configuration is not in sync with master's, sequence:4
slave starts to sync with master
logout all admin users