diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/architecture.png b/architecture.png new file mode 100644 index 0000000..8d3eee2 Binary files /dev/null and b/architecture.png differ diff --git a/css/custom.css b/css/custom.css new file mode 100644 index 0000000..7f799b1 --- /dev/null +++ b/css/custom.css @@ -0,0 +1,4 @@ +img { + max-width: 100%; /* 设置图片的最大宽度为屏幕宽度的百分比 */ + height: auto; /* 自动保持宽高比 */ +} diff --git a/css/theme.css b/css/theme.css new file mode 100644 index 0000000..9c3c3b7 --- /dev/null +++ b/css/theme.css @@ -0,0 +1,286 @@ +body { + font-family: pingfang SC,helvetica neue,arial,hiragino sans gb,microsoft yahei ui,microsoft yahei,simsun,sans-serif; +} +.container { + color: #333; +} +.nav { + width: 300px; + background-color: #F6F6F6; + height: 100vh; + overflow: auto; + position: fixed; +} +.nav-inner { + height: auto; +} +.nav .logo { + width: 100%; + height: 160px; + background-color: #ff6a00; + background-image: url(../img/logo-bg.jpeg); + background-repeat: no-repeat; + background-size: 100% 100%; +} +.nav .logo img { + width: 80%; + margin-top: 60px; + margin-left: 30px; +} +.nav ul { + list-style: none; + margin: 40px 0 0; + padding: 0; + width: 100%; +} +.nav ul li { + width: 100%; + height: 40px; +} +.nav ul li a { + width: 100%; + height: 100%; + padding-left: 32px; + text-decoration: none; + color: #333; +} +.nav ul li a:hover { + color: #ff6a00; +} +.nav ul li.li-h3 a { + width: 100%; + padding-left: 64px; +} + +.content { + margin-left: 300px; + padding-top: 48px; +} + +.content-inner { + max-width: 1200px; + padding: 0 48px 0; + margin: 0 auto 48px; +} + +.copyrights { + height: 56px; + line-height: 56px; + padding-left: 48px; + background-color: #EEEEEE; +} + +/* @media screen and (max-width: 768px) */ +@media screen and (max-width: 768px) { + .nav { + width: 100%; + background-color: #F6F6F6; + height: 48px; + overflow: auto; + position: relative; + } + .nav .logo { + height: 48px; + } + .nav .logo img { + margin-top: 0px; + padding-top: 8px; + margin-left: auto; + margin-right: auto; + height: 32px; + width: auto; + display: block; + } + .nav ul { + display: none; + } + .content { + margin-left: 0; + padding-top: 48px; + } + .content-inner { + max-width: 1200px; + padding: 0 24px 0; + margin: 0 auto 24px; + } +} + +/* content */ +h1 { + margin-top: 0; + border-bottom: 1px solid rgba(61,61,61,.1); + padding-bottom: 24px; +} + +h2 { + font-weight: 500; + margin: 32px 0 16px; +} + +p { + line-height: 24px; +} + +pre code { + display: block; + overflow-x: auto; + background: #f7f7f7; + color: #695d69; + padding: 1em; +} + +p img { + max-width: 100%; + height: auto; +} + +ul, ol { + padding-left: 24px; +} + +li { + line-height: 24px; +} + +table { + width: 100%; + overflow: auto; + display: block; + border: none; +} + +table thead { + color: #000; + text-align: left; + vertical-align: bottom; + white-space: nowrap; +} + +/* table tbody tr:nth-child(2n-1) td { + background-color: #f3f6f6; +} */ + +th { + background-color: #f3f6f6; +} + + +td, th { + border: 1px solid #e1e4e5; + border-collapse: collapse; + font-size: 90%; + margin: 0; + overflow: visible; + padding: 8px 16px; +} + +a { + color: #0070cc; + text-decoration: none; +} + +blockquote { + background-color: #DBEDFE; + margin: 0; + padding: 16px; +} +blockquote p { + margin: 0; +} +blockquote p + p { + margin-top: 16px; +} + +/* from https://highlightjs.org/demo */ +.theme-github { +/*! +Theme: GitHub +Description: Light theme as seen on github.com +Author: github.com +Maintainer: @Hirse +Updated: 2021-05-15 + +Outdated base version: https://github.com/primer/github-syntax-light +Current colors taken from GitHub's CSS +*/ +} + +.theme-github pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em +} + +.theme-github code.hljs { + display: block; + overflow-x: auto; + padding: .5em; + color: #333; + background: #f8f8f8 +} + +.theme-github .hljs { + color: #24292e; + background: #fff +} + +.theme-github .hljs-doctag,.theme-github .hljs-keyword,.theme-github .hljs-meta .hljs-keyword,.theme-github .hljs-template-tag,.theme-github .hljs-template-variable,.theme-github .hljs-type,.theme-github .hljs-variable.language_ { + color: #d73a49 +} + +.theme-github .hljs-title,.theme-github .hljs-title.class_,.theme-github .hljs-title.class_.inherited__,.theme-github .hljs-title.function_ { + color: #6f42c1 +} + +.theme-github .hljs-attr,.theme-github .hljs-attribute,.theme-github .hljs-literal,.theme-github .hljs-meta,.theme-github .hljs-number,.theme-github .hljs-operator,.theme-github .hljs-selector-attr,.theme-github .hljs-selector-class,.theme-github .hljs-selector-id,.theme-github .hljs-variable { + color: #005cc5 +} + +.theme-github .hljs-meta .hljs-string,.theme-github .hljs-regexp,.theme-github .hljs-string { + color: #032f62 +} + +.theme-github .hljs-built_in,.theme-github .hljs-symbol { + color: #e36209 +} + +.theme-github .hljs-code,.theme-github .hljs-comment,.theme-github .hljs-formula { + color: #6a737d +} + +.theme-github .hljs-name,.theme-github .hljs-quote,.theme-github .hljs-selector-pseudo,.theme-github .hljs-selector-tag { + color: #22863a +} + +.theme-github .hljs-subst { + color: #24292e +} + +.theme-github .hljs-section { + color: #005cc5; + font-weight: 700 +} + +.theme-github .hljs-bullet { + color: #735c0f +} + +.theme-github .hljs-emphasis { + color: #24292e; + font-style: italic +} + +.theme-github .hljs-strong { + color: #24292e; + font-weight: 700 +} + +.theme-github .hljs-addition { + color: #22863a; + background-color: #f0fff4 +} + +.theme-github .hljs-deletion { + color: #b31d28; + background-color: #ffeef0 +} \ No newline at end of file diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 0000000..a566910 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/logo-2x.png b/img/logo-2x.png new file mode 100644 index 0000000..a7bdaea Binary files /dev/null and b/img/logo-2x.png differ diff --git a/img/logo-bg.jpeg b/img/logo-bg.jpeg new file mode 100644 index 0000000..7b3e9fb Binary files /dev/null and b/img/logo-bg.jpeg differ diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000..3856bb8 Binary files /dev/null and b/img/logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..698dbf2 --- /dev/null +++ b/index.html @@ -0,0 +1,807 @@ + +
+ + + + +本文介绍基于MySQL软件包快速构建托管版单租户计算巢服务,关于计算巢托管版可以参考帮助文档, +本示例采用ECS+SLB的架构,默认支持私网打通、网络变配与磁盘扩容功能。用户部署服务实例后,可以直接通过内网访问部署在服务商的MySQL,除此之外还配置了三种套餐,分别为:
+套餐名 | +SLB规格 | +ECS规格族 | +vCPU与内存 | +系统盘 | +公网带宽 | +
---|---|---|---|---|---|
低配版 | +slb.s1.small | +ecs.c6.large | +内存型c6,2vCPU 4GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
基础版 | +slb.s1.small | +ecs.c6.xlarge | +内存型c6,4vCPU 8GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
高配版 | +slb.s3.small | +ecs.c6.2xlarge | +内存型c6,4vCPU 8GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
本示例对应的Git仓库地址:mysql-managed-demo
+本示例会自动的构建计算巢服务,具体的服务构建流程为:
+创建过程大约持续3分钟,当服务变成待提交后构建成功。
+本部署架构为SLB+ECS,安全组开放3306端口,并配置了终端节点。 +
+测试本服务构建无需任何费用,创建服务实例涉及的费用参考服务实例计费说明。
+本服务需要对ECS、VPC等资源进行访问和创建操作,若您使用RAM用户创建服务实例,需要在创建服务实例前,对使用的RAM用户的账号添加相应资源的权限。添加RAM权限的详细操作,请参见为RAM用户授权 +。所需权限如下表所示。
+权限策略名称 | +备注 | +
---|---|
AliyunECSFullAccess | +管理云服务器服务(ECS)的权限 | +
AliyunVPCFullAccess | +管理专有网络(VPC)的权限 | +
AliyunROSFullAccess | +管理资源编排服务(ROS)的权限 | +
AliyunComputeNestUserFullAccess | +管理计算巢服务(ComputeNest)的用户侧权限 | +
AliyunComputeNestSupplierFullAccess | +管理计算巢服务(ComputeNest)的服务商侧权限 | +
AliyunPrivateLinkFullAccess | +管理私网连接(PrivateLink)的权限 | +
测试本服务在计算巢上的费用主要涉及:
+计费方式包括:
+目前提供如下套餐:
+套餐名 | +SLB规格 | +ECS规格族 | +vCPU与内存 | +系统盘 | +公网带宽 | +
---|---|---|---|---|---|
低配版 | +slb.s1.small | +ecs.c6.large | +内存型c6,2vCPU 4GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
基础版 | +slb.s1.small | +ecs.c6.xlarge | +内存型c6,4vCPU 8GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
高配版 | +slb.s3.small | +ecs.c6.2xlarge | +内存型c6,4vCPU 8GiB | +ESSD云盘 200GiB PL0 | +固定带宽1Mbps | +
预估费用在创建实例时可实时看到。私网连接只有在创建服务时候并建立连接后才会计费,具体的计费方式可以参考:https://help.aliyun.com/document_detail/198081.html?spm=a2c4g.120462.0.0.5f104bffA7i9WJ
+参数族 | +参数项 | +说明 | +
---|---|---|
基础配置 | +数据库root和admin账户密码 | +数据库root和admin账户密码,长度8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*-+=_)。 | +
网络配置 | +可用区 | +选择可用区,资源将在服务商的该可用区创建。 | +
网络设置 | +专有网络 | +选择建立私网连接的VPC。 | +
网络设置 | +安全组 | +选择建立私网连接的安全组。 | +
网络设置 | +交换机和可用区 | +选择建立私网连接的可用区与交换机。 | +
注:由于本服务开启了网络变配功能,若此处不开启私网连接,也可通过变配功能开启。详情见变配流程-变配私网连接。 + +2. 参数填写完成后点击下一步:确认订单确认参数。 + +3. 确认订单完成后同意服务协议并点击立即创建,随后进入部署阶段。 +
+
+4. 等待部署完成后就可以开始使用服务。
+
+5. 使用服务
+ 1. 本服务支持私网访问,租户可以通过PrivateLink实现私网访问(私网访问帮助文档),
+ 租户私网访问流程:
+ 1. 在服务实例的虚拟互联网页签中查看详细信息,连接时可以通过自定义域名(如果在创建服务实例时勾选了的话)、IP地址或者可用区域名进行访问。
+
+ 2. 在对应的vsw中创建ECS,创建好后安装mysql客户端。
+ yum install mysql
+ or
+ apt install mysql-client
+ 3. 在该ECS中连接MySQL,下面展示分别用自定义域名、IP与可用区域名进行连接:
1. 自定义域名方式访问:
+ ![自定义域名访问.png](自定义域名访问.png)
+ 2. 通过IP访问:
+ ![通过ip访问.png](通过ip访问.png)
+ 3. 通过可用区域名访问:
+ ![通过可用区域名访问.png](通过可用区域名访问.png)
+
+本服务默认开启支持变配私网连接、支持数据盘扩容。
+私网连接变配:用户可以通过变配开启/关闭/新增/删除私网连接;
+数据盘扩容:用户可通过变配扩容数据盘容量。
+查看结果:进入服务端ECS 通过命令 df -h 查看,磁盘容量已修改:
+变配前: + +变配后: +
+本文提前将MySQL社区版安装包存放到该Github Repo中,构建服务过程中会将该安装包发布为计算巢部署物,并在ROS模板写入安装指令,ROS模板引擎在执行时便会自动执行安装了。
+wget '{{ computenest::file::MySQL }}' -O mysql-community-release-el6-5.noarch.rpm
+rpm -ivh mysql-community-release-el6-5.noarch.rpm
+yum repolist all | grep mysql
+yum install mysql-community-server -y
+
+{{ computenest::file::MySQL }} 为占位符,会由计算巢服务替换成文件部署物MySQL的http下载地址。
+文件说明
+文件路径 | +说明 | +
---|---|
config.yaml | +构建服务的配置文件,服务构建过程中会使用计算巢命令行工具computenest-cli,computenest-cli会基于该配置文件构建服务。 | +
parameters.yaml | +本服务为托管版单租,使用该文件渲染服务商需要配置的网络参数,包括VpcId,VSwitch等。 | +
artifact/mysql-community-release-el6-5.noarch.rpm | +MySQL社区版安装包,构建过程会将该包发布为计算巢部署物。 | +
icons/service_logo.jpg | +构建服务默认的图标。 | +
templates/parameters.yaml | +本服务为托管版单租服务,所以只需要用户填写一部分参数,通过该文件指定用户所填参数。 | +
templates/template.yaml | +ROS模板文件,ROS模板引擎根据该模板能够自动创建出所有的资源。 | +
templates/template.yaml主要由三部分组成
+ZoneId:
+ Type: String
+ AssociationProperty: ALIYUN::ECS::Instance:ZoneId
+ Label:
+ en: VSwitch Available Zone
+ zh-cn: 可用区
+# 数据库root账户密码
+Password:
+ # 查询该参数时只输出星号(*)
+ NoEcho: true
+ Type: String
+ Description:
+ en: 'Database root account passwor, 8-32 characters, including uppercase and lowercase letters, numbers and special symbols (including: !@#$%^&*-+=_).'
+ zh-cn: 数据库root账户密码,长度8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*-+=_)。
+ Label:
+ en: Root Account Password
+ zh-cn: 数据库root账户密码
+ ConstraintDescription:
+ en: '8-32 characters, including uppercase and lowercase letters, numbers and special symbols (including: !@#$%^&*-+=_).'
+ zh-cn: 8-32个字符,可包含大小字母、数字及特殊符号(包含:!@#$%^&*-+=_)。
+ MinLength: '8'
+ MaxLength: '32'
+ AssociationProperty: ALIYUN::ECS::Instance::Password
+# 专有网络VPC实例ID
+VpcId:
+ AssociationProperty: ALIYUN::ECS::VPC::VPCId
+ Type: String
+ Label:
+ en: VPC ID
+ zh-cn: 专有网络VPC实例ID
+# 交换机实例ID
+VSwitchId:
+ AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
+ AssociationPropertyMetadata:
+ VpcId: ${VpcId}
+ ZoneId: ${ZoneId}
+ Type: String
+ Label:
+ en: VSwitch ID
+ zh-cn: 交换机实例ID
+# 数据盘大小
+DataDiskSize:
+ Description:
+ zh-cn: ECS实例数据盘大小,单位为GiB。取值范围:100~32768
+ en: 'ECS Instance disk size, range of values: 100-32768, units: GB'
+ Default: 200
+ MaxValue: 32768
+ MinValue: 100
+ Label:
+ zh-cn: 数据盘空间
+ en: Data Disk Space
+ Type: Number
+# Ecs实例类型
+EcsInstanceType:
+ Type: String
+ Label:
+ en: Instance Type
+ zh-cn: Ecs实例类型
+ AssociationProperty: ALIYUN::ECS::Instance::InstanceType
+ AllowedValues:
+ - ecs.c6.large
+ - ecs.c6.xlarge
+ - ecs.c6.2xlarge
+ - ecs.c6.4xlarge
+SlbInstanceType:
+ Type: String
+ Label:
+ en: Instance Type
+ zh-cn: Slb实例类型
+ AssociationProperty: ALIYUN::Slb::LoadBalance::LoadBalancerSpec
+ AllowedValues:
+ - slb.s1.small
+ - slb.s3.small
+
+EcsSecurityGroup:
+ Type: 'ALIYUN::ECS::SecurityGroup'
+ Properties:
+ VpcId:
+ Ref: VpcId
+ SecurityGroupIngress:
+ - Priority: 1
+ PortRange: 3306/3306
+ NicType: internet
+ SourceCidrIp: 0.0.0.0/0
+ IpProtocol: tcp
+# Ecs实例
+EcsInstanceGroup:
+ Type: ALIYUN::ECS::InstanceGroup
+ Properties:
+ # I/O优化实例
+ IoOptimized: optimized
+ ZoneId:
+ Ref: ZoneId
+ DiskMappings:
+ - Category: cloud_essd
+ Device: /dev/xvdb
+ Size:
+ Ref: DataDiskSize
+ SystemDiskSize: 40
+ # 付费方式:按量付费
+ InstanceChargeType: PostPaid
+ MaxAmount: 1
+ # 系统盘类型:cloud_essd
+ SystemDiskCategory: cloud_essd
+ # 实例名称
+ InstanceName:
+ Ref: ALIYUN::StackName
+ VpcId:
+ Ref: VpcId
+ SecurityGroupId:
+ Ref: EcsSecurityGroup
+ VSwitchId:
+ Ref: VSwitchId
+ # 指定CentOS 7.9镜像,如果修改镜像,UserData脚本需要进行适配
+ ImageId: "centos_7_9_x64_20G_alibase_20220727.vhd"
+ InstanceType:
+ Ref: EcsInstanceType
+ # 主机名
+ HostName:
+ Ref: ALIYUN::StackName
+ # Ecs登录密码
+ Password:
+ Ref: Password
+ # 是否为实例分配公网IP
+ AllocatePublicIP: true
+ InternetMaxBandwidthOut: 1
+# ECS执行脚本
+RunCommand:
+ Type: ALIYUN::ECS::RunCommand
+ Properties:
+ CommandContent:
+ Fn::Sub:
+ - |
+ #!/bin/sh
+ FLAG_FILE="/root/.disk_initialized"
+ PARTITION=/dev/vdb1
+ MOUNT_POINT=/data1
+
+ initialize_disk() {
+ # 初始化数据盘,对数据盘分区
+ cat >> /root/InitDataDisk.sh << EOF
+ #!/bin/bash
+ echo "p
+ n
+ p
+
+
+
+ w
+ " | fdisk -u /dev/vdb
+ EOF
+ /bin/bash /root/InitDataDisk.sh
+ rm -f /root/InitDataDisk.sh
+ rm -f InitDataDisk.sh
+
+ # 在新分区上创建文件系统
+ mkfs.ext4 /dev/vdb1
+
+ # 创建目录,MySQL将安装在该目录下
+ mkdir /data1
+
+ # 挂载文件系统
+ mount /dev/vdb1 /data1
+
+ # 向 /etc/fstab 写入新分区信息
+ echo /dev/vdb1 /data1 ext4 defaults,nodelalloc,noatime 0 2 >> /etc/fstab
+ }
+
+ install_mysql() {
+ # 安装社区版MySQL
+ cd /data1/
+ wget '{{ computenest::file::MySQL }}' -O mysql-community-release-el6-5.noarch.rpm
+ rpm -ivh mysql-community-release-el6-5.noarch.rpm
+ yum repolist all | grep mysql
+ yum install mysql-community-server -y
+
+ # 启动MySQL服务
+ service mysqld start
+ }
+
+ configure_mysql() {
+ # 以超级用户身份登入,创建admin用户,并允许admin用户以Password为密码远程登录
+ mysqladmin -u root password '${Password}'
+ echo "create database test character set utf8 collate utf8_bin;" > ./test.sql
+ echo "CREATE USER 'admin'@'%' IDENTIFIED BY '${Password}';" >> ./test.sql
+ echo "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;" >> ./test.sql
+ mysql -u root -p'${Password}' < ./test.sql
+ }
+
+ move_mysql_data() {
+ # 将MySQL的配置和数据路径移动到数据盘上
+ systemctl stop mysqld
+ rsync -av /var/lib/mysql /data1
+
+ # 修改配置文件
+ sed -i 's/\/var\/lib/\/data1/g' /etc/my.cnf
+ echo -e '\n' >> /etc/my.cnf
+ echo '[client]' >> /etc/my.cnf
+ echo 'port=3306' >> /etc/my.cnf
+ echo 'socket=/data1/mysql/mysql.sock' >> /etc/my.cnf
+
+ # 重启MySQL
+ systemctl start mysqld
+ }
+
+ expand_partition() {
+ # 使用 growpart 扩展分区
+ echo "Expanding partition..."
+ if ! growpart /dev/vdb 1; then
+ echo "Failed to expand partition"
+ exit 1
+ fi
+
+ # 通知系统分区的更改
+ partprobe $PARTITION
+
+ # 使用 e2fsck 检查文件系统
+ echo "Checking filesystem..."
+ e2fsck -f -y $PARTITION
+
+ # 扩展文件系统
+ echo "Resizing filesystem..."
+ resize2fs $PARTITION
+ }
+
+ if [ ! -f "$FLAG_FILE" ]; then
+ # 首次创建ECS时执行
+
+ # 确保网络就绪
+ sleep 15
+
+ initialize_disk
+ install_mysql
+ configure_mysql
+ move_mysql_data
+
+ # 当初始化完成后,创建一个标志文件
+ touch "$FLAG_FILE"
+ echo "Initialization complete. Flag file created."
+
+ # 执行成功回调WaitCondition结束WaitCondition的等待
+ ${CurlCli} -d "{\"Data\" : \"SUCCESS\", \"Status\" : \"SUCCESS\"}"
+
+ else
+ # 扩容数据盘时执行
+
+ # 停止MySQL服务
+ systemctl stop mysqld
+
+ # 检查并确保分区未被挂载
+ if mountpoint -q $MOUNT_POINT; then
+ umount $MOUNT_POINT
+ fi
+
+ expand_partition
+
+ # 重新挂载分区
+ echo "Remounting partition..."
+ mount $PARTITION $MOUNT_POINT
+
+ # 启动MySQL服务
+ systemctl start mysqld
+ fi
+ # 获取到WaitConditionHandle的地址放到 ${CurlCli}变量里
+ - CurlCli:
+ Fn::GetAtt:
+ - WaitConditionHandle
+ - CurlCli
+ # 数据库root账户密码
+ Password:
+ Ref: Password
+ Type: RunShellScript
+ Timeout: 900
+ Sync: true
+ InstanceIds:
+ - Ref: EcsInstanceGroup
+Slb:
+ Type: ALIYUN::SLB::LoadBalancer
+ Properties:
+ LoadBalancerName:
+ Fn::Join:
+ - '-'
+ - - mysql
+ - Ref: ALIYUN::StackName
+ VpcId:
+ Ref: VpcId
+ VSwitchId:
+ Ref: VSwitchId
+ PayType: PayOnDemand
+ AddressType: intranet
+ LoadBalancerSpec:
+ Ref: SlbInstanceType
+ SupportPrivateLink: true
+SlbBackendServerAttachment:
+ DependsOn:
+ - EcsInstanceGroup
+ Type: ALIYUN::SLB::BackendServerAttachment
+ Properties:
+ BackendServerList:
+ Fn::GetAtt:
+ - EcsInstanceGroup
+ - InstanceIds
+ LoadBalancerId:
+ Ref: Slb
+ BackendServerWeightList:
+ - 100
+ - 0
+SlbListener:
+ DependsOn: Slb
+ Type: ALIYUN::SLB::Listener
+ Properties:
+ Persistence:
+ CookieTimeout: 60
+ StickySession: 'on'
+ PersistenceTimeout: 180
+ XForwardedFor: 'off'
+ StickySessionType: insert
+ ListenerPort: 3306
+ Bandwidth: -1
+ HealthCheck:
+ HttpCode: http_2xx,http_3xx,http_4xx,http_5xx
+ HealthCheckType: tcp
+ UnhealthyThreshold: 3
+ Timeout: 5
+ HealthyThreshold: 3
+ Port: 3306
+ URI: /
+ Interval: 2
+ LoadBalancerId:
+ Ref: Slb
+ BackendServerPort: 3306
+ Protocol: tcp
+VpcEndpointService:
+ DependsOn: Slb
+ Type: ALIYUN::PrivateLink::VpcEndpointService
+ Properties:
+ ServiceDescription: isv service
+ Resource:
+ - ZoneId:
+ Ref: ZoneId
+ ResourceId:
+ Ref: Slb
+ ResourceType: slb
+ AutoAcceptEnabled: true
+
+Outputs:
+ EndpointServiceId:
+ Description:
+ en: EndpointService Id
+ zh-cn: 终端节点服务Id
+ Value:
+ Fn::GetAtt:
+ - VpcEndpointService
+ - ServiceId
+ Endpoint:
+ Value:
+ Fn::Join:
+ - ''
+ - - Ref: ALIYUN::StackName
+ - .mysql.com
+ MysqlUserName:
+ Description:
+ en: MySQL User Name
+ zh-cn: MySQL登录用户名
+ Value: admin
+
+