{"id":308040,"date":"2020-08-05T15:01:18","date_gmt":"2020-08-05T15:01:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308040"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308040","title":{"rendered":"Canary \u0434\u0435\u043f\u043b\u043e\u0439 \u0441 Jenkins-X, Istio \u0438 Flagger"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/513918\/\">\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c!<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e \u041a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0445 \u0440\u0435\u043b\u0438\u0437\u0430\u0445 \u0432 Kubernetes \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0416\u0435\u043b\u0430\u044e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0431\u044b\u043b \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"ispolzovanie-resheniya-jenkins-x-dlya-vypolneniya-canary-deploya-v-klastere-kubernetes\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f Jenkins X \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Canary \u0434\u0435\u043f\u043b\u043e\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes<\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5m\/wf\/za\/5mwfzagr2wecdvcrus2tbq7nbyg.jpeg\">  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"v-etom-cikle\">\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435:<\/h3>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/512766\/\">Canary Deployment \u0447\u0435\u0440\u0435\u0437 GitlabCI + GitOps\/Manual Approach<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/513118\/\">Canary Deployment \u0447\u0435\u0440\u0435\u0437 Argo Rollouts<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/513578\/\">Canary Deployment \u0441 Istio<\/a><\/li>\n<li>(\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f)<\/li>\n<\/ol>\n<p>  <\/p>\n<h2 id=\"chto-my-budem-delat-zdes\">\u0427\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c?<\/h2>\n<p>  <\/p>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Jenkins X k8s \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 JenkinsX+Flagger+Istio \u0441anary deployment \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u044d\u0442\u0430 \u0441\u0432\u044f\u0437\u043a\u0430 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"canary-deployment\">Canary Deployment<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0447\u0438\u0442\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/512766\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a>, \u0433\u0434\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u043b\u0438 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0441anary deployment \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b Kubernetes.<\/p>\n<p>  <\/p>\n<h3 id=\"jenkins-x\">Jenkins X<\/h3>\n<p>  <\/p>\n<p>\u0418 \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u044f \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u0432\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Jenkins X. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043d\u0435\u043c <a href=\"https:\/\/itnext.io\/k8s-native-jenkins-x-and-tekton-pipelines-e2b5a61a1d22?source=friends_link&amp;sk=92a653ec0f914366bd7b13404941d9b0\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"istio\">Istio<\/h3>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043c\u044b \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Istio. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043d\u0435\u043c <a href=\"https:\/\/itnext.io\/kubernetes-istio-simply-visually-explained-58a7d158b83f?source=friends_link&amp;sk=378ed718d2d6cfd09e6d23c7616cba81\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/513578\/\">\u0447\u0430\u0441\u0442\u044c 3<\/a>, \u0433\u0434\u0435 \u043c\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u0438 Canary deployment \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Istio, \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"flagger\">Flagger<\/h3>\n<p>  <\/p>\n<blockquote><p>Flagger \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Kubernetes, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441anary deployments \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Istio, Linkerd, App Mesh, NGINX, Contour \u0438\u043b\u0438 Gloo routing \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 Prometheus \u0434\u043b\u044f canary-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. Canary-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431-\u0445\u0443\u043a\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. (<a href=\"https:\/\/github.com\/weaveworks\/flagger\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>)<\/p><\/blockquote>\n<p>  <\/p>\n<h2 id=\"sozdaem-testovuyu-infrastrukturu-i-prilozhenie\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 Jenkins X <code>jx<\/code> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Kubernetes, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f Github \u0438 \u043f\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"jenkins-x-k8s-klaster\">Jenkins X k8s \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c Jenkins X \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Gcloud:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx create cluster gke -n jenkinsx --machine-type n1-standard-4<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0438\u043f \u201cServerless Jenkins X Pipelines with Tekton\u201d \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 Github \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443. \u042d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0432\u0430 Github \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f stage \u0438 production \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (addons):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx create addon istio jx create addon flagger jx create addon prometheus<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0441 Istio (\u0443 \u043c\u0435\u043d\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>istio_requests_total<\/code> \u0432 Prometheus), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Istio \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">istioctl manifest generate --set values.kiali.enabled=true --set values.tracing.enabled=true --set values.grafana.enabled=true --set values.prometheus.enabled=true &gt; istio.yaml kubectl -f istio.yaml install<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Flagger \u0447\u0435\u0440\u0435\u0437 <code>jx<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043d\u0435\u0434\u0440\u0438\u0442 Istio sidecar \u0432 \u043f\u043e\u0434\u044b namespace <code>jx-production<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl get ns -L istio-injection<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 label <code>istio-injection: enabled<\/code> \u043a \u043b\u044e\u0431\u043e\u043c\u0443 namespace, \u0432 \u043f\u043e\u0434\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e Istio sidecar \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d.<\/p>\n<p>  <\/p>\n<h3 id=\"test-app--quickstart\">Test App \/ Quickstart<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0434\u0435\u043c \u043f\u043e\u043a\u0430 <code>jxing-nginx-ingress-controller<\/code> \u0432 namespace <code>kube-system<\/code> \u043f\u043e\u043b\u0443\u0447\u0438\u0442 External IP. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx create quickstart --project-name python-test<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f <code>python-http<\/code>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e canary deployment \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 HTTP endpoints \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043d\u0443\u0436\u0434.<\/p>\n<p>  <\/p>\n<p>Jenkins X \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 Github \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u042f \u0438\u0437\u043c\u0435\u043d\u0438\u043b <code>do_GET<\/code> \u043c\u0435\u0442\u043e\u0434 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c <code>app.py<\/code>, \u0447\u0442\u043e \u0431\u044b \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b \u0442\u0435\u043a\u0441\u0442, \u0430 \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">def do_GET(self):  self.send_response(200)  self.send_header('Content-type','text\/html')  self.end_headers()  # Send the html message  output = 'v1'  self.wfile.write(output.encode('utf-8'))  return<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"okruzheniya\">\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>Jenkins X \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0440\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (<code>jx get env<\/code>):<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o6\/dd\/dj\/o6dddj0ugntvhnp9i0fbf4c9u0w.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0433\u0434\u0435 \u0432\u0441\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0447\u0435\u0440\u0435\u0437 GitOps. \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437 Helm Charts \u0438 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f + \u0432\u0435\u0440\u0441\u0438\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0438\u0445, \u0447\u0435\u0440\u0435\u0437 require.yaml.<\/p>\n<p>  <\/p>\n<h3 id=\"nachalnyy-deployment\">\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 Deployment<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e quickstart \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e (<code>jx import<\/code>), \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u0432\u0435\u0440\u0441\u0438\u044f 0.0.1 \u0432 stage \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e PROMOTE \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 Auto \u0434\u043b\u044f stage \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0445 \u043a\u0430\u043a Pull Request \u0432 stage \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Jenkins X \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u0441\u043b\u0438\u0432\u0430\u0435\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f Pipeline \u0447\u0435\u0440\u0435\u0437:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> jx get activities -w<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a pipelines \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx get applications<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dr\/xb\/d3\/drxbd3r1ppvjq19gwvwatuhreyw.png\">  <\/p>\n<pre><code class=\"plaintext\">                        Jenkins X \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Semver<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f <code>0.0.1<\/code> \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0435\u043d\u0430 \u043d\u0430 <code>stage<\/code>, \u0432 <code>prod<\/code> \u043f\u043e\u043a\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl -n jx-staging get all       # shows the app kubectl -n jx-production get all    # shows nothing<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a stage \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 URL:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/io\/lg\/s1\/iolgs1kdfqncbhrmoiiradhgdo0.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"peremeschenie-v-production\">\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 production<\/h3>\n<p>  <\/p>\n<p>(\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0432 production \u044f \u0432\u043d\u0435\u0441 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e <code>0.0.2<\/code>)<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 (<code>promote<\/code>) \u0432 production \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u201c\u0434\u0435\u043f\u043b\u043e\u0439\u201d. \u0427\u0435\u0440\u0435\u0437 <code>jx get env<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e production \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx promote --version 0.0.2 --env production<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 Pull Request \u0432 Jenkins X production Github \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0418 \u0441\u0435\u0439\u0447\u0430\u0441 <code>jx get applications<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e 0.0.2 \u043d\u0430 stage \u0438 \u0442\u0430\u043a \u0436\u0435 \u043d\u0430 production:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n6\/c8\/b7\/n6c8b7ln_xrsky23hwwvjprswie.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 production \u0447\u0435\u0440\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 <code>requirements.yaml<\/code> \u0444\u0430\u0439\u043b\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 prod \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"vklyuchenie-canary-dlya-prod-okruzheniya\">\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Canary \u0434\u043b\u044f prod \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0435\u043f\u043b\u043e\u0439 \u0432 prod \u0438\u043b\u0438 stage \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f canary, \u043d\u043e \u0447\u0435\u0440\u0435\u0437 rolling-rollouts Kubernetes.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Python, Jenkins X \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u0447\u0435\u0440\u0435\u0437 \u0445\u0435\u043b\u043c-\u0447\u0430\u0440\u0442. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b <code>charts\/APP_NAME\/values.yaml,<\/code> \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b Flagger Canary:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"># Canary deployments # If enabled, Istio and Flagger need to be installed in the cluster canary:  enabled: false  progressDeadlineSeconds: 60  canaryAnalysis:    interval: &quot;1m&quot;    threshold: 5    maxWeight: 60    stepWeight: 20    # WARNING: Canary deployments will fail and rollback if there is no traffic that will generate the below specified metrics.    metrics:      requestSuccessRate:        threshold: 99        interval: &quot;1m&quot;      requestDuration:        threshold: 1000        interval: &quot;1m&quot;  # The host is using Istio Gateway and is currently not auto-generated  # Please overwrite the `canary.host` in `values.yaml` in each environment repository (e.g., staging, production)  host: acme.com<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 canary deployment \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 3 \u043c\u0438\u043d\u0443\u0442\u044b, \u043f\u043e 1 \u043c\u0438\u043d\u0443\u0442\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433: 20%, 40%, 60%.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441anary \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0447\u0435\u0440\u0435\u0437 <code>canary: enabled: false<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e Jenkins X \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u044f \u0438 \u0434\u0435\u043b\u0430\u044e \u0434\u043b\u044f production \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f <code>environment-jenkinsx-production<\/code>. \u041c\u043e\u0436\u043d\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 Python, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 Helm charts \u0438 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 <code>requirements.yaml<\/code>. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 <code>env\/values.yaml<\/code> \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <code>environment-jenkinsx-production<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">... jenkinsx-istio-canary-python-test:  canary:    enabled: true    host: jenkinsx-istio-canary-python-test.35.204.67.7.nip.io<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043e\u043c\u0435\u043d <code>xxx.IP_ADDRESS.nip.io<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u043b\u0435\u043d \u043d\u0430 IP_ADDRESS. \u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438.<\/li>\n<li><code>host<\/code>: \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u043d\u0435\u043c \u0445\u043e\u0441\u0442\u0430 Istio, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041d\u0430\u0439\u0434\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 Istio \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e: <code>kubectl -n istio-system get svc<\/code>. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 <code>host:<\/code>, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 External IP \u0448\u043b\u044e\u0437\u0430 Istio.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 production \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 Jenkins X, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0447\u0435\u0440\u0435\u0437:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> jx get activity<\/code><\/pre>\n<p>  <\/p>\n<p>\u0416\u0434\u0435\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 activities \u0441\u0442\u0430\u043d\u0443\u0442 successful. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c Istio VirtualService \u0438 Gateway:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl -n jx-production get virtualservices.networking.istio.io,gateways.networking.istio.io<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0431\u044b\u043b \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0435\u043d, \u043e\u043d \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0441anary, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u043d \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f. (<a href=\"https:\/\/jenkins-x.io\/docs\/managing-jx\/tutorials\/progressive-delivery\/\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>)<\/p><\/blockquote>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432 production \u0447\u0435\u0440\u0435\u0437 Istio \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jenkinsx-istio-canary-python-test.35.204.67.7.nip.io:<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/re\/il\/1d\/reil1drva5_fnsz15yzoltrqw2i.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"otkroem-flagger-grafana-dashboard\">\u041e\u0442\u043a\u0440\u043e\u0435\u043c Flagger Grafana Dashboard<\/h3>\n<p>  <\/p>\n<p>Flagger \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 Grafana \u0432 namespace istio-system, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl port-forward -n istio-system service\/flagger-grafana 3000:80 # admin:admin<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wm\/uo\/tv\/wmuotvof7mai4-nxdsyt4ky87je.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<p>\u0412 Grafana \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 Istio Dashboard \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>namespace: <code>jx-production<\/code><\/li>\n<li>primary: <code>jx-jenkinsx-istio-canary-python-test-primary<\/code><\/li>\n<li>canary: <code>jx-jenkinsx-istio-canary-python-test-canary<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>Primary \u0438 canary \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f services. \u041e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0434\u0435\u043f\u043b\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 Canary \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0435\u043d.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>istio_requests_total<\/code>, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Istio \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 <code>jx<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"flagger-canary-workflow-i-analiz\">Flagger Canary Workflow \u0438 \u0410\u043d\u0430\u043b\u0438\u0437<\/h3>\n<p>  <\/p>\n<p>\u0412 Helm Chart \u0434\u043b\u044f Python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c (<a href=\"https:\/\/docs.flagger.app\/usage\/progressive-delivery\">\u0437\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0438\u0437 \u043d\u0438\u0445):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">canary:  enabled: false # false, but we set to true in prod env git repo  progressDeadlineSeconds: 60  canaryAnalysis:    interval: &quot;1m&quot;    threshold: 5    maxWeight: 60    stepWeight: 20    # WARNING: Canary deployments will fail and rollback if there is no traffic that will generate the below specified metrics.    metrics:      requestSuccessRate:        threshold: 99        interval: &quot;1m&quot;      requestDuration:        threshold: 1000        interval: &quot;1m&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. Flagger \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439.<br \/>  \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f Canary, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b Flagger:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl -n jx-production get canaries.flagger.app<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"vypolnenie-canary-deployment\">\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Canary Deployment<\/h2>\n<p>  <\/p>\n<h4 id=\"deploy-izmeneniy\">Deploy \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/h4>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code>app.py<\/code> \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 GET \u0437\u0430\u043f\u0440\u043e\u0441. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Pull Request \u0432 master-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e merge. Jenkins X \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 deploy \u043d\u0430 stage.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430 prod, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043d\u0430 stage. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043d\u0430 0.0.6 \u0432\u0435\u0440\u0441\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u0432\u043d\u0435\u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">jx promote --version 0.0.6 --env production<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0431\u043e\u0442\u044b Canary:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">kubectl -n jx-production get events --field-selector involvedObject.kind=Canary --sort-by='{.lastTimestamp}'<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"zapusk-canary-s-vesom-20\">\u0417\u0430\u043f\u0443\u0441\u043a Canary \u0441 \u0432\u0435\u0441\u043e\u043c 20%<\/h4>\n<p>  <\/p>\n<pre><code class=\"plaintext\">2m39s       Normal    Synced   Canary   Advance jx-jenkinsx-istio-canary-python-test.jx-production canary weight 20<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0439\u0441\u044f curl \u043d\u0430 production Istio endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e 20% \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ua\/te\/pn\/uatepnnaibj_-rdwywz-14fh2wi.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h4 id=\"canary-terpit-neudachu-nedostatochno-trafika\">Canary \u0442\u0435\u0440\u043f\u0438\u0442 \u043d\u0435\u0443\u0434\u0430\u0447\u0443 (\u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430)<\/h4>\n<p>  <\/p>\n<p>\u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 endpoint, \u0438\u043d\u0430\u0447\u0435 Canary \u0430\u043d\u0430\u043b\u0438\u0437 \u0447\u0435\u0440\u0435\u0437 Flagger \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043e\u0442\u043a\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m3\/y2\/bs\/m3y2bseceadoqcq3tc965rdorvq.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<p>Canary \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b.<\/p>\n<p>  <\/p>\n<h4 id=\"canary-s-vesom-40\">Canary \u0441 \u0432\u0435\u0441\u043e\u043c 40%<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, Flagger \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u0432\u0435\u0441 \u0434\u043e 40%:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3a\/s-\/cw\/3as-cw_bvo2vzhoy769q5_n49qa.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h4 id=\"canary-s-vesom-60\">Canary \u0441 \u0432\u0435\u0441\u043e\u043c 60%<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, Flagger \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043c \u0434\u043e 60%:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">60s         Normal    Synced   Canary   Advance jx-jenkinsx-istio-canary-python-test.jx-production canary weight 60<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cx\/vn\/ss\/cxvnssjuf1si7fzyvzsi0gjx4os.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h4 id=\"canary-proshel-uspeshno\">Canary \u043f\u0440\u043e\u0448\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e<\/h4>\n<p>  <\/p>\n<pre><code class=\"plaintext\">25s         Normal    Synced   Canary   Routing all traffic to primary<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kh\/yr\/am\/khyramsoyw3-yi4kpok8t3mwnei.png\">  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"itog\">\u0418\u0442\u043e\u0433<\/h3>\n<p>  <\/p>\n<p>Jenkins X \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Istio \u0438 Flagger \u0434\u043b\u044f Canary Deployments. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 Istio \u0447\u0435\u0440\u0435\u0437 jx create addon istio, \u0438 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u0441\u044f \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 Flagger, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u0441\u044c \u0441 Jenkins X \u0438 \u0441 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c \u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0443\u0447\u043d\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0439\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0431\u0435\u0437 Jenkins X, \u044f \u0434\u0443\u043c\u0430\u044e, \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f Flagger \u0438 Istio \u0434\u043b\u044f Canary Deployments \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u043e\u0449\u043d\u0430, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0438\u0437\u0443\u0447\u0430\u043b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"eschyoistochniki\">\u0415\u0449\u0451\/\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h3>\n<p>  <\/p>\n<p><u><a href=\"https:\/\/jenkins-x.io\/docs\/managing-jx\/tutorials\/progressive-delivery\/\">https:\/\/jenkins-x.io\/docs\/managing-jx\/tutorials\/progressive-delivery\/<\/a><\/u><\/p>\n<p>  <\/p>\n<p><u><a href=\"https:\/\/docs.flagger.app\/usage\/progressive-delivery\">https:\/\/docs.flagger.app\/usage\/progressive-delivery<\/a><\/u><\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/7eePqtxW7NM?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>(\u041f\u0440\u0438\u043c. \u043f\u0435\u0440. \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0442\u0440\u0435\u043d\u0430\u0436\u0435\u0440 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043a \u044d\u043a\u0437\u0430\u043c\u0435\u043d\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 CKAD \u2014 <a href=\"https:\/\/killer.sh\/\">https:\/\/killer.sh\/<\/a> )<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/513918\/\"> https:\/\/habr.com\/ru\/company\/nixys\/blog\/513918\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/513918\/\">\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c!<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e \u041a\u0430\u043d\u0430\u0440\u0435\u0435\u0447\u043d\u044b\u0445 \u0440\u0435\u043b\u0438\u0437\u0430\u0445 \u0432 Kubernetes \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0416\u0435\u043b\u0430\u044e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0431\u044b\u043b \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"ispolzovanie-resheniya-jenkins-x-dlya-vypolneniya-canary-deploya-v-klastere-kubernetes\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f Jenkins X \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Canary \u0434\u0435\u043f\u043b\u043e\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes<\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5m\/wf\/za\/5mwfzagr2wecdvcrus2tbq7nbyg.jpeg\">  <\/p>\n<hr>\n<p>  <\/p>\n<h3 id=\"v-etom-cikle\">\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435:<\/h3>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/512766\/\">Canary Deployment \u0447\u0435\u0440\u0435\u0437 GitlabCI + GitOps\/Manual Approach<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/513118\/\">Canary Deployment \u0447\u0435\u0440\u0435\u0437 Argo Rollouts<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/en\/company\/nixys\/blog\/513578\/\">Canary Deployment \u0441 Istio<\/a><\/li>\n<li>(\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f)<\/li>\n<\/ol>\n<p>  <\/p>\n<h2 id=\"chto-my-budem-delat-zdes\">\u0427\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c?<\/h2>\n<p>  <\/p>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Jenkins X k8s \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 JenkinsX+Flagger+Istio \u0441anary deployment \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u044d\u0442\u0430 \u0441\u0432\u044f\u0437\u043a\u0430 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-308040","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308040"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308040\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}