<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: coktopus</title>
    <description>The latest articles on DEV Community by coktopus (@coktopus).</description>
    <link>https://dev.to/coktopus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F377844%2F72f33300-6204-4b45-a58e-b4503990d296.png</url>
      <title>DEV Community: coktopus</title>
      <link>https://dev.to/coktopus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coktopus"/>
    <language>en</language>
    <item>
      <title>Candlestick with React &amp; Recharts</title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Mon, 05 Oct 2020 09:14:10 +0000</pubDate>
      <link>https://dev.to/coktopus/candlestick-with-react-recharts-g2g</link>
      <guid>https://dev.to/coktopus/candlestick-with-react-recharts-g2g</guid>
      <description>&lt;h2&gt;
  
  
  My experience with Recharts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Easy &amp;amp; quick&lt;/li&gt;
&lt;li&gt;Not too bulky&lt;/li&gt;
&lt;li&gt;Typescript support&lt;/li&gt;
&lt;li&gt;Lots of alternative way to overcome bugs&lt;/li&gt;
&lt;li&gt;And most important works well with pdf generations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Example
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvy3qt4hhlzx82gaaoa94.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvy3qt4hhlzx82gaaoa94.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Candlestick with error-bar. &lt;br&gt;
&lt;a href="https://jsfiddle.net/coktopus/kfpd0oL5/26/" rel="noopener noreferrer"&gt;jsfiddle&lt;/a&gt;&lt;/p&gt;

</description>
      <category>recharts</category>
      <category>react</category>
      <category>charts</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Automation of helm | step 5
</title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Mon, 28 Sep 2020 06:09:27 +0000</pubDate>
      <link>https://dev.to/coktopus/automation-of-helm-step-5-2j2h</link>
      <guid>https://dev.to/coktopus/automation-of-helm-step-5-2j2h</guid>
      <description>&lt;p&gt;To automate helm deployment we a need circleCI &lt;a href="https://github.com/coktopus-org/devOps/tree/project-for-video-dev/.circleci"&gt;configuration&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;BRANCH FILTER&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;workflow provides an option to filter the branches on which the circleCI pipeline runs: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DEV&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;workflows:
  main:
    jobs:
      - deploy:
          filters:
            branches:
              only: 
                [project-for-video-dev]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;PROD&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;workflows:
  main:
    jobs:
      - deploy:
          filters:
            branches:
              only: 
                [project-for-video-prod]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;ORBS&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://circleci.com/orbs/registry/orb/circleci/gcp-gke"&gt;gcp-gke&lt;/a&gt; is use to interact with kubernetes engine running in gcloud. It have commands like create-cluster, delete-cluster, and so on . we use rollout-image which updates the deployment with latest image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://circleci.com/orbs/registry/orb/circleci/gcp-gcr"&gt;gcp-gcr&lt;/a&gt; has  built in commands and &lt;a href="https://circleci.com/orbs/registry/orb/circleci/gcp-gcr#commands-gcr-auth"&gt;gcr-auth&lt;/a&gt; is use to authenticate the user and it will take the credentials from environment variables of circleCI.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the images stored in Google Container Registry is a perfectly working image and ready to deploy on environment . so replace the current tag running tag with the newer one in config.yml and push it to repository and merge it to the branch which triggers the circleCI pipeline and circleCI is already setup to run rollout-image command.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;EXAMPLE&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;dev branch contains &lt;a href="https://github.com/coktopus-org/devOps/blob/project-for-video-dev/.circleci/config.yml"&gt;config.yml&lt;/a&gt; file and all the values required to update dev. If any tag will merged to dev branch it will trigger the pipeline and update the dev-deployment with the newly merged tag of image and same in the case of other branches like prod.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;KUBERNETES PROCESS&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once the pipeline is triggered, the kubernetes run their blue-green deployment process and update the image with zero down time.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/j_zaUhNkqGA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cicd</category>
      <category>circleci</category>
      <category>helm</category>
    </item>
    <item>
      <title>Helm Explained | step 4 </title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Mon, 21 Sep 2020 05:48:32 +0000</pubDate>
      <link>https://dev.to/coktopus/helm-explained-step-4-1kh0</link>
      <guid>https://dev.to/coktopus/helm-explained-step-4-1kh0</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://helm.sh/"&gt;Helm&lt;/a&gt;&lt;/strong&gt; is a tool that streamlines installing and managing Kubernetes applications. Think of it like yum and homebrew for Kubernetes. Helm uses a packaging format called &lt;strong&gt;&lt;a href="https://helm.sh/docs/topics/charts/"&gt;charts&lt;/a&gt;&lt;/strong&gt;. A chart is a collection of files that describe a related set of Kubernetes resources. helm provide commands to install, run, update deployments and services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v5GrZE3Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byw738790ffx9eql3uvk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v5GrZE3Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/byw738790ffx9eql3uvk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;CONCEPT OF TILLERS&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Tiller, the server portion of Helm, typically runs inside of your Kubernetes cluster. But for development, it can also be run locally, and configured to talk to a remote Kubernetes cluster.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;In Helm v3 tiller is gone, and there is only Helm client.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;UNDERSTANDING HELM CHARTS&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Helm uses a packaging format called charts. A chart is a collection of files that describe a related set of Kubernetes resources. A single chart might be used to deploy something simple or a full web app stack with HTTP servers, databases, caches, and so on.&lt;/p&gt;

&lt;p&gt;Templates generate manifest files, which are YAML-formatted resource descriptions that Kubernetes can understand. We'll look at how templates are structured, how they can be used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k7xRSkYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/25bhuo18h5uua99fa8zd.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k7xRSkYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/25bhuo18h5uua99fa8zd.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To build a helm chart &lt;code&gt;helm create&lt;/code&gt; is the command. It creates the base template of YAML files and the base template can be modified in the way you want and you can find  Kubernetes-ready app at  &lt;strong&gt;&lt;a href="https://hub.helm.sh/"&gt;helm-hub&lt;/a&gt;&lt;/strong&gt; and can push you own created helm chart.&lt;/p&gt;

&lt;p&gt;Because we are using GKE helm and kubectl is already setup and ready to use otherwise, needs to setup by installing.  Deployment and Services of  Google Kubernetes Engine  are the features which are getting used in in the setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/coktopus-org/devOps/blob/project-for-video-prod/templates/deployment.yaml"&gt;development .yaml&lt;/a&gt; contains all the details of development and &lt;a href="https://github.com/coktopus-org/devOps/blob/project-for-video-prod/templates/service.yaml"&gt;service.yaml&lt;/a&gt; contains the details which expose the development and these files are getting their values like image, tag, and ports from &lt;a href="https://github.com/coktopus-org/devOps/blob/project-for-video-prod/values.yaml"&gt;value.yaml&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Few tags from *value.yaml&lt;/strong&gt;*&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;replicaCount: 1

image:
  repository: gcr.io/project-for-video/project-for-video
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: "latest"

containerPort: 3100
readinessProbe: /
livenessProbe: /

serviceAccount:
  name: "project-for-video-dev"

service:
  type: LoadBalancer
  port: 80
  targetPort: 3100
  nodePort: 30001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Namespaces&lt;/strong&gt; are intended for use in environments with many users spread across multiple teams, or projects. ... Namespaces are a way to divide cluster resources between multiple users (via resource quota). In future versions of Kubernetes, objects in the same **namespace will have the same access control policies by default.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;DEPLOY CHART TO GKE&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create helm chart with &lt;code&gt;helm create {name of chart}&lt;/code&gt; command&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Updates the values in &lt;code&gt;value.yaml&lt;/code&gt;. Update the name, image, image tag, container-port, service port, and internal port(target port)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Push it to the separate repository with separate branches like dev for dev-environment and prod for prod-environment&lt;br&gt;
&lt;strong&gt;&lt;a href="https://github.com/coktopus-org/devOps/tree/project-for-video-dev"&gt;prod branch&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KPjSiOGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n7np0jbdxvh6r5w2wava.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KPjSiOGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n7np0jbdxvh6r5w2wava.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/coktopus-org/devOps/tree/project-for-video-prod"&gt;dev branch&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dtv1EEAo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4bwjk8fwiyv4tbls5fl0.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dtv1EEAo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4bwjk8fwiyv4tbls5fl0.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create namespaces &lt;code&gt;kubectl create namespace {NAMESPACE}&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clone repository on cloud.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install chart.(from both branches dev and prod because the ports are different)  &lt;code&gt;helm install {name-of-chart} {address-of-chart} --namespace {NAMESPACE}&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test (postman to check the response)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;IMPORTANT COMMANDS&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt; &lt;code&gt;helm cerete {NAME OF CHART}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;helm delete {NAME OF CHART}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;helm update{NAME OF CHART}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;helm rollback&lt;/code&gt; &lt;em&gt;It only updates if there is any change in chart&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl get namespace --all&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl create namespace&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl delete namespace&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/CbDIX8X0RUk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>helm</category>
      <category>circleci</category>
      <category>cicd</category>
    </item>
    <item>
      <title>How circleCI fits into the setup | step 3</title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Mon, 14 Sep 2020 05:36:48 +0000</pubDate>
      <link>https://dev.to/coktopus/how-circleci-fits-into-the-setup-3177</link>
      <guid>https://dev.to/coktopus/how-circleci-fits-into-the-setup-3177</guid>
      <description>&lt;p&gt;CircleCI is a tool to handle the continuous integration and continuous development.&lt;/p&gt;

&lt;p&gt;Basically, Continuous Integration means multiple developers pushing small, frequent changes to a shared repository or ‘master’. They are integrating changes continuously, rather than periodically.&lt;/p&gt;

&lt;p&gt;Because the CD is a periodic process and CI is not the CD is getting handled separately.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How does CircleCI helps?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;CIrcleCI provides simple integration to code repositories like github and bitbucket&lt;/p&gt;

&lt;p&gt;It automatically run the circleCI pipeline when triggered by merges.&lt;/p&gt;

&lt;p&gt;Notification of everything happening on the attached circleCI's&lt;/p&gt;

&lt;p&gt;Build all jobs within one  circle.yml file.&lt;/p&gt;

&lt;p&gt;No need to manage server as every job will be started on new environment.&lt;/p&gt;

&lt;p&gt;Web UI is truly interactive and improving frequently&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;To attach repositories&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--12T1edna--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6af2drvbp05iapqykcg.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--12T1edna--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6af2drvbp05iapqykcg.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h5&gt;
  
  
  &lt;em&gt;Thanks to role set access control based on SSH key, because It is important when working as an organization.&lt;/em&gt;
&lt;/h5&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5OM1MTFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/smsdqanp2eal2r06ncnu.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5OM1MTFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/smsdqanp2eal2r06ncnu.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;circle.yml&lt;/code&gt; explained
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--omHF7EU7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/inyvct026rpck1xcvc9i.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--omHF7EU7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/inyvct026rpck1xcvc9i.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a folder '.cirlceci', create 'config.yml', and push it to the repository to active the triggers of repository attached to circleCI&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Points to understand&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;workflow (lines 30-37) - runs the jobs in a sequence&lt;/li&gt;
&lt;li&gt;jobs (lines 5-28) - The jobs level contains a collection of arbitrarily named children. build is the first named child in the jobs&lt;/li&gt;
&lt;li&gt;filter (lines 35-37) - pipeline only triggers when a request is merged in the listed branch&lt;/li&gt;
&lt;li&gt;build (lines 6-16) - Boilerplate kind of jobs&lt;/li&gt;
&lt;li&gt;steps (lines 20-28) - actual commands run in a sequence as it is declared&lt;/li&gt;
&lt;li&gt;orbs - explained below&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Importance of orbs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Orbs is reusable package of YAML configuration that contains repeated pieces of config into a single line of code. CircleCI orbs are open-source, shareable packages of reusable configuration elements, including &lt;a href="https://circleci.com/docs/2.0/reusing-config/#authoring-parameterized-jobs"&gt;jobs&lt;/a&gt;, &lt;a href="https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands"&gt;commands&lt;/a&gt;, and &lt;a href="https://circleci.com/docs/2.0/reusing-config/#executor"&gt;executors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;orbs save a lot of extra efforts and time. The &lt;a href="https://circleci.com/orbs/registry/"&gt;Orb Registry&lt;/a&gt; is an open repository of all published orbs&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In config.yml from line 12-21 all the steps are the command of the orbs.&lt;/p&gt;

&lt;p&gt;node, gcp-gcr, gcp-gke, helm are the orbs which are getting used in the setup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;gcp-gcr&lt;/code&gt; .  An orb for working with &lt;a href="https://cloud.google.com/container-registry"&gt;Google Container Registry&lt;/a&gt; . &lt;code&gt;gcr/gcr-auth&lt;/code&gt; is authentication to google container registry and it fetch the credentials from circleCI environment variable. Environment variable will not get exposed throughout, the execution of pipeline which indicate that sensitive data can be store inside.&lt;/p&gt;

&lt;h4&gt;
  
  
  Environment Variables
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Abk2IdYN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xe4ibvadzsll09xz7l90.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Abk2IdYN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xe4ibvadzsll09xz7l90.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The target of this part of setup is to store all the unique tags of images in google container registry  with the help of &lt;code&gt;CIRCLE_SHA1&lt;/code&gt; which is unique commit id and those tags were further use to update the deployment.&lt;/p&gt;

&lt;p&gt;video link is there for the whole implementation&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/43-JQ5xuk0A"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>helm</category>
      <category>circleci</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Understanding Docker step-2</title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Sun, 06 Sep 2020 08:10:57 +0000</pubDate>
      <link>https://dev.to/coktopus/understanding-docker-20n4</link>
      <guid>https://dev.to/coktopus/understanding-docker-20n4</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Explain&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Docker is all about containerization. It is an open-source project used to run containerized applications.&lt;/p&gt;

&lt;p&gt;Containers are isolated platform in which applications run independently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BcFRB9FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cnutrywi4wyg7faqsyz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BcFRB9FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cnutrywi4wyg7faqsyz7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the dependencies, npms, environment variables, network ports or anything required to run the application can be added to the container with the help of Dockerfile to run the docker images which is the build image of the application.&lt;/p&gt;

&lt;p&gt;The application running in the container can be accessed from outside the container if exposed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:11.8.0-alpine&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; */usr/src/app*&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; *package.json* *.*&lt;/span&gt;

&lt;span class="k"&gt;RUN *&lt;/span&gt;npm&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;install&lt;/span&gt;&lt;span class="k"&gt;*&lt;/span&gt;

&lt;span class="k"&gt;copy&lt;/span&gt;&lt;span class="s"&gt; *.* *.*&lt;/span&gt;

&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; *3100*&lt;/span&gt;

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; "node" "server.js"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Dockerfile is a synchronized set of command written in an easy-to-understand syntax that includes the instructions to build a Docker image.&lt;/p&gt;

&lt;p&gt;Dockerhub is a public repository and can be used to pull and push images publicly. There are plenty of official images like node. Many private repository/registries are available and GCR is the one which is being used in this series.&lt;/p&gt;

&lt;p&gt;To build the image:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build ${url of dockerfile}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;To expose the application running in the container, a mapping of inter-port and external port is required.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker run [OPTIONS] ${internal-port}:${external-port} ${IMAGE ID}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;After building the image, image id will be available in images list.:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oFe4hq0d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/p668xlx9sg9efsaixzm7.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oFe4hq0d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/p668xlx9sg9efsaixzm7.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running the container, container id will be available:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NQ9vAcYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lz0wz88qqny5cxnvvbiw.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NQ9vAcYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lz0wz88qqny5cxnvvbiw.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Few docker commands
&lt;/h4&gt;

&lt;p&gt;'docker ps' -  list of running container&lt;/p&gt;

&lt;p&gt;'docker' - list of images&lt;/p&gt;

&lt;p&gt;'docker run' -  to run the image&lt;/p&gt;

&lt;p&gt;'docker rm' - to remove resource image/container&lt;/p&gt;

&lt;p&gt;'docker build' - to build for dockerfile&lt;/p&gt;

&lt;p&gt;&lt;em&gt;video of complete setup and implementation of docker&lt;/em&gt;&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/u34-4hybknY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;For Gcloud setup --&amp;gt; &lt;a href="https://www.youtube.com/watch?v=A-3yY594Oko&amp;amp;t=27s"&gt;https://www.youtube.com/watch?v=A-3yY594Oko&amp;amp;t=27s&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>kubernetes</category>
      <category>helm</category>
      <category>circleci</category>
    </item>
    <item>
      <title>CICD in 5 steps with circle CI &amp; helm</title>
      <dc:creator>coktopus</dc:creator>
      <pubDate>Fri, 28 Aug 2020 14:38:15 +0000</pubDate>
      <link>https://dev.to/coktopus/cicd-in-5-steps-with-circle-ci-helm-33ii</link>
      <guid>https://dev.to/coktopus/cicd-in-5-steps-with-circle-ci-helm-33ii</guid>
      <description>&lt;p&gt;CICD itself is enormous, so we just cover those section which is &lt;br&gt;
sufficient to maintain the production deployment of a basic application.&lt;/p&gt;

&lt;p&gt;CICD is the process of continuous integration and continuous delivery which means automating all the steps involved right from merging the code to updating the running environment with that code.&lt;/p&gt;

&lt;p&gt;This setup was created to manage the deployments of my first side project and after completing and implementing the pipeline I just realized that the setup is a short and effective solution which makes me motivates to write a blog.&lt;/p&gt;
&lt;h4&gt;
  
  
  The series has 5 steps which are interlinked with each other.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/sdk/gcloud" rel="noopener noreferrer"&gt;Gcloud&lt;/a&gt; setup ☁️&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; setup 🚢&lt;/li&gt;
&lt;li&gt;Automatic build docker and push to &lt;a href="https://gcr.io/" rel="noopener noreferrer"&gt;google container registry&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Deploy &lt;a href="https://helm.sh/" rel="noopener noreferrer"&gt;helm&lt;/a&gt; charts 📋&lt;/li&gt;
&lt;li&gt;Automate the update deployment process 💻&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;
  
  
  &lt;strong&gt;Setup gcloud&lt;/strong&gt;
&lt;/h4&gt;
&lt;h5&gt;
  
  
  &lt;em&gt;Important points&lt;/em&gt;
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Cloud is free for a year🆓&lt;/li&gt;
&lt;li&gt;Google Kubernetes Engine automatically creates VM instances.💻&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpz304i2t4aoncd3foyqq.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpz304i2t4aoncd3foyqq.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google Cloud projects form the basis for creating, enabling, and using all Google Cloud services including managing APIs, enabling billing, adding and removing collaborators, and managing permissions for Google Cloud resources.&lt;/p&gt;

&lt;p&gt;Creating a cluster is the primary step inside the project.&lt;br&gt;
Cluster is the set of one master node and multiple worker nodes that run the containerized applications.&lt;/p&gt;

&lt;p&gt;Master node runs the core resource controllers and inside the worker nodes, pod runs the containers which can be 1 or more that one.&lt;/p&gt;

&lt;p&gt;While setting up the cluster, one step will be of a machine set up in which OS image, CPU performance, and resource allocation have to be selected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5b7i9j0mscf84a8ntcqj.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5b7i9j0mscf84a8ntcqj.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the cluster's setup is completed the cloud is ready to deploy applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhku80v435yk703ejuqpv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhku80v435yk703ejuqpv.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The best feature of gcloud is that it provides the shell terminal in its UI, so no need to connect separately with puTTY.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi86eea33y4wilcr1s0gz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi86eea33y4wilcr1s0gz.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gcloud init&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;gcloud auth login&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 are the basic commands and reference video is attached for more details.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/A-3yY594Oko"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;TO BE CONTINUE...&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>circleci</category>
      <category>docker</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
