The lazy programmer scripts
scripts that work

Overview for git

Lazy upgrade GitLab

Upgrading or installing GitLab can be a very simple or very complicated endeavor, depending on how you perform it and what are your requirements.

In my setup, I had GitLab version 12.6.3-ee.0 installed using Omnibus on an Ubuntu 18.04. At the moment, the latest version of GitLab is 13.3, but I chose to upgrade to the latest version of 13.2.x, as I considered it more stable. I will upgrade to 13.3.x when 13.4.x appears.

These are the raw information I used when choosing the upgrade path:

I chose to perform the upgrade in multiple stages, 7 to be more exact:

  • 12.6.3 -> 12.6.8 -> 12.7.9 -> 12.8.10 -> 12.9.10 -> 12.10.14 -> 13.0.14 ->13.2.9

I have chosen the path as I wanted to perform upgrades between minor version to minor version. In addition, upgrade 12.6.3 -> 12.6.8 was added for a safer patch to patch version upgrade (according to semantic versioning MAJOR.MINOR.PATCH).

Besides the apt upgrade, two manual interventions were required:

  • update unicorn settings when upgrading from 12.6.3-ee.0 to 12.6.8-ee.0
  • upgrade postgres version to v11 after installing GitLab version 12.8.10-ee.0

The following script should not be run automatically, as things can go wrong between every upgrade. Perform functional tests between every upgrade to make sure GitLab works as expected.

The commands should be run with administrative privileges (sudo).

Written by kami on Friday September 11, 2020
Permalink - Tags: linux, bash, gitlab, ubuntu, git, apt

Lazy see git merge history

When a git tree gets merge commits, the liniar history gets very hard to check, especially when you want to do a git bisect.

This git command will show you only the git merge commits from the base tree.

Written by kami on Wednesday December 12, 2018
Permalink - Tags: git, github


Lazy build from source apache2 with HTTP/2 support

This script builds apache2 on Linux with HTTP/2 protocol support.

Tested on Ubuntu 15.04.

Ubuntu 14.10 and 15.04 come by default with apache2 version 2.4.10.

The minimum required version for apache2 with HTTP/2 support is 2.4.17, downloadable from https://httpd.apache.org/download.cgi.

More information about HTTP/2: https://http2.github.io/

More information on how to build apache2 and configure with HTTP/2 support: http://icing.github.io/mod_h2/howto.html

Clients that support HTTP/2 protocol are latest version of curl with libcurl http2 support, Mozilla Firefox Nightly or Google Chrome Canary.

Make sure you do not have apache2 already installed and running on port 80.

Written by kami on Tuesday October 20, 2015
Permalink - Tags: ubuntu, bash, git, webserver, apache2, apt-get