
# 快速部署
本章节主要帮助用户快速部署该解决方案。
 表1表1 参数填写说明 
| 参数名称                | 类型     | 是否必填 | 参数解释                                                                                                                                                                                                                                        | 默认值                                       |
|:---|:---|:---|:---|:---|
| vpc_name            | String | 必填   | 虚拟私有云名称，该模板新建VPC，不支持重名。取值范围：1-60个字符，支持字母、数字、中文、下划线（_）、中划线（-）、英文句号（.）。                                                                                                                                                                       | deploy-a-highly-available-postgresql-demo |
| secgroup_name       | String | 必填   | 安全组名称。取值范围：1-55个字符，支持字母、数字、中文、下划线（_）、中划线（-）、英文句号（.）。                                                                                                                                                                                        | deploy-a-highly-available-postgresql-demo |
| ecs_name            | String | 必填   | 云服务器名称，不允许重名。取值范围：1-53个字符，支持字母、数字、中文、下划线（_）、中划线（-）、英文句号（.）。                                                                                                                                                                                 | deploy-a-highly-available-postgresql-demo |
| ecs_flavor          | String | 必填   | 云服务器实例规格，支持弹性云服务器 ECS及华为云Flexus 云服务器X实例。Flexus 云服务器X实例规格ID命名规则为x1.?u.?g，例如2vCPUs4GiB规格ID为x1.1u.2g，具体华为云Flexus 云服务器X实例规格请参考控制台。弹性云服务器 ECS规格具体请参考官网[弹性云服务器规格清单](https://support.huaweicloud.com/productdesc-ecs/zh-cn_topic_0159822360.html)。 | x1.1u.2g                                  |
| ecs_password        | String | 必填   | 云服务器初始密码，创建完成后，请参考[重置ECS实例密码](https://support.huaweicloud.com/usermanual-ecs/zh-cn_topic_0067909751.html)登录ECS控制台修改密码。取值范围：长度为8-26位，密码至少必须包含大写字母、小写字母、数字和特殊字符（!@$%\^-_=+\[{}\]:,./?）中的三种，密码不能包含用户名或用户名的逆序。管理员账户为root.                       | 空                                         |
| system_disk_size    | number | 必填   | 系统盘大小，以GB为单位，取值范围为40～1024，不支持缩盘。                                                                                                                                                                                                            | 40                                        |
| data_disk_size      | number | 必填   | 数据盘大小，以GB为单位，取值范围为10～32768。                                                                                                                                                                                                                 | 100                                       |
| charging_mode       | String | 必填   | 计费模式，默认自动扣费，取值为prePaid（包年包月）或postPaid（按需计费），默认postPaid。                                                                                                                                                                                     | postPaid                                  |
| charging_unit       | String | 选填   | 有效值为"year"或"month"。当charging_mode（计费模式）为prePaid时，此选项为必填项。                                                                                                                                                                                   | month                                     |
| charging_period     | number | 选填   | 包年包月时长，当charging_unit取值为"year",取值范围为1～3；当charging_unit取值为"month",取值范围为1～9。当charging_mode（计费模式）为prePaid时，此选项为必填项。                                                                                                                            | 1                                         |
| postgresql_password | String | 必填   | PostgreSQL的root用户密码，长度4-12位，密码至少大写字母、小写字母、数字和特殊字符（@%\^-=）中的三种。参考[修改PostgreSQL数据库默认用户postgres的密码](https://support.huaweicloud.com/postgresql-ctf/postgresql_06.html#postgresql_06__section767013910479)，重置默认用户postgres的密码。                   | 空                                         |
   
1. 登录[华为云解决方案实践](https://www.huaweicloud.com/solution/implementations/index.html)，选择"快速部署高可用PostgreSQL"解决方案，数据中心下拉菜单可以选择需要部署的区域，单击"一键部署"，跳转至解决方案创建堆栈界面。
   
   图1解决方案实施库   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001986275993.png)
   
   
2. 在选择模板界面中,单击"下一步：配置参数。 
   图2选择模板   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001484072416.png)
   
   
3. 在配置参数界面中，参考[表1]完成自定义参数填写，单击"下一步"。
   
   图3配置参数   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001986423593.png)
   
   
4. 在资源栈设置页面中，权限委托选择"rf_admin_trust",单击"下一步"。 
   图4资源栈设置   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001463914812.png)
   
   
5. 在配置确认页面中，单击"创建执行计划"。 
   图5配置确认   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001952792360.png)
   
   
6. 在弹出的创建执行计划框中，自定义填写执行计划名称，单击"确定"。 
   图6创建执行计划   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001986312029.png)
   
   
7. 待执行计划状态为"创建成功，待部署"后，单击"部署"，并且在弹出的执行计划确认框中单击"执行"。 
   图7执行计划   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001952793220.png)
   图8执行计划确认   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001952793644.png)
   
   
8. （可选）如果计费模式选择"包年包月"，在余额不充足的情况下（所需总费用请参考[表1](https://support.huaweicloud.com/postgresql-ctf/postgresql_02.html#postgresql_02__table439520515271)）请及时登录[费用中心](https://account.huaweicloud.com/usercenter/?agencyId=&region=cn-north-4&locale=zh-cn#/userindex/allview)，手动完成待支付订单的费用支付。
9. 等待解决方案自动部署。部署成功后，单击"事件"，回显结果如下: 
   图9资源创建成功   
   ![](https://support.huaweicloud.com/postgresql-ctf/zh-cn_image_0000001953480502.png)
   
   
 
