<?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 @Olivierodo on Medium]]></title>
        <description><![CDATA[Stories by @Olivierodo on Medium]]></description>
        <link>https://medium.com/@Olivierodo?source=rss-a12b6bfb6c9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*acYALd6w84KRScRNMpFLUg.jpeg</url>
            <title>Stories by @Olivierodo on Medium</title>
            <link>https://medium.com/@Olivierodo?source=rss-a12b6bfb6c9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:41:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Olivierodo/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[Create or Update Comment: Oh My Github Action #2]]></title>
            <link>https://medium.com/@Olivierodo/create-or-update-comment-oh-my-github-action-2-e6754053b7cf?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6754053b7cf</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 02:02:27 GMT</pubDate>
            <atom:updated>2023-02-03T02:02:27.620Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Github Action changed the game!<br>Continuous Integration has never been so exciting.</blockquote><p>In this series, I just want to share my findings about the different Github Action I’m using to empower my different project.</p><h3>About the Github Action?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omjgeniD9xpfyGzqRkH9QA.png" /></figure><ul><li><em>Name</em>: create-or-update-comment</li><li><em>Description</em>: A GitHub action to create or update an issue or pull request comment</li><li><em>Marketplace</em>: <a href="https://github.com/marketplace/actions/create-or-update-comment">https://github.com/marketplace/actions/create-or-update-comment</a></li><li><em>Maintainer</em>: <a href="https://github.com/peter-evans">peter-evans</a></li></ul><h3>What I love about It?</h3><p>This Github Action open so much possibilities to use continuous integration with item such as Github Issues or Github Pull Request.<br>Compare to the other Github action of the same type, I love :</p><ul><li>The simple API: a few line and it works</li><li>Outstanding documentation: Multiple integration example are shared</li><li>The stability: Acceptable amount of update. the maintainer is active and helpful</li></ul><h3>How do I use it?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2ojSTgCoCPZcwbq0W9oDw.png" /></figure><p>Currently I’m maintaining the <a href="https://github.com/restqa/restqa">RestQA</a> and trying to provide a great developer experience. Then every time that I will tag an issue as “Good first issue”. The Github Action will automatically add a comment to share a few information to the potential contributor on how to start it contribution<br>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*gjykMLwleAwB0SC-zkWdCA.png" /><figcaption><a href="https://github.com/restqa/restqa/issues/293">https://github.com/restqa/restqa/issues/293</a></figcaption></figure><h3>How can you use it?</h3><p>Managing an open source project could be very consuming when it comes to the community. <br>I believe there is a lot of different use case where this Github action could become super handy, example:</p><ul><li>If a random contributor forgot to add his name to the contributor list, you can remind him through a nice comment</li><li>If the commit of a PR are not following the standard pattern, you can warn the contributor with a comment</li><li>Add an automatic reaction when a contributor create a pull request</li><li>etc..</li></ul><h3>What could be improved? How can you contribute?</h3><p>So far this Github action is doing it job perfectly. I do not think of any way to improve it so far. When it comes to contribution there is no technical needs however you can still propose to new use case example to the README, or promote this Github action on different platforms 😎.</p><p>Don’t forget to support the create-or-update-comment Github action by giving them a <a href="https://github.com/peter-evans/create-or-update-comment">star ⭐️ on github</a></p><p>If you want to get more update about the best way to improve your project through Continuous Integration. Follow me 😁.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6754053b7cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Markdown link checker: Oh My Github Action #1]]></title>
            <link>https://medium.com/@Olivierodo/markdown-link-checker-oh-my-github-action-1-edc31b7762d0?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/edc31b7762d0</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[markdown]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 12:13:52 GMT</pubDate>
            <atom:updated>2023-01-24T12:13:52.118Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Github Action changed the game!<br>Continuous Integration has never been so exciting.</blockquote><p>In this series, I just want to share my findings about the different Github Action I’m using to empower different projects.</p><h3>About the Github Action?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*oH8G-lFqFZ834QTsWNEiLw.png" /></figure><ul><li><em>Name</em>: 404-links</li><li><em>Description</em>: The only Github Action that will open pull request review when a broken link has been found in one of your markdown documentation.</li><li><em>Marketplace</em>: <a href="https://github.com/marketplace/actions/404-links">https://github.com/marketplace/actions/404-links</a></li><li><em>Maintainer</em>: <a href="https://github.com/olivierodo">Olivierodo</a></li></ul><h3>What I love about It?</h3><p>Compared to other Markdown link checker, I love the different feature of 404-links:</p><ul><li>Allow whitelist by url or by file</li><li>Enforce https links</li><li>Share a simple summary</li><li>Create Pull Request review using PR comments</li></ul><h3>How do I use it?</h3><p>Currently I’m maintaining the <a href="https://github.com/restqa/restqa">RestQA</a> that has more than 50+ markdowns file. Most of the files has external links (github pr, 3rd party tools), Now i’m happy to know that each link will be check regularly checked in order to provide a good experience while reading our documentation.</p><h3>How can you use it?</h3><p>If your project is using the JAMstack, this 404-links will become super helpful for website that relies on framework like:</p><ul><li>Docusaurus</li><li>Hugo</li><li>Gatsby</li><li>etc…</li></ul><h3>What could be improved? How can you contribute?</h3><p>So far the 404-links Github action is focused on remote links (http and https), that would be great if the Action could also<strong> check links to local files</strong>.</p><p>Don’t forget to support the 404-link Github action by giving them a <a href="https://github.com/atalent-labs/404-links">star ⭐️ on github</a></p><p>If you want to get more update about the best way to improve your project through Continuous Integration. Follow me 😁.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edc31b7762d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I do Mentor Anyone through Open Pair Programing]]></title>
            <link>https://medium.com/@Olivierodo/how-i-do-mentor-anyone-through-open-pair-programing-bbef4e1c23e7?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbef4e1c23e7</guid>
            <category><![CDATA[mentorship]]></category>
            <category><![CDATA[test-automation-framework]]></category>
            <category><![CDATA[pair-programming]]></category>
            <category><![CDATA[open-source-software]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Tue, 24 Aug 2021 06:32:20 GMT</pubDate>
            <atom:updated>2021-08-24T06:32:20.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHCa3eEH7dyzZD9Lj4QAdw.jpeg" /></figure><p>Hello Everyone 👋,</p><p>Let me share a concept that I have been running the last few months: <strong>Open Pair Programming </strong>and how I was able to leverage <strong>Github Action</strong> to automating the flow.</p><p>Let’s face it the learning curve for any engineer to contribute to an open source project is not that easy, between the intimidating project with a huge community or the small project without clear documentation… Most of us feel that the time to invest to be onboarded is not worth it.</p><h3>What is the purpose of Open Pair Programming ?</h3><p>My latest Open Source project is <a href="https://restqa.io/">RestQA</a>. I want to share a different flavor of API test automation within the NodeJs ecosystem.</p><p>Then I realized that it was not easy to attract contributors. In order to get contributors, a project needs to reach some popularity.<br>I personally love mentoring, especially through pair programming. Some days ago when I was browsing some interesting issues on Github I thought: “It would be cool to pair program with the maintainer of the project in order to reduce the learning curve of the codebase”. Then realizing that nobody is proposing this support. I decided to give a try to propose or offer it. <strong>Open Pair Programming</strong> was born.</p><h3>Why is it important to me ?</h3><p>Being an engineer for 15+ years, my experience is not helping me to understand the upcoming developer generation. We can’t claim that we are expert on everything we all have to learn from someone. Exchanging with knowledge with different people is the best way to grow. Understanding different background, different culture, different generation and this is the beauty of open source 😇. I had a chance to exchange with student, professional, junior, self-learner and etc. It feels amazing to see so much diversity in the same community.</p><p>As an Open source maintainer, each tool that we are building needs to have a great developer experience. It’s the only way to get a chance to attract users that we love our product. Understand our user is important.</p><h3>How I do Pair Program with anyone ?</h3><p>What I wanted is to have a free and simple way to invite anyone to book a session with me based on an issue that they saw on one of my project that gets their interest. For the solution, I needed to create a new Github Label that will automatically add a comment into the issue inviting anyone to reach me out if they want to pair with me on a selected feature.Then anyone can just check and book a session with me to pair on a Github issue.</p><p><em>Example:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYPWnDqJBx3PdBGilqBVPQ.png" /></figure><h4>1. Explain the concept into a repository.</h4><p>I simply decided to start by creating a repository under my Github username called: <em>Pair with me</em><br>You can find it here: <a href="https://github.com/olivierodo/pair-with-me">https://github.com/olivierodo/pair-with-me</a></p><h4>2. Create a Calendly event</h4><p>In order to allow the user to book an event on a session I created an account on <a href="https://calendly.com/">Calendly</a>, but there is many alternative available out there.<br>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndX1FR0t-RQNnwotOEsJ2w.png" /></figure><h4>3. Create a label into your repository</h4><p>Then into my <a href="https://github.com/restqa/restqa">main open source project repository</a> you will need to create a new label to identify all the issue that you are opening to be paired with you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJBKiq8ytR3jDX0y_jhSog.png" /></figure><h4>4. Create a template of your comment</h4><p>I created the template of the comment that I want to post on any issue, the template is also referring to Calendly link 👆.<br>My template is located here: <a href="https://github.com/olivierodo/pair-with-me/blob/master/.github/issues/pair-template.md">https://github.com/olivierodo/pair-with-me/blob/master/.github/issues/pair-template.md</a></p><p><em>Screenshot:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_XbvIkK-_lhI74oD9y1Y3Q.png" /></figure><h4>5. Create a Github Action</h4><p>Last step would be me to orchestrate all of this with a nice Github Action.<br>The Github action behavior is following the steps:<br>1. Detect if the label “<strong>pair-with-maintainer</strong>” (created on step 3) has been added to an issue<br>2. Fetch the <strong>Pair with me</strong> comment template content (created on step 2)<br>3. Add the <strong>comment</strong> into the selected <strong>issue</strong>.</p><p><strong><em>Example of the Github Action source code</em></strong>: <a href="https://github.com/restqa/restqa/blob/master/.github/workflows/pair-issue-comment.yml">https://github.com/restqa/restqa/blob/master/.github/workflows/pair-issue-comment.yml</a></p><h3>What I am learning from Open Pair programming ?</h3><p>I listed the benefits that this open pair programming is giving me:</p><p>1. Define a well explained template Issue.<br>2. Learning how to split issues in an atomic way.<br>3. Building relationship with motivated developers.<br>4. Learning new way of working (I’m stuck with vim since 2012 😁)<br>5. Accepting feedback from developer regardless of their experience</p><p><strong>Open Pair programming is simply a way for any user to pair with you on your project. We all learn from someone</strong></p><p>Feel free to give a try or <a href="https://calendly.com/olivierodo/pair-with-olivierodo">book a session with me</a> 😇</p><p>Inspiration:<br> * <a href="http://www.pairprogramwith.me/">Pair with me</a><br> * <a href="https://github.com/kkemple/awesome-pair-programming">Awesome pair programming</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbef4e1c23e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build an MVP with a costless logging system through social media.]]></title>
            <link>https://medium.com/@Olivierodo/build-an-mvp-with-a-costless-logging-system-through-social-media-ffad9eeb9d33?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffad9eeb9d33</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mvp]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Mon, 25 Jun 2018 23:15:12 GMT</pubDate>
            <atom:updated>2018-06-25T23:15:12.765Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bcEwFWsvRTkSaH6jOUWayQ.jpeg" /></figure><h4>Nowadays, building a side project has never been so easy.</h4><p>I remember when we had to consider every aspect of the technical stack before coding. Today a simple combination of an internet connection and a few account to different *aas (All As A Service) is more than enough. The programming world keeps moving, cloud platforms enables a tons of opportunities to serve the developers demand. With a few API we could host a page on a Paas (platform as a service), store data on a Daas (Database as a service), Test and deploy on a CI/CD platform, etc…</p><p>Since we can deliver faster, the job is extremly exciting , we focus ourselves on building the right tools for the right user.</p><p>Regarding the launch of a MVP, everyone has the same questions:</p><ul><li>How to build a quality product that helps you to validate your idea?</li><li>How to measure the success of your product ?</li><li>How to shorten the feedback loop ?</li></ul><p><strong><em>Knowing how to measure the outcome should be our first priority before developing any features. <br></em></strong>Providing a satisfying experience to our users is not so difficult when we listen to their interaction AND frustration around the product.</p><blockquote>Bugs are human that’s why we can’t prevent them. However as a human we should prevent the reproduction of a bug.</blockquote><h3>Social media is your best friend</h3><p>As a developer, to get a notice from my apps, I used to send technical logs within an email, then I realized it’s introducing a lot disruption. Receiving email with logs is untraceable, makes the investigation difficult and on a long term considered as spams. Then when Slack appeared in the market alongside their amazing API. I used Slack’s incoming web hooks, it works fine comparing to the email, the experience is much better. However it’s still ending with a lot of noise in my channels. It’s was a must to strategize how to format the log messages, but when you are building an MVP you don’t want to think too much about that!<br>Then I started dreaming about a simple and fast way to pull out and receive information about my user’s activity from everywhere. The solution was obvious, the social media platforms have excellent assets :</p><ul><li>Share information</li><li>Share content with friends by mentioning them</li><li>Block the access to your personal information</li><li>User experience: powerful timeline feed</li><li>Real time notification</li><li>Cross platform</li><li>Incredible Quality of Service</li><li>Unlimited storage</li><li>Free… access (… we pay with our data)</li></ul><p><em>Social media are computer-mediated technologies that facilitate the creation and sharing of information, ideas, career interests and other forms of expression via virtual communities and networks. (cf. </em><a href="https://en.wikipedia.org/wiki/Social_media"><em>Wikipedia</em></a><a href="https://en.wikipedia.org/wiki/Social_media))*"><em>)</em></a></p><p>Let’s make it simple… I’m not a big fan of social medias. From the tons of information I receive from these platforms, I do care about 2% of them. The main issue is a combination of low quality information and people personal interest. However in our use case by considering our applications as a friend and not as a tool. <strong>He </strong>(our application)<strong> </strong>could <strong>share quality information</strong> that <strong>interest us</strong>.</p><p>Okay, we have a need, let’s write down the user story:</p><blockquote>AS a product owner I WANT to receive notifications SO THAT I can be informed of the important user’s activity in timely manner.</blockquote><p>This User story should be the top priority in your backlog, to do list, task list , etc… Consequently you will have to define the different activities that you need to measure on the following user stories.</p><p>On my personal setting, I went for twitter because it’s the only social media I can stand, including the fact that their developer experience is quite good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTo4H9balrAfNql_QJsWMA.png" /><figcaption>My Assistant with more than 25000 tweets, followed by me and my partner</figcaption></figure><p>Since last year, I’ve been using Twitter to notify me about different activities from my side projects (application, bot, iot, etc…).<br>My developer experience changed entirely, I can see worldwide news alongside my running products activities within the same source of information.</p><h4>Installation steps</h4><p>Let me share with you a simple setup using twitter :</p><ol><li>Create a new account on twitter for your assistant (ex : @alexa) and turn it as private (<a href="https://help.twitter.com/en/safety-and-security/how-to-make-twitter-private-and-public">detail</a>) .</li><li>Follow your assistant’s twitter profile with your personal account (ex: <a href="http://twitter.com/olivierodo">@olivierodo</a>).</li><li>Accept the followers request with your assistant’s account</li><li>Create a new app on the <a href="https://apps.twitter.com/">twitter developer portal</a> to enable your access to the twitter apis (using the @alexa account).</li><li>Find a library from your preferred programming language, example :<br> * Node and winston : <a href="https://www.npmjs.com/package/winston-twitter">winston-twitter</a><br> * Python : <a href="https://github.com/mvillaress/python-logging-twitter">python-logging-twitter</a></li><li>Define a simple logging strategy : <br> * @alexa tweet : normal log<br> * @alexa tweet that mentioning <a href="http://twitter.com/olivierodo">@olivierodo</a> : Receive an important log notification on realtime.</li><li>If you want to receive the notifications from everywhere, download the twitter app on your phone.</li><li>Et Voila!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3-EGgjcwVJLhQP57DkInA.png" /></figure><p><em>NOTICE: if you create 2 tweets in a row with the same content, Twitter will refuse your second tweet due to duplication content. To avoid this error just add the current time on every tweet ^^.</em></p><blockquote>Simple, reliable and free!</blockquote><p>It fits perfectly for all the different app I worked on, especially IOT. The main limitation refers to the crashes of your app or any network issues, in that case you will receive any notification.</p><p>Don’t consider this trick for a productionize application with a large set of users. Use it as a tool to accelerate the launch of your product and shorten the feedback loop.</p><p>As a person you know that you need to be careful about what you share on social media. It’s exactly the same for your assistant don’t share any sensitive or user’s information.</p><p>If you have any other creative hack please share it to the world in the comment .</p><p>Enjoy !</p><blockquote>We don’t have a choice on whether we do social media the question is how well we do it. Erik Qualman</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffad9eeb9d33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get your Mac To Speak To You With The Commit Message]]></title>
            <link>https://medium.com/@Olivierodo/get-your-mac-to-speak-to-you-with-the-commit-message-d943a00d2a36?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d943a00d2a36</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[commit]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[macbook]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Tue, 08 May 2018 00:36:33 GMT</pubDate>
            <atom:updated>2018-05-08T00:36:33.005Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZxiTOv6TKfM7egjpET4bHA.jpeg" /></figure><p>Hey,<br>let me share with you a fun snippet that will allow your Mac to talk to you by telling you what is the last message from a git repository.</p><h3>The Say Command</h3><p>A while ago I discovered the nice “<a href="https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/say.1.html">say</a>” command. It’s allowing you to use the built-in text to speech feature.</p><p>Let’s try it now, open your terminal and type the command:</p><pre>$ say &quot;hello buddy&quot;</pre><p>You should hear a nice voice saying “hello buddy”. (The voice is the default one selected from the system preference)</p><p>If you don’t like the current voice and want to use another one just use the -v options (example with the <em>moira</em>’s voice):</p><pre>$ say &quot;hello buddy&quot; -v &quot;moira&quot;</pre><p>If you want to list the voices available on your mac type in:</p><pre>$ say -v?</pre><h3>The last Git commit message</h3><p>We just learned how to interact with our mac with a simple command. Now we will improve this interaction by combining it with Git.<br>We will retrieve the last commit message from therepository folder by using the command :</p><pre>$ git log --pretty=format:&#39;%s&#39; -1</pre><p>However unless you are working alone, you may want to know who pushed the last commit. Let’s improve our output to display the author:</p><pre>$ git log --pretty=format:&#39;%s from %an&#39; -1</pre><p>Alright, from here we just need to redirect the output to the say command:</p><pre>$ git log --pretty=format:&#39;%s from %an&#39; -1 | say</pre><p>Easy !</p><h3>The Git alias</h3><p>Let’s create the alias git vlog to run the command :</p><pre>$ git config --global alias.vlog &#39;!git log --pretty=format:&quot;%s from %an&quot; -1 | say &amp;&#39;</pre><p>Now it’s the time to test it :</p><pre>$ git vlog</pre><p>And Voila!</p><p>If you know any nice integrations with the say command please share them in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d943a00d2a36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker — How to simply manage your micro-services app with NodeJS]]></title>
            <link>https://medium.com/@Olivierodo/docker-how-to-simply-manage-your-micro-services-app-with-nodejs-489b8825053?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/489b8825053</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Mon, 16 May 2016 15:28:27 GMT</pubDate>
            <atom:updated>2016-05-16T15:28:27.590Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sO8__nEhPFq6aTXJkLenWA.jpeg" /></figure><p>Hi guy,</p><p>It’s been a while since I’ve played with Docker and today I want to share with you how to create a gateway for your micro-services with NodeJS.</p><p>If you are not familiar with Docker/NodeJS visit my old post “<a href="https://medium.com/@Olivierodo/the-10-minute-docker-s-intro-3f7f97cfe4e8#.188dcroxx">The 10 Minute Docker’s Intro</a>”. It will be enough to have a good start.</p><h4>Topic</h4><p>We want to create a website driven by 2 of docker’s containers :</p><ul><li>Container 1 : NodeJS api provider</li><li>Container 2 : NodeJS render the view (get the data from the container 1)</li></ul><h4>1. The NodeJS API provider (container 1)</h4><p>For this container, I found a ready to use image on the <a href="https://hub.docker.com/r/ptitdam2001/node-rest-server/">Dockerhub</a> (thank you to @ptitdam2001 ) .</p><p>The container is a expressJs app with 2 routes :</p><ul><li>`/users` Retrieve a list of events (yes.. this confusing)</li><li>`/users/:id` Retrieve an event by id</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*J0nxEMsaKe1rFuXN23dX6g.png" /></figure><p>Let’s pull the image.</p><pre>docker pull ptitdam2001/node-rest-server</pre><h4>2. The NodeJS render (container 2)</h4><p>The container will render a simple view, more detail on the <a href="https://github.com/olivierodo/node-micro-service-front">github repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*Xg2qn9q8kQhl2-qM6TCUMQ.png" /></figure><p>Angular call : “/api/users” (<a href="https://github.com/olivierodo/node-micro-service-front/blob/master/index.html#L59">index.html</a>) to retrieve the data (We consider that we want to access to the <strong>container 1</strong> by the prefix “/api”)</p><p>Let’s pull the image.</p><pre>docker pull olivierodo/node-micro-service-front</pre><h4>3. The NodeJS gateway Container app</h4><p>Let start the gateway, it’s very simple and based on 2 packages :</p><ul><li><a href="https://www.npmjs.com/package/dockerode">Dockerode</a> : Help to manage docker by api</li><li><a href="https://www.npmjs.com/package/http-proxy">http-proxy</a> : Help to create a proxy</li></ul><p>Clone the repository : <a href="https://github.com/olivierodo/node-micro-service-gateway">https://github.com/olivierodo/node-micro-service-gateway</a> and run :</p><pre>npm install</pre><p>The purpose is simple :</p><ul><li>every request like `/api/*` is sent to the container 1</li><li>All the others requests are sent to the container 2.</li></ul><p>Run the app :</p><pre>npm start</pre><p>You can check the app at: http://localhost:3000</p><h4>More details…</h4><p>We use a config file to lists our containers (config/default.json) :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b3abab9782e43683c0b83ee41207689/href">https://medium.com/media/5b3abab9782e43683c0b83ee41207689/href</a></iframe><p>Our script is trying to:</p><ul><li>Create and run containers based on the config file</li><li>Start a http server to redirect the requests.</li></ul><blockquote>Simple, no?</blockquote><p>I’ll let you check the code (see server.js).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49b1f23a8948f177f99b2f4b6f4b6cc4/href">https://medium.com/media/49b1f23a8948f177f99b2f4b6f4b6cc4/href</a></iframe><p>This code is just a sample and <strong>NOT READY FOR PRODUCTION</strong>.</p><h4>Final thoughts</h4><p>Hopefully this tutorial helped you understand how you can use the <a href="https://docs.docker.com/engine/reference/api/docker_remote_api/">Docker API</a> or create a proxy within a NodeJS app.</p><p>Please let me know in the comments or if you had any trouble setting this up. Also if you have any ideas to improve it, just create a pull request.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=489b8825053" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using clipboard Mac Osx Terminal]]></title>
            <link>https://medium.com/@Olivierodo/using-clipboard-mac-osx-terminal-fec09c618af4?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fec09c618af4</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[os-x]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Wed, 23 Mar 2016 03:23:15 GMT</pubDate>
            <atom:updated>2016-03-23T03:23:47.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*PgltaJlpaHWs0AV-8gCDAA.jpeg" /></figure><p>Hi, <br> I like my Mac Osx but I love the Terminal more. Here are some clipboard features within the Terminal.</p><p>Using the clipboard on Mac Osx by Command Line (CLI).</p><p>On Osx to use the clipboard feature on the terminal by cli we also have the pbcopy and pbpaste command.</p><p>Copying with pbcopy</p><p>To put information in the clipboard we need to feed the pbcopy command with another command’s output like :</p><pre>$ pwd | pbcopy</pre><p>or</p><pre>$ cat ~/.ssh/id_dsa.pub | pbcopy</pre><p>Pasting with pbpaste</p><p>To get the information from the clipboard we should use the pbpaste command.</p><pre>$ pbpaste</pre><p>For example if I want to create a tag in git with the information from the clipboard, I use:</p><pre>$ git tag $(pbpaste)</pre><p>Alias</p><p>Of course to feel more comfortable it’s better to use an alias. <br> As a vim user, I’ll share with you my alias:</p><pre>$ alias yy=&quot;pbcopy&quot;</pre><p>and</p><pre>$ alias p=&quot;pbpaste&quot;</pre><p>Then to copy the content’s file :</p><pre>$ yy &lt; myFile.txt</pre><p>or if I want to append the content’s file :</p><pre>$ p &gt;&gt; myFile.txt</pre><p>This is very simple !</p><blockquote><em>On the next post I’ll show you how to share information from the clipboard to </em><em>VIM.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fec09c618af4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 10 Minute Docker’s Intro]]></title>
            <link>https://medium.com/@Olivierodo/the-10-minute-docker-s-intro-3f7f97cfe4e8?source=rss-a12b6bfb6c9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f7f97cfe4e8</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[@Olivierodo]]></dc:creator>
            <pubDate>Tue, 22 Mar 2016 02:27:39 GMT</pubDate>
            <atom:updated>2016-05-16T03:27:13.944Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVzlWkLelOtTFI_NP3HuJw.jpeg" /></figure><p>Hello everyone, let’s talk about <a href="https://www.docker.com/">Docker</a>. <br> Docker is an amazing tool to deploy your apps in containers. Open-source and simple, Docker can be the devOp’s best friend.</p><p>I’ll show you how to deploy a NodeJs app on a container.</p><h3>1. A simple NodeJs App</h3><p>Let’s create a small <a href="https://nodejs.org/">nodejs</a> app with the <a href="http://expressjs.com/">express</a> package.</p><p>The package.json</p><pre>// ./package.json<br>{<br>  &quot;name&quot;: &quot;application-name&quot;,<br>  &quot;version&quot;: &quot;0.0.1&quot;,<br>  &quot;private&quot;: true,<br>  &quot;scripts&quot;: {<br>    &quot;start&quot;: &quot;node app.js&quot;<br>  },<br>  &quot;dependencies&quot;: {<br>    &quot;express&quot;: &quot;3.3.5&quot;,<br>    &quot;jade&quot;: &quot;*&quot;<br>  }<br>}</pre><p>The small <strong>hello world</strong> app.js</p><pre>// ./app.js<br>var express = require(&#39;express&#39;);  <br>var app = express();</pre><pre>app.get(&#39;/&#39;, function (req, res) {  <br>  res.send(&#39;&lt;h1&gt;Hello World!&lt;/h1&gt;&#39;);<br>});</pre><pre>var server = app.listen(3000, function () {  <br>  var host = server.address().address;<br>  var port = server.address().port;</pre><pre>  console.log(&#39;Example app listening at http://%s:%s&#39;, host, port);<br>});</pre><p>FYI: How to run a nodejs app</p><p>To run the app, we just need to install the package with :</p><pre>$ npm install</pre><p>Then run the app :</p><pre>node app.js</pre><p>or</p><pre>npm start</pre><h3>2. Create the Dockerfile</h3><p>The <a href="https://docs.docker.com/reference/builder/">Dockerfile</a> is an instructional file that Docker reads to create the container.</p><pre># ./Dockerfile<br>FROM ubuntu:14.04  <br># Define the Env var HOME<br>ENV HOME /usr/src</pre><pre># Update apt and install nodejs, npm<br>RUN apt-get update &amp;&amp; apt-get install -y \  <br>  nodejs \<br>  npm<br></pre><pre># Add the current folder in a container&#39;s folder<br>ADD . /usr/src</pre><pre># Define the workdir folder<br>WORKDIR /usr/src/</pre><pre># Install Express<br>RUN npm install -g express</pre><pre># Create an alias for nodejs<br>RUN ln -s /usr/bin/nodejs /usr/bin/node</pre><pre># Define the port to expose<br>EXPOSE 3000</pre><pre># Command to run the app<br>CMD npm install &amp;&amp; npm start</pre><h3>3. Build the container</h3><p>Before running the container you need to build it with docker build.</p><pre>$ docker build -t docker-intro .</pre><p>The <em>docker-intro</em> image container has now been created.</p><p>See the image list :</p><pre>$ docker images</pre><p>Until you update the <strong>Dockerfile</strong> you won’t need to build your container anymore. <br> <em>Docker has a cache system to build the image.</em></p><h3>4. Run the container</h3><p>Running the container is simple with docker run</p><pre>$ docker run -d -p 80:3000 -v $(pwd):/usr/src --name din docker-intro</pre><p>Parameters</p><ul><li>-d detach the container</li><li>-p 80:3000 Do a port forwarding from the container’s port (3000) to the host’s port (80)</li><li>-v $(pwd):/usr/src Mount the current path ( $(pwd) ) to the workdir inside the container (/usr/src)</li><li>-name din Call the container <strong>din</strong></li><li>docker-intro Docker image to use</li></ul><p>Now you can see the result at the address :</p><pre><a href="http://127.0.0.1/">http://127.0.0.1</a></pre><p>If you use <a href="https://www.docker.com/products/docker-toolbox">docker toolbox</a> use the command `docker-machine ip` to know the docker VM’s ip.</p><p>If you want to run again the container you may have this error:</p><pre>YYYY/mm/dd HH:ii:ss Error response from daemon: Conflict, The name din is already assigned to {CONTAINER_ID}. You have to delete (or rename) that container to be able to assign din to a container again.</pre><p>That means you need to delete the container to run it again.</p><p><strong>If you don’t modify the </strong><strong>Dockerfile it’s not necessary to build your container before running it</strong></p><h3>5. See the running containers</h3><p>To see if the container is running use docker ps :</p><pre>$ docker ps -a</pre><p>You should see something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/0*8Awwt4-vHBHdzhlI.png" /></figure><h3>6. Delete the container</h3><p>if you update your <strong>Dockerfile</strong> you’ll need to build and run your container. If you have an error when you will want to run the container with the same name. So delete the old one.</p><pre>$ docker rm -f din</pre><h3>7. Start, Stop, Restart…</h3><p>Start a container</p><p>If you container isn’t running, start it with docker start</p><pre>$ docker start din</pre><p>Stop a container</p><p>If you container is running, stop it with docker stop</p><pre>$ docker stop din</pre><p>Restart a container</p><p>If you container is running, restart it with docker restart</p><pre>$ docker restart din</pre><h3>8. Enter the container</h3><p>Sometimes you want to enter in the container in development mode or to debug.</p><p>The container is running</p><p>In the case, your container is running you have to use the docker exec command</p><pre>$ docker exec -it din bash</pre><p><em>This way you will access by ssh on your container as root user.</em></p><p>The container is not running</p><p>In the case, the container is not running you have to still can use the docker run command but the the options -i -t</p><pre>$ docker run -it -p 80:3000 -v $(pwd):/usr/src --name din docker-intro bash</pre><p>We use the option -it and decide to override the CMD command from the Dockerfile (npm start) by bash <br> <em>This way you will access by ssh on your container as root user.</em></p><h3>Conclusion</h3><p>Now you know the basics to start with <em>Docker</em>, do a round in the documentation and the dockerhub you will find amazing information.</p><p>Find all the files mentioned at <a href="https://github.com/olivierodo/docker-introduction">https://github.com/olivierodo/docker-introduction</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f7f97cfe4e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>