Brad Lucas

Programming, Clojure and other interests

Release Procedures

June 14, 2017

Some Rules

  • No releases after hours unless previously negotiated
  • Reponsible parties need to be present during the release
    • ie, Developer and Ops
  • Different systems have different release requirements
    • All have dependencies
    • Need to know roll back procedure
    • And, how to know if a roll back is necessary
  • The release may have ‘other‘ tasks. These should be documented and have been previously tested
    • Any env settings, configuration setting changes
    • Database changes
    • Systems that need to be stopped and started as part of the release
    • The ‘recipe‘ should be published
    • The ‘recipe‘ should have been followed in a ‘testing/staging‘ environment

Source Control

  • Use Git Flow
  • Releases are from release/VERSION_NUMBER branches
  • All code should be reviewed if necessary and merged to ‘develop‘ prior to release
    • ie, releases are branched from a stable state
  • Releases are numbered with a x.x.x format
    • Each release should increment intelligently
    • If any confusion get it sorted out ahead of time
  • DevOps will deploy the branch unless previously negotiated

Checklist

Continue reading →

Juxt

June 13, 2017

Overview

While cleaning out some old Gists I found a function I wrote six years ago using Clojure's juxt function.

The gist is here:

https://gist.github.com/bradlucas/1233763

To save a click I'll put the function here after fixing the embarassing typo in the comment.

Continue reading →

Working With A Local Clojure Project

June 12, 2017

Overview

A common workflow when developing a Clojure project is to leverage one or more libraries written by others. When found, you'll review the main documentation page for a library and learn the information you'll need to add to your project.clj file's :dependencies vector so Leiningen can find and load that library. These libraries will typically come from Clojars but can also be loaded from Maven Central.

Behind the scenes, when you build your project, you should know that your configured libraries will be installed in your local Maven repository. Look inside of the .m2 directory off of your home directory.

So far so good. This will be all you need if you are good using these libraries without modification.

The question does arise though when you want to try changing one of these libraries. How can you set things up to allow this is the question.

Continue reading →

PHP To Clojure

June 11, 2017

Overview

I have a few old sites that were developed in PHP using the Zend framework. Since moving to Clojure mostly full-time I thought it would be good to do some house cleaning and move these old sites over to Clojure. While doing so I and seeing that there was a basic pattern to the process I thought it might help others if I mocked up an example and put some notes together.

Now, before I go on I'll say that my example is very simple and it covers a basic site. Highlighting the structure of the PHP/Zend site and the Clojure/Compojure site is the main idea I'd like to get across. Those with more complex sites will clearly need to do more. Hopefully, the following will help get them started.

Repo

To start visit or clone the following repo. It contains two examples of the same simple site. One in PHP and the other in Clojure. I'll walk through the differences.

Continue reading →

Markdown Mode Is A Win

June 10, 2017

I previously mentioned reviving this blog by starting to use Cryogen.

Cryogen works by compiling your posts created in Markdown into HTML using the theme and configuration settings you've setup. This is great because I can edit everything in Emacs just as I do for nearly everything else.

Here, I've been using org-mode for nearly all lists, plans and documents for a very long time. With the discovery of Markdown Mode for Emacs) I've found a new balance. With keystrokes for expanding and moving around your Markdown document that are familar to the org-mode user I've found the new mode is making creating these blog posts as comfortable as when I was creating documents in org-mode.

Continue reading →