- Visão geral de serviço
- Primeiros passos
- Guia de usuário
-
Perguntas frequentes
-
Geral
- Quais são as restrições para o uso do AS?
- Devo usar o AS junto com o ELB e o Cloud Eye?
- O AS é cobrado?
- Uma mudança abrupta nos valores de métrica de monitoramento acionará uma ação de dimensionamento desnecessária?
- Quantas políticas de AS e configurações de AS posso criar e usar?
- O AS pode aumentar ou diminuir automaticamente as vCPUs, a memória e a largura de banda dos ECSs?
- O que é uma cota de AS?
- Como corrigir o erro "The key pair does not exist" quando me conecto a uma instância?
- Que tipos de EIP e de larguras de banda compartilhadas podem ser ajustados pelo AS?
- Que tipos de instâncias de ECS e HECS podem ser dimensionados pelo AS?
- Se o sistema operacional de uma instância do ECS em um grupo de AS for atualizado, o AS pode adicionar automaticamente instâncias com o sistema operacional mais recente durante a próxima ação de expansão?
- O AS pode adicionar instâncias anuais/mensais do ECS ao expandir um grupo de AS?
- AS pode aumentar larguras de banda como necessário?
- Grupo de AS
-
Política de AS
- Quantas políticas de AS posso ativar?
- Quais são as condições para acionar uma política de AS baseada em alarme?
- O que é um período de resfriamento e por que ele é necessário?
- O AS pode dimensionar a capacidade com base no monitoramento personalizado pelo Cloud Eye?
- Quais métricas de monitoramento de um grupo de AS serão afetadas se as ferramentas VM não estiverem instaladas nas instâncias do grupo?
- O que posso fazer se uma política de AS falhar ao ser ativada?
- Como instalar o agente em instâncias de um grupo de AS para usar as métricas de monitoramento do Agente?
-
Instância
- Como evitar que instâncias adicionadas manualmente a um grupo de AS sejam removidas automaticamente?
- Quando há vários flavors incluídos na configuração de AS de um grupo de AS, em que ordem os flavors são selecionados durante os eventos de expansão?
- Quando uma instância é removida de um grupo de AS e excluída, os dados da aplicação são salvos?
- Posso adicionar instâncias de ECS anuais/mensais a um grupo de AS?
- O AS pode excluir automaticamente instâncias adicionadas com base em uma política do AS quando elas não são necessárias?
- Qual é o número esperado de instâncias?
- Como excluir uma instância do ECS criada em uma ação de dimensionamento?
- As instâncias anuais/mensais do ECS serão excluídas se se tornarem não íntegras?
- Como lidar com instâncias não íntegras em um grupo de AS?
- Por que instâncias em um grupo de AS continuam falhando em verificações de integridade e sendo excluídas e recriadas?
- Como evitar que instâncias sejam removidas automaticamente de um grupo de AS?
- Por que uma instância que foi removida de um grupo de AS e excluída ainda é exibida na lista do ECS?
- Preciso vincular um EIP a uma instância antes de adicionar manualmente a instância a um grupo de AS?
- Posso aplicar as configurações de uma instância existente em um grupo de AS às instâncias a serem adicionadas no futuro?
- O sistema vinculará um novo EIP ou um existente a uma instância de ECS recém-adicionada?
-
Outros
- Como implementar automaticamente minha aplicação em uma instância?
- Como o Cloud-Init afeta o serviço AS?
- Por que não consigo usar um arquivo de chave para fazer logon em um ECS?
- Preciso configurar um EIP em uma configuração de AS quando um balanceador de carga foi ativado para um grupo de AS?
- Como ativar a inicialização automática de discos EVS em instâncias que foram adicionadas a um grupo de AS durante ações de dimensionamento?
-
Geral
-
Referência de API
- Antes de começar
- Visão geral de API
- Chamada das API
- Primeiros passos
-
APIs
- Grupos de AS
- Configurações de AS
- Instâncias
-
Políticas do AS
- Criação de uma política de AS
- Criação de uma política de AS (V2)
- Modificação de uma política de AS
- Modificação de uma política de AS (V2)
- Consulta de políticas de AS
- Consulta de políticas de AS (V2)
- Consulta de políticas de AS (V2)
- Consulta de uma política de AS
- Consulta de uma política de AS (V2)
- Execução, habilitação ou desabilitação de uma política de AS
- Exclusão de uma política de AS
- Gerenciamento de políticas de AS em lote
- Logs de execução da política de AS
- Logs da ação de dimensionamento
- Cotas
- Notificações
- Ganchos do ciclo de vida
- Tags
- Consulta de versões da API
- Exemplos de aplicação
- Políticas de permissões e ações suportadas
- Apêndice
- Histórico de mudanças
- No momento, o conteúdo não está disponível no seu idioma selecionado. Consulte a versão em inglês.
- What's New
- Function Overview
- Best Practices
- SDK Reference
- Videos
- Glossary
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Are ELB and Cloud Eye Mandatory for AS?
- Is AS Billed?
- Does an Abrupt Change on Monitoring Indicator Values Cause an Incorrect Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- Can AS Automatically Scale Up or Down vCPUs, Memory, and Bandwidth of ECSs?
- What Is the AS Quota?
- Why is a message displayed indicating that the key pair does not exist and the operation is discontinued when several users under the same account operate AS resources?
- AS Group
-
AS Policy
- How Many AS Policies Can Be Enabled?
- What Are the Conditions to Trigger an Alarm in the AS Policy?
- What Is a Cooldown Period? Why Is It Required?
- Can AS Scale Capacity Based on Custom Monitoring of Cloud Eye?
- What Will Monitoring Metrics for an AS Group Be Affected If VM Tools Are Not Installed on ECSs?
- What Can I Do If an AS Policy Fails to Be Enabled?
- How Can I Install the Agent Plug-in on the Instances in an AS Group to Use Agent Monitoring Metrics?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Removed Automatically?
- What Are the Sequence of Selecting Flavors in Multi-Flavor AS Configuration?
- Will the Application Data on an Instance Be Retained After the Instance Is Removed from an AS Group and Deleted?
- Can I Add ECSs Charged in Yearly/Monthly Mode?
- Can Instances That Have Been Added Based on an AS Policy Be Automatically Deleted When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Created in a Scaling Action?
- Will a Yearly/Monthly ECS Be Deleted When the ECS Becomes Faulty?
- How Should I Handle Abnormal Instances in an AS Group?
- What Can I Do If Instances in an AS Group Frequently Fail in Health Checks and Are Deleted and Then Created Repeatedly?
- How Do I Prevent ECSs from Being Removed from an AS Group Automatically?
- Why Is an Instance Removed and Deleted from an AS Group Still Displayed in the ECS List?
-
Others
- What Can I Do to Enable My Application to Be Automatically Deployed on an Instance?
- How Does Cloud-Init Affect the AS Service?
- How Can I Run Existing Services on an Instance Newly Added to an AS Group?
- Why Cannot I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When A Load Balancer Has Been Enabled in an AS Group?
- How Can I Enable Automatic Initialization of EVS Disks of Instances That Have Been Added in a Scaling Action to an AS Group?
-
General
- Change History
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
API
- AS Groups
- AS Configurations
- Instances in an AS Group
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies
- Querying AS Policies (V2)
- Querying All AS Policies (V2)
- Querying AS Policy Details
- Querying Details of an AS Policy (V2)
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Performing Operations on AS Policies in Batches
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hook
- Tag Management
- API Management
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
User Guide (Paris Regions)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can AS Automatically Delete Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
- API Reference (Paris Regions)
-
User Guide (Kuala Lumpur Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Is AS Billed?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- Can AS Automatically Scale Up or Down vCPUs, Memory, and Bandwidth of ECSs?
- What Is an AS Quota?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- Can AS Scale Capacity Based on Custom Monitoring by Cloud Eye?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
- How Do I Install the Agent on Instances in an AS Group to Use Agent Monitoring Metrics?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When There Are Multiple Flavors Included in the AS Configuration of an AS Group, What Order Are the Flavors Selected in During Scale-out Events?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can I Add Yearly/Monthly ECS Instances to an AS Group?
- Can the System Automatically Delete the Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- Will a Yearly/Monthly ECS Instance Be Deleted If It Becomes Unhealthy?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- How Does Cloud-Init Affect the AS Service?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
-
API Reference (Kuala Lumpur Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs
- AS Groups
- AS Configurations
- Instances in an AS Group
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies
- Querying AS Policies (V2)
- Querying All AS Policies (V2)
- Querying AS Policy Details
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Performing Operations on AS Policies in Batches
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hook
- Tag Management
- API Management
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
User Guide (Ankara Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can AS Automatically Delete Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- How Does Cloud-Init Affect the AS Service?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
-
API Reference (Ankara Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs
- AS Groups
- AS Configurations
- Instances
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies Bound to an AS Group
- Querying AS Policies Bound to a Scaling Resource (V2)
- Querying AS Policies (V2)
- Querying an AS Policy
- Querying an AS Policy (V2)
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Batch Managing AS Policies
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hooks
- API Version Query
- Permissions and Supported Actions
- Appendix
- Change History
-
User Guide (ME-Abu Dhabi Region)
Mostrar todos
Copiado.
Como ativar a inicialização automática de discos EVS em instâncias que foram adicionadas a um grupo de AS durante ações de dimensionamento?
Cenários
Depois que uma instância do ECS é criada, você precisa inicializar manualmente os discos EVS anexados à instância antes de usá-los. Se várias instâncias forem adicionadas ao grupo de AS, você deverá inicializar os discos EVS em cada instância, o que demora um pouco.
Esta seção descreve como configurar um script para habilitar a inicialização automática de discos EVS, incluindo particionamento de disco e anexação de diretórios especificados. O script só pode ser usado para inicializar um disco EVS.
Esta seção usa o CentOS 6.5 como exemplo. Para saber como configurar a inicialização automática de discos EVS em outros sistemas operacionais, consulte a documentação relevante do sistema operacional.
Procedimento
- Faça logon na instância como usuário root.
- Execute um comando para alternar para o diretório onde o script será armazenado:
Por exemplo:
cd /home
- Execute o seguinte comando para criar o script:
Por exemplo:
vi fdisk_mount.sh
- Pressione i para entrar no modo de edição.
O script a seguir é usado como um exemplo para mostrar como implementar a inicialização automática de um disco de dados:
#!/bin/bash bash_scripts_name=fdisk_mount.sh ini_path=/home/fdisk.ini disk= size= mount= partition= function get_disk_from_ini() { disk=`cat $ini_path|grep disk| awk -F '=' '{print $2}'` if [ $disk = "" ] then echo "disk is null in file,exit" exit fi result=`fdisk -l $disk | grep $disk` if [ $result = 1 ] then echo "disk path does not exist in linux,exit" exit fi } function get_size() { size=`cat $ini_path| grep size|awk -F '=' '{print $2}'` if [ $size = "" ] then echo "size is null,exit" exit fi } function make_fs_mount() { mkfs.ext4 -T largefile $partition if [ $? -ne 0 ] then echo "mkfs disk failed,exit" exit fi dir=`cat $ini_path|grep mount |awk -F '=' '{print $2}'` if [ $dir = "" ] then echo "mount dir is null in file,exit" exit fi if [ ! -d $dir ] then mkdir -p $dir fi mount $partition $dir if [ $? -ne 0 ] then echo "mount disk failed,exit" exit fi echo "$partition $dir ext3 defaults 0 0" >> /etc/fstab } function remove_rc() { cat /etc/rc.local | grep $bash_scripts_name if [ $? ne 0 ] then sed -i '/'$bash_scripts_name'/d' /etc/rc.local fi } ################## start ####################### ##1. Check whether the configuration file exists. if [ ! -f $ini_path ] then echo "ini file not exist,exit" exit fi ##2. Obtain the device path for the specified disk from the configuration file. get_disk_from_ini ##3. Obtain the size of the size partition from the configuration file. get_size ##4. Partition the disk. fdisk $disk <<EOF n p 1 1 $size w EOF partition=`fdisk -l $disk 2>/dev/null| grep "^/dev/[xsh].*d" | awk '{print $1}'` ##5. Format the partition and attach the partition to the specified directory. make_fs_mount ##6. Change startup items to prevent re-execution of the scripts. remove_rc echo 'SUCESS'
- Pressione Esc, insira :wq e pressione Enter para salvar as alterações e sair.
- Execute o seguinte comando para criar o arquivo de configuração:
- Pressione i para entrar no modo de edição.
A letra da unidade, o tamanho e o diretório de montagem do disco EVS são configurados no arquivo de configuração. Você pode alterar as configurações com base nas seguintes informações exibidas.
disk=/dev/xdev size=+100G mount=/opt/test
- Pressione Esc, insira :wq e pressione Enter para salvar as alterações e sair.
- Execute o seguinte comando para abrir o arquivo de configuração rc.local:
vi /etc/rc.local
- Pressione i para adicionar o seguinte conteúdo ao rc.local:
/home/fdisk_mount.sh
Após a configuração do rc.local, o script de inicialização do disco EVS será executado automaticamente quando o ECS for iniciado.
- Pressione Esc, insira :wq e pressione Enter para salvar as alterações e sair.
- Crie uma imagem privada usando um ECS.
- Crie uma configuração de AS.
Ao especificar as informações de configuração do AS, selecione a imagem privada criada na etapa anterior e selecione um disco EVS.
- Crie um grupo de AS.
Ao configurar o grupo de AS, selecione a configuração de AS criada na etapa anterior.
Depois que o grupo de AS for criado, os discos EVS de novas instâncias adicionadas a esse grupo de AS em ações de dimensionamento serão inicializados automaticamente.