<?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[DevopSquare - Medium]]></title>
        <description><![CDATA[DevopSquare is a community dedicated to sharing the latest developments in technology, in-depth articles, case studies, and other events that provide us with valuable insights into the future of DevOps and IT. - Medium]]></description>
        <link>https://medium.com/devopssquare?source=rss----c02571413317---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DevopSquare - Medium</title>
            <link>https://medium.com/devopssquare?source=rss----c02571413317---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 07:32:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/devopssquare" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Create various resources on AWS using Terraform & GitHub Actions]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/devopssquare/create-various-resources-on-aws-using-terraform-github-actions-42c7763b025c?source=rss----c02571413317---4"><img src="https://cdn-images-1.medium.com/max/1024/1*YyR6GoyH5KMYkulqJ6oyIA.jpeg" width="1024"></a></p><p class="medium-feed-snippet">Integrating Terraform with GitHub Actions</p><p class="medium-feed-link"><a href="https://medium.com/devopssquare/create-various-resources-on-aws-using-terraform-github-actions-42c7763b025c?source=rss----c02571413317---4">Continue reading on DevopSquare »</a></p></div>]]></description>
            <link>https://medium.com/devopssquare/create-various-resources-on-aws-using-terraform-github-actions-42c7763b025c?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/42c7763b025c</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Dhruvin Soni]]></dc:creator>
            <pubDate>Tue, 17 Aug 2021 11:51:51 GMT</pubDate>
            <atom:updated>2021-08-17T11:51:51.868Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to run an ansible playbook using Jenkins?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/devopssquare/how-to-run-an-ansible-playbook-using-jenkins-191e2b349bff?source=rss----c02571413317---4"><img src="https://cdn-images-1.medium.com/max/700/0*OerPp928hQXbdzxm.png" width="700"></a></p><p class="medium-feed-snippet">What is Jenkins?</p><p class="medium-feed-link"><a href="https://medium.com/devopssquare/how-to-run-an-ansible-playbook-using-jenkins-191e2b349bff?source=rss----c02571413317---4">Continue reading on DevopSquare »</a></p></div>]]></description>
            <link>https://medium.com/devopssquare/how-to-run-an-ansible-playbook-using-jenkins-191e2b349bff?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/191e2b349bff</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Dhruvin Soni]]></dc:creator>
            <pubDate>Thu, 12 Aug 2021 07:47:12 GMT</pubDate>
            <atom:updated>2021-08-12T07:47:12.565Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Cloud build: Easy way to receive build notifications through Email]]></title>
            <link>https://medium.com/devopssquare/cloud-build-easy-way-to-receive-build-notifications-through-email-aed6768d2b20?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/aed6768d2b20</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[cloud-build]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Mukarram Ishaq]]></dc:creator>
            <pubDate>Tue, 10 Aug 2021 07:19:51 GMT</pubDate>
            <atom:updated>2021-08-10T07:19:51.261Z</atom:updated>
            <content:encoded><![CDATA[<p>Google Cloud build is a serverless CI/CD platform and it sends all build event updates, along with build metadata, to Pub/Sub on the cloud-builds topic. In this story, we’ll see how can we receive build notifications through email with the least possible number of steps.</p><h4>Prerequisites</h4><p>You must have the following items set up in your system:</p><ol><li><a href="https://cloud.google.com/sdk/docs/install">Google Cloud SDK</a></li><li><a href="https://docs.docker.com/engine/install/">Docker</a></li><li><a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">Git</a></li><li>An email account, of course!</li></ol><p>We’ll be using the <a href="https://github.com/mukarramishaq/cloud-build-notifications">cloud-build-notifications</a> repository to configure email notifications for build statuses. This repository uses the <a href="https://nodemailer.com/about/">nodemailer</a> library for SMTP and supports two types of SMTP authentications for emails by default:</p><ol><li>LOGIN (through Email addressand Password)</li><li>OAUTH2 (through Email address , Client ID , Client Secret and Refresh Token</li></ol><p>LOGIN type authentication is less secure and if you are going to use a Gmail account, you’ll have to allow “Less secure apps” explicitly.</p><p>OAUTH2 type authentication is very much secured and if any time your secret is compromised, just create a new one and invalidate the first one.</p><p>There is also a CUSTOM type authenticated supported by <a href="https://nodemailer.com/about/">nodemailer</a> but for that, you’ll have to write some code for it to work.</p><h4>Gcloud, Docker, Git, Action!</h4><p><strong>Step 1: Clone</strong></p><p>First clone this <a href="https://github.com/mukarramishaq/cloud-build-notifications">cloud-build-notifications</a> repository. It is for Google Cloud Build and currently supports the following recipient channels:</p><ol><li><a href="https://devopsquare.com/cloud-build-notifications-in-google-chat-317d277c5d4a">Google Chat room</a></li><li><a href="https://medium.com/@mukarramishaq189/cloud-build-easy-way-to-receive-build-notifications-through-email-aed6768d2b20">SMTP for emails</a></li></ol><p><strong>Step 2: Configure ENV variables</strong></p><p>Rename env.sample file to .env</p><p>Uncomment and update the values of the following ENV variables:</p><ol><li>PROJECT_NAME e.g “Whiteboard”.</li><li>SMTP_HOST e.g for Gmail its value is smtp.gmail.com.</li><li>SMTP_PORT e.g 465 for secure and 587 for not secure.</li><li>SMTP_AUTH_TYPE It can beLOGIN or OAUTH2</li><li>SMTP_AUTH_USER this is an email address through this the <a href="https://nodemailer.com/about/">nodemailer</a> will authenticate and send emails</li></ol><p>If SMTP_AUTH_TYPE is LOGIN , uncomment and update the value of SMTP_AUTH_LOGIN_PASS with the password of your email account</p><p>And if SMTP_AUTH_TYPE is OAUTH2 , uncomment and update the values of the following ENV variables:</p><ol><li>SMTP_AUTH_OAUTH2_CLIENT_ID</li><li>SMTP_AUTH_OAUTH2_CLIENT_SECRET</li><li>SMTP_AUTH_OAUTH2_REFRESH_TOKEN</li></ol><p>Now to configure the sender and recipients name and emails, uncomment and update the following ENV variables:</p><ol><li>EMAIL_FROM i.e sender of this email notification</li><li>EMAIL_TO a comma-separated list of recipients emails</li></ol><p>There are two more optional variables EMAIL_CC and EMAIL_BCC to configure a list of recipients as CC or BCC. Both these variables accept a comma-separated list of emails.</p><p><strong>Step 3: Run</strong></p><p>Give executable permissions to setup.sh file with the following command:</p><pre>chmod +x ./setup</pre><ol><li>Now the main command which will do all the hard work for you:</li></ol><pre>sh ./setup -p &lt;GOOGLE_PROJECT_NAME&gt; -l &lt;DEFAULT_LOCATION&gt;</pre><p>Replace &lt;GOOGLE_PROJECT_NAME&gt; with your own google project name and &lt;DEFAULT_LOCATION&gt; with your preferred location. Mine is us-central1 :P.</p><p>So, if your project on Google cloud is whiteboard and its preferred location is us-central1 then the above command will become:</p><pre>sh ./setup -p whiteboard -l us-central1</pre><p>That’s all to it. Wait for this command to end and whenever cloud build will come into action to process your build, you’ll receive build status emails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*_cH7jPc-vHFrSzkuJzcTxA.jpeg" /></figure><p>And suppose, you have 10 services configured with continuous integration and continuous deployment from 10 different repositories. And whenever cloud build will process any service, you’ll receive an email message with the subject &lt;Project Name&gt; | &lt;Repo Name&gt; | &lt;Branch Name&gt; | &lt;Build Status&gt; . And the email body will contain more information about the build.</p><p>This one setup will handle all your services CI/CD in one google cloud project.</p><p>That’s all</p><p>After running setup.sh the file, what APIs were enabled? what services were created? What topics and triggers were created? And how do they fit together? Read “<a href="https://medium.com/@mukarramishaq189/cloud-build-notifications-in-google-chat-part-2-7f9630e95d83">Cloud build notifications in Google Chat (Part-2)</a>”.</p><p>The <a href="https://github.com/mukarramishaq/cloud-build-notifications">cloud-build-notifications</a> repository (under MIT license) is new and currently, it supports Google Cloud Build for build events and <a href="https://devopsquare.com/cloud-build-notifications-in-google-chat-317d277c5d4a">Google Chat Room</a> and <a href="https://medium.com/@mukarramishaq189/cloud-build-easy-way-to-receive-build-notifications-through-email-aed6768d2b20">SMTP for emails</a> as a message channel. But this repository has an aim to supports all possible message channels in the future. And if you want to contribute to it, you are more than welcome. Just create an issue there and once after discussion it is final, you can work on it right away.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aed6768d2b20" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/cloud-build-easy-way-to-receive-build-notifications-through-email-aed6768d2b20">Cloud build: Easy way to receive build notifications through Email</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Host a Static website using AWS S3?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/devopssquare/how-to-host-a-static-website-using-aws-s3-8cb933702a16?source=rss----c02571413317---4"><img src="https://cdn-images-1.medium.com/max/2600/1*t1gedMuX09sHOfA38XNt9A.png" width="3584"></a></p><p class="medium-feed-snippet">Host a static website using AWS S3</p><p class="medium-feed-link"><a href="https://medium.com/devopssquare/how-to-host-a-static-website-using-aws-s3-8cb933702a16?source=rss----c02571413317---4">Continue reading on DevopSquare »</a></p></div>]]></description>
            <link>https://medium.com/devopssquare/how-to-host-a-static-website-using-aws-s3-8cb933702a16?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/8cb933702a16</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[static-websites]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Dhruvin Soni]]></dc:creator>
            <pubDate>Tue, 10 Aug 2021 07:19:24 GMT</pubDate>
            <atom:updated>2023-04-19T09:27:08.183Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How To Create Kubernetes Cluster With Containerd]]></title>
            <link>https://medium.com/devopssquare/how-to-create-kubernetes-cluster-with-containerd-90399ec3b810?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/90399ec3b810</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[containerd]]></category>
            <dc:creator><![CDATA[Mr.Zik]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:41 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:41.629Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>At the end of 2021 kubernetes (release v1.22) plans to end support with docker, as can be seen on the kubernetes website <a href="https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/">https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/</a></blockquote><p>Here we can use an alternative runtime container, namely<br>- CRI-O<br>- containerda<br>here I will show how to configure the Kubernetes cluster to use <em>containerd</em> as the container runtime<br>in this lab iam using 3 server as follows</p><p>my lab using 3 server as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*tGoAbDe1AGeJD7Iok7RoFw.png" /><figcaption>Server List</figcaption></figure><h3><strong>Step 1. Install and Configure Containerd</strong></h3><p>Do this configuration on all node</p><p>Setup host files so node can communicate each other with names</p><pre>sudo vi /etc/hosts</pre><pre>#Add the following list in the end of line<br>172.16.4.90 kubmaster.demo<br>172.16.4.91 kubworker1.demo<br>172.16.4.92 kubworker2.demo</pre><pre>#save and exit with :wq</pre><p>configure modules required by containerd</p><pre>sudo modprobe overlay<br>sudo modprobe br_netfilter<br>cat &lt;&lt;EOF | sudo tee /etc/modules-load.d/containerd.conf<br>overlay<br>br_netfilter<br>EOF</pre><p>Install containerd service</p><pre>sudo apt-get update<br>sudo apt-get install -y containerd</pre><p>Configure containerd to use systemd as cgroup driver</p><pre>sudo mkdir -p /etc/containerd<br>sudo containerd config default | sudo tee /etc/containerd/config.toml<br>sudo vi /etc/containerd/config.toml</pre><pre>#find the [plugins.&quot;io.containerd.grpc.v1.cri&quot;.containerd.runtimes.runc.options] section and change systemdcgroup to true</pre><pre>SystemdCgroup = true</pre><pre>#save and exit with :wq</pre><p>Restart and enable containerd service</p><pre>sudo systemctl restart containerd<br>sudo systemctl enable containerd</pre><p>Verify containerd configuration</p><pre>sudo containerd config dump</pre><h3>Step 2. install Kubernetes</h3><p>Do this configuration on all nodes</p><p>Configure sysctl</p><pre>cat &lt;&lt;EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf<br>net.bridge.bridge-nf-call-iptables  = 1<br>net.ipv4.ip_forward                 = 1<br>net.bridge.bridge-nf-call-ip6tables = 1<br>EOF</pre><pre>sudo sysctl --system</pre><p>Disable Swap</p><pre>sudo swapoff -a<br>sudo vi /etc/fstab</pre><pre>#comment swap disk<br>#/swap.img       none    swap    sw      0       0</pre><pre>#save and exit :wq</pre><p>Allow required port for kubernetes or Disable Firewall</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*wFMrKzVoFNWTeBxuB-YbEw.png" /></figure><pre>sudo ufw disable</pre><p>Setup iptables backend to use iptables-legacy</p><pre>sudo update-alternatives --config iptables</pre><pre>There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).</pre><pre>Selection    Path                       Priority   Status<br>------------------------------------------------------------<br>  0            /usr/sbin/iptables-nft      20        auto mode<br>* 1            /usr/sbin/iptables-legacy   10        manual mode<br>  2            /usr/sbin/iptables-nft      20        manual mode</pre><pre>Press &lt;enter&gt; to keep the current choice[*], or type selection number:</pre><p>Add kubernetes repository</p><pre>sudo wget <a href="https://packages.cloud.google.com/apt/doc/apt-key.gpg">https://packages.cloud.google.com/apt/doc/apt-key.gpg</a><br>sudo mv apt-key.gpg /etc/apt/trusted.gpg.d/</pre><pre>sudo cat &lt;&lt;EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list<br>deb <a href="https://apt.kubernetes.io/">https://apt.kubernetes.io/</a> kubernetes-xenial main<br>EOF</pre><pre>sudo apt update<br>sudo apt install -y kubeadm kubelet kubectl</pre><p>Enable kubelet service but dont start yet</p><pre>sudo systemctl enable kubelet</pre><h3>Step 3. Kubernetes Cluster Init</h3><p>Do this configuration only on master nodes</p><p>Initialize cluster using containerd as container runtime</p><pre>sudo kubeadm init --pod-network-cidr 192.168.0.0/16 --cri-socket /run/containerd/containerd.sock</pre><p>Note the final result cause we will use it for join worker nodes</p><pre>Your Kubernetes control-plane has initialized successfully!</pre><pre>To start using your cluster, you need to run the following as a regular user:</pre><pre>mkdir -p $HOME/.kube<br>  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>  sudo chown $(id -u):$(id -g) $HOME/.kube/config</pre><pre>Alternatively, if you are the root user, you can run:</pre><pre>export KUBECONFIG=/etc/kubernetes/admin.conf</pre><pre>You should now deploy a pod network to the cluster.<br>Run &quot;kubectl apply -f [podnetwork].yaml&quot; with one of the options listed at:<br>  <a href="https://kubernetes.io/docs/concepts/cluster-administration/addons/">https://kubernetes.io/docs/concepts/cluster-administration/addons/</a></pre><pre>Then you can join any number of worker nodes by running the following on each as root:</pre><pre>kubeadm join 172.16.4.90:6443 --token 7i34jm.q8enu8wxvfic9s8k \<br>        --discovery-token-ca-cert-hash sha256:202117e62f133323eff707919ec512eef466a59a29454c4ee320a0626ff42c05</pre><p>Create kubeconfig file to use kubectl command</p><pre>mkdir -p $HOME/.kube<br>sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>sudo chown $(id -u):$(id -g) $HOME/.kube/config</pre><h3>Step 4. Join Worker Nodes</h3><p>Do this configuration only on worker nodes</p><p>Paste kubeadm join from the previous result of cluster init and dont forget to use containerd as container runtime</p><pre>sudo kubeadm join 172.16.4.90:6443 --token 7i34jm.q8enu8wxvfic9s8k \<br>        --discovery-token-ca-cert-hash sha256:202117e62f133323eff707919ec512eef466a59a29454c4ee320a0626ff42c05 --cri-socket /run/containerd/containerd.sock</pre><h3>Step 5. Install Calico CNI</h3><p>Do this configuration on master nodes</p><p>install calico cni</p><pre>kubectl apply -f calico.yaml</pre><p>Verify pod status</p><pre>sysadmin@kubmaster:~$ kubectl get pods -n kube-system<br>NAMESPACE     NAME                                      READY   STATUS              RESTARTS   AGE<br>kube-system   calico-kube-controllers-d7c67954f-n5cms   0/1     ContainerCreating   0          74s<br>kube-system   calico-node-c888q                         0/1     PodInitializing     0          74s<br>kube-system   calico-node-llmjp                         0/1     PodInitializing     0          74s<br>kube-system   calico-node-lq8hc                         0/1     Running             0          74s<br>kube-system   coredns-558bd4d5db-4c7gz                  0/1     ContainerCreating   0          20m<br>kube-system   coredns-558bd4d5db-tg5t2                  0/1     ContainerCreating   0          20m<br>kube-system   etcd-kubmaster.demo                       1/1     Running             0          20m<br>kube-system   kube-apiserver-kubmaster.demo             1/1     Running             0          20m<br>kube-system   kube-controller-manager-kubmaster.demo    1/1     Running             0          20m<br>kube-system   kube-proxy-d7cqg                          1/1     Running             0          20m<br>kube-system   kube-proxy-m7pfg                          1/1     Running             1          17m<br>kube-system   kube-proxy-q596m                          1/1     Running             0          5m<br>kube-system   kube-scheduler-kubmaster.demo             1/1     Running             0          20m</pre><p>Wait until all pod running</p><pre>sysadmin@kubmaster:~$ kubectl get pods -n kube-system<br>NAME                                      READY   STATUS    RESTARTS   AGE<br>calico-kube-controllers-d7c67954f-n5cms   1/1     Running   0          2m31s<br>calico-node-c888q                         1/1     Running   0          2m31s<br>calico-node-llmjp                         1/1     Running   0          2m31s<br>calico-node-lq8hc                         1/1     Running   0          2m31s<br>coredns-558bd4d5db-4c7gz                  1/1     Running   0          21m<br>coredns-558bd4d5db-tg5t2                  1/1     Running   0          21m<br>etcd-kubmaster.demo                       1/1     Running   0          21m<br>kube-apiserver-kubmaster.demo             1/1     Running   0          21m<br>kube-controller-manager-kubmaster.demo    1/1     Running   0          22m<br>kube-proxy-d7cqg                          1/1     Running   0          21m<br>kube-proxy-m7pfg                          1/1     Running   1          18m<br>kube-proxy-q596m                          1/1     Running   0          6m17s<br>kube-scheduler-kubmaster.demo             1/1     Running   0          21m<br>sysadmin@kubmaster:~$</pre><p>Verify node status and cluster info</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*kqpZtIREWZsUVUKo7i1kSg.png" /><figcaption>verify cluster</figcaption></figure><p><em>Thats all the basic configuration cluster using containerd as container runtime, in next article i will share how to configure multimaster kubernetes cluster for high availability using containerd as a container runtime.</em></p><p><em>cheers</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90399ec3b810" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/how-to-create-kubernetes-cluster-with-containerd-90399ec3b810">How To Create Kubernetes Cluster With Containerd</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LXC vs Docker container]]></title>
            <link>https://medium.com/devopssquare/lxc-vs-docker-container-5699db209391?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/5699db209391</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Asish M Madhu]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:30 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:30.638Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“A book is a <strong>container</strong> of ideas which can influence minds. It has no value, unless those ideas are implemented”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXpdAT7EJe6gH08hInhjvw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@frankiefoto?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">frank mckenna</a> on <a href="https://unsplash.com/s/photos/container?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In this short article I will try to explain how an LXC differs from application containers. In a nutshell, LXC is a supercharged chroot on Linux. With an LXC, you can run and isolate an entire OS. An application container such as Docker, provides portability, versioning and component reuse along with layered storage solutions.</p><h3>LXC</h3><p><a href="https://en.wikipedia.org/wiki/LXC">LinuX Containers</a> (LXC) is an operating system level virtualization method for running multiple isolated Linux systems (containers) on a single control host (LXC Host). It is often considered as something in the middle between a chroot and a full fledged virtual machine. It can also be compared between a virtual machine and a application container hosted by a container runtime. It is much easier to implement than a VM.</p><p>Linux kernel provides cgroups functionality which allows the limitation and prioritiztion of resources like CPU, Memory, Network etc. The kernel also has namespace functionality which provides isolation of applications view of OS like process, netwoking, users, filesystems mounts. LXC combines these features.</p><h3><strong>LXD</strong></h3><p>In order for the user to use these linux kernel features a daemon named LXD is provided. It is a container manager, which uses REST API to interact with liblxc, which is the software library for LXC. A host can run many LXC containers using a single system daemon. It provides a CLI interface, through which user can manage the container.</p><h3>Docker</h3><p>Early version of docker used LXC as the container execution driver and later migrated to its own runtime environment. Docker is a container runtime application which runs an application as a container using an image that includes all the dependencies and libraries to run the application. It also has REST API to manage its object using Docker CLI.</p><h3>LXC vs Docker container</h3><p>1 . LXC focuses on OS containerisation, while Docker container focuses on application containerisation.</p><p>2. We can run multiple processes on a LXC container, while docker container mainly runs a single process.</p><p>3. Docker container is more portable compared to LXC. Docker containers can be packaged, distributed and deployed on multiple environments. We just need to have a docker runtime enabled on these environment.</p><p>4. LXC only runs on linux distributions. While docker can be run on non-linux environments like Windows.</p><h3>Basic Commands</h3><ol><li>To launch a container</li></ol><p>LXC</p><pre>lxc launch ubuntu:18.04 lxc-ubuntu</pre><p>Docker</p><pre>docker run nginx docker-nginx</pre><p>2. To list containers</p><p>LXC</p><pre>lxc ls</pre><p>Docker</p><pre>docker container ls</pre><p>3. To download an image</p><p>LXC</p><pre>lxc image import &lt;name_of_image_file&gt; -alias lxc-image</pre><p>Docker</p><pre>docker pull &lt;name_of_docker-image&gt;</pre><p>4. To get inside a container shell</p><p>LXC</p><pre>lxc exec &lt;name_of_lxc_conainer&gt; /bin/bash</pre><p>Docker</p><pre>docker container exec -it &lt;container_name&gt; bash</pre><p>5. To stop a container</p><p>LXC</p><pre>lxc stop &lt;name_of_lxc_container&gt;</pre><p>Docker</p><pre>docker stop &lt;container_name&gt;</pre><p>6. To remove a container</p><p>LXC</p><pre>lxc delete &lt;lxc_container_name&gt;</pre><p>Docker</p><pre>docker container rm &lt;cotnainer_name&gt;</pre><h3>Conclusion</h3><p>Here we discussed about LXC and Docker containers. LXC and docker are both containerization techniques. LXC has merits of running OS system as container and is close to a VM while being a container, whereas Docker is a lightweight container runtime which mainly focuses on mostly single application process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5699db209391" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/lxc-vs-docker-container-5699db209391">LXC vs Docker container</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MySQL Dockerization]]></title>
            <link>https://medium.com/devopssquare/mysql-dockerization-226a389ee01c?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/226a389ee01c</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[custom-build]]></category>
            <category><![CDATA[separation]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Hani Perkasa]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:28 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:27.973Z</atom:updated>
            <content:encoded><![CDATA[<h4>and why do we need this ?</h4><p>Normally we just need a single database service for a ton of database schema.</p><blockquote>but sometimes . .</blockquote><p>Each database schema need specific config and the configs interfere with each other.</p><p>Another solution of that case we can put our database services into containers (docker) so they can run with their specific configs with no interfere each others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*JhdEQJRrlcMp-m3NtiNiCg.png" /><figcaption>single vs multiple engine</figcaption></figure><h4>Requirements</h4><ol><li>Host (Ubuntu, CentOS, etc.)</li><li>Docker Engine</li><li>Docker Compose</li></ol><h4>Preparations (optional)</h4><ol><li>Clone <a href="https://github.com/haninp/mysqldockerization.git">repository</a></li><li>Adjust your basic mysql config at mysql-conf folder (e.g. my.cnf)</li><li>Adjust your initial sql, you could put your basic setup for your mysql such as default database schema, basic users or another things.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*yX9ERy-XTjG-A3ueIdYoWQ.png" /><figcaption>it’s mine !!</figcaption></figure><h4>Let’s Build the Image</h4><blockquote>docker build -t customdb:latest .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*qmaPImWjX8J6TS5xn8lzEg.png" /><figcaption>Dockerfile</figcaption></figure><p>here a short explanation:</p><blockquote>FROM mysql:8</blockquote><p>we pull mysql base image from <a href="https://docs.docker.com/docker-hub/official_images/">official dockerhub account</a> for <a href="https://hub.docker.com/_/mysql">mysql</a></p><blockquote>ENV MYSQL_ROOT_PASSWORD=toor</blockquote><p>this line setup a root password for our custom mysql we set to ‘toor’ not ‘thor’ ;p</p><blockquote>COPY ./mysql-conf/conf.d /etc/mysql/conf.d</blockquote><p>we copy all config files from our host path mysql-conf/conf.d to /etc/mysql/conf.d in docker</p><blockquote>COPY ./initial.sql /docker-entrypoint-initdb.d</blockquote><p>copy the initial.sql to docker entrypoint, so that we have some configuration at initial.sql as pre-config at the docker image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*F8A2iaQutrBgcCqGCdBcGg.png" /><figcaption>success output</figcaption></figure><h4>Let’s Run</h4><blockquote>docker run -d -p 9033:3306 — name customdb-1 customdb</blockquote><p>here a short explanation:</p><ul><li>-d options for run container in background</li><li>-p options for publish container’s port(s) to the host</li><li>— name options for assign a name to the container</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzuV7JwoiXgG2-d3mt17uw.png" /><figcaption>what we see it success</figcaption></figure><p>also you can use your favorite sql client for accessing the container(s), but firstly you need ensure the container publish port was accessible from your workstation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjoIyfnQYXY0Vxeaux0vHw.png" /><figcaption>here what it’s look like if you use mysql workbench</figcaption></figure><h4>Let’s Run Another One</h4><blockquote>docker run -d -p 9034:3306 — name customdb-2 customdb</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kIcYq3rCZgCcFrDzz7Dxsg.png" /><figcaption>now you should have two “identical” mysql on separate machines on your host</figcaption></figure><p>this methodology quite enough for me, if you have other needs please discuss.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=226a389ee01c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/mysql-dockerization-226a389ee01c">MySQL Dockerization</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Persistence]]></title>
            <link>https://medium.com/devopssquare/data-persistence-dfd4b7dd2137?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/dfd4b7dd2137</guid>
            <category><![CDATA[docker-volume]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[data-persistence]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-bind-mounts]]></category>
            <dc:creator><![CDATA[Hani Perkasa]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:26 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:25.941Z</atom:updated>
            <content:encoded><![CDATA[<h4>bring your docker to real life</h4><p>My last stories talked about <a href="https://haniperkasa.medium.com/mysql-dockerization-226a389ee01c">MySQL Dockerization</a>, we talked about why we need it and how to get it done with ease.</p><blockquote>But we skip one thing and it’s very essential, it’s all about data persistence.</blockquote><p>What is it and why is it so important to us? You can read some references from wikipedia or from the others on google, but we are not going deep dive into that right now.</p><p>On the docker world we can handle this things with many ways, on it <a href="https://docs.docker.com/storage/">documentation</a> we can find three ways :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/0*UwEFPqwwpht9ULT4.png" /><figcaption>type of mount</figcaption></figure><ol><li><strong>volumes</strong> : this method store the data in somewhere (/var/lib/docker/volumes/) at host filesystem which is managed by Docker services. And it should be not modified by non-docker processes. This method is quite enough for our use case because with this method we can back-up, restore, migrate, etc. the volume with ease.</li><li><strong>bind mounts</strong> : it store the data anywhere in the host filesystem and everybody else can manage it at any time. This method is better if you need sharing file artifact between host and container(s).</li><li><strong>tmpfs mounts</strong> : data was stored in the host system’s memory only. This method are fit enough if you don’t want the data to persist but you need to write large volume of data.</li></ol><p>Referring to our last use case, we just customize the mysql service which is the container has running the database engine so the most suitable mount type we should use is volume.</p><h4>Volume Creation</h4><p>Before we run our database containers we need to create one or more volumes who can used by the containers, here the basic ways to creating it.</p><figure><img alt="docker volume create db-one" src="https://cdn-images-1.medium.com/max/528/1*-pgzclV7vvnz6VncaRe0eA.png" /><figcaption>inspect for details</figcaption></figure><h4>Use a volume</h4><p>Once it’s was created we can use it with add flag ‘ — mount’ or ‘-v’ at our docker run command.</p><p>We have two different kind of syntax but generally it’s have same result. We use -v for the first.</p><blockquote>docker run -d — name customdb-3 -p 9033:3306 -v db-one:/var/lib/mysql customdb:latest</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WBeEKruPMwhe9cQ91xzOkw.png" /><figcaption>run and inspect</figcaption></figure><h4>Write some data at the database</h4><p>Reach your db with your favorite sql client (i use mysql workbench) and let’s put some data to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Cn8CknK1F2_zXHRL_YvKA.png" /><figcaption>with mysql workbench</figcaption></figure><h4>Drop the container and mount the volume to another one</h4><p>As long as you follow my thread from the beginning, now we would do some test for our volume.</p><p>The scenario is :</p><ol><li>Remove customdb-3 (container we run before)</li><li>Create a new one with volume db-one was mount to it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*XYl8vpwIwk4VqIiQv75zzQ.png" /><figcaption>remove customdb-3</figcaption></figure><p>As you can see above, customdb-3 was success removed from our planet but the volume db-one was still with us with table ‘greetings’ was stored in there and still safe as long as we didn’t delete the volume or doing something stupid like a do ‘<em>docker volume prune</em>’.</p><p>Create new database container with command below,</p><blockquote>docker run -d — name customdb-4 -p 9034:3306 — mount source=db-one,target=/var/lib/mysql customdb:latest</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tz9blo-RI_l7ezrDgVA6Rg.png" /><figcaption>access our <strong><em>“greetings from Indonesia”</em></strong> with different container from before</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*6P-y2CV-E6YbQk-4dc5Oeg.png" /><figcaption>docker-compose.yml</figcaption></figure><p><strong>or just run via docker-compose.yml</strong></p><blockquote>docker-compose run -d</blockquote><blockquote>note : please consider if you try to copy and paste my command from Medium, because sometimes it will give you an error like below.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y063rI_VoBt9czksfl-MMQ.png" /><figcaption>weirdo error ;p</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfd4b7dd2137" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/data-persistence-dfd4b7dd2137">Data Persistence</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker is]]></title>
            <link>https://medium.com/devopssquare/docker-is-a51272b7fe9a?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/a51272b7fe9a</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[simplesample]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[memory-issues]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Hani Perkasa]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:22 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:22.585Z</atom:updated>
            <content:encoded><![CDATA[<h4>short explanation about it</h4><p>Many of us are a bit confused about docker, what is it and why is it different from our virtual machine and also when we need it, right?</p><p>Here a very simple sample of docker implementation in a single picture.</p><blockquote>keynotes :</blockquote><blockquote>keep in mind we don’t need install java on our host.</blockquote><blockquote>but we need run a java services.</blockquote><blockquote>we can only call java service when we need it, after that we drop it.</blockquote><blockquote>just to remind you, java takes and ‘keep’ a ton of memory. ;p</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8028mqXbwiBiZ1xL2lfIQg.png" /><figcaption>simple sample of docker</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a51272b7fe9a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/docker-is-a51272b7fe9a">Docker is</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MySQL-Bind Mounts]]></title>
            <link>https://medium.com/devopssquare/mysql-bind-mounts-de0721862666?source=rss----c02571413317---4</link>
            <guid isPermaLink="false">https://medium.com/p/de0721862666</guid>
            <category><![CDATA[docker-volume]]></category>
            <category><![CDATA[docker-bind-mounts]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Hani Perkasa]]></dc:creator>
            <pubDate>Fri, 06 Aug 2021 11:03:19 GMT</pubDate>
            <atom:updated>2021-08-06T11:03:19.750Z</atom:updated>
            <content:encoded><![CDATA[<h4>another ways</h4><p>About my topic at <a href="https://haniperkasa.medium.com/data-persistence-dfd4b7dd2137">Data Persistence</a> we talked how to mount a <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">volume</a> to our database container and we used <a href="https://docs.docker.com/storage/volumes/">Use Volumes</a> for the first time.</p><p>Another ways to achieve it but slightly different from ‘Use Volumes’ is use ‘Bind Mounts’ method.</p><p>Before we go deeper please take an attention to <a href="https://haniperkasa.medium.com/data-persistence-dfd4b7dd2137">Data Persistence</a> at the last word (about docker-compose). We will run this section with docker-compose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*7WxmwSVScUpKThjMZCB7Yg.png" /><figcaption>it’s mine !!</figcaption></figure><p>run it with</p><blockquote>docker-compose up -d</blockquote><p>if you notice we didn’t have a folder db-data before, but when we had run the compose we bring it (db-data folder) to this world. And it matches with what we previously believed that this folder was mounted to /var/lib/mysql. So it should be the same content as /var/lib/mysql in the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*JGwboaaBt5v1EEPirpJzlA.png" /><figcaption>you knew it when you are veteran MySQL users</figcaption></figure><h4>Use Volumes vs Use Bind Mounts</h4><p>In general they both have the same results but slightly different in terms of performance and maintenance.</p><p><strong>Use Bind Mounts when you need to share “artifacts” between hosts and containers (e.g. configuration files).</strong> But this method depends on our host machine’s filesystem structure which seems to be a potential problem on the next day, especially if we need to deploy on Linux and Windows with the same docker-compose.yml.</p><p>When we use ‘Use Volume’ we can get rid of the previous problems we encountered with binding mounts, and also this method will give us ‘hands free’ to perform backups or migrate data between different platforms which we cannot do with Bind Mounts . And of course YES for the Docker API.</p><p><strong>Best practice for a database engine was use ‘Use Volume’ </strong>because its stored on Linux VM so we shouldn’t facing any issue when we need to migrate or backup and also we can have more performance compared ‘Bind Mounts’. But we still need ‘Bind Mounts’ for our configuration file, so we can easily tuning our engine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de0721862666" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devopssquare/mysql-bind-mounts-de0721862666">MySQL-Bind Mounts</a> was originally published in <a href="https://medium.com/devopssquare">DevopSquare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>