Step 2: CircleCI and S3 Buckets

The second part took longer than usual. Part of this was because I was wrestling with DNS — I don’t think DNS changes ever go quickly — but the other part was because I was hit with another bout of depression. #yaydepression

For the second part I configured CircleCI to build and deploy this blog to an S3 bucket, which I reconfigured with the slidingdown.com URL by using Route 53 as my new DNS provider.

CircleCI

This part was pretty fun. I first setup Docker to make sure it could containerize correctly. This helped me debug a JS dependency for Middleman — something I quickly fixed with mini_racer. Next I figured out how to get it to build on CircleCI. CircleCI lets you build one project for free, which is why I’m having it run my blog, which is a private repo.

One useful piece of information was understanding how to persist data in workflows. The diagram in the article really helped and I was able to cobble the rest together using documentation.

AWS Configuration

The S3 configuration was really straightforward once I got the hang of the naming conventions and what how permission should be setup. I followed Amazon’s guide for setting up a custom domain static site And if you’re wary about copypasta’ing the policy into your bucket’s config, you can get the same results from using the AWS Policy Generator.

Getting CircleCI authenticated was also really easy — I created an IAM user specifically for CircleCI and gave it S3 permissions.

The most annoying part was figuring out I needed to switch from my own DNS provider to Route 53. I was trying to setup my own CNAME record and it didn’t take — S3 balked at my configuration. So I made the switch and everything worked magically.

Putting it all together

And now CI/CD for my blog works! The only nice-to-have I really want to have is SSL support. It’s not necessary because I host a static site, but it’s where the web is heading and Firefox gets angry. There might be an option using CloudFront that I can explore.

Raspberry Pi — I remember you!

Before we begin, fun fact: Middleman doesn’t like generating articles with exclamation points in the title. I’m guessing it has a problem stripping them out when generating the filename. Maybe this is a good opportunity for a pull request!


I’m following Gordon Turner’s Raspberry Pi guide to start step one of putting an information radiator in my home.

Hardware

I’m using an old monitor and an old Raspberry Pi 1. 8 GB memory card from who knows when. Nothing fancy here; why invest in hardware when I haven’t written any software yet?

Turning It On

I guess there’s one piece of hardware I invested in that was a nice-to-have — a Wemo Mini Smart Plug. Right now I have it hooked up to an IFTTT recipe that lets me press a button on my iPad to toggle the Pi on and off. Eventually I’ll have it hooked up to Alexa or put on a schedule so I can see it in the morning and otherwise have the whole thing turned off.

Setting Up the Pi

I followed the Raspberry Pi setup steps to get Raspbian Stretch flashed onto the memory card. (Etcher Pro looks _so_ cool btw) Next was to follow the directions as they were written out! I especially liked the instructions to SSH into the Pi, since that lets me copypasta the scripts easily from my MacBook Pro. After following those instructions, everything worked out!

Next Steps

Next I’ll want to design a website — it’ll have to be pretty lightweight so the Pi can easily render it. I think that’ll be a fun challenge! I also want to get my domains in order: I’ve been having trouble with GitHub Pages and custom domains, so I’ll probably bite the bullet and host on AWS or something. We’ll see what kind of architecture I need.

That’s it for now! This is the first day of a week long “sabbatical” for me. I’m using the time to get caught up on grad work, relax from burnout, and innovate. So far so good!

Be Still

I wrote a Firefox extension called Be Still that blocks traffic from social media websites I need to get myself off of. Right now it’s not published (you can still check it out on GitHub) and it only shows an image, but I’d like to make it more mental health focused going forward. I’d also like to support Chrome, Safari and Edge too.

But right now it’s something. Ironically enough, it was difficult to develop extension because my mind was on fire the whole time. I still don’t have a great system for planning out work — sometimes I cope fine and my brain can keep everything organized, other times it can barely focus on one thing. I’m hoping this extension is a step in a direction that supports people like me, and maybe it can give me ideas for building other tools I might need.

I haven’t written in this blog recently — was a bit held up trying to get my Ghost blog ported. Instead I think I should just keep writing these posts and not worry about importing the past. If there’s ever a time for me to need writing, it’s now.