In a different world, a quarantine network is something completely different. If you’re a hacker or a network admin or a hobbyist that has come here looking for a solution on how to build a quarantine network. I am sorry. There is no content here on that. There may be later since that is a topic that I am interested in. This is a side project that I am trying to keep as simple as possible. When the world seems to be spiraling out of control, we gravitate towards things that we can control. Having a side project that is relevant to the current situation in the world is a great comfort to me. I’m spending a few minutes here and there on the weekend on this site.

Building

This site is built in jekyll. I chose this because I had no desire to maintain, deploy, or deal with a database. I’ve worked with jekyll and didn’t really look into other static site generators. I’ve very limited time for side projects and I knew I could generate a site and get it deployed somewhere quick without having to go through a new tutorial or adjust to new styles of work. It also meant that I could deploy this to github pages if I wanted to. It’s built to be SEO friendly and the Jekyll admin plugin makes management easy.

Deploying

This is hosted on AWS. I could of gone with heroku, or just kept it on github pages but I wanted to keep my options open with AWS features. I like heroku and the simplicity of github pages but I took a bet that I could keep things pretty simple on AWS.

I think I was able to keep it simple but I still ended up having to configure four different services to get the site up. Five if you count the credentials and IAM groups I had to set up for the CI/CD pipeline.

There’s already tutorials available on how to do this so I’m not going to go into details.

  • Do I wish I had a one click setup option? Yes. I’m sure one exists somewhere, please comment if you know where it is.
  • Was it painless to setup? Not painless enough.
  • Would I do it again? Yes
  • Would I recommend for new programmers/new to AWS? Yes, you should get used to using AWS and this is one of the simpler builds.

To start, I configured everything and deployed the basic site manually. After it was deployed, I went and created a private github repo and put together an automated deploy.

For my the automated deploy, I opted for github actions. I’ve used circle ci in the past for this. There’s no particular reason I went with github actions this time other than I hadn’t before and wanted to look into it. I fully intended to give up quickly and go back to circle ci if it turned out to be too much trouble. It wasn’t, so I stuck with it.

Configuring an action was fairly simple. They had a boilerplate file for ruby projects that I made a few tweaks to. The containers used already have the aws cli installed so that made it even easier. I’ve posted my code below. To reuse it, you’ll have to create a set of credentials on AWS that has access to the bucket where your site lives and store them as a secret in github. Make sure these credentials ONLY have access to the bucket where the site lives. While, we’re at it, make sure you have billing alerts setup on your AWS account. There is always risk using credentials on third party sites so you want to minimize risk as much as possible. I think you can trust github, but you also should not extend that trust a millimeter further than you absolutely need to.

.github/workflows/ruby.yml

name: Ruby

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-deploy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x
    - name: Build
      env: 
        AWS_ACCESS_KEY_ID: ${{ secrets.YOUR_ACCESS_KEY_NAME }} #use github secrets! Do not hard code!
        AWS_SECRET_ACCESS_KEY: ${{ secrets.YOUR_SECRET_KEY_NAME }} #use github secrets! Do not hard code!
        JEKYLL_ENV: production
      run: |
        gem install bundler
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3
        bundle exec jekyll build --config _config.yml,_config-production.yml
        aws s3 sync _site/ s3://REDACTED_BUCKET_NAME

After getting the site deployed, I’ve turned to work on content and improvements. I like being able to make edits on my phone on github and not have to worry about getting on the side-project computer to deploy.

Next Steps

I’m thinking about the possibility of getting some other contributors on this but have yet to reach out or architect for it. I’ve thoughts about hooking up the jekyll admin front end to something that will create github pull requests. That would be a lot of fun and I am desperately trying to talk myself out of it and actually work on the site content. There’s always the possibility of adding some auto generated content from web scraping but I’m not sure where to start.

Random Programmer Thoughts

  • Is learning COBOL a reasonable backup plan for society collapse?