Tous les produits
Search
Centre de documentation

CloudOps Orchestration Service:ACS-SAP-SAPAutoScaling

Dernière mise à jour :Aug 11, 2026

Met à l'échelle automatiquement les serveurs d'applications supplémentaires SAP (AAS) à partir d'une instance existante du serveur d'applications principal (PAS).

Nom du modèle

ACS-SAP-SAPAutoScaling

Exécuter maintenant

Description du modèle

Crée un groupe de mise à l'échelle automatique basé sur le serveur d'applications principal (PAS) d'un système SAP existant. Le groupe de mise à l'échelle ajoute des instances ECS, automatiquement ou manuellement, et les déploie en tant que serveurs d'applications supplémentaires (AAS) intégrés aux groupes de connexion SAP (SMLG).

Type de modèle

Automatisé

Propriétaire

Alibaba Cloud

Paramètres d'entrée

Paramètre

Description

Type

Obligatoire

Valeur par défaut

Limite

PASInstanceId

ID de l'instance PAS.

Json

Oui

RootPassword

Mot de passe de l'utilisateur root.

String

Oui

Expression régulière pour la validation de la chaîne : ^{{oos-secret:.*$

SAPSID

ID système (SID) du système SAP.

String

Oui

Username

Nom d'utilisateur du système SAP.

String

Oui

UserPassword

Mot de passe utilisateur du système SAP.

String

Oui

Expression régulière pour la validation de la chaîne : ^{{oos-secret:.*$

ClientNumber

SAP CLIENT

String

Oui

AASCount

Nombre d'AAS à ajouter.

Number

Oui

KeyPairName

Nom de la paire de clés.

String

Oui

UsrsapDiskSize

Taille du système de fichiers /usr/sap.

String

Oui

SwapDiskSize

Taille de la zone de swap.

String

Oui

AASInstanceId

ID de l'instance AAS.

Json

Non

{'Type': 'ResourceIds', 'ResourceIds': [''], 'RegionId': '{{ ACS::RegionId }}'}

ClassName

Nom du SMLG.

String

Non

SPACE

CpuTargetValue

Utilisation moyenne attendue du CPU.

String

Non

80

Cooldown

Intervalle minimum entre les opérations de mise à l'échelle, en secondes.

Number

Non

300

Paramètres de sortie

Paramètre

Description

Type

ScalingGroupId

String

Politique d'autorisations requise pour exécuter le modèle

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeInstances"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ros:CreateStack",
                "ros:GetStack"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Références

Pour plus d'informations, consultez ACS-SAP-SAPAutoScaling sur GitHub.Configurer des tâches déclenchées par des événements

Contenu du modèle

FormatVersion: OOS-2019-06-01
Description:
  en: ''
  name-en: ACS-SAP-SAPAutoScaling
Parameters:
  PASInstanceId:
    Type: Json
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
    Description:
      en: Please select the ECS where the existing SAP AS ABAP system PAS is located
    Label:
      en: PASInstanceId
  AASInstanceId:
    Type: Json
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
    Description:
      en: Please select the ECS where the existing SAP AS ABAP system AAS is located. The CPU load of the selected instance will also be used to calculate the average CPU usage. If there is no other AAS, or the existing AAS and PAS are in the same ECS instance, you do not need to select
    Label:
      en: AASInstanceId
    Default: 
      Type: ResourceIds
      ResourceIds:
        - ""
      RegionId: '{{ ACS::RegionId }}'
  RootPassword:
    Type: String
      en: The password of the root user of the instance where the PAS is located. To ensure data security, only the encryption parameter function of the parameter warehouse is supported. Please click the button on the right side of the input box to create and select the encryption parameter. For more details, please refer to <a href='https://www.alibabacloud.com/help/en/oos/getting-started/manage-encryption-parameters' target='_blank'>Create encryption parameters</a> and <a href='https://www.alibabacloud.com/help/en/oos/getting-started/use-encryption-parameters-for-template-executions' target='_blank'>Use encryption parameters</a>
    Label:
      en: RootPassword
    AllowedPattern: '^\{\{oos-secret:.*$'
  SAPSID:
    Type: String
    Label:
      en: SAPSID
  Username:
    Type: String
    Description:
      en: SAP AS ABAP system SAP GUI login user name
    Label:
      en: Username
  UserPassword:
    Type: String
    Description:
      en: The login user password of SAP GUI, in order to ensure data security, only supports the encryption parameter function of the parameter warehouse. Please click the button on the right side of the input box to create and select the encryption parameter. For more details, please refer to <a href='https://www.alibabacloud.com/help/en/oos/getting-started/manage-encryption-parameters' target='_blank'>Create encryption parameters</a> and <a href='https://www.alibabacloud.com/help/en/oos/getting-started/use-encryption-parameters-for-template-executions' target='_blank'>Use encryption parameters</a>
    Label:
      en: UserPassword
    AllowedPattern: '^\{\{oos-secret:.*$'
  ClientNumber:
    Type: String
    Description:
      en: Login Client of SAP GUI, such as 800, 600
    Label:
      zh-cn: SAP CLIENT
      en: ClientNumber
  ClassName:
    Type: String
    Description:
      en: SMLG login group name. The extended AAS will be automatically added to the SMLG login group. If it is not filled in, it will be automatically added to the default 'SPACE' group. If the SMLG group is not set, it is not required to fill in. To facilitate and flexibly adjust the groups that AAS joins, it is recommended that you use <a href='https://www.alibabacloud.com/help/en/oos/getting-started/use-encryption-parameters-for-template-executions' target='_blank'>encryption parameters</a>
    Label:
      en: ClassName
    Default: 'SPACE'
  AASCount:
    Type: Number
    Label:
      en: AASCount
    MinValue: 1
    MaxValue: 2000
  CpuTargetValue:
    Type: String
    Description:
      en: The expected average CPU usage of the ECS where the PAS and AAS are located. Average CPU usage = (the ECS instance where the PAS is located + the ECS instance where the added AAS is located + the ECS instance where the automatically expanded AAS is located) the sum of the CPU utilization / the total number of CPU cores in all instances x100 %. The actual average CPU usage is counted every minute. When the actual value exceeds the expected value three times in a row, the automatic expansion AAS action will be triggered. If you need to customize the statistics period and trigger times, please click the <a href='https://ess.console.aliyun.com/#/v3/welcome' target='_blank'> elastic scaling console after the execution is completed. </a>Add the corresponding alarm task. For details, please refer to <a href='https://www.alibabacloud.com/help/en/auto-scaling/user-guide/manage-event-triggered-tasks' target='_blank'>Create an alarm task</a>
    Label:
      en: CpuTargetValue
    Default: 80
  Cooldown:
    Type: Number
    Description:
      en: The interval for triggering automatic expansion of AAS, in seconds. For example, if the specified interval is 300 seconds, within 300 seconds after expanding an AAS, even if the average CPU usage exceeds the 'expected average CPU usage', the expansion action will not be triggered again
    Label:
      en: Cooldown
    Default: 300
    MinValue: 0
    MaxValue: 86400
  KeyPairName:
    Type: String
    Description: 
      en: The name of the key pair bound to the ECS instance where the extended AAS resides. It is used to log in to the ECS instance. Please pre-register in the <a href='https://ecs.console.alibabacloud.com/#/keyPair/region/' target ='_blank'>Key Pair Console</a>Create and manage key pairs
    Label:
      en: KeyPairName
  UsrsapDiskSize:
    Type: String
    Description:
      en: Size of the '/usr/sap' file system of the ECS instance where the extended AAS resides, in GB
    Label:
      en: UsrsapDiskSize
  SwapDiskSize:
    Type: String
    Description:
      en: Size of the swap partition of the ECS instance where the extended AAS resides, in GB
    Label:
      en: SwapDiskSize
Tasks:
  - Name: getPASInstance
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      Filters:
        - '{{ PASInstanceId }}'
    Outputs:
      PASInstanceId:
        ValueSelector: 'Instances.Instance[0].InstanceId'
        Type: String
      VSwitchId:
        ValueSelector: 'Instances.Instance[0].VpcAttributes.VSwitchId'
        Type: String
      PASIP:
        ValueSelector: 'Instances.Instance[0].VpcAttributes.PrivateIpAddress.IpAddress[0]'
        Type: String
  - Name: getAASInstance
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      Filters:
        - '{{ AASInstanceId }}'
    Outputs:
      AASInstanceId:
        ValueSelector: 'Instances.Instance[].InstanceId'
        Type: List
  - Name: createStack
    Action: 'ACS::ExecuteAPI'
    Description:
      en: 'Create scaling group, scaling rule, scaling configuration and lifecycle hook.'
    Properties:
      Service: ROS
      API: CreateStack
      Parameters:
        StackName: 'AutoScaling-{{ACS::ExecutionId}}'
        TimeoutInMinutes: 10
        DisableRollback: true
        Parameters:
          - ParameterKey: ClassName
            ParameterValue: '{{ ClassName }}'
          - ParameterKey: ClientNumber
            ParameterValue: '{{ ClientNumber }}'
          - ParameterKey: UserPassword
            ParameterValue: '{{ UserPassword }}'
          - ParameterKey: Username
            ParameterValue: '{{ Username }}'
          - ParameterKey: SAPSID
            ParameterValue: '{{ SAPSID }}'
          - ParameterKey: PASInstanceId
            ParameterValue: '{{ getPASInstance.PASInstanceId }}'
          - ParameterKey: ExistingAASInstances
            ParameterValue: 
              'Fn::If':
                - 'Fn::Equals':
                  - []
                  - '{{ getAASInstance.AASInstanceId }}'
                - '[]'
                - 'Fn::Jq':
                  - First
                  - 'tostring'
                  - '{{ getAASInstance.AASInstanceId }}'
          - ParameterKey: RootPassword
            ParameterValue: '{{ RootPassword }}'
          - ParameterKey: PASIP
            ParameterValue: '{{ getPASInstance.PASIP }}'
          - ParameterKey: VSwitchId
            ParameterValue: '{{ getPASInstance.VSwitchId }}'
          - ParameterKey: AASCount
            ParameterValue: '{{ AASCount }}'
          - ParameterKey: Cooldown
            ParameterValue: '{{ Cooldown }}'
          - ParameterKey: CpuTargetValue
            ParameterValue: '{{ CpuTargetValue }}'
          - ParameterKey: UsrsapDiskSize
            ParameterValue: '{{ UsrsapDiskSize }}'
          - ParameterKey: SwapDiskSize
            ParameterValue: '{{ SwapDiskSize }}'
          - ParameterKey: KeyPairName
            ParameterValue: '{{ KeyPairName }}'
        TemplateURL: 'http://ros-template.cn-hangzhou.oss.aliyun-inc.com/S4HANA_Auto_Scaling.json'
    Outputs:
      StackId:
        Type: String
        ValueSelector: StackId
  - Name: untilStackReady
    Action: 'ACS::WaitFor'
    Description:
      en: Wait the stack status util CREATE_COMPLETE
    Retries: 10
    Properties:
      Service: ROS
      API: GetStack
      Parameters:
        StackId: '{{createStack.StackId}}'
      DesiredValues:
        - CREATE_COMPLETE
      StopRetryValues:
        - CREATE_FAILED
        - CHECK_FAILED
        - ROLLBACK_FAILED
        - ROLLBACK_COMPLETE
        - CREATE_ROLLBACK_COMPLETE
        - CREATE_ROLLBACK_FAILED
      PropertySelector: Status
    Outputs:
      ScalingGroupId:
        Type: String
        ValueSelector: '.Outputs[] | select(.OutputKey == "ScalingGroupId") | .OutputValue'
Outputs:
  ScalingGroupId:
    Type: String
    Value: '{{ untilStackReady.ScalingGroupId }}'