Holy Atomic Operating Systems, Batman!

This one is going to be short. My company has a weekly ‘Docker Roundup’ that the ‘Misfits of Docker’ participate in. We use an hour each week to explore what all of us are working on that’s related to containers and container orchestration.

Additionally, we’ve recently started having a ‘theme’ for the meeting, a task to accomplish related to containers or container orchestration.

For the last one, I requested that we cover Atomic Hosts. We followed this guide – I should point out that we followed the directions almost exactly, even though some strings had changed, with the exception of the 192.* IP addresses. We replicated the steps on an AWS cluster.

It was a bit odd to instantiate a pod directly in kubernetes ( rather than a replication controller ), so we moved onto another guide that included an expose command, and that’s about where our success ended: Amazon and Kubernetes don’t know each other well enough for Amazon to respond to the expose command.

Other than that, though, the experience went pretty well: We were able to get a modern kubernetes cluster working that could create a single pod ( or replicated pods ) in under an hour. This was, by far, the fastest way to get a kubernetes cluster working on the cloud. Everything else that we’ve tried - CentOS guides and coreOS guides - have resulted in more work than an hour’s worth. Recently I found one in Kubernetes/Contrib that uses Vagrant to set up the entire cluster, but doesn’t work – at least not without OpenStack.

The Next Blog

Goodbye Wordpress

I lost my desire to blog with Wordpress the first time I watched it mangle my spacing, and then enforce whatever it was doing by not taking changes … until my efforts to make it accept my deisred whitespace wiped out the entire post. I remember feeling particularly angry that I had found a bug report mentioning this … that was … … years … old. Or maybe it was when I was messing around with themes, and I did something in the theme that caused the entire site not to load. Or maybe it was the day that I realized that all the posts are stored in a database, so there’s no easy way to backup. And restoring a Wordpress site? By the time I considered that nightmare, I was determined to avoid that level of hell by avoiding blogging altogether.

It was beginning to feel a lot like Microsoft tech: big, bloated interfaces that save your data in secret places that are a nightmare to back up. … crashes, wasted time … wasted hours, days, ( which I projected would later be followed by weeks and months ).

And I was supposed to maintain a spririt of creativity throught that? Shaking my fists at inanimate computer screens ( which aren’t even part of the problem ) – is not my idea of time well spent.

My experience with Wordpress wasn’t all bad. It gave me standards for a blogging platform:

  • I wanted to be able to edit files off-line
  • I wanted the posts to be as effortless to maintain as possible
  • I didn’t want everything in a database
  • As a matter of fact, maybe not a dynamic site, at all
  • I wanted the data backed up to the cloud somewhere
  • I wanted solid revision control
  • I wanted the site to be easily restorable

If you’ve ever worked with Wordpress, you might notice that the list above is sort of the antithesis of Wordpress.

And while I wanted convenience, I still wanted the end result to be more customizable ( and less expensive! ) than those website-in-a-box kind of places.

And then I happened to see a demo where someone had married static site generation ( with Jekyll ) with devops style cleverness. ( I talk about how this site is set up here. )

I just knew this was my ticket to a blogging platform that would be a better fit for me.

And it just so happened that this solution came with free revision control (backups) AND free hosting? I hadn’t even dared put on my list of standards that I didn’t want to manage a web hosting account for the site. I didn’t dream I’d find such a thing.

Hello Chaos

So, I took the time to duplicate what I saw in the demo, and suddenly found myself confronted with a new, empty page; with chaos. Where the page was once taken up by “helpful” fluff of all kinds, now it was like the page was staring back at me.

Well, what are you going to do now?

It was a feeling similar to the feeling I had when I finally succeeded in switching to Linux: I had been used to hand-holding, and suddenly confronted with so much more potential than my hand-holding-conditioned mind could fathom. All of the layers that I had once been comfortably unaware of now held key clues that I needed to understand to use my system efficiently.

What did I want?

My mind boggled at the sheer potential. If I could do anything, what would I do?

I wanted my blog to be friendly to human beings and different devices. It seemed like Jekyll themes already considered mobile devices and computer screens, out of the box, but friendly to people? How could I ( who am not a web developer ) make such a thing? How would I make it human-friendly?

That was when I remembered my favorite theme: Solarized – which has light and dark choices, both designed to be easy on the eyes. And that was when I realized, that if Jekyll builds static pages in files saved locally to my hard drive, then I could tap into my scripting aptitude to mangle the static files after the build, and create the effect of a dynamic ( theme-switchable ) site with all of the advantages of a static one.

So, apparently, when confronted with chaos, I can build something that I would have never conceived of without staring down the void.

Blog Fail

In my last post, I pretty much slammed Wordpress and mentioned that I was using a Jekyll container to convert simple paragraphs ( Markdown files ) into web pages. Well, when I went to update my blog with my first post, I ran into a few issues that meant that the post never actually made it onto the blog.

Since I’m here at these crossroads now, I’ll blog about the issue that prevented Jekyll from working. In a word, the issue seems to be ‘docker-machine’.

I’m relatively new to container tech. To get Docker running on my laptop ( MacBook Air ), I first went to Docker. They had a friendly Mac install, and I soon found myself running hello-world ( through VirtualBox ). I don’t recall why, but I also found myself checking out Vagrant. Through Vagrant, I found myself running a similar container. I didn’t really see the difference between the two.

Well, one possible difference concerns the issue that I had with docker-machine when I tried to run the Jekyll container: docker doesn’t actually run on the Mac. Instead, docker-machine does this weird thing where it sets environment variables, and the docker command can then be magically accessed. At least for a while. In the case of the Jekyll container, when I was originally setting up my blog, I had set up the container with no issues, and then run it many times, with no issues. Then I had shut down the container. I had anticipated that it would just sit there, and be ready when I needed it. After all, it was a container: if it ran once successfully, since nothing persists in containers unless written to specially mounted volumes, then it should run perfectly, every time.

As I mentioned, that was not the case. I was getting errors from docker. ( I have since stopped using docker-machine on the mac, so I can’t cite what they were. )

I recalled that I had also seen this at work. I had been unable to find a solution on Google, and had ultimately found a post where an error that seemed fundamental enough that it really needed to be fixed, remained in an un-fixed state after some time. Months? Years? I really don’t recall. But I did know that I needed the thing I was working on to be fixed today, so I reimplemented it using Vagrant instead:

I recalled finding a nice image in a Vagrantfile produced by a group that calls themselves Phusion when I was trying to get a container going with grafana and graphite. Instead of relying on magically accessing the docker command, a VM was created by Vagrant that itself ran docker.

It could very well be that I’m just not running docker-machine the correct way. That maybe something happens when I shut my laptop and put it into sleep mode. Or maybe I need to shut down the terminal where I set the environment variables. However, when discussing this with my supervisor later that day, he commented that he had ditched docker-machine for Vagrant, as well. From a user-experience perspective, Vagrant just works.

The Jekyll container approach to blogging on github was mentioned in a docker/cloud meetup that I went to. After the meetup, Boyd posted the link to his blog where he details how to set it up.

Because I ran into the same issues that I ran into at work with docker-machine, I intend to set a Jekyll container environment up in Vagrant, which I consider to be much more stable.

So the process will look like this:

  • Configure a github.io account
  • Install Vagrant and VirtualBox
  • Get and build the VM that runs Docker
  • Within the image, build the Jekyll image
  • Run the Jekyll image
  • Set up a base blog
  • Make a change, commit the repo

Now that I’ve listed the steps out, it doesn’t seem as straightforward as it did in my head. Then again, consider that what I am aiming to do is to build an environment that will convert simple paragraphs to a version-controlled ( backed up ) blog ( that can be worked on, though not updated ) without an internet connection – in effect, build a blogging platform that replaces the need for Wordpress ( for simple content ).

I don’t mind taking a few extra steps to get this set up, so long as the end result is that I can run it at will, when I want to, and the work is backed up.

Once this blog is set up, the creative process should look like this:

  • vagrant up / vagrant resume
  • make local changes to markdown files
  • run mangling scripts ( for the dual-theme static site )
  • check local copy
  • commit changes to (web) source repo
  • vagrant halt / vagrant suspend

( all of that can be done without access to the net ), then, when the net is accessible:

  • push changes to source repo
  • cd into _site directory, push changes to site repo

The last step will result in updating the live site.

Hmm. Still seems like a long list. But I think the tradeoff will be worth it.

Update ( March 3, 2016 ) :

I’m now blogging with a Mac through a Vagrant-Docker-Jekyll combo. No mysterious “can’t access the VM / container issues”, though there was an odd caching issue with icons that I solved by removing all the icons and then restarting the vagrant box.

I’ll include all the steps I took to get this monster working soon!

New Blog, First Post

About a year ago, I tried to start another blog. I have had this nasty habit of trying to start blogs, and then just not keeping up with them. This time was going to be different. Until I started it with Wordpress. I honestly don’t know why anyone has time for that platform. On my first entry, I ran into the issue of Wordpress ignoring my desired line-spacing, and willfully inserting its own. What? I can’t control the output? I have to just settle for whatever Wordpress thinks is sufficient? That’s not my usual relationship with software. I prefer to do the deciding, and for the software to comply. Consistently.

The next gotcha that I ran into was when one of my posts just mysteriously disappeared while writing it. I looked into using plugins to back it up, and then determined that the words that I anticipated spending my time writing … were hidden away in a database somewhere. Worse, it looked like it was going to be a thing to restore a site.

I don’t have time for such things. I live in a word where I allocate most of my time trying to figure out how to get computers to do things. For a while, that was all that I had time to do. Because depression. … It was a balancing act: how to do the work that I need to do to complete my work goals with the time that I’m not under a cloud of darkness?

Today, depression hits me differently. Mostly, I remain standing. The darkness is not nearly as dense. The last few times, I found myself saying that I felt like I could not track my thoughts, but it hadn’t registered as depression to me because there wasn’t a feeling of hopelessness. For now, I’m guessing that this is what depression feels like when the biological process happens and doesn’t trigger a mood drop. I’m guessing this because I’m taking preventative measures against mood drops, like exercising, and observing and curating my thoughts.

My process has led me to intentionally structure my time for more space away from work. I use this time to come closer to achieving that work-life balance that the company was always talking about.

So today, I have time for myself. I consider it mandatory to invest some of that time into exercise. I also choose to spend time with loved ones. And quality of life management.

Quality of life management is a new category for me. So much so, that I’m not really sure what I should call it. For the past two years, I have lived in a room that seems too small for me. It may actually be too small. But I’ve never been able to keep things put away long enough to make that determination. Because there isn’t much space. And depression. … When a wave hit, it used to wash out everything under my feet.

Structuring my work to leave more time for myself was a bold move for me. Accepting that I needed more time than I was getting in order to manage my life was not an easy thing for me to do. At first, I tried a career change.

This was, in itself, huge for me. I went from the software / system administration field to becoming an LMT. While working in a brand new field to me, the difference between being in a field where I truly knew very little, and being in a field that was difficult for a human being to do with his brain, became more evident to me. I had been telling myself that I just wasn’t any good at what I had been doing. But something about working in a new field with very knowledge helped to better frame the evidence I had that I was actually quite skilled in the field that I had left.

I’m off topic. Here’s the short version: I got a new job at the same company doing exactly what I wanted ( instead of what I had been doing ), paying twice as much, with more time off for myself.

With that, I’m back to the present, where I sit typing on 750words.com ( because it seemed interesting to do it that way ), in anticipation of loading this blog post into a new site that doesn’t run Wordpress, but instead, takes advantage of the distributed repository, github, and runs Jekyll in a container to generate these words, literally from plain text paragraphs into what you see right now.

  • Backup? Check.
  • Formatting? Check.
  • Efficiency? Check.

In a future post, I’ll address more about Jekyll, and how not having prefabricated css influenced my design decisions.

Page 2 of 2 Older →