<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aliaksandr Shulyak on Medium]]></title>
        <description><![CDATA[Stories by Aliaksandr Shulyak on Medium]]></description>
        <link>https://medium.com/@alexshulyak?source=rss-f5caba28f43c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-vGfOITuRPFy9O-iTVEdeA.jpeg</url>
            <title>Stories by Aliaksandr Shulyak on Medium</title>
            <link>https://medium.com/@alexshulyak?source=rss-f5caba28f43c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 23:02:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexshulyak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is Load Average in linux?]]></title>
            <link>https://medium.com/@alexshulyak/what-is-load-average-in-linux-6468224e1e67?source=rss-f5caba28f43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6468224e1e67</guid>
            <category><![CDATA[load-average]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[systems-engineering]]></category>
            <dc:creator><![CDATA[Aliaksandr Shulyak]]></dc:creator>
            <pubDate>Wed, 03 Jun 2020 16:33:15 GMT</pubDate>
            <atom:updated>2020-06-03T16:33:15.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DGURzyI18Afa6Jb8_l0Vg.jpeg" /></figure><p>Many of us saw those three numbers in any way</p><pre>Load average: 0.11 0.15 0.23</pre><p>So what they mean and how can you interpret them?</p><p>In the most common explanation these three number show you average system load calculated for a 1, 5, and 15 min. Actually it’s not exactly 1,5,15 min, but I will explain it a bit later.</p><p>And what exactly do these numbers mean?</p><p>The load average in Linux is an average number of processes that are in the execution queue which are marked as running or uninterruptible.</p><p>Is it becoming more clear? Let’s continue.</p><p>In the real world these three numbers it’s not a load from 1, 5 and 15 min. They are numerous constants which are used to calculate exponentially-damped moving sums of a five second average.</p><p>You can check their definition in Linux kernel sources here: <a href="https://github.com/torvalds/linux/blob/master/include/linux/sched/loadavg.h"><em>linux/include/linux/sched/loadavg.h</em></a></p><pre>#define FSHIFT    11          /* nr of bits of precision */<br>#define FIXED_1   (1&lt;&lt;FSHIFT) /* 1.0 as fixed-point */<br>#define LOAD_FREQ (5*HZ+1)    /* 5 sec intervals */<br>#define EXP_1     1884        /* 1/exp(5sec/1min) as fixed-point */<br>#define EXP_5     2014        /* 1/exp(5sec/5min) */<br>#define EXP_15    2037        /* 1/exp(5sec/15min) */</pre><p>Originally these principles were borrowed from TENEX system and you can find them here: <a href="https://github.com/PDP-10/tenex">https://github.com/PDP-10/tenex</a></p><p>I mentioned that these numbers include uninterruptible processes. So what are they and why are they uninterruptible? They are a part of process code that wants to be free from interrupt system signals blocked I/O and some other locks. So that means that load average numbers now depend not only on the exact CPU load but also on the disk I/O load sub-system as well.</p><p>Another important aspect of understanding the load average in Linux is to know how it calculates in relation to multi-core/multi-processor systems.</p><ul><li>Multi-core processor — single socket with multiple cores.</li><li>Multi-processor system — a single system with multiple sockets for processors. Of course, each processor can include multiple cores.</li><li>Hyper-threading — when one physical core takes additional tasks while idle and appears in the system as a separated logic core. The logical core also appears in load-average numbers.</li></ul><pre># You can check the number of cores using the following methods as an example<br>➜  ~ nproc<br>1<br>➜  ~ lscpu <br>~~~<br>CPU(s):              1<br>~~~<br>Thread(s) per core:  1<br>Core(s) per socket:  1<br>Socket(s):           1<br>~~~</pre><p>You can read lots of articles that told us that your ration between load average and number of CPUs should not be more than 1.0 However, in many different cases this may be a wrong approach to assessment of your system load. Because of the reasons listed above that are included in load average numbers, it is more suited for a relative assessment of every single system and you need to determine your thresholds based on your long-term metric records.</p><p>So overall a system load in Linux is a complex number which represents the overall pressure on a system and not on a particular resource. It measures the number of executable threads and those waiting in the queue because of CPU/Disk I/O /uninterruptible locks. So it is a total number of threads that are not idle at the moment.</p><p>What can you actually learn at a glance from load average numbers?</p><ul><li>If the load average for <strong>1</strong> minute is <strong>greater</strong> than for <strong>5</strong> and <strong>15</strong> min — the load <strong>increases</strong>.</li><li>If the load average for <strong>1</strong> minute is <strong>lesser</strong> than for <strong>5</strong> and <strong>15</strong> min — the load <strong>decreases</strong></li><li>If the load average is <strong>equal</strong> to <strong>0.0 </strong>— the system is in the <strong>idle</strong>.</li></ul><p>How can you take a look at the load average of the Linux system?</p><p>There are some options:</p><pre># The first one is to take the output from /proc/loadavg. It&#39;s a system file which stores in virtual file system /proc/<br>➜  ~ cat /proc/loadavg<br>0.13 0.18 0.17 1/256 17449</pre><pre># The first three numbers it&#39;s load average numbers.<br># The second one is two numbers divided by a slash. The first of them is the current count of executable processes and the second one is the total number of running processes in a system.<br># And the third one is the latest allocated PID</pre><pre>--------------------------------------------------------------------</pre><pre># The second option to get load average values is to use uptime<br>➜  ~ uptime<br>13:56:28 up 19:30,  1 user,  load average: 0.14, 0.13, 0.15</pre><pre>--------------------------------------------------------------------</pre><pre># And the third option is side tools as top/htop/glances and etc.<br>➜  ~ top<br>load average: 0.04, 0.10, 0.14</pre><p>Documentation used to prepare this article:</p><ul><li><a href="https://tools.ietf.org/html/rfc546">RFC 546</a> standart</li><li><a href="https://github.com/torvalds/linux/blob/master/kernel/sched/loadavg.c">loadavrg.c</a></li><li><a href="https://www.helpsystems.com/resources/guides/unix-load-average-part-1-how-it-works">Unix Average how it works</a></li><li><a href="https://github.com/PDP-10/tenex">TENEX Github</a></li><li><a href="https://serverfault.com/questions/471100/linux-load-averages-and-hyperthreads">Questions on serverfault</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6468224e1e67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VSCode extensions which might be useful for DevOps]]></title>
            <link>https://medium.com/@alexshulyak/vscode-extensions-which-might-be-useful-for-devops-d8ed200ce37b?source=rss-f5caba28f43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ed200ce37b</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[extension]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Aliaksandr Shulyak]]></dc:creator>
            <pubDate>Tue, 02 Jun 2020 15:15:35 GMT</pubDate>
            <atom:updated>2020-06-02T15:15:35.543Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJpaDNCVcqoLyHv32LnpUQ.jpeg" /></figure><p>Within the last few years, VSCode became a universal and flexible editor for any kind of development. What I really like about this editor, that with all plugins it might become a completed IDE for golang, Python, DevOps tooling code and etc. and everything will be in one place. It might be a bit heavy for the computing resources of your dev machine but it worth it.</p><p>So as many others I prepared yet another article about VS Code extensions which might be useful for you. But it’s only about DevOps tooling, as it’s might be too various in one article :)</p><ol><li><em>Docker</em> extension from <em>Microsoft</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIf_IID-4EgLZ3rWDCdbfQ.png" /></figure><p>Includes snippets, Dockerfile, and Docker-compose files syntax highlighting as well as some extra functionality. You have the ability to run/build/manage your images within a context menu or using VS Code commands. As well as you have access to a list of your resources and for example inspect options.</p><p>2. <em>Kubernetes</em> extension from <em>Microsoft</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wf2qddpfpj6unDBBXU2vZA.png" /></figure><p>Really useful thing if you don’t use k9s (I will write a separate article about it) and you would like to have integration of your IDE with everything you using. Some basic functionality: manifest editing, port forwarding, dashboard access, terminal attach and etc.</p><p>3. <em>Kubernetes Support</em> extension from <em>ipedrazas</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_-_fttU9tIWsjSl3tlCcQ.png" /></figure><p>Lot’s of default code snippets for Kubernetes manifests.</p><p>4. <em>GitLens</em> extension from <em>Eric Amodio</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-qlxafasepEN06Lmjh0CQ.png" /></figure><p>Awesome extension to have visual access to your Git processes and workflow. Very useful for big projects.</p><p>5. <em>Vagrant</em> extension from <em>Baptist BENOIST</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUkojafbBm9WoBStNaGx5A.png" /></figure><p>Number of snippets and commands for VS Code to control local vagrant machines.</p><p>6. <em>Systemd-unit-file</em> extension from <em>coolbear</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rG6Fh0S0zmYRTdwgVwrj8A.png" /></figure><p>Very simple well named extension which make a syntax highlighting for systemd service files.</p><p>7. <em>Better TOML</em> extension from <em>bungcip</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_IaxJ4tawqd4vtpfkkQMg.png" /></figure><p>If you like to use TOML format for configuration that’s perfext extension to have formatter and syntax highlight.</p><p>8. <em>PostgreSQL</em> extension from <em>Chris Kolkman</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4U_2ph9J4mrW2fuT5WGMw.png" /></figure><p>The lovely extension which gains to your interface to work with the Postgres database. You can perform some small queries and check DB availability and structure. For sure it’s less functional in comparison to full IDE such as JetBrains DataGrip.</p><p>Can’t say that it’s TRULY DEVOPS TOOLS but they are useful in day to day task :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ed200ce37b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helm(ed) Jenkins for  k8s in details]]></title>
            <link>https://medium.com/@alexshulyak/helm-ed-jenkins-for-k8s-in-details-6b286a3a894f?source=rss-f5caba28f43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b286a3a894f</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Aliaksandr Shulyak]]></dc:creator>
            <pubDate>Thu, 28 May 2020 11:40:19 GMT</pubDate>
            <atom:updated>2020-05-28T11:59:09.654Z</atom:updated>
            <content:encoded><![CDATA[<h3>Helm(ed) Jenkins for k8s in details</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HRhYYgYohECxQytKs1jXTw.jpeg" /></figure><p>Someday on one of my previous projects, I used to create quite a complicated automated system based on Jenkins helm repository. And that time I spent a lot to understand most of the helm configuration fields and figure out how they work.</p><p>So today I want to share with you as detailed as possible “guide” for Jenkins helm repository with examples where it’s possible and where I know something. Where I don’t have experience — I will provide links to relevant documentation so you can faster understand what you need to do with it.</p><p>This story was written on the basis of the official stable helm chart: <a href="https://github.com/helm/charts/tree/master/stable/jenkins">link</a>. However, at the end of the year 2020 common helm chart become deprecated and you will need this chart somewhere on the Jenkins website. I take all variables from official documentation, so the order of them is the same as in the main table.</p><p>Section 1: Common variables</p><pre># Checks for deprecated values used<br>checkDeprecation: true</pre><p>As far as I understand this option introduced in v1.0.0 of the chart to check if the variable is deprecated and notify you to make migration smoother.</p><pre># Override the cluster name for FQDN resolving<br>clusterZone: &quot;cluster.local&quot;</pre><p>If you have different from default name of the cluster — it’s useful to specify this variable to have correct internal domain name resolving.</p><pre># Override the resource name prefix<br>nameOverride: &quot;jenkins&quot;</pre><p>Simply if for some reason you want to name your resources somehow different.</p><pre># Override the full resource names<br>fullnameOverride: jenkins-{release-name}</pre><p>Useful in case you want to use your own name pattern for all resources.</p><pre># Override the deployment namespace<br>namespaceOverride: &quot;jenkins-namespace&quot;</pre><p>If you want to place all your Jenkins resources into a separate namespace.</p><p>Section 2: Jenkins master variables</p><pre># Jenkins master name<br>componentName: &quot;jenkins-master&quot;</pre><p>Just a rename option for your Jenkins master component. It might be useful if you create per-team Jenkins instances.</p><pre># Master image name<br>image: &quot;jenkins/jenkins&quot;</pre><p>You can use your own private repository with your own built Jenkins image. For example — for security reasons.</p><pre># Master image tag<br>tag: &quot;lts&quot;</pre><p>Specify the tag for your image. For example — to prevent unexpected upgrades your Jenkins master.</p><pre># Master image pull policy<br>imagePullPolicy: &quot;Always&quot;</pre><p>Image pull policy for Kubernetes — you can refer this link for more details: <a href="https://kubernetes.io/docs/concepts/containers/images/">https://kubernetes.io/docs/concepts/containers/images/</a></p><pre># Master image pull secret<br>imagePullSecretName: someSecret</pre><p>Specify Kubernetes secret name with values in docker format — more details available here: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/">https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/</a></p><pre>#Disable use of remember me<br>disableRememberMe: false</pre><p>Disable “remember me” option for Jenkins login page.</p><pre># Set Number of executors<br>numExecutors: 0<br># Set executor mode of the Jenkins node. Possible values are: NORMAL or EXCLUSIVE<br>executorMode: &quot;NORMAL&quot;</pre><p>Number of executors, additional documentation can be found using these two links (Jenkins cloudbees support portal): <a href="https://support.cloudbees.com/hc/en-us/articles/216456477-What-is-a-Jenkins-Executor-and-how-can-I-best-utilize-my-executors">link 1</a> and <a href="https://support.cloudbees.com/hc/en-us/articles/115002654991-Remoting-Best-Practices">link 2</a></p><pre># Yaml of the markup formatter to use<br>markupFormatter: plainText</pre><p>This parameter is for markup formatter for job descriptions. However, this value will be ignored if <em>enableRawHtmlMarkupFormatter</em> is equal to <em>true</em>.</p><pre># Append Jenkins labels to the master<br>customJenkinsLabels: []</pre><p>Add some extra labels to Jenkins config file.</p><pre># Use basic security<br>useSecurity: true</pre><p>Using this variable you can disable Jenkins auth and expose the main page.</p><pre># Custom Security Realm<br># Example usage:<br>securityRealm: |-<br>      &lt;securityRealm class=&quot;hudson.security.LegacySecurityRealm&quot;/&gt;</pre><p>This is a very important and useful variable. Using that parameter you able to specify you auth for example to LDAP protocol and integrate with your domain controller. This parameter might be overridden with JCasC.</p><p>Here you can find additional information about it: <a href="https://javadoc.jenkins.io/hudson/security/class-use/SecurityRealm.html">link</a>. And availaible options you can check with your authorisation plugin.</p><pre># Jenkins custom authorisation strategy<br>authorizationStrategy: |-<br>    &lt;authorizationStrategy class=&quot;hudson.security.FullControlOnceLoggedInAuthorizationStrategy&quot;&gt;<br>     &lt;denyAnonymousReadAccess&gt;true&lt;/denyAnonymousReadAccess&gt;<br>    &lt;/authorizationStrategy&gt;</pre><p>One of the options to implement your own authorization strategy. It might be overridden with JCasC.</p><pre># Custom deployment lables<br>deploymentLabels:<br>    testLabe: value<br># Custom service lables<br>serviceLabels: {}<br># Custom pods lables<br>podLabels: {}</pre><p>Customization labels for Kubernetes deployment/service/pod.</p><pre># Admin username (and password) created as a secret if useSecurity is true<br>adminUser: &quot;admin&quot;<br>adminPassword: &quot;password&quot;</pre><p>If these variables are unspecified default user will be admin and the password will be random.</p><pre># Custom Jenkins home path<br>jenkinsHome: &quot;/var/jenkins_home&quot;</pre><pre># Custom Jenkins reference path<br>jenkinsRef: &quot;/usr/share/jenkins/ref&quot;</pre><p>Might be very useful in case you try to attach home folders from different instance or make a shared one or for some reasons you need to specify the non-default path.</p><pre># Email address for the administrator of the Jenkins instance<br>jenkinsAdminEmail: &quot;example@email.org&quot;</pre><p>Useful in case of you have configured mail server.</p><pre># Jenkins pod resources config<br>resources:<br>  requests:<br>    cpu: 50m<br>    memory: 256Mi<br>  limits:<br>    cpu: 2000m<br>    memory: 4096Mi</pre><p>Just an example of how might looks like resource configuration for Jenkins master.</p><pre># Environment variables for Init Container<br>initContainerEnv:<br>  - name: http_proxy<br>    value: &quot;http://192.168.64.1:3128&quot;</pre><pre># Environment variables for Jenkins Container<br>containerEnv: &quot;&quot;</pre><p>Some additional environment variables for startup and container runtime. Example usage for HTTP proxy.</p><pre>#Enable pod security context (must be true if runAsUser or fsGroup are set)<br>usePodSecurityContext: true<br># uid that jenkins runs with<br>runAsUser: 0<br># uid that will be used for persistent volume<br>fsGroup: 0</pre><p>You can find additional documentation about about kubernetes security context <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/">here</a>.</p><pre># Aliases for IPs in /etc/hosts<br>hostAliases:<br>  - ip: 192.168.1.1<br>    hostnames:<br>      - router.local</pre><p>In case of you need to hardcode some extra ip address — domain records.</p><pre># Service annotations<br>serviceAnnotations:<br>  service.beta.kubernetes.io/aws-load-balancer-internal: &quot;true&quot;</pre><pre># Service type<br>serviceType: &quot;ClusterIP&quot;</pre><pre># k8s service clusterIP<br>clusterIP: &quot;10.0.0.10&quot;</pre><pre># k8s service port<br>servicePort: 8080</pre><pre># k8s target port<br>targetPort: 8080</pre><pre># k8s node port<br>nodePort: 8080</pre><p>This block of variables provides you additional flexibility to configure Kubernetes services. For more references, you can check this <a href="https://kubernetes.io/docs/concepts/services-networking/service/">link</a>.</p><pre># Enable k8s liveness and readiness probes<br>healthProbes: true</pre><pre># Set the timeout for the liveness probe<br>healthProbesLivenessTimeout: 5</pre><pre># Set the timeout for the readiness probe<br>healthProbesReadinessTimeout: 5</pre><pre># Set how often (in seconds) to perform the liveness probe<br>healthProbeLivenessPeriodSeconds: 10</pre><pre># Set how often (in seconds) to perform the readiness probe<br>healthProbeReadinessPeriodSeconds: 10</pre><pre># Set the failure threshold for the liveness probe<br>healthProbeLivenessFailureThreshold: 5</pre><pre># Set the failure threshold for the readiness probe<br>healthProbeReadinessFailureThreshold: 3</pre><pre># Set the initial delay for the liveness probe<br>healthProbeLivenessInitialDelay: 90</pre><pre># Set the initial delay for the readiness probe<br>healthProbeReadinessInitialDelay: 60</pre><p>Kubernetes probes configuration. Here you can check more details about it: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/">link</a>.</p><pre># Listening port for agents<br>slaveListenerPort: 50000</pre><pre># Host port to listen for agents<br>slaveHostPort: 5000</pre><pre># Defines how to expose the slaveListener service<br>slaveListenerServiceType: &quot;ClusterIP&quot;</pre><pre># Static IP for the slaveListener LoadBalancer<br>slaveListenerLoadBalancerIP: &quot;x.x.x.x&quot;</pre><pre># Namespace in which the Kubernetes agents should be launched<br>slaveKubernetesNamespace: agent-namespace</pre><pre># The name of the pod template to use for providing default values<br>slaveDefaultsProviderTemplate:</pre><pre># Overrides the Kubernetes Jenkins URL<br>slaveJenkinsUrl: &quot;http://jenkins.example&quot;</pre><pre># Overrides the Kubernetes Jenkins tunnel<br>slaveJenkinsTunnel:</pre><pre># The connection timeout in seconds for connections to Kubernetes API. Minimum value is 5.<br>slaveConnectTimeout: 5</pre><pre># The read timeout in seconds for connections to Kubernetes API. Minimum value is 15.<br>slaveReadTimeout: 15</pre><pre># Disabled agent protocols<br>disabledAgentProtocols:<br>  - &quot;JNLP-connect&quot;<br>  - &quot;JNLP2-connect&quot;</pre><p>A various number of fields to configure your Agent connectivity. Mostly used in case you have your Agents behind load-balancers.</p><pre>csrf:<br>  defaultCrumbIssuer:<br>    # Enable the default CSRF Crumb issuer<br>    enabled: true<br>    # Enable proxy compatibility<br>    proxyCompatability: true</pre><p>This is a list of options to configure CSRF (Cross Site Request Forgery) protection. You can find more info here: <a href="https://support.cloudbees.com/hc/en-us/articles/219257077-CSRF-Protection-Explained">link</a>.</p><pre># Enable CLI over remoting<br>cli: false</pre><p>Enable or disable Jenkins CLI. Quite useful if you have some additional automation on top of deployment scripts.</p><pre># Allowed inbound IP addresses<br>loadBalancerSourceRanges: &quot;0.0.0.0/0&quot;</pre><pre># Optional fixed external IP<br>loadBalancerIP: &quot;1.2.3.4&quot;</pre><p>LoadBalancerSourcesRange is a list of allowed CIDR values, which are combined with ServicePort to set allowed inbound rules on the security group assigned to the master load balancer.</p><pre># Additional Java options forwarder<br>javaOpts: &gt;<br>   -Dcom.sun.management.jmxremote.port=4000<br>   -Dcom.sun.management.jmxremote.authenticate=false<br>   -Dcom.sun.management.jmxremote.ssl=false</pre><pre># Open a port, for JMX stats<br>jmxPort: 4000</pre><p>Optionally you able to configure <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html">jmx port</a>, but in that case you also need to be able to forward few options to java startup cli.</p><pre># Open extra ports, for other uses<br>extraPorts:<br>  - name: ExtraPort<br>    port: 8443</pre><p>If you need to open extra ports for some purposes — that the parameter which you need to use.</p><pre># Replace init scripts and config w/ ConfigMap on boot<br>overwriteConfig: false</pre><p>By default, the configMap is only used to set the initial config the first time that the chart is installed. Setting <em>overwriteConfig</em> to <em>true</em> will overwrite the Jenkins config with the contents of the configMap every time the pod starts. This will also overwrite all init scripts.</p><pre>ingress:<br>  # Enables ingress<br>  enabled: false<br>  # Ingress API version<br>  apiVersion: extensions/v1beta1<br>  # Ingress host name<br>  hostName: &quot;Jenkins.example&quot;<br>  # Ingress annotations<br>  annotations: <br>    kubernetes.io/ingress.class: nginx<br>  # Ingress lables<br>  labels: {}<br>  # Ingress path<br>  path: &quot;/jenkins&quot;<br>  # Override for the default Ingress paths<br>  paths: []<br>  # Ingress TLS configuration<br>  tls:<br>    - secretName: Jenkins.local<br>      hosts:<br>        - &quot;jenkins.local&quot;</pre><p>You can enable included to helm chart ingress and provide additional customization. Or you can use your own, but in this case, you need to disable included one.</p><pre>backendconfig:<br>  # Enables backendconfig<br>  enabled: false<br>  # backendconfig API version<br>  apiVersion: extensions/v1beta1<br>  # backendconfig name<br>  name:<br>  # backendconfig annotations<br>  annotations: {}<br>  # backendconfig labels<br>  labels: {}<br>  # backendconfig spec<br>  spec: {}</pre><p>If you’re running on GKE and need to configure a backendconfig to finish ingress setup. More information you can find <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/backendconfig">here</a>.</p><pre>route:<br>  # Enables openshift route<br>  enabled: false<br>  # Route annotations<br>  annotations: {}<br>  # Route labels<br>  labels: {}<br>  # Route path<br>  path: {}</pre><p>Openshift routes. To be honest, I never worked with Openshift, but I find useful documentation for this block <a href="https://docs.openshift.com/container-platform/4.4/networking/routes/route-configuration.html">here</a>.</p><pre># Set protocol for JenkinsLocationConfiguration.xml -- Set to https if master.ingress.tls<br>jenkinsUrlProtocol: http</pre><p>Web access protocol configuration.</p><pre>JCasC:<br>  # Wheter Jenkins Configuration as Code is enabled or not<br>  enabled: false<br>  # Enables default Jenkins configuration via configuration as code          plugin<br>  defaultConfig: false<br>  # List of Jenkins Config as Code scripts<br>  configScripts:<br>    welcome-message: |<br>      jenkins:<br>      systemMessage: Welcome to our CI\CD server.  This Jenkins is configured and managed &#39;as code&#39;.</pre><p>Below is the implementation of Jenkins Configuration as Code. Add a key under configScripts for each configuration area, where each corresponds to a plugin or section of the UI. Each key (prior to | character) is just a label, and can be any value. Keys are only used to give the section a meaningful name. The only restriction is they may only contain RFC 1123 \ DNS label characters: lowercase letters, numbers, and hyphens. The keys become the name of a configuration yaml file on the master in <em>/var/jenkins_home/casc_configs</em> (by default) and will be processed by the Configuration as Code Plugin. The lines after each |become the content of the configuration yaml file. The first line after this is a JCasC root element, eg jenkins, credentials, etc. Best reference you can find in your installed jenkins using this url pattern <em>https://&lt;jenkins_url&gt;/configuration-as-code/reference</em>.</p><pre># enables configuration done via XML files<br>enableXmlConfig: true</pre><p>This variable enables the configuration of Jenkins directly with XML config files. However, if you will use the JCasC plugin listed above, you need to set the value of this variable to <em>false</em>.</p><pre>sidecars:<br>  # Jenkins Config as Code auto-reload settings<br>  configAutoReload:<br>    # Jenkins Config as Code auto-reload settings (Attention: rbac needs to be enabled otherwise the sidecar can&#39;t read the config map)<br>    enabled: false<br>    # Image which triggers the reload<br>    image: kiwigrid/k8s-sidecar:0.1.20<br>    # Environment variables for the Jenkins Config as Code auto-reload container<br>    env:<br>      - name: REQ_TIMEOUT<br>        value: &quot;30&quot;<br>  # Configures additional sidecar container(s) for Jenkins master<br>  sidecars: []</pre><p>Sidecar containers allow you re-load your configuration on a fly-in case of you use the JCasC plugin.</p><pre># List of Jenkins init scripts<br>initScripts:<br>  - |<br>    print &#39;adding global pipeline libraries, register properties, bootstrap jobs...&#39;</pre><p>Allow you to send Groovy scripts to Jenkins on startup.</p><pre># Kubernetes secret that contains a &#39;credentials.xml&#39; file<br>credentialsXmlSecret: jenkins-credentials<br># Kubernetes secret that contains &#39;secrets&#39; files<br>secretsFilesSecret: jenkins-secrets</pre><p>Kubernetes secrets which contains listed files.</p><pre># Jenkins XML job configs<br>jobs: <br>  test: |-<br>    &lt;&lt;xml here&gt;&gt;</pre><p>Jenkins XML jobs to provision.</p><pre># Replace jobs w/ ConfigMap on boot<br>overwriteJobs: false</pre><p>By default, the Jobs Map is only used to set the initial jobs the first time<br>that the chart is installed. Setting <em>overwriteJobs</em> to <em>true</em> will overwrite<br>the Jenkins jobs configuration with the contents of Jobs every time the pod starts.</p><pre># List of Jenkins plugins to install. If you don&#39;t want to install plugins set it to []<br>installPlugins:<br>  - kubernetes:1.18.2<br>  - workflow-aggregator:2.6<br>  - credentials-binding:1.19<br>  - git:3.11.0<br>  - workflow-job:2.33</pre><pre># Overwrite installed plugins on start.<br>overwritePlugins: false<br># Keep plugins that are already installed in the master image.<br>overwritePluginsFromImage: true</pre><p>The section provides you the ability to configure plugins which will be automatically installed on Jenkins during the provision.</p><pre># Enable HTML parsing using<br>enableRawHtmlMarkupFormatter: false</pre><p>Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with <em>ghprb</em> plugin. The plugin is not installed by default, so you need to install it in plugins section.</p><pre># List of groovy functions to approve<br>scriptApproval:<br>  - &quot;method groovy.json.JsonSlurperClassic parseText java.lang.String&quot;<br>  - &quot;new groovy.json.JsonSlurperClassic&quot;</pre><p>Used to approve a list of groovy functions in pipelines used the script-security plugin. Can be viewed under <em>/scriptApproval</em>.</p><pre># Node labels for pod assignment<br>nodeSelector: {}</pre><pre># Toleration labels for pod assignment<br>tolerations: []</pre><p>You can set node <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector">selector</a> and <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature">tolerations</a> here.</p><pre># Kubernetes scheduler name<br>schedulerName: &quot;sc-a&quot;</pre><p>If you use <a href="https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/">multiple scheduler</a>, you can choose which one should be used for jenkins deployment.</p><pre># Set TerminationGracePeriodSeconds<br>terminationGracePeriodSeconds: 10</pre><p>More information about container lifecycle <a href="https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/">here</a>.</p><pre># Root Uri Jenkins will be served on<br>jenkinsUriPrefix: &quot;/team1&quot;</pre><p>In case, for example, you have few Jenkinses behind one urn, you can split them up with URI prefix.</p><pre>#Custom init-container specification in raw-yaml format<br>customInitContainers:<br>- name: custom-init<br>  image: &quot;alpine:3.7&quot;<br>  imagePullPolicy: Always<br>  command: [ &quot;uname&quot;, &quot;-a&quot; ]</pre><p>Just if you need for some reason have any additional startup/init container.</p><pre># Lifecycle specification for master-container<br>lifecycle:<br>  postStart:<br>    exec:<br>      command:<br>       - &quot;uname&quot;<br>       - &quot;-a&quot;</pre><p>Regular Kubernetes lifecycle commands available for configuration. For example for some webhooks on startup or termination.</p><pre>prometheus:<br>  # Enables prometheus service monitor<br>  enabled: false<br>  # Additional labels to add to the service monitor object<br>  serviceMonitorAdditionalLabels: {}<br>  # Custom namespace for serviceMonitor<br>  serviceMonitorNamespace: monitoring<br>  # How often prometheus should scrape metrics<br>  scrapeInterval: &quot;60s&quot;<br>  # The endpoint prometheus should get metrics from<br>  scrapeEndpoint: &quot;/prometheus&quot;<br>  # Array of prometheus alerting rules<br>  alertingrules: []<br>  # Additional labels to add to the prometheus rule object<br>  alertingRulesAdditionalLabels: {}</pre><p>Section to configure additional prometheus instance to collect metrics from you Jenkins master. If Prometheus enable — you need to add Prometheus plugin to your plugin list. Alerting rules example configuration you can find <a href="https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/">here</a>.</p><pre>httpsKeyStore:<br>  # Enables https keystore on jenkins master<br>  enabled: false<br>  # Name of the secret that already has ssl keystore<br>  jenkinsHttpsJksSecretName: &quot;&quot;<br>  # Http Port that Jenkins should listen on along with https, it also serves liveness and readiness probs port. When https keystore is enabled servicePort and targetPort will be used as https port<br>  httpPort: 8081<br>  # Path of https keystore file<br>  path: &quot;/var/jenkins_keystore&quot;<br>  # Jenkins keystore filename which will apear under   master.httpsKeyStore.path<br>  fileName: &quot;keystore.jks&quot;<br>  # Base64 ecoded Keystore content. Keystore must be converted to base64 then being pasted here<br>  jenkinsKeyStoreBase64Encoded: &quot;&quot;</pre><p>This is a configuration for Jenkins key store and internal SSL connection config. But it will store as a Kubernetes secret.</p><pre>networkPolicy:<br>  # Enable creation of NetworkPolicy resources.<br>  enabled: false<br>  # NetworkPolicy ApiVersion<br>  apiVersion: &quot;networking.k8s.io/v1&quot;<br>  internalAgents:<br>    # Allow internal agents (from the same cluster) to connect to master. Agent pods would be filtered based on PodLabels.<br>    allowed: false<br>    # A map of labels (keys/values) that agents namespaces must have to be able to connect to master.<br>    namespaceLabels: {}<br>  externalAgents:<br>    # The IP range from which external agents are allowed to connect to master.<br>    ipCIDR: &quot;172.17.0.0/16&quot;<br>    # A list of IP sub-ranges to be excluded from the whitelisted IP range.<br>    except:<br>      - 172.17.1.0/24</pre><p>Creation of Kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/">network policy</a> resource.</p><pre>rbac:<br>  # Whether RBAC resources are created<br>  create: true<br>  # Whether the Jenkins service account should be able to read   Kubernetes secrets<br>  readSecrets: false</pre><p>Install default RBAC roles and bindings. More information available <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/">here</a>.</p><pre>serviceAccount:<br>  # name of the ServiceAccount to be used by access-controlled   resources<br>  # name: autogenerated by default<br>  # Configures if a ServiceAccount with this name should be created<br>  create: true<br>  # Configures annotation for the ServiceAccount<br>  annotations: {}</pre><pre>serviceAccountAgent:<br>  # name of the agent ServiceAccount to be used by access-controlled   resources<br>  # name: autogenerated by default<br>  # Configures if an agent ServiceAccount with this name should be created<br>  create: false<br>  # Configures annotation for the agent ServiceAccount<br>  annotations: {}</pre><p>Create service accounts for both master and agents.</p><p>Section 3: Agent configuration variables</p><pre># Always pull agent container image before build<br>alwaysPullImage: false<br># Append Jenkins labels to the agent<br>customJenkinsLabels: {}<br># Enable Kubernetes plugin jnlp-agent podTemplate<br>enabled: true</pre><pre># Agent image name<br>image: jenkins/jnlp-slave<br># Agent image pull secret<br>imagePullSecretName: &quot;some-kubernetes-secret&quot;<br># Agent image tag<br>tag: &quot;3.27-1&quot;</pre><p>Pretty much the same as we have for Jenkins master configuration.</p><pre># Agent privileged container<br>privileged: false</pre><p>This is quite an important parameter which allows you to build docker images and etc. But it’s important for security — as it’s forward docker.sock or docker TCP connection into the pod.</p><pre># Resources allocation (Requests and Limits)<br>resources:<br>  requests:<br>    cpu: 512m<br>    memory: 512Mi<br>  limits:<br>    cpu: 512m<br>    memory: 512Mi</pre><p>Configuration of pod resource limits.</p><pre># Additional volumes<br>volumes:<br>  - type: ConfigMap<br>    configMapName: myconfigmap<br>    mountPath: /var/myapp/myconfigmap</pre><p>Allow you to attach extra volumes to agent pod.</p><pre># Environment variables for the agent Pod<br>envVars:<br> - name: PATH<br>   value: /usr/local/bin</pre><p>If you need to pass some extra variable to agent pod.</p><pre># Executed command when side container starts<br>command:<br># Arguments passed to executed command<br>args: &quot;${computer.jnlpmac} ${computer.name}&quot;</pre><p>Executed command when side container gets started</p><pre># Side container name in agent<br>sideContainerName: &quot;jnlp&quot;<br># Allocate pseudo tty to the side container<br>TTYEnabled: false<br># Maximum number of agent<br>containerCap: 10</pre><p>Few well named parameters :)</p><pre># Allows the Pod to remain active for reuse<br>idleMinutes: 0<br># Timeout in seconds for an agent to be online<br>slaveConnectTimeout: 100</pre><p>Two quite important variables that allow you to keep for a sometime agent and not waste time on spin up for each job.</p><p>I hope this article helped you at least a bit :)<br>There is plenty of examples of how to use most of the available variable, but if you have any questions — let me know in comments or in messages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b286a3a894f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why DevOps “Top Tools” doesn’t make any sense]]></title>
            <link>https://medium.com/@alexshulyak/why-devops-top-tools-doesnt-make-any-sense-221fa0b2ae4c?source=rss-f5caba28f43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/221fa0b2ae4c</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[top-10]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devops-tool]]></category>
            <dc:creator><![CDATA[Aliaksandr Shulyak]]></dc:creator>
            <pubDate>Thu, 21 May 2020 17:09:11 GMT</pubDate>
            <atom:updated>2020-05-21T17:09:11.994Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q6HcwxTM_Gp-wi5RXlrRSw.jpeg" /></figure><p>It is always strange for me to see any kind of “Top 10 DevOps tools”/”DevOps tools which you MUST use” articles.</p><p>I understand that it mostly marketing articles or just because people like to read some “TOP 10 OF SOMETHING SOMETHING”, but someone promotes those articles seriously and it’s bad. Let’s think about why it is.</p><p>First of all, you work for the business. The business has it’s own goals and resources and business shouldn’t care about your favorites. If your company has well-established infrastructure and technical stack — you shouldn’t suggest or change everything just because you faced a new fancy tool that looks nice and promotes itself as innovative-something-something. Or you came to a new company and realized that their technical stack is far from your dream-tech-stack.</p><p>For example when I moved to one of the past projects, it has a Chef based system configuration. Am I like a Chef and enjoy ruby code and don’t have any concerns about stability? — No!</p><p>Should I have suggested that everyone must migrate to Ansible because I enjoy working with this tool?! — No!</p><p>First, you need to consider business goals, understand resources of your team and company and then if you have strong concerns about some parts of architecture you should design alternate solution find pros and cons of it, understand how much resources to you need to integrate this solution and if it’s more valuable for business than the existing solution — start to present it to your TeamLead/Product owners and etc.</p><p>If you work for a company and it’s not your company and you are not a CTO (and actually in this case you need to think even more) — you need to consider business goals first and understand the value of your suggestion, not do frantic movements and statements that “we need to change everything”.</p><p>And honestly? There are no “best DevOps tools”, there are better solution for each particular case based on all possible variables that you have. You can have your own preferences but applicable only to your own lab environment. In a commercial company — first, think about the best solution for a case and how it might be implemented.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=221fa0b2ae4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>