Skip to content

Instantly share code, notes, and snippets.

View m0un10's full-sized avatar

Craig Barr m0un10

View GitHub Profile

How to fix breaking change in the AWS developer preview SDK for Go on the client side

A recent commit resulted in a change in naming convention for the client struct. The below is tested on Mac OS X, not sure if it needs adjustment for linux distros or not. This is not an exhaustive fix, it just fixes the APIs that I was using in my projects.

find . -type f -name "*.go" | xargs sed -i '' 's/s3\.S3/s3.Client/g'
find . -type f -name "*.go" | xargs sed -i '' 's/cloudfront\.CloudFront/cloudfront.Client/g'
find . -type f -name "*.go" | xargs sed -i '' 's/dynamodb\.DynamoDB/dynamodb.Client/g'

Generally followed the steps here with some necessary adjustments to get it to work.

Install pyenv

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

Add the following to .bash_profile

@m0un10
m0un10 / latest-git-on-earlier-redhat.md
Last active September 5, 2023 13:42
Installing latest Git on older RedHat Linux derivatives

The default Git that ships with older versions of RedHat-derivates such as (Centos 6, Oracle Linux 6 and of course RedHat 6 itself) may be quite old. If it is a version such as 1.7.1 or earlier, you won't be able to use git with other tools that requirer newer versions such as Jenkins. Below are the steps to install (or upgrade to) a newer version of git. Thanks to Tim for the original article here.

The following should be performed as a root user or with sudo.

If an older Git is already installed, run this to remove it:

yum remove git -y

Install the prerequisite packages and remove the any current Git installation.

@m0un10
m0un10 / upgrade-jenkins.md
Last active July 4, 2019 22:20
Upgrading Jenkins 1.x to 2.x

This is a brute force approach that helped me to upgrade from Jenkins 1.x to 2.x without much pain.

  1. Upgrade Jenkins from the web-console. This is an option under "Manage Jenkins"
  2. If it fails to boot up, check the Jenkins log. In my case, this was at /opt/jenkins/log/jenkins.log
  3. There may be multiple iterations required to fix missing dependencies or invalid/old configurations from Jenkins 1.x. I found it useful to start Jenkins (e.g. service jenkins start) then check the log and make adjustments to fix any startup errors.
  4. Once startup is successful, there will be a "Upgrade Now" banner in the Jenkins web-console. You can click on this and follow the prompts to choose valuable Jenkins 2 plugins such as the "Pipeline Plugin". This plugin allows support of the Jenkinsfile to automate end-to-end Continuous Delivery Pipelines in Jenkins.

The following are resolutions for common startup issues after upgrading Jenkins 1.x to 2.x

  • Remove AJP

This is a simplified version of the instructions at https://bahmni.atlassian.net/wiki/display/BAH/Bahmni+Using+Docker What the instructions don't mention is that there is an easier way to get Bahmni up and running, through Vagrant. All of the docker magic is handled behind the scenes by a docker-compose plugin, so you don't really need to know anything about docker.

Prerequisites

  • Vagrant
  • VirtualBox
  • Git

Booting Vagrant