<?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 Ivan Nemytchenko on Medium]]></title>
        <description><![CDATA[Stories by Ivan Nemytchenko on Medium]]></description>
        <link>https://medium.com/@inemation?source=rss-fbcbbe0b1ad3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*u4DnFUo-FHcZcTBI.jpeg</url>
            <title>Stories by Ivan Nemytchenko on Medium</title>
            <link>https://medium.com/@inemation?source=rss-fbcbbe0b1ad3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 12:00:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@inemation/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[Getting Started with 1Activity]]></title>
            <link>https://medium.com/@inemation/getting-started-with-1activity-e6a3059db565?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6a3059db565</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[context-awareness]]></category>
            <category><![CDATA[context]]></category>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Wed, 30 Aug 2017 10:19:36 GMT</pubDate>
            <atom:updated>2017-08-30T10:19:36.424Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s make you on-boarding smooth</h4><p><a href="https://productivitymode.com/1activity">1Activity</a> is a program that <a href="https://medium.com/@inemation/the-mess-on-your-computer-vs-project-centric-approach-25eab70a64a0#a737">saves your time</a>, when you work on multiple projects at a time(read: always). When you want to put downloaded file to specific project folder, you should either use “Save as” dialog, or move the file to project folder from Downloads manually.</p><p>1Activity eliminates it by introducing the concept of <strong><em>Current activity</em> </strong>to your system (if it sounds confusing, read “<em>current project</em>” instead).</p><p>When I plan my weekend, all downloads automatically go to “Weekend plans” folder. When I switch to “1Activity onboarding post”, downloads go to corresponding folder as well.</p><p>Moreover, my current project folder is always one-click away from me:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*MhfeIJhQIiIZCC7isaIbUA.gif" /></figure><p>Or one keyboard shortcut. I don’t spend time browsing through the hierarchy of folder to find required folder.</p><p>Looks interesting?</p><p>To achieve this you need to configure everything properly. Let’s walk you through that.</p><h3>Configuration</h3><p>1Activity creates a folder named “Activities” in your home folder, and a symlink named “Current” which will always be linked to your current activity folder.</p><h4>Browsers</h4><p>To route all downloads to current activity folder you need to specify that Current symlink as a destination folder for all downloads.</p><p>The problem is that if you try to specify symlink itself, browser will resolve it, and set current activity folder as a destination. But we can trick them.</p><p>The following trick works for all major browsers — Chrome, Safari, Firefox, and even Opera:</p><ol><li>Rename ~/Current to ~/Current1</li><li>Create folder ~/Current</li><li>Set it as a Downloads location (in any number of browsers)</li><li>Delete folder ~/Current</li><li>Rename symlink ~/Current1 back to ~/Current</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dIIyfc_RsPd9iGdKW00kg.png" /><figcaption>The expected result in Chrome</figcaption></figure><p>You can leave one browser unconfigured to keep saving everything to Downloads. You can now call it The Mess Browser :)</p><h4>Finder</h4><p>To make finder to open new window with your current activity folder by default, repeat the trick from above again. Expected result in settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*vcMTPB-Nc7gzO02TsKvWPg.png" /></figure><p>The second part is even simpler. Just drag and drop our symlink to Finder sidebar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*4X_LRap5BDeZIc0jouOvXQ.gif" /></figure><h4>Keyboard shortcuts</h4><p>The main functionality</p><p>• Open activities switcher — ⌥Space<br>• Switch to previous activity — ⇧⌥Space<br>• Open current activity folder in Finder — ⌃⌥⌘Space<br><br>1Activity has some “note-taking” features to make you even more productive:<br>• To make screenshot use ⌘⇧X . “✕” is for that cross you have when you make screenshots<br>• Use ⌘⇧I to save clipboard contents as a text note. “I” — is for letter “i” in “cl<strong>I</strong>pboard”.<br>• ⌘⇧O — create text note. “O” —is for letter “o” in “n<strong>O</strong>te”<br>• ⌘⇧U save the URL of currently opened website as a file (works in Chrome and Safari)<br>• When you want to rename last created file in your current activity folder — use ⌘⇧E . “E” is for letter “e” in “r<strong>E</strong>name”.</p><p>Of course, you can redefine any shortcut in 1Activity settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*azTa3hje54WibrCspbsuLA.png" /></figure><p>That should be it! It was not that hard at all, right?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6a3059db565" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The mess on your computer vs Project-centric approach]]></title>
            <link>https://medium.com/@inemation/the-mess-on-your-computer-vs-project-centric-approach-25eab70a64a0?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/25eab70a64a0</guid>
            <category><![CDATA[download]]></category>
            <category><![CDATA[chao]]></category>
            <category><![CDATA[filesystem]]></category>
            <category><![CDATA[entropy]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Fri, 11 Aug 2017 18:11:16 GMT</pubDate>
            <atom:updated>2017-08-11T22:04:21.129Z</atom:updated>
            <content:encoded><![CDATA[<h4>How I managed to put the approach into practice, got my files organized and started saving time while doing less routine operations</h4><p>How is your <em>Downloads</em> folder looks like? Mine looked like this for years:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*Q6IWRL0BI6RQ7oahCC8C-w.gif" /><figcaption>Yeah, I know it is worrisome. Just keep reading and it will go away :)</figcaption></figure><h3>What is wrong with stockpiling?</h3><ol><li>It takes significant time to find a specific file</li><li>Too many things around distract you from the task you’re working on</li><li>The longer you stockpile files, the bigger the problem gets</li></ol><p>All in all, it hurts our productivity, but it looks like we’ve put up with it.</p><h3>Why do we keep this mess?</h3><p>Well, it is the way operating system assumes we should behave: “here’s you <em>Downloads</em> folder — put your <em>downloads</em> there”.</p><p>The trick is that since we put a lot of important (<em>downloaded</em>) stuff there, we often put our work-related stuff in the <em>Downloads</em> folder too.</p><p>Because it is convenient not to think too much about where to store a file.</p><h3>Meet project-centric approach</h3><p>With project-centric approach life seems to be easier:</p><ol><li>Just keep the track of the current project you’re working on</li><li>Have a directory per project somewhere on your computer</li><li>Put project-related stuff in the corresponding folder</li></ol><p>The rules are simple. Why can’t we just follow them to keep our files organized?</p><h3>Project-centric approach in practice is hard</h3><p>In theory, it should work, but you’ll meet a bunch of problems when you try to put it into practice:</p><ol><li>You have to use “Save as..” option in browsers.</li><li>You have to click through the folders hierarchy every time you want to save or open a file.</li><li>You have to make a mental effort to realize the current project and recall the name and the location of the corresponding folder.</li></ol><p>When you have only a few projects, and they don’t change too often you can partially treat these issues by creating shortcuts for them at Finder’s sidebar.</p><p>But what if you have a lot of projects to work on? Most of us do have more than ten parallel projects at a time.</p><p>Because “preparing a weekend trip”, “writing a blog post” or something similar are also (micro-)projects — we just don’t recognize them as such.</p><p>Are we all doomed in this world of multitasking, and the only way to keep our digital assets organized is to spend time on weekends dragging and dropping files around?</p><p>I don’t think so.</p><h3>How I managed to put project-centric approach into practice</h3><p>I faced the very same problem a year ago, and I decided to try to do something about it.</p><ol><li>I created a small app which displayed a name of the current project in the menubar for me.</li><li>Of course, the program had to have a project switcher, so I could switch between them and create new ones on the fly.</li><li>The next logical step was to automatically create a folder per project when a project is created.</li><li>Then I realized that I can trick the browsers to store downloads to the current project folder.</li><li>Finally, I put symlink that always points on a current project to the Finder’s sidebar.</li></ol><p>And that was it! All three major problems of project-centric approach in practice were beaten:</p><ol><li>No need to use “Save as..” All downloads go to a current project folder automatically.</li><li>Current project folder is always one click or one keyboard shortcut away from me.</li><li>The current project name is displayed in the menubar so it reminds me of what I should be working on.</li></ol><p>Moreover, switching between the projects have become an explicit procedure, so it helps me be more mindful about my work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*ePSARMQ6ZePBfK44JwnHzw.gif" /><figcaption>The look of the project switcher</figcaption></figure><p>Finally, I managed to make it a real app so you can try it too. Here’s the link:</p><p><a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads&amp;utm_content=project-centric">1Activity. Declutters your digital assets</a></p><p>But let’s not stop here. I always had a question of how much time 1Activity saves for me per day &amp; per week. Let’s try to answer this question.</p><h3>Measuring the efficiency of project-centric approach with 1Activity</h3><p>We have to make a lot of assumptions in our calculations. Luckily <a href="https://www.getguesstimate.com/">Guesstimate</a>(created by awesome <a href="https://medium.com/u/ec98d22568d5">Ozzie Gooen</a>) helps us to deal with uncertainty.</p><p>Here’re my preconditions:</p><ul><li>Time to find specific folder in Finder dialog: 5 to 15 seconds</li><li>I use “Save to“ dialog from 10 to 20 times per day</li><li>I use ”Open file“ dialog from 5 to 15 times per day</li><li>Number of active projects during the day: 3 to 8</li><li>I lose from 2 to 5 minutes to switch between projects (both mentally and organizationally)</li><li>I switch to unwanted activities from 3 to 5 times during the day…</li><li>…and I lose from 4 to 10 minutes in such activities</li></ul><p>Here’s our model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZW5yxmkspbk3NZr0iMUyA.png" /><figcaption><a href="https://www.getguesstimate.com/models/9369">https://www.getguesstimate.com/models/9369</a></figcaption></figure><p>The answer is that on average I lose <strong><em>57 minutes daily</em></strong>, and <strong><em>from 4 to 11 hours weekly</em></strong>.</p><p>This doesn’t look ignorable, but let’s make more assumptions and estimate how much time <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads&amp;utm_content=project-centric">1Activity</a> saves for me.</p><p>Let’s say that <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads&amp;utm_content=project-centric">1Activity</a> treats our three main problems with the following coefficients:</p><ul><li>Spending time to find specific folder in a dialog(solution: sidebar element) — coefficient of <strong>0.8</strong></li><li>Time loses during switching between projects(shortcuts and explicit switching) — <strong>0.5</strong></li><li>Lack of focus(solution: project name in the menu bar) — <strong>0.3</strong></li></ul><p>With this, our model says, that 1Activity saved me <strong><em>25 minutes per day</em></strong> on average, and <strong><em>from 1.8 to 4.6 hour per week:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*9ToK-T4kVldr4AT80aIBew.png" /><figcaption><a href="https://www.getguesstimate.com/models/9369">https://www.getguesstimate.com/models/9369</a></figcaption></figure><p>I encourage you to <a href="https://www.getguesstimate.com/models/9369">play with the numbers</a>: put your number of active projects and your time losses estimations and get your personal results.</p><p>You can even fork the model by signing up and choosing “File → Copy Model” in the menu.</p><h3>Summary</h3><ol><li>We are stockpiling stuff because it seems natural, and we always did it like that.</li><li>Project-centric approach “as is” is hard to implement because of its cost: a lot of routine operations and the mental effort to keep track of current project and corresponding folder</li><li>With <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads&amp;utm_content=project-centric">1Activity</a> it is possible to preorganize your files on per-project basis, and stop making a mess in <em>Downloads </em>folder.</li><li>Moreover, our approximation shows that project-centric approach with <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads&amp;utm_content=project-centric">1Activity</a> is able to save you time.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25eab70a64a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitLab CI: Deployment & Environments]]></title>
            <link>https://medium.com/@inemation/gitlab-ci-deployment-environments-c5097eb954a2?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5097eb954a2</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Fri, 02 Dec 2016 09:14:08 GMT</pubDate>
            <atom:updated>2016-12-02T09:14:08.522Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>Learn how to set up deployment pipeline to multiple environments</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fWgPP-azFKEKIthK6H--mg.jpeg" /></figure><p>This post is a success story of one imaginary news portal, and you’re the happy owner, the editor, and the only developer. Luckily, you already host your project code on GitLab.com and know that you can <a href="https://medium.com/@inemation/gitlab-ci-run-jobs-sequentially-in-parallel-or-build-a-custom-pipeline-5a1e1124ba98#.mmnp0uh62">run tests with GitLab CI</a>. Now you’re curious if it can be used for deployment, and how far can you go with it.</p><p>To keep our story technology stack-agnostic, let’s assume that the app is just a set of HTML files. No server-side code, no fancy JS assets compilation.</p><p>Destination platform is also simplistic — we will use <a href="https://aws.amazon.com/s3/">Amazon S3</a>.</p><p>The goal of the article is not to give you a bunch of copypasteable snippets. The goal is to show principles and features of GitLab CI so that you could easily apply them to your technology stack.</p><p>Let’s start from the beginning: no CI in our story yet.</p><h3>A Starting Point</h3><p><strong>Deployment</strong>: in your case, it means that a bunch of HTML files should appear on your S3 bucket (which is already configured for <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html?shortFooter=true">static website hosting</a>).</p><p>There’re a million ways to do it. We’ll use the <a href="http://docs.aws.amazon.com/cli/latest/reference/s3/cp.html#examples">awscli</a> library, provided by Amazon.</p><p>The full command looks like this:</p><pre>aws s3 cp ./ s3://yourbucket/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NjyyxHTE7WwxOFgc.jpg" /></figure><p><em>Pushing code to repository &amp; deploing are separate processes</em></p><p><strong>Important detail</strong>: the command <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#config-settings-and-precedence">expects you</a> to provide AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. Also you might need to specify AWS_DEFAULT_REGION.</p><p>Let’s try to automate it using GitLab CI.</p><h3>First Automated Deployment</h3><p>With GitLab, there’s no difference on what commands to run. You can setup GitLab CI according to your needs as if it was your local terminal on your computer. As long as you execute commands there, you can tell CI to do the same for you in GitLab. Put your script to .gitlab-ci.yml and push your code - that’s it: CI triggers a <em>job</em> and your commands are executed.</p><p>Let’s add some context to our story: our website is small, there is 20–30 daily visitors and the code repository has only one branch: master.</p><p>Let’s start by specifying a <em>job</em> with the command from above in .gitlab-ci.yml:</p><pre>deploy:<br>  script: aws s3 cp ./ s3://yourbucket/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><p>No luck:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Avlzo2_lIIUGAokv.png" /></figure><p>It is our <em>job</em> to ensure that there is an aws executable. To install awscli we need pip, which is a tool for Python packages installation. Let&#39;s specify Docker image with preinstalled Python, which should contain pip as well:</p><pre>deploy:<br>  image: python:latest<br>  script:<br>  - pip install awscli<br>  - aws s3 cp ./ s3://yourbucket/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QywVQfOLPjYn_62m.jpg" /></figure><p><em>You push your code to GitLab, and it is automatically deployed by CI</em></p><p>The installation of awscli extends the job execution time, but it is not a big deal for now. If you need to speed up the process, you can always <a href="https://hub.docker.com/explore/">look for a Docker image</a> with preinstalled awscli, or create an image by yourself.</p><p>Also, let’s not forget about these environment variables, which you’ve just grabbed from <a href="https://console.aws.amazon.com/">AWS Console</a>:</p><pre>variables:<br>  AWS_ACCESS_KEY_ID: &quot;AKIAIOSFODNN7EXAMPLE&quot;<br>  AWS_SECRET_ACCESS_KEY: “wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY”<br>deploy:<br>  image: python:latest<br>  script:<br>  - pip install awscli<br>  - aws s3 cp ./ s3://yourbucket/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><p>It should work, however keeping secret keys open, even in a private repository, is not a good idea. Let’s see how to deal with it.</p><h3>Keeping Secret Things Secret</h3><p>GitLab has a special place for secret variables: <strong>Settings &gt; Variables</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yFSzaXpCQZLcVWi7.png" /></figure><p>Whatever you put there will be turned into <strong>environment variables</strong>. Only an administrator of a project has access to this section.</p><p>We could remove variables section from our CI configuration. However, let’s use it for another purpose.</p><h3>Specifying and Using Non-secret Variables</h3><p>When your configuration gets bigger, it is convenient to keep some of the parameters as variables at the beginning of your configuration. Especially if you use them in multiple places. Although it is not the case in our situation yet, let’s set the S3 bucket name as a <a href="http://docs.gitlab.com/ee/ci/variables/README.html"><strong>variable</strong></a>, for demonstration purposes:</p><pre>variables:<br>  S3_BUCKET_NAME: &quot;yourbucket&quot;<br>deploy:<br>  image: python:latest<br>  script:<br>  - pip install awscli<br>  - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><p>So far so good:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jykjEPSsniaIal2d.png" /></figure><p>Because the audience of your website grew, you’ve hired a developer to help you. Now you have a team. Let’s see how teamwork changes the workflow.</p><h3>Dealing with Teamwork</h3><p>Now there’s two of you working in the same repository. It is no longer convenient to use the master branch for development. You decide to use separate branches for both new features and new articles and merge them into master when they are ready.</p><p>The problem is that your current CI config doesn’t care about branches at all. Whenever you push anything to GitLab, it will be deployed to S3.</p><p>Preventing it is straightforward. Just add only: master to your deploy job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VkqxsRU3AnKoJVKA.jpg" /></figure><p><em>You don’t want to deploy every branch to the production website</em></p><p>But it would also be nice to preview your changes from feature-branches somehow.</p><h3>Setting Up a Separate Place for Testing</h3><p>Patrick (the guy you recently hired) reminds you that there is such a thing called <a href="http://pages.gitlab.io/">GitLab Pages</a>. It looks like a perfect candidate for a place to preview your work in progress.</p><p>To <a href="https://about.gitlab.com/2016/04/07/gitlab-pages-setup/">host websites on GitLab Pages</a> your CI configuration should satisfy these simple rules:</p><ul><li>The <em>job</em> should be named pages</li><li>There should be an artifacts section with folder public in it</li><li>Everything you want to host should be in this public folder</li></ul><p>The contents of the public folder will be hosted at http://&lt;username&gt;.gitlab.io/&lt;projectname&gt;/</p><p>After applying the <a href="https://gitlab.com/pages/plain-html/blob/master/.gitlab-ci.yml">example config for plain-html websites</a>, the full CI configuration looks like this:</p><pre>variables:<br>  S3_BUCKET_NAME: &quot;yourbucket&quot;</pre><pre>deploy:<br>  image: python:latest<br>  script:<br>  - pip install awscli<br>  - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;<br>  only:<br>  - master</pre><pre>pages:<br>  image: alpine:latest<br>  script:<br>  - mkdir -p ./public<br>  - cp ./*.html ./public/<br>  artifacts:<br>    paths:<br>    - public<br>  except:<br>  - master</pre><p>We specified two jobs. One job deploys the website for your customers to S3 (deploy). The other one (pages) deploys the website to GitLab Pages. We can name them &quot;<strong>Production</strong>environment&quot; and &quot;<strong>Staging</strong> environment&quot;, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*R2dfo0ywCRD5GDtr.jpg" /></figure><p><em>All branches, except master, will be deployed to GitLab Pages</em></p><h3>Introducing Environments</h3><p>GitLab offers <a href="http://docs.gitlab.com/ee/ci/environments.html#environments">support for environments</a>, and all you need to do it to specify the corresponding environment for each deployment <em>job</em>:</p><pre>variables:<br>  S3_BUCKET_NAME: &quot;yourbucket&quot;</pre><pre>deploy to production:<br>  environment: production<br>  image: python:latest<br>  script:<br>  - pip install awscli<br>  - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;<br>  only:<br>  - master</pre><pre>pages:<br>  image: alpine:latest<br>  environment: staging<br>  script:<br>  - mkdir -p ./public<br>  - cp ./*.html ./public/<br>  artifacts:<br>    paths:<br>    - public<br>  except:<br>  - master</pre><p>GitLab keeps track of your deployments, so you always know what is currently being deployed on your servers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jeK2hb6NA6Vr3wXD.png" /></figure><p>GitLab provides full history of your deployments per every environment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EyCGSSDtDjoyYjwK.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mDWK5bB8eoMqxLeO.jpg" /></figure><p>Now, with everything automated and set up, we’re ready for the new challenges that are just around the corner.</p><h3>Deal with Teamwork Part 2</h3><p>It has just happened again. You’ve pushed your feature-branch to preview it on staging; a minute later Patrick pushed his branch, so the Staging was re-written with his work. Aargh!! It was the third time today!</p><p>Idea! Let’s use Slack to notify us of deployments, so that people will not push their stuff if another one has been just deployed!</p><h3>Slack Notifications</h3><p>Setting up Slack notifications is a <a href="http://docs.gitlab.com/ce/project_services/slack.html">straightforward process</a>.</p><p>The whole idea is to take the <a href="https://api.slack.com/incoming-webhooks">Incoming WebHook</a> URL from Slack…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aUr2fOddPKpA9j8S.png" /></figure><p>…and put it into <strong>Settings &gt; Services &gt; Slack</strong> together with your Slack username:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1wtqaF-CSJeeyI28.png" /></figure><p>Since the only thing you want to be notified of is deployments, you can uncheck all the checkboxes except the “Build” in the settings above. That’s it. Now you’re notified for every deployment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*We-c-cZQArKnQGE8.png" /></figure><h3>Teamwork at Scale</h3><p>As the time passed, your website became really popular, and your team has grown from 2 to 8 people. People develop in parallel, so the situation when people wait for each other to preview something on Staging has become pretty common. “Deploy every branch to staging” stopped working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SieGqEx9m1rXAr77.jpg" /></figure><p>It’s time to modify the process one more time. You and your team agreed that if someone wants to see his/her changes on the staging server, he/she should first merge the changes to the “staging” branch.</p><p>The change of .gitlab-ci.yml is minimal:</p><pre>except:<br>- master</pre><p>is now changed to</p><pre>only:<br>- staging</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RWA0-nK8nU2yoyXd.jpg" /></figure><p><em>People have to merge their feature branches before preview on Staging</em></p><p>Of course, it requires additional time and effort for merging, but everybody agreed that it is better than waiting.</p><h3>Handling Emergencies</h3><p>You can’t control everything, so sometimes things go wrong. Someone merged branches incorrectly and pushed the result straight to production exactly when your site was on top of HackerNews. Thousands of people saw your completely broken layout instead of your shiny main page.</p><p>Luckily, someone found the <strong>Rollback</strong> button, so the website was fixed a minute after the problem was discovered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7b7HC2yW8o-Xwvhz.png" /></figure><p><em>Rollback relaunches the previous job with the previous commit</em></p><p>Anyway, you felt that you needed to react to the problem and decided to turn off auto deployment to production and switch to manual deployment. To do that, you needed to add when: manual to your <em>job</em>.</p><p>As you expected, there will be no automatic deployment to Production after that. To deploy manually go to <strong>Pipelines &gt; Builds</strong>, and click the button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bjbYNzZzZW1Od5rb.png" /></figure><p>Finally, your company has turned into a corporation. You have hundreds of people working on the website, so all the previous compromises are not working anymore.</p><h3>Review Apps</h3><p>The next logical step is to boot up a temporary instance of the application per feature-branch for review.</p><p>In our case, we set up another bucket on S3 for that. The only difference that we copy the contents of our website to a “folder” named by a name of the development branch, so that the URL looks like this:</p><p>http://&lt;REVIEW_S3_BUCKET_NAME&gt;.s3-website-us-east-1.amazonaws.com/&lt;branchname&gt;/</p><p>Here’s the replacement for the pages <em>job</em> we used before:</p><pre>review apps:<br>  variables:<br>    S3_BUCKET_NAME: &quot;reviewbucket&quot;<br>  image: python:latest<br>  environment: review<br>  script:<br>  - pip install awscli<br>  - mkdir -p ./$CI_BUILD_REF_NAME<br>  - cp ./*.html ./$CI_BUILD_REF_NAME/<br>  - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude &quot;*&quot; --include &quot;*.html&quot;</pre><p>The interesting thing is where we got this $CI_BUILD_REF_NAME variable from. GitLab predefines <a href="http://docs.gitlab.com/ce/ci/variables/README.html#predefined-variables-environment-variables">many environment variables</a> so that you can use them in your jobs.</p><p>Note that we defined the S3_BUCKET_NAME variable inside the <em>job</em>. You can do this to rewrite top-level definitions.</p><p>Visual representation of this configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M6nIzhM7UHEA0dHw.jpg" /></figure><p>The details of Review Apps implementation depend widely on your real technology stack and on your deployment process, which is out of the scope of this blog post.</p><p>It will not be that straightforward, as it is with our static HTML website. For example, you had to make these instances temporary, and booting up these instances with all required software and services automatically on the fly is not a trivial task. However, it is doable, especially if you use Docker, or at least Chef or Ansible.</p><p>We’ll cover deployment with Docker in another blog post. To be fair, I feel a bit guilty for simplifying the deployment process to a simple HTML files copying, and not adding some hardcore scenarios. If you need some right now, I recommend you to read article <a href="https://about.gitlab.com/2016/08/11/building-an-elixir-release-into-docker-image-using-gitlab-ci-part-1/">“Building an Elixir Release into a Docker image using GitLab CI”</a></p><p>For now, let’s talk about one final thing.</p><h3>Deploying to Different Platforms</h3><p>In real life, we are not limited to S3 and GitLab Pages. We host, and therefore, deploy our apps and packages to various services.</p><p>Moreover, at some point, you could decide to move to a new platform and thus need to rewrite all your deployment scripts. You can use a gem called dpl to minimize the damage.</p><p>In the examples above we used awscli as a tool to deliver code to an example service (Amazon S3). However, no matter what tool and what destination system you use, the principle is the same: you run a command with some parameters and somehow pass a secret key for authentication purposes.</p><p>The dpl deployment tool utilizes this principle and provides a unified interface for <a href="https://github.com/travis-ci/dpl#supported-providers">this list of providers</a>.</p><p>Here’s how a production deployment <em>job</em> would look if we use dpl:</p><pre>variables:<br>  S3_BUCKET_NAME: &quot;yourbucket&quot;</pre><pre>deploy to production:<br>  environment: production<br>  image: ruby:latest<br>  script:<br>  - gem install dpl<br>  - dpl --provider=s3 --bucket=$S3_BUCKET_NAME<br>  only:<br>  - master</pre><p>If you deploy to different systems or change destination platform frequently, consider using dpl to make your deployment scripts look uniform.</p><h3>Summary</h3><ol><li>Deployment is just a command (or a set of commands) that is regularly executed. Therefore it can run inside GitLab CI</li><li>Most times you’ll need to provide some secret key(s) to the command you execute. Store these secret keys in <strong>Settings &gt; Variables</strong></li><li>With GitLab CI, you can flexibly specify which branches to deploy to</li><li>If you deploy to multiple environments, GitLab will conserve the history of deployments, which gives you the ability to rollback to any previous version</li><li>For critical parts of your infrastructure, you can enable manual deployment from GitLab interface, instead of automated deployment</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5097eb954a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitLab CI: Getting Started]]></title>
            <link>https://medium.com/@inemation/gitlab-ci-run-jobs-sequentially-in-parallel-or-build-a-custom-pipeline-5a1e1124ba98?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a1e1124ba98</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[continous-integration]]></category>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Fri, 02 Dec 2016 08:55:20 GMT</pubDate>
            <atom:updated>2017-02-02T14:04:29.295Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*ko6CgQL5LraGrlHv5D8tEw.png" /></figure><p>Let’s assume that you don’t know anything about what Continuous Integration is and why it’s needed. Or, you just forgot. Anyway, we’re starting from scratch here.</p><p>Imagine that you work on a project, where all the code consists of two text files. Moreover, it is super-critical that the concatenation of these two files contains the phrase “Hello world.”</p><p>If there’s no such phrase, the whole development team stays without a salary for a month. Yeah, it is that serious!</p><p>The most responsible developer wrote a small script to run every time we are about to send our code to customers. The code is pretty sophisticated:</p><pre>cat file1.txt file2.txt | grep -q &quot;Hello world&quot;</pre><p>The problem is that there are ten developers in the team, and, you know, human factors can hit hard.</p><p>A week ago, a new guy forgot to run the script and three clients got broken builds. So you decided to solve the problem once and for all. Luckily, your code is already on GitLab, and you remember that there is a <a href="https://about.gitlab.com/gitlab-ci/">built-in CI system</a>. Moreover, you heard at a conference that people use CI to run tests…</p><h3>Run our first test inside CI</h3><p>After a couple minutes to find and read the docs, it seems like all we need is these two lines of code in a file called .gitlab-ci.yml:</p><pre>test:<br>  script: cat file1.txt file2.txt | grep -q &#39;Hello world&#39;</pre><p>Committing it, and hooray! Our build is successful:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NXyQ3CeAAtoBssAC.png" /></figure><p>Let’s change “world” to “Africa” in the second file and check what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WdBSugD08fcH_jCv.png" /></figure><p>The build fails as expected!</p><p>Okay, we now have automated tests here! GitLab CI will run our test script every time we push new code to the repository.</p><h3>Make results of builds downloadable</h3><p>The next business requirement is to package the code before sending it to our customers. Let’s automate that as well!</p><p>All we need to do is define another job for CI. Let’s name the job “package”:</p><pre>test:<br>  script: cat file1.txt file2.txt | grep -q &#39;Hello world&#39;</pre><pre>package:<br>  script: cat file1.txt file2.txt | gzip &gt; package.gz</pre><p>We have two tabs now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tQ3k7ncP8r3Cr-M0.png" /></figure><p>However, we forgot to specify that the new file is a build <em>artifact</em>, so that it could be downloaded. We can fix it by adding an artifacts section:</p><pre>test:<br>  script: cat file1.txt file2.txt | grep -q &#39;Hello world&#39;</pre><pre>package:<br>  script: cat file1.txt file2.txt | gzip &gt; packaged.gz<br>  artifacts:<br>    paths:<br>    - packaged.gz</pre><p>Checking… It is there:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hoDDiSQr4C8s22t2.png" /></figure><p>Perfect! However, we have a problem to fix: the jobs are running in parallel, but we do not want to package our application if our tests fail.</p><h3>Run jobs sequentially</h3><p>We only want to run the ‘package’ job if the tests are successful. Let’s define the order by specifying stages:</p><pre>stages:<br>  - test<br>  - package</pre><pre>test:<br>  stage: test<br>  script: cat file1.txt file2.txt | grep -q &#39;Hello world&#39;</pre><pre>package:<br>  stage: package<br>  script: cat file1.txt file2.txt | gzip &gt; packaged.gz<br>  artifacts:<br>    paths:<br>    - packaged.gz</pre><p>That should be good!</p><p>Also, we forgot to mention, that compilation (which is represented by concatenation in our case) takes a while, so we don’t want to run it twice. Let’s define a separate step for it:</p><pre>stages:<br>  - compile<br>  - test<br>  - package</pre><pre>compile:<br>  stage: compile<br>  script: cat file1.txt file2.txt &gt; compiled.txt<br>  artifacts:<br>    paths:<br>    - compiled.txt</pre><pre>test:<br>  stage: test<br>  script: cat compiled.txt | grep -q &#39;Hello world&#39;</pre><pre>package:<br>  stage: package<br>  script: cat compiled.txt | gzip &gt; packaged.gz<br>  artifacts:<br>    paths:<br>    - packaged.gz</pre><p>Let’s take a look at our artifacts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*Fjb3hmXfSaL0TudM.png" /></figure><p>Hmm, we do not need that “compile” file to be downloadable. Let’s make our temporary artifacts expire by setting expire_in to &#39;20 minutes&#39;:</p><pre>compile:<br>  stage: compile<br>  script: cat file1.txt file2.txt &gt; compiled.txt<br>  artifacts:<br>    paths:<br>    - compiled.txt<br>    expire_in: 20 minutes</pre><p>Now our config looks pretty impressive:</p><ul><li>We have three sequential stages to compile, test, and package our application.</li><li>We are passing the compiled app to the next stages so that there’s no need to run compilation twice (so it will run faster).</li><li>We are storing a packaged version of our app in build artifacts for further usage.</li></ul><h3>Learning which Docker image to use</h3><p>So far so good. However, it appears our builds are still slow. Let’s take a look at the logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yLxvYs12IsruzQXU.png" /></figure><p>Wait, what is this? Ruby 2.1?</p><p>Why do we need Ruby at all? Oh, GitLab.com uses Docker images to <a href="https://about.gitlab.com/2016/04/05/shared-runners/">run our builds</a>, and <a href="https://about.gitlab.com/gitlab-com/settings/#shared-runners">by default</a> it uses the <a href="https://hub.docker.com/_/ruby/">ruby:2.1</a> image. For sure, this image contains many packages we don&#39;t need. After a minute of googling, we figure out that there&#39;s an image called <a href="https://hub.docker.com/_/alpine/">alpine</a> which is an almost blank Linux image.</p><p>OK, let’s explicitly specify that we want to use this image by adding image: alpine to .gitlab-ci.yml. Now we&#39;re talking! We shaved almost 3 minutes off:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l9_fO4iuURpqe8un.png" /></figure><p>It looks like <a href="https://hub.docker.com/_/mysql/">there’s</a> <a href="https://hub.docker.com/_/python/">a lot of</a> <a href="https://hub.docker.com/_/java/">public images</a> <a href="https://hub.docker.com/_/php/">around</a>. So we can just grab one for our technology stack. It makes sense to specify an image which contains no extra software because it minimizes download time.</p><h3>Dealing with complex scenarios</h3><p>So far so good. However, let’s suppose we have a new client who wants us to package our app into .iso image instead of .gz Since CI does the whole work, we can just add one more job to it. ISO images can be created using the <a href="http://linuxcommand.org/man_pages/mkisofs8.html">mkisofs</a> command. Here&#39;s how our config should look:</p><pre>image: alpine</pre><pre>stages:<br>  - compile<br>  - test<br>  - package</pre><pre><em># ... &quot;compile&quot; and &quot;test&quot; jobs are skipped here for the sake of compactness</em></pre><pre>pack-gz:<br>  stage: package<br>  script: cat compiled.txt | gzip &gt; packaged.gz<br>  artifacts:<br>    paths:<br>    - packaged.gz</pre><pre>pack-iso:<br>  stage: package<br>  script:<br>  - mkisofs -o ./packaged.iso ./compiled.txt<br>  artifacts:<br>    paths:<br>    - packaged.iso</pre><p>Note that job names shouldn’t necessarily be the same. In fact if they were the same, it wouldn’t be possible to make the jobs run in parallel inside the same stage. Hence, think of same names of jobs &amp; stages as coincidence.</p><p>Anyhow, the build is failing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s07RXYnKW8nADx33.png" /></figure><p>The problem is that mkisofs is not included in the alpine image, so we need to install it first.</p><h3>Dealing with missing software/packages</h3><p>According to the <a href="https://pkgs.alpinelinux.org/contents?file=mkisofs&amp;path=&amp;name=&amp;branch=&amp;repo=&amp;arch=x86">Alpine Linux website</a> mkisofs is a part of the xorriso and cdrkitpackages. These are the magic commands that we need to run to install a package:</p><pre>echo &quot;ipv6&quot; &gt;&gt; /etc/modules  <em># enable networking</em><br>apk update                   <em># update packages list</em><br>apk add xorriso              <em># install package</em></pre><p>For CI, these are just like any other commands. The full list of commands we need to pass to script section should look like this:</p><pre>script:<br>- echo &quot;ipv6&quot; &gt;&gt; /etc/modules<br>- apk update<br>- apk add xorriso<br>- mkisofs -o ./packaged.iso ./compiled.txt</pre><p>However, to make it semantically correct, let’s put commands related to package installation in before_script. Note that if you use before_script at the top level of a configuration, then the commands will run before all jobs. In our case, we just want it to run before one specific job.</p><p>Our final version of .gitlab-ci.yml:</p><pre>image: alpine</pre><pre>stages:<br>  - compile<br>  - test<br>  - package</pre><pre>compile:<br>  stage: compile<br>  script: cat file1.txt file2.txt &gt; compiled.txt<br>  artifacts:<br>    paths:<br>    - compiled.txt<br>    expire_in: 20 minutes</pre><pre>test:<br>  stage: test<br>  script: cat compiled.txt | grep -q &#39;Hello world&#39;</pre><pre>pack-gz:<br>  stage: package<br>  script: cat compiled.txt | gzip &gt; packaged.gz<br>  artifacts:<br>    paths:<br>    - packaged.gz</pre><pre>pack-iso:<br>  stage: package<br>  before_script:<br>  - echo &quot;ipv6&quot; &gt;&gt; /etc/modules<br>  - apk update<br>  - apk add xorriso<br>  script:<br>  - mkisofs -o ./packaged.iso ./compiled.txt<br>  artifacts:<br>    paths:<br>    - packaged.iso</pre><p>Wow, it looks like we have just created a pipeline! We have three sequential stages, but jobs pack-gz and pack-iso, inside the package stage, are running in parallel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*3gTuMBJpVC23-JXK.png" /></figure><h3>Summary</h3><p>There’s much more to cover but let’s stop here for now. I hope you liked this short story. All examples were made intentionally trivial so that you could learn the concepts of GitLab CI without being distracted by an unfamiliar technology stack. Let’s wrap up what we have learned:</p><ol><li>To delegate some work to GitLab CI you should define one or more <a href="http://docs.gitlab.com/ce/ci/yaml/README.html#jobs">jobs</a> in .gitlab-ci.yml.</li><li>Jobs should have names and it’s your responsibility to come up with good ones.</li><li>Every job contains a set of rules &amp; instructions for GitLab CI, defined by <a href="https://about.gitlab.com/2016/07/29/the-basics-of-gitlab-ci/#keywords">special keywords</a>.</li><li>Jobs can run sequentially, in parallel, or you can define a custom pipeline.</li><li>You can pass files between jobs and store them in build artifacts so that they can be downloaded from the interface.</li></ol><p>Below is the last section containing a more formal description of terms and keywords we used, as well as links to the detailed description of GitLab CI functionality.</p><p>See also:</p><ul><li><a href="https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/">Learn how to set up deployment pipeline to multiple environments</a></li><li><a href="https://about.gitlab.com/2016/07/22/building-our-web-app-on-gitlab-ci/">Migrate from Jenkins to GitLab CI</a></li><li><a href="http://beenje.github.io/blog/posts/gitlab-ci-and-conda/">Decrease build time with custom docker image</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a1e1124ba98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two reasons to abandon your cloud storage client]]></title>
            <link>https://medium.com/@inemation/two-reasons-to-abandon-your-cloud-storage-client-f0ab379db7a3?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0ab379db7a3</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[dropbox]]></category>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Wed, 10 Feb 2016 13:38:15 GMT</pubDate>
            <atom:updated>2017-08-11T18:20:09.509Z</atom:updated>
            <content:encoded><![CDATA[<p>I bet you have Dropbox account. Or Google Drive. Or maybe OneDrive.<br>All of these services copy some data already contained on your hard drive to a cloud storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XqJoFWp308u5VPxxJCjGPA.png" /></figure><p>This is quite useful when you’d like to:</p><ul><li>create a backup copy of your files,</li><li>share your files with others,</li><li>synchronize multiple working stations,</li><li>or access your files from a portable device, e.g. a tablet.</li></ul><p>But sometimes you really <strong>don’t want</strong> a local copy of data from the cloud storage. I always want that <strong>extra space</strong> in the cloud to save data that may not be relevant now, but has the potential to become useful in the future. Now that’s what I call storage! So I’ve tried to create a setup based on that vision.</p><p>Below are two of my failed attempts and one super-successful.</p><h4><strong>Attempt #1. WebDAV</strong></h4><p>I remember some cloud service not-so-openly introduced WebDAV support for their storage. It seemed encouraging but turned out utterly unusable. A simple listing of files in a folder could take up to several minutes.</p><p>Not mentioning if you’d try to download something at the same time… All in all, it was not an option.</p><h4>Attempt 2. Web interface</h4><p>I tried to use the web interface only, without installing a cloud storage client at all. This method proved useful, though awkward. <br>My files would eventually end up buried in the cloud for all eternity. <br>It was too much of a drag to download them one by one. And I didn’t see the point in synchronizing the entire archive to my hard drive for the sake of a few files. I’ve almost lost all hope when in a few months I bumped into Odrive.</p><h3><strong>Odrive</strong></h3><p>I don’t know, what the developers are thinking, but their <a href="https://www.odrive.com/">app is, in fact, free</a>, which is mind-blowing, as it has two killer features: <strong>multiple storage support</strong> &amp; <strong>unsync</strong></p><h4>Feature #1. Multiple clouds</h4><p>You can link several cloud storages to this client. All of them will be synchronized both ways and stored on your computer in separate folders. <br>Yes, you can link Google Drive, too. And yes, you can add two Dropbox accounts. Or even three.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjJy0D2AEoBSVyi0pVpj3g.png" /><figcaption>Incomplete list of storages supported by Odrive</figcaption></figure><h4>Feature #2. Unsync</h4><p>Imagine this: you’ve just finished editing a movie about 5 Gb. Next wait for the movie to sync with a “conditional cloud storage” (dropbox or whatever) and press Unsync. In result, you get a “shortcut” — a zero-sized file. <br>If you want it back, just click on the shortcut and it will start downloading it to your hard drive. The same applies to folders too:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*cQgStxh0R6fq2_3G6wHn1w.gif" /><figcaption>Notice the file size</figcaption></figure><p>The problem I’ve faced when navigating folders using WebDav is solved easily: you simply keep the structure for the most used folders on you hard drive and Unsync all the actual files.<br>I could close the subject at this point, but it’s not the end of our story.</p><p>While reviewing the list of supported storages for Odrive I’ve noticed <a href="https://www.amazon.com/clouddrive/home">Amazon Personal Cloud</a> with <strong>unlimited storage</strong> for the price of $60 a year.<br>This would be just $5 a month, which is two times cheaper than a terabyte storage on Dropbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*y35Ko-6wpsQJWkcTPMbfpg.png" /></figure><p>Please read the next part with caution. Chances are, you’ll end up abandoning not only your cloud storage client but also your cloud storage service as well.</p><p><em>UPD: Amazon updated their plan, so now you get only 1TB for this price. This didn’t change a lot to me, since I haven’t reach 1TB anyway, and I use odrive to sync with multiple clouds, not just Amazon.</em></p><h3>Оdrive + Amazon Private Cloud synergy</h3><blockquote>The term “Synergy” means the interaction of two or agents or forces so that their combined effect is greater than the sum of their individual effects.</blockquote><p>Which is exactly what is happening with the Odrive + Amazon Private Cloud pair.</p><p>I suppose, when Amazon is offering unlimited storage, the service does count on a finite size of the users’ hard drives after all. But with <strong>Unsync</strong> this is no longer a limitation. Which means we really are able to use <em>unlimited</em> storage!</p><p>Just take a moment to sit back and imagine that. I’ll wait.</p><h4>My personal user experience</h4><p>No, I haven’t used Amazon to upload petabytes of data. <br>I merely created my dream configuration, when all the heavy-weight but needed stuff is stored in a cloud, but still within reach.</p><p>Furthermore, I’ve started gradually moving my archives from a 1TB external drive to Amazon cloud. <br>This is a slow process with the bottleneck being the hard drive disk size (I’m using a MacBook with 128 Gb storage) and the upload bandwidth speed of internet connection.</p><h4>Minor downsides:</h4><ul><li>Once you abandon storage client apps, you won’t be able to use data sharing features from the OS user interface.</li><li>Odrive cannot handle symlinks. At all. So your symlinks will end up with a permanent “Not allowed” status until you delete them manually. This means you won’t be able to upload your entire system to Amazon using Odrive.</li></ul><h4>And upsides:</h4><ul><li>Odrive has its own quite simple tool for sharing folders/files (implemented as a web page).</li><li>After several months of using Odrive, I still wasn’t able to lose any of my data, though it felt risky.</li><li>Amazon gives you a free subscription for three months to keep you on the hook for good, so I didn’t have to spend a dime yet.</li></ul><h3>Where does this come from</h3><p>I am the author of the app called <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads">1Activity</a>. It solves the problem of digital clutter on your computer by introducing the concept of <strong>current activity</strong> to your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfXFZUCnIDu02q2fA1tNtA.png" /></figure><p>You create(or switch to) activities on the fly — 1Activity routes your downloads straight to the current activity folder. As a result — you have your files pre-organized without manual browsing through hierarchy of folder.</p><p>I love synergic effects, and I sync the stuff organized by <a href="https://productivitymode.com/1activity?utm_source=medium&amp;utm_medium=footer&amp;utm_campaign=medium_leads">1Activity</a> to cloud with odrive, and they play nice together.</p><p>Read this article to learn a way to keep your digital assets organized with zero efforts:</p><p><a href="https://medium.com/@inemation/the-mess-on-your-computer-vs-project-centric-approach-25eab70a64a0">The mess on your computer vs Project-centric approach</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0ab379db7a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code organization style in Semaphore]]></title>
            <link>https://medium.com/@inemation/code-organization-style-in-semaphore-68c3340bb3dd?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/68c3340bb3dd</guid>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Mon, 09 Jun 2014 07:35:38 GMT</pubDate>
            <atom:updated>2014-06-09T07:35:38.519Z</atom:updated>
            <content:encoded><![CDATA[<h4>Interview with guys from Rendered Text</h4><p>I decided to collect stories about how different ruby teams and developers manage complexity of their ruby applications.</p><p>And as a result of <a href="https://medium.com/@inemation/2a9ffbe09726">my previous post</a>, I was happy to spend a day in the office of company named <a href="http://renderedtext.com/">Rendered Text</a>. If you’re not familiar with their product Semaphore yet — just <a href="https://semaphoreapp.com/">go and check it</a>.</p><p>I asked the team everything I wanted: about the company, product and their code. Now I am happy to share it.</p><p><strong>1. About the company</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFVR0HId01mIzhFb083fvg.jpeg" /></figure><p>— Rendered Text story started five years ago. Now we’re product company and stopped doing work for clients. We launched <a href="https://semaphoreapp.com/">Semaphore</a> two years ago. And we were developing it for almost year before launch.</p><p>We always wanted to do our own product, and we waited for good timing for that. We recently grew up and current team size is 8 people.</p><h3><strong>2. About the product</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*irn4e79pEmx9GrvvC_R69g.png" /></figure><p>— Even before we started this product and were doing consulting, we started some kind of social network for sharing events. If we were doing it now, it would be called a startup. But it required a lot of marketing work, which we couldn’t do right at that point. So doing our own thing is something we always wanted to do.</p><p><strong>— What are your next plans? Do you plan to launch more products? </strong>No, we plan to focus on Semaphore. We have some ideas, to make it more than just CI. Moreover, we’re on billion-dollars market, and we don’t have our billion yet ☺</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oatq-xqkPjAX6D0aF1cTrw.jpeg" /><figcaption>Marko Anastasov (<a href="http://twitter.com/markoa">@markoa</a>) and Darko Fabijan (<a href="http://twitter.com/darkofabijan">@darkofabijan</a>) at their workplaces</figcaption></figure><h3><strong>3. And the most interesting part: the code</strong></h3><p>— Our Rails code organization style is guided by Single Responsibility Principle.</p><p>— We treat the principle as a guide and don’t go to the extremes — models still have some business logic. It’s fair to say we try to keep both controllers and models skinny. Services implement use cases — the bulk of work.</p><p>Several things sprout from following the style:</p><ul><li>A controller method never performs more than a single <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> action. It calls a service that talks to domain objects and other services to perform a task.</li><li>There are less model callbacks. Factories are used to setup a model instance correctly.</li><li>Authorization layer is separate from controllers. For authorization we use <a href="https://github.com/elabs/pundit">Pundit</a>.</li><li>One line Rake tasks. A task calls a service that performs the weightlifting. Testing Rake tasks is straightforward — you write a test only for the service.</li><li>Domain related code and services live in lib/appname directory.</li></ul><p>This was the first post on code organization style. I’ll come with more of these soon. <a href="http://twitter.com/inemation"><strong>Follow me</strong></a><strong> </strong>to be notified about new posts. Want to share your story? <a href="/service/mailto:nemytchenko@gmail.com">Drop me a line</a>.</p><p><em>— </em><a href="http://about.me/inem"><em>Ivan Nemytchenko</em></a><em>, ruby code anthropologist :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68c3340bb3dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Serbia]]></title>
            <link>https://medium.com/@inemation/current-status-serbia-2a9ffbe09726?source=rss-fbcbbe0b1ad3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a9ffbe09726</guid>
            <dc:creator><![CDATA[Ivan Nemytchenko]]></dc:creator>
            <pubDate>Thu, 15 May 2014 21:49:52 GMT</pubDate>
            <atom:updated>2014-06-08T16:39:53.442Z</atom:updated>
            <content:encoded><![CDATA[<h4>Looking for Ruby devs to meet and share experience</h4><p>I am using Ruby on Rails since 2006. For years I believed in Rails-way as a single possible way to write web-applications. But recently I had an epiphany about what I was missing in my attempts to write maintainable and clean code.</p><p>Since this drawing below become quite popular, it seems there’s a lot of people, sharing same thought that something might be wrong with Rails way:</p><h3>Twitter / inemation: Current state of ruby on rails ...</h3><p>Current state of ruby on rails community. //cc @adman65 @avdi @andrzejkrzywda @_solnic_ pic.twitter.com/1WUJS6c7Yy</p><p>I have 30-mins speech about how I came from monolithic application to a set of small apps with modular architecture. I already had a pleasure to share it with guys from <a href="http://7bits.it/">7bits</a>(Omsk) and <a href="http://activato.com/">Activato</a>(Belgrade).</p><p>If you’re a web-development agency and use Ruby &amp; Rails in your regular work, it would be great to meet with you and learn from each other.</p><p><em>Currently I am in Serbia, and will be here until end of May. </em><a href="/service/mailto:nemytchenko@gmail.com"><em>Drop me a line</em></a><em>, if you’d like to meet.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a9ffbe09726" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>