Files
doc-exports/docs/asm/umn/asm_01_0036.html
qiujiandong1 719033eb05 ASM UMN update 20250506 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-07-14 13:38:34 +00:00

52 lines
14 KiB
HTML

<a name="asm_01_0036"></a><a name="asm_01_0036"></a>
<h1 class="topictitle1">Creating a Grayscale Release Task</h1>
<div id="body0000001130151131"><div class="section" id="asm_01_0036__section695502711820"><h4 class="sectiontitle">Basic Concepts</h4><ul id="asm_01_0036__ul1540612364188"><li id="asm_01_0036__li206717917229"><span class="keyword" id="asm_01_0036__keyword26724919224">Grayscale version</span><p id="asm_01_0036__p135211613172220">Only one grayscale version can be released for a service. You can configure grayscale policies for the version.</p>
</li><li id="asm_01_0036__li17102132219228"><span class="keyword" id="asm_01_0036__keyword161031822192210">Grayscale policy</span><p id="asm_01_0036__p1686542219222">Before releasing a new service version in the production environment and letting it serve all the live traffic, you can add a grayscale version and configure grayscale policies to serve just a proportion of the traffic. After the grayscale version has run stably for a period, it can serve as the default version to take over all traffic in place of the original version in the production environment.</p>
</li></ul>
</div>
<div class="section" id="asm_01_0036__section230105120212"><h4 class="sectiontitle">Creating a Grayscale Release Task</h4><ol id="asm_01_0036__ol923713456714"><li id="asm_01_0036__li0970112012172"><span>Log in to the ASM console and go to the <strong id="asm_01_0036__b13161141102511">Create a grayscale release task</strong> page by one of the following ways:</span><p><ul id="asm_01_0036__ul171761631102512"><li id="asm_01_0036__li7877104561515">(Shortcut) In the upper right corner of an Enterprise mesh, click <span><img id="asm_01_0036__image1891933718163" src="en-us_image_0000001254994843.png"></span>.</li><li id="asm_01_0036__li51767318252">(Shortcut) In the center of the target mesh, click <strong id="asm_01_0036__b1545983530102415">Create a grayscale release task</strong>.</li><li id="asm_01_0036__li746144374218">Create a grayscale release task on the mesh details page.<ol type="a" id="asm_01_0036__ol4373114819425"><li id="asm_01_0036__li123737481421">Click the target mesh and go to its details page, click <strong id="asm_01_0036__b1885266196102415">Grayscale Release</strong> in the navigation pane on the left.</li><li id="asm_01_0036__li4599125384218">If no grayscale task is running, click <strong id="asm_01_0036__b7201145816720">Create Release Task</strong> in the <strong id="asm_01_0036__b920820582075">Canary Release</strong> or <strong id="asm_01_0036__b16209135817711">Blue-Green Deployment</strong> area. If there is an ongoing grayscale task, click <strong id="asm_01_0036__b1620995818710">Grayscale Release</strong> in the upper right corner.</li></ol>
</li></ul>
</p></li><li id="asm_01_0036__li771712313588"><span>Configure basic information of the grayscale release task.</span><p><ul id="asm_01_0036__ul6468103391818"><li id="asm_01_0036__li182551458340"><strong id="asm_01_0036__b151365433183">Grayscale Release Form</strong><p id="asm_01_0036__p2064691819344">Select <strong id="asm_01_0036__b1497597343102415">Canary Release</strong> or <strong id="asm_01_0036__b2049366149102415">Blue-Green Deployment</strong> as required. For details about the differences between the two forms, see <a href="asm_01_0035.html">Grayscale Release Overview</a>.</p>
</li><li id="asm_01_0036__li4938581353"><strong id="asm_01_0036__b743019103613">Task Name</strong><p id="asm_01_0036__p98958413619">Customize a grayscale release task name. Enter 4 to 63 characters, starting with a lowercase letter and ending with a letter or digit. Only lowercase letters, digits, and hyphens (-) are allowed.</p>
</li><li id="asm_01_0036__li36212449385"><strong id="asm_01_0036__b13288953173816">Namespace</strong><p id="asm_01_0036__p26361500386">Select the namespace that the service belongs to.</p>
</li><li id="asm_01_0036__li10113185692215"><strong id="asm_01_0036__b083101432311">Service</strong><p id="asm_01_0036__p11370657182210">Select the service to be released from the drop-down list box. Services that are running grayscale tasks cannot be selected. They are automatically filtered out from the list.</p>
</li><li id="asm_01_0036__li164901553114017"><strong id="asm_01_0036__b486725564018">Workload</strong><p id="asm_01_0036__p614765119400">Select the workload to which the service belongs.</p>
</li><li id="asm_01_0036__li16245142511413"><strong id="asm_01_0036__b2245142520413">Version</strong><p id="asm_01_0036__p5245132584112">Current service version number, which cannot be changed.</p>
</li></ul>
</p></li><li id="asm_01_0036__li1480323914110"><span>Configure grayscale version information.</span><p><ul id="asm_01_0036__ul11748103715413"><li id="asm_01_0036__li1074820373417"><strong id="asm_01_0036__b67471377410">Cluster</strong><p id="asm_01_0036__p7748103744117">Select the cluster on which the grayscale version of the service will be deployed.</p>
</li><li id="asm_01_0036__li1574817374414"><strong id="asm_01_0036__b207485372415">Version</strong><p id="asm_01_0036__p187481537204112">Enter the grayscale version number of the service.</p>
</li><li id="asm_01_0036__li1835217487279"><strong id="asm_01_0036__b96251705281">Pods</strong><p id="asm_01_0036__p6256649192710">Number of pods of the grayscale version. You can modify the number as required. Each pod of the grayscale version consists of containers deployed with the same image.</p>
</li><li id="asm_01_0036__li17315175072717"><strong id="asm_01_0036__b3547182102812">Image Name</strong><p id="asm_01_0036__p1763125102711">The image of the service is selected by default.</p>
</li><li id="asm_01_0036__li366895242717"><strong id="asm_01_0036__b16922517284">Image Tag</strong><p id="asm_01_0036__p058355372716">Select the image tag of the grayscale version.</p>
</li></ul>
</p></li><li id="asm_01_0036__li11228147115610"><span>Click <span class="uicontrol" id="asm_01_0036__uicontrol142518585718"><b>Release</b></span>. Wait for the grayscale version to be created.</span><p><p id="asm_01_0036__p157607115573">Ensure that all pods of the grayscale version are running normally and configure the traffic policy when the startup progress reaches 100%. You can view the pod monitoring information, including <strong id="asm_01_0036__b738282634102415">Start Logs</strong> and <strong id="asm_01_0036__b38129282102415">Performance Monitoring</strong> on the <strong id="asm_01_0036__b2126702874102415">View Status</strong> page.</p>
</p></li><li id="asm_01_0036__li5242204519710"><span>(For canary release only) Click <strong id="asm_01_0036__b2127315232102415">Configure Traffic Policy</strong> to configure a traffic policy.</span><p><p id="asm_01_0036__p58080153163125"><strong id="asm_01_0036__b371783390102415">Policy Type</strong>: The value can be <strong id="asm_01_0036__b1569755184102415">Based on traffic ratio</strong> or <strong id="asm_01_0036__b1443871107102415">Based on request content</strong>.</p>
<ul id="asm_01_0036__ul61311494163314"><li id="asm_01_0036__li1265865519290"><strong id="asm_01_0036__b179291468309">Based on traffic ratio</strong><p id="asm_01_0036__p910935618296">A specified ratio of traffic will be directed to the grayscale version. For example, 75% of the traffic is directed to the original version, and 25% is directed to the grayscale version. In actual applications, you can gradually increase the traffic ratio of the grayscale version and deliver policies to monitor the performance of the grayscale version.</p>
<div class="fignone" id="asm_01_0036__fig1550914468143"><span class="figcap"><b>Figure 1 </b>Based on traffic ratio</span><br><span><img class="eddx" id="asm_01_0036__image45091246201417" src="en-us_image_0000001210438852.png"></span></div>
<p id="asm_01_0036__p184331616162415">You can set the traffic ratio for the original version and grayscale version. The system distributes traffic to the two versions based on the specific traffic ratio.</p>
</li></ul>
<ul id="asm_01_0036__ul21864151442"><li id="asm_01_0036__li1318621514442"><strong id="asm_01_0036__b1184715194414">Based on request content</strong><p id="asm_01_0036__p10186515104411">With such a policy, a grayscale version can be accessed only when the traffic meets the rules based on cookies, headers, queries, allowed operating systems, and allowed browsers. For example, only HTTP requests whose cookies meet <strong id="asm_01_0036__b1217005551102415">User=Internal</strong> can be forwarded to the grayscale version. Other requests are still received by the original version.</p>
<div class="fignone" id="asm_01_0036__fig19101134141212"><span class="figcap"><b>Figure 2 </b>Based on request content</span><br><span><img class="eddx" id="asm_01_0036__image1610220411210" src="en-us_image_0000001210119300.png"></span></div>
<ul id="asm_01_0036__ul146803318438"><li id="asm_01_0036__li1765991217433"><strong id="asm_01_0036__b0949204010510">Cookie</strong><p id="asm_01_0036__p14135174411452"><strong id="asm_01_0036__b351285221111">Regular expression</strong>: When the cookie of a request matches the configured regular expression, the request will be distributed to the grayscale version.</p>
</li><li id="asm_01_0036__li63161151174315"><strong id="asm_01_0036__b99941448155113">Header</strong><ul id="asm_01_0036__ul17661191910713"><li id="asm_01_0036__li111518584416"><strong id="asm_01_0036__b08691434192116">Full match</strong>: Only the header that fully matches the values you set can be used for service access. For example, if <strong id="asm_01_0036__b1697833709102415">Key</strong> is set to <strong id="asm_01_0036__b2061631694102415">User</strong> and <strong id="asm_01_0036__b781961949102415">Value</strong> is set to <strong id="asm_01_0036__b38182976102415">Internal</strong>, only requests whose headers contain <strong id="asm_01_0036__b1880166255102415">User</strong> with the value <strong id="asm_01_0036__b438277587102415">Internal</strong> are responded by the grayscale version.</li><li id="asm_01_0036__li1830122117716"><strong id="asm_01_0036__b1433176777102415">Regular expression</strong>: When the header of a request matches the configured regular expression, the request will be distributed to the grayscale version.<p id="asm_01_0036__p530216211679">You can create custom key and value. The value supports the full match and regular expression.</p>
</li></ul>
</li><li id="asm_01_0036__li0455205112192"><strong id="asm_01_0036__b6293190135211">Query</strong><ul id="asm_01_0036__ul122705534206"><li id="asm_01_0036__li62701453112015"><strong id="asm_01_0036__b052280152213">Full match</strong>: Only the query that fully matches the values you set can be used for service access. For example, if <strong id="asm_01_0036__b1874948701102415">Key</strong> is set to <strong id="asm_01_0036__b1903766040102415">User</strong> and <strong id="asm_01_0036__b1996971534102415">Value</strong> is set to <strong id="asm_01_0036__b2112203613102415">Internal</strong>, only requests whose queries contain <strong id="asm_01_0036__b433224998102415">User</strong> with the value <strong id="asm_01_0036__b566472174102415">Internal</strong> are responded by the grayscale version.</li><li id="asm_01_0036__li127075311208"><strong id="asm_01_0036__b1062257843102415">Regular expression</strong>: When the query of a request matches the configured regular expression, the request will be distributed to the grayscale version.<p id="asm_01_0036__p112701053182010">You can customize the key and value for filtering. The value supports the full match and regular expression.</p>
</li></ul>
</li><li id="asm_01_0036__li15787154419"><strong id="asm_01_0036__b649621384102415">Allowed OS</strong>: Select OSs that can access the grayscale version, including iOS, Android, Windows, and macOS.</li><li id="asm_01_0036__li526131604411"><strong id="asm_01_0036__b2030726272102415">Allowed Browser</strong>: Select browsers that can access the grayscale version, including Chrome and Internet Explorer.</li><li id="asm_01_0036__li1630402520442"><strong id="asm_01_0036__b1968871174102415">Traffic management YAML</strong>: The rule YAML is automatically generated based on the configured parameters.</li></ul>
</li></ul>
<div class="note" id="asm_01_0036__note197321798815"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="asm_01_0036__p10999132611241">A traffic policy based on request content is valid only for the entry service that is directly accessed. If you want the traffic policy to be applied to all services, the header information of HTTP requests needs to be transferred in the service code.</p>
<p id="asm_01_0036__p3184131564415">For example, if you configured a grayscale policy based on the request content for service <strong id="asm_01_0036__b960115943102415">reviews</strong> and did not transfer the HTTP request header information in the service code, the grayscale policy will not take effect when you send requests to service <strong id="asm_01_0036__b910678144102415">productpage</strong>.</p>
<p id="asm_01_0036__p8184815194414">The reason is that when the <strong id="asm_01_0036__b13915193132120">productpage</strong> service calls the <strong id="asm_01_0036__b1592293112212">reviews</strong> service, the header information of the HTTP request you sent to <strong id="asm_01_0036__b99231931132113">productpage</strong> will be lost. As a result, the <strong id="asm_01_0036__b20926133182113">reviews</strong> service receives a request without the header information. The grayscale policy will not take effect.</p>
</div></div>
</p></li><li id="asm_01_0036__li17696734191613"><span>Click <span class="uicontrol" id="asm_01_0036__uicontrol7839138133516"><b>Deliver Policy</b></span>.</span><p><p id="asm_01_0036__p1375153681612">It takes several seconds for a grayscale policy to take effect. You can view the traffic monitoring of the service and the health monitoring of the original version and grayscale version.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="asm_01_0034.html">Grayscale Release</a></div>
</div>
</div>