创建发布任务
<p class="shortdesc">本文主要介绍如何创建应用灰度发布任务。</p>
<section class="section prereq" id="createU__prereq_pbn_4g2_vvb"><div class="tasklabel"><h2 class="doc-tairway">前提条件</h2></div>
<ul class="ul" id="createU__d99e20">
<li class="li">您已成功创建管理集群,可参考<a class="xref" href="/ssr/help/compute/caas/Operation_Guide.Cluster_Management.Master_Cluster.create" target="_blank" rel="external noopener">创建管理集群</a>。</li>
<li class="li">您已成功创建业务集群,可参考<a class="xref" href="/ssr/help/compute/caas/Operation_Guide.Cluster_Management.worker.create" target="_blank" rel="external noopener">创建业务集群</a>。</li>
<li class="li">您已成功创建无状态应用,可参考<a class="xref" href="/ssr/help/compute/caas/Operation_Guide.Service_Management.Deployment.create" target="_blank" rel="external noopener">创建无状态应用</a>。</li>
</ul>
</section>
<section class="section context" id="createU__context_w5d_jdj_vvb"><div class="tasklabel"><h2 class="doc-tairway">背景信息</h2></div>
<p class="p">灰度发布是为新版本创建一个与老版本完全一致的生产环境,在不影响老版本的前提下,按照一定的规则把部分流量切换到新版本,当新版本试运行一段时间没有问题后,将用户的全量流量从老版本迁移至新版本。</p>
<p class="p">其中AB测试就是一种灰度发布方式,一部分用户继续使用老版本的服务,将一部分用户的流量切换到新版本,如果新版本运行稳定,则逐步将所有用户迁移到新版本。</p>
</section>
<section class="section attention" id="createU__attention_ndt_1tk_vvb"><div class="tasklabel"><h2 class="doc-tairway">注意事项</h2></div>
<p class="p">同一个应用同时只可创建一个灰度发布任务。</p>
</section>
<section id="createU__steps_tfn_kxt_fvb"><div class="tasklabel"><h2 class="doc-tairway">操作步骤</h2></div><ol class="ol steps" id="createU__steps_tfn_kxt_fvb"><li class="li step stepexpand">
<span class="ph cmd">登录<a class="xref" href="https://www.ocftcloud.com/console/caas/overview" target="_blank" rel="external noopener">容器服务CaaS控制台</a>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">单击左侧导航栏<span class="ph uicontrol">应用发布</span>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">单击页面右上角的<span class="ph uicontrol">创建</span>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">根据如下信息,创建应用灰度发布任务。</span>
<div class="itemgroup info">
<table class="table frame-all" id="createU__table_pn3_nxt_fvb"><caption></caption><colgroup><col style="width:20.161290322580648%"><col style="width:26.814516129032263%"><col style="width:53.0241935483871%"></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="createU__table_pn3_nxt_fvb__entry__1" colspan="2">
<p class="p">配置项</p>
</th>
<th class="entry" id="createU__table_pn3_nxt_fvb__entry__2">
<p class="p">说明</p>
</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 " rowspan="9">
<p class="p">基本信息配置</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">发布任务名称</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">设置发布任务的名称。</p>
<div class="note note note_note"><span class="note__title">说明:</span> 名称长度需为6~63个字符,包含小写字母、数字和下划线,并以字母或者数字开头。</div>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">发布类型</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">不可修改,系统默认为灰度发布。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">发布版本号</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">设置发布版本号。</p>
<div class="note note note_note"><span class="note__title">说明:</span> 以0~999跟.组成的版本号,格式为xxx.xxx.xxx,如1.0.0。</div>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">描述信息</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">填写发布任务的描述信息,便于后续统一管理。</p>
<div class="note note note_note"><span class="note__title">说明:</span> 最长支持250个字符。</div>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">地域</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">选择发布任务的地域。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">管理集群</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">选择发布任务所属的管理集群。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">业务集群</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">选择发布任务所属的业务集群。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">待灰度(老版本)应用</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">选择待灰度发布的应用(老版本)。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">灰度(新版本)应用</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">选择灰度发布的应用(新版本)。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 " rowspan="6">
<p class="p">策略参数</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">发布策略</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">不可修改,系统默认为<span class="ph uicontrol">基于流量配比</span>。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">待灰度流量配比(%)</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">不可修改,系统默认为50%。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">待灰度实例数</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">设置设置待灰度发布的实例数量。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">灰度流量配比(%)</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">设置需要进行灰度发布的流量配比。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">灰度实例数</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">设置需要进行灰度发布的实例数量。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__1 ">
<p class="p">规则描述信息</p>
</td>
<td class="entry" headers="createU__table_pn3_nxt_fvb__entry__2 ">
<p class="p">填写发布任务的描述信息,便于后续统一管理。</p>
<div class="note note note_note"><span class="note__title">说明:</span> 长度最长支持250个字符。</div>
</td>
</tr>
</tbody></table>
</div>
</li><li class="li step stepexpand">
<span class="ph cmd">单击<span class="ph uicontrol">确认</span>。</span>
</li></ol></section>
<section class="section result" id="createU__result_khh_dyt_fvb"><div class="tasklabel"><h2 class="doc-tairway">执行结果</h2></div>
<p class="p">在<span class="keyword wintitle">应用发布任务列表</span>页面,可查看到已成功创建的灰度发布任务。</p>
</section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!