Skip to content

Instantly share code, notes, and snippets.

View albertorm95's full-sized avatar

Alberto Rojas albertorm95

View GitHub Profile
@BretFisher
BretFisher / swarm-upgrade.md
Last active March 19, 2024 09:37
docker swarm upgrade

Replace your Swarm Manager and Workers with updated versions of docker

  • it's best to replace nodes, don't do apt/yum upgrades.
  • both would work, but VM replacment forces me to think of it as immutable and prevents making pets
  • if you don't want to update join scripts for manager IP's, then do something like Elastic IP's so manager IP's won't change.

Lets assume you have 3 managers and 3 workers on 17.06 and you want to update to 17.12

  • managers: m1, m2, m3
@yonglai
yonglai / playbook_centos_install_docker.yaml
Created November 15, 2017 18:04
An Ansible playbook to install docker-ce on Centos
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
@overdrive3000
overdrive3000 / git-tips.md
Last active May 27, 2021 20:24
Useful git commands

Search a string across commits

git log -S <string to find> --source --all

To find all commits that added or removed the fixed string string to find. The --all parameter means to start from every branch and --source means to show which of those branches led to finding that commit.

Find branches the commit is on

git branch --contains <commit>