<?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 kc merrill on Medium]]></title>
        <description><![CDATA[Stories by kc merrill on Medium]]></description>
        <link>https://medium.com/@themayor?source=rss-dbc29c458290------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*edOlXRueOrp4xr0An-Smbg.jpeg</url>
            <title>Stories by kc merrill on Medium</title>
            <link>https://medium.com/@themayor?source=rss-dbc29c458290------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:39:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@themayor/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[Docker, Dev/Test/CI environments, fetch-proxy and Alfred, Oh my!]]></title>
            <link>https://medium.com/@themayor/docker-dev-test-ci-environments-fetch-proxy-and-alfred-oh-my-daed9c41e28e?source=rss-dbc29c458290------2</link>
            <guid isPermaLink="false">https://medium.com/p/daed9c41e28e</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[build-tool]]></category>
            <category><![CDATA[dev]]></category>
            <dc:creator><![CDATA[kc merrill]]></dc:creator>
            <pubDate>Fri, 17 Feb 2017 19:40:46 GMT</pubDate>
            <atom:updated>2017-02-17T19:40:46.946Z</atom:updated>
            <content:encoded><![CDATA[<p>Don’t tell anybody, but I really hated docker when I first started to use it. I mean, who could blame me? I was just a web dev who didn’t care how or where my application was deployed to. That was someone else’s job. Besides, docker at the time was version .4 or something ridiculous and on Centos. /bleh</p><p>That was until it became my job. My CTO at the time felt it was an engineers responsibility to be “full stack”. As the tech lead for the web platform team it was our responsibility to do all things related to the enterprise application including the upgrade from a prehistoric PHP 5.4 to something more modern.</p><p>We tried Ansible. Which is great when all the boxes are exactly the same. We tried writing a shell script with a bunch of different if/else statements. We tried setting up new dev vms but the devs were reluctant to switch over. I don’t blame them, it took forever and a day to get it setup just perfectly(a week actually, for new hires).</p><p>Why a week? Multiple microserves, api’s, styleguides, products, etc … I think all and all there were at least 20 different services needed to be installed and running locally, not to mention the unique setup for each product/service we had.</p><p>Enter docker. Enter fig.</p><p>This was great. Sure, it was painful, but I’ll admit 100% worth it in hindsight. Docker enabled devs to have isolated environments that we could nuke, we could play around with. At the beginning we had a really weird deployment strategy. Not because we were incapable of coming up with different approaches, but because we wanted to come up with a slowly phased approach.</p><p>We volume mounted our data/code in production. We setup docker boxes, 1 container per host, the only different is those VM’s used in prod only had docker installed, and we manually orchestrated the containers. As cumbersome as this was it ended up being a good slowly phased in approach to dockerland. It got us accustomed to all of it’s nuances and it meant we could still use our same code deployment methods. Not an ideal long term solution but easily one that can get you working with docker.</p><p>I think docker has production down easily. So many great tools available, so many great orchestration bits and build tools that it makes it really great for production.</p><p>It’s dev where docker becomes a pain. Sure, you can use docker-compose but it’s really only responsible for running the containers. Which is fantastic, but trying to teach 50+ devs docker it abstracts out way too much. On top of that, it’s only purpose is for containers which is fine, but when you have 20+ services, you need some tiny orchestration to happen. You need ports to be setup, code situated in certain places(volume mounting in dev for quick feedback as example), symlinks and configs setup etc …</p><p>Having been on multiple projects converting over to docker, and having been at different companies with various levels of expertise in said engineering departments I’ve come across a few problems. Being an engineer, I’ve created a few solutions as well.</p><p><strong>Problem: Complicated setups.</strong></p><p>The solution is getting a good/simple build setup. I’ve created one called <a href="http://github.com/kcmerrill/alfred">alfred</a> that is just a simple bash wrapper. You don’t have to use alfred, but you can use gulp, grunt or make even. There are thousands of them out there, choose one that works for you and meets your needs.</p><p>There are multiple benefits to this approach, the main one being is you can have a few maintainers of the build file and everybody gets to benefit from it. Simply by updating your repository(which you should be doing 24/7) you’ll get the latest and greatest configs. Now the dev won’t have to worry about setting up symlinks, putting folders/files in specific places or running certain commands in certain order. Docker is great, but with 20+ microservices it can get complicated quickly.</p><p>Devs can know 2–3 commands to get up and running, and if they want to dive into what is actually going on, they can then look at the build file. If they don’t, then they don’t need to worry about it.</p><p>You train your engineers to run a few commands. For example, alfred up will start up your dev environment. Make a change, or add a new service? You no longer need devs to go hunting for documentation. Simply have them update their VCS and run alfred up again and *boom* you get the latest and greatest.</p><p><strong>Problem: Which ports? What if engineers are using other ports?</strong></p><p>This one is especially true with web services. Do you come up with a convention for ports? What if other products are using the ports you’ve designated? The other problem with this is updating urls locally to be <a href="http://localhost:1200/">http://localhost:1200</a> -&gt; someservice.somedomain.tld is cumbersome and too robotic.</p><p>If you could simply go to <a href="http://someservice.localhost/">http://someservice.localhost</a> instead, this provides a much easier way of identifying the webservice and it doesn’t require port memorization. On top of that you can’t put ports in your etc/hosts so you’ll need some sort of proxy sitting behind port 80.</p><p>Sure, you could create an nginx proxy, or haproxy configuration and that works, but there is an easier way.</p><p><a href="http://github.com/kcmerrill/fetch-proxy">Fetch-Proxy</a> is a way to dynamically map randomly assigned docker ports to host ports via container names. So that <a href="http://localhost:1200/">http://localhost:1200</a> service that is running, if we give the container a good looking name, say “somewebservice” you can now go to <a href="http://somewebservice.localhost/">http://somewebservice.localhost</a> in your browser instead. Automagically. You can then add this service/docker container as part of the configuration seen above.</p><p><strong>In conclusion</strong></p><p>Those have been the two biggest hurdles that I’ve encountered and with both of these tools makes setting up dev environments incredibly simple. There are some cons to this approach no doubt, but all in all, I think it’s been a net positive experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daed9c41e28e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I can show you a failure]]></title>
            <link>https://medium.com/@themayor/i-can-show-you-a-failure-6102cc3bf259?source=rss-dbc29c458290------2</link>
            <guid isPermaLink="false">https://medium.com/p/6102cc3bf259</guid>
            <dc:creator><![CDATA[kc merrill]]></dc:creator>
            <pubDate>Fri, 01 May 2015 04:20:07 GMT</pubDate>
            <atom:updated>2015-05-01T04:20:07.759Z</atom:updated>
            <content:encoded><![CDATA[<p></p><h3>I can show you a failure</h3><p>I’m typically not one for silly tests. “Which Star Wars character are you?”, “What is your personality type?”, “What are your strengths?” or “What color best defines you?”.</p><p>“Oh, you’re an ENTP too!? Now I know how to effectively communicate with you!”</p><p>I tend to lump these tests in with other silly things like fortune cookies and horoscopes. They can be fun, offer a couple insights but typically I will dismiss them and go on to other silly things like new reddit posts or twitter updates. At least there is a slight chance of memes and laughter. I don’t dismiss them because of the science or research behind them but because of the people taking them. I find that people know what questions/answers do what(e.g: choosing answer A over answer B will make me more of an Extrovert, or it will choose RGB color over another color). I don’t know why, but I feel people have a conscious biased as to what they think they are and what they <em>want</em> to be.</p><p>I had to take another one today. A strengths finder. It was different today. Not because I suddenly found merit in the tests(I didn’t, I still find them silly), but there were a few quotes and a few snippets that I found incredibly relevant to my life. It got me thinking and anytime something can get me thinking I will often pause and reflect</p><blockquote>“Show me a satisfied man and I’ll show you a failure.” ~ Thomas Edison</blockquote><p>I love this quote. I had never heard it before today but I love it. I need to think about it some more but it might be my favorite quote. Currently at the top of the list is “No pressure no diamonds” or “Shit or get off the pot”. I think this quote though, if you were to ask me to associate a quote to my life this one would be it. I’ve never been satisfied and those around me who are ho hum drive me nuts. I never understood those that were content working at dead end jobs, or those who were not happy with their situation who did nothing to change it.</p><p>Pull yourself up by your bootstraps you say? Mine are broke. I’ve been pulling on them so damn hard they must’ve snapped. People will often tell me and others I know to be content and to be satisfied. Sure, I can’t complain, but if I ever know of something better out there I can’t stop until it’s mine or I’ve achieved what I’ve set out to achieve. It’s not just materialistic things too. It’s everything. Well, except women but I digress.</p><p>Myers Briggs explains the different personality types. Extroverts do this or that, Introverts do this or that. In this strengths test, I’m an achiever. Which leads to the following ‘Achiever’ comment. It really stuck with me. Like eating too much peanut butter</p><blockquote>Your relentless need for achievement might not be logical. It might not even be focused. But it will always be with you. <strong>As an Achiever you must learn to live with this whisper of discontent. It does have its benefits.</strong></blockquote><p><em>As an achiever you must learn to live with this whisper of discontent. </em>A whisper?<em> </em>It has benefits? It’s never been a whisper. Had it been a whisper I might be better off but it’s not a whisper. It’s more like a stranger’s child screaming it’s head off at your favorite restaurant.</p><p>It’s a benefit? Sure, it can be a benefit on the rare occasion but damn I’d be lying to you if I said it wasn’t a curse. Just the thought of not being good enough, or smart enough, rich enough. It’s an insatiable thirst regardless of how much water you drink.</p><p>I’d give anything to be content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6102cc3bf259" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>