<?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: chis0m</title>
    <description>The latest articles on DEV Community by chis0m (@chis0m).</description>
    <link>https://dev.to/chis0m</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%2F319824%2F2136c1af-9e0f-4e0b-a934-f353caa0966e.png</url>
      <title>DEV Community: chis0m</title>
      <link>https://dev.to/chis0m</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chis0m"/>
    <language>en</language>
    <item>
      <title>C.A.L.M.S - The DevOps Core Values </title>
      <dc:creator>chis0m</dc:creator>
      <pubDate>Mon, 03 May 2021 01:19:39 +0000</pubDate>
      <link>https://dev.to/chis0m/c-a-l-m-s-the-devops-core-values-c9c</link>
      <guid>https://dev.to/chis0m/c-a-l-m-s-the-devops-core-values-c9c</guid>
      <description>&lt;p&gt;CALMS is an acronym for Culture, Automation, Lean, Measurement, and Sharing. These are the foundational values of DevOps practice. Below are some thoughts on them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Culture&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Culture is a major factor in DevOps because it is the primary human factor.&lt;/li&gt;
&lt;li&gt;Notwithstanding technology, the core of our problem is related to people and their behavior.&lt;/li&gt;
&lt;li&gt;If we have a bad culture, other aspects of DevOps will only enhance and magnify our bad culture.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Automation&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Automation/CI/CD only helps to accelerate and enhance the benefits of DevOps as a whole. It doesn't correct human problems.&lt;/li&gt;
&lt;li&gt;Here we use CI Toolchains, Test Frameworks, Artifactories, Cloud services&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Lean&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Simply, lean means creating more value for customers with fewer resources. The aim is to reduce waste.&lt;/li&gt;
&lt;li&gt;You should learn to have Minimum Viable Products. Every feature doesn't have to come fully grown...&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;a. Implement the basics, then from user feedbacks and other necessary inputs, mature the feature&lt;br&gt;
   b. Many times the developers' consent should be consulted in modifying and maturing a feature.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;3.Every feature should also be broken down into basic stories so that it can be...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a. Easily built, monitored, and tagged&lt;br&gt;
  b. Easily isolate failures&lt;br&gt;
  c. Easily tested&lt;br&gt;
  d. Easily digested when pushed into the pipeline&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Measurement&lt;/strong&gt;&lt;br&gt;
1.In DevOps, progress must be tracked.&lt;br&gt;
2.Some Metrics that can be tracked are...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a. User satisfaction and feedback&lt;br&gt;
  b. MTTR: Mean Time  To Recovery - The time it takes for our &lt;br&gt;
  c. system to be fully working after a downtime&lt;br&gt;
  d. MTBT: Mean Time Between Failures - The average time &lt;br&gt;
    between two downtimes&lt;br&gt;
  e. Income&lt;br&gt;
  f. Cost&lt;br&gt;
  g. Deployment Frequency&lt;br&gt;
  h. Release Frequency&lt;br&gt;
Note: &lt;em&gt;Working software successfully delivered by sound systems is the primary measure of progress.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Sharing&lt;/strong&gt;&lt;br&gt;
1.This basically has to do with communication. Transparency and openness are key here.&lt;br&gt;
2.The Operations and Developers should be able to communicate with utmost good faith.&lt;br&gt;
3.developer should always communicate his architecture with the Team Lead(and team if necessary), PM(Product Manager if need be) before implementing his task. To avoid repeating the task and to reduce WIP(Work in Progress) time&lt;br&gt;
4.Costly faults should be communicated to the team lead or escalated(if need be) to find the best possible ways to mitigate such.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>culture</category>
    </item>
    <item>
      <title>Monolith or Microservices</title>
      <dc:creator>chis0m</dc:creator>
      <pubDate>Sun, 02 May 2021 18:32:14 +0000</pubDate>
      <link>https://dev.to/chis0m/monolith-or-microservices-2hce</link>
      <guid>https://dev.to/chis0m/monolith-or-microservices-2hce</guid>
      <description>&lt;p&gt;&lt;strong&gt;Monolithic&lt;/strong&gt; application has single code base with multiple interdependent modules. Also known as &lt;em&gt;Integrated systems.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices&lt;/strong&gt; is breaking down large application into highly independent units called services. It can also be called &lt;em&gt;Distributed Systems&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So the key concept here is level of &lt;strong&gt;Dependency&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlight of Characteristics of both&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PnX-6kA7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ngpvetd59jnsrsut10e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PnX-6kA7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ngpvetd59jnsrsut10e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions to answer before considering Microservices&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do you have a complete understanding of what microservices are and how they could influence your development operations?&lt;/li&gt;
&lt;li&gt;Is your business mature enough to adopt microservices?&lt;/li&gt;
&lt;li&gt;How strong is your practice of application infrastructure?&lt;/li&gt;
&lt;li&gt;Do you have a tried and tested agile or DevOps practice?&lt;/li&gt;
&lt;li&gt;Is your data management team skilled enough to support the incorporation? If it’s a no for this one, they will only slow down what is supposed to be a swift process.&lt;/li&gt;
&lt;li&gt;Is your product at the fulcrum of your business model?&lt;/li&gt;
&lt;li&gt;What are your goals and vision on scaling up? The architecture is designed for scalability and is ideal only if you have a sound plan of expanding both your product/service and your market.&lt;/li&gt;
&lt;li&gt;Is your business model tested and proven?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a thought on Microservices or Monolith:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So my primary guideline would be &lt;strong&gt;don't even consider microservices unless you have a system that's too complex to manage as a monolith&lt;/strong&gt;. The majority of software systems should be built as a single monolithic application.&lt;strong&gt;Do pay attention to good modularity within that monolith&lt;/strong&gt;, but don't try to separate it into separate services... unless you're faced with that complexity, remember that the microservices approach brings a high premium, one that can slow down your development considerably&lt;/em&gt; - &lt;strong&gt;Martin Fowler.&lt;/strong&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  What to do?
&lt;/h1&gt;

&lt;p&gt;There is an architecture that combines the simplicity of monolith (in terms of architecture and deployment) with the logical advantage of microservices. It is the &lt;strong&gt;Modular Monolith&lt;/strong&gt; (&lt;strong&gt;Modulith&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;For a typical Laravel application, you could leverage &lt;strong&gt;namespaces, service providers, autoloaders, packages, API routes&lt;/strong&gt; to totally separate these modules. There is a package that could help with this. Check it out here: &lt;a href="https://github.com/nWidart/laravel-modules"&gt;nwidart/laravel-modules&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;click &lt;a href="https://medium.com/@destinyajax/how-to-build-modular-applications-in-laravel-the-plug-n-play-approach-part-1-13a87f7de06"&gt;here&lt;/a&gt; and &lt;a href="https://medium.com/@adedotunolawale/using-modular-approach-with-laravel-building-module-based-application-part-1-b5c5a4e9ed38"&gt;here&lt;/a&gt; to read more on the package usage.&lt;/p&gt;

&lt;p&gt;In a nutshell, each module will have its own model, providers, config, route, migrations etc.&lt;/p&gt;

&lt;p&gt;On a final note, as an application grows the best question to ask is how to structure your application in such a way that it will reduce interdependency among modules. So that when it becomes very large you can easily go microservice.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Installing Puppeteer on an Ubuntu AWS EC2 Instance</title>
      <dc:creator>chis0m</dc:creator>
      <pubDate>Fri, 25 Sep 2020 07:08:28 +0000</pubDate>
      <link>https://dev.to/chis0m/installing-puppeteer-on-an-ubuntu-aws-ec2-instance-5o7</link>
      <guid>https://dev.to/chis0m/installing-puppeteer-on-an-ubuntu-aws-ec2-instance-5o7</guid>
      <description>&lt;p&gt;Haven worked on projects where I converted HTML/CSS to pdf, I have come to learn a few things. First, I must say that Puppeteer in my opinion is still the best converter from the server-side of things. &lt;/p&gt;

&lt;p&gt;So, in this article, I will be discussing how to install Puppeteer and mitigate errors that are likely to arise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt;&lt;br&gt;
My project was a Laravel/PHP project which communicated with a NodeJS server through a socket within the same localhost. So PHP sends the JSON data to the NodeJS, then NodeJS converts the data with a predefined HTML template into pdf, saves the file, and writes the result(file) back to PHP through the socket. Php on receiving the pdf file returns the result as a downloadable file to the browser.&lt;br&gt;
In this way, I have achieved total separation of concern, highly reusable, and printed out a very clear pdf.&lt;br&gt;
The project was hosted on an AWS EC2/ubuntu instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to install Puppeteer on an Ubuntu instance (18.04 and 20.04)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to your project directory&lt;/li&gt;
&lt;li&gt;Install NodeJS/npm if you haven't&lt;/li&gt;
&lt;li&gt;Run:
&lt;code&gt;sudo npm install -g puppeteer --unsafe-perm=true -allow-root &amp;amp;&amp;amp; sudo apt install chromium-browser -y&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Errors&lt;/strong&gt; you are likely to face&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ubuntu 20.04/18.04 Oh error: Error: Failed to launch the browser process! error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Note: You might see this same error for &lt;strong&gt;libnss3.so&lt;/strong&gt;, &lt;strong&gt;libgbm.so&lt;/strong&gt;, &lt;strong&gt;libxss1.so&lt;/strong&gt; or &lt;strong&gt;libasound2.so&lt;/strong&gt; missing packages&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br&gt;
You can install these packages singly like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sudo apt install libnss3-dev&lt;/li&gt;
&lt;li&gt;sudo apt install libgbm-dev 
and so on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But here is a complete install&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install -y gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install all dependencies that might be missing.&lt;br&gt;
If however, you encounter any challenges along the line, you could reach out, I could be of help. Thank you.&lt;/p&gt;

&lt;p&gt;Links that were of help to me&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://techoverflow.net/2018/06/05/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-object-file-no-such-file-or-directory/"&gt;https://techoverflow.net/2018/06/05/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-object-file-no-such-file-or-directory/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zhang0peter.com/2020/02/07/linux-chrome-bug/"&gt;https://zhang0peter.com/2020/02/07/linux-chrome-bug/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/actions/virtual-environments/issues/732"&gt;https://github.com/actions/virtual-environments/issues/732&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/puppeteer/puppeteer/issues/807"&gt;https://github.com/puppeteer/puppeteer/issues/807&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/alixaxel/chrome-aws-lambda/issues/93"&gt;https://github.com/alixaxel/chrome-aws-lambda/issues/93&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>puppeteer</category>
      <category>install</category>
      <category>aws</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
