2019
Feb

#dynolocker

https://github.com/joshmyers/dynolocker Archive: https://archive.sweetops.com/dynolocker/

2019-02-14

Erik Osterman
05:19:04 AM

2019-02-08

richwine
11:02:56 PM

@richwine has joined the channel

2019-02-07

joshmyers

Morning

joshmyers

Sure, PRs always welcome

joshmyers

it was a hacky tool whipped up due to a race condition when bootstrapping Vault nodes (a few years back now)

joshmyers

locksmithctl by coreOS may also be interesting

Erik Osterman

That one requires etcd, no?

joshmyers

Yeah it was based off etcd

Erik Osterman

That might not work well if running outside of k8s

joshmyers

dynolocker might not work well outside of AWS

joshmyers

well, def won’t

Erik Osterman

Haha well, kinda depends on what “outside” means ;-)

Erik Osterman

But yea, I get your point. For our purposes, AWS is an acceptable requirement.

Erik Osterman

(And already use it for terraform locking)

joshmyers

Yeah, I was going to try and do more with it and actually have it do sane things with process and signals etc but never got around to it

joshmyers

huh, I like this Variant

2019-02-06

Erik Osterman
11:34:06 PM

@Erik Osterman has joined the channel

Erik Osterman
11:34:06 PM

@Erik Osterman set the channel purpose: https://github.com/joshmyers/dynolocker

joshmyers
11:34:06 PM

@joshmyers has joined the channel

mumoshu
11:34:07 PM

@mumoshu has joined the channel

Erik Osterman

@joshmyers was just talking with @mumoshu about your tool

Erik Osterman

i’ve been referring a bunch of people over to dynolocker

Erik Osterman

there’s no good solution like this that does distributed locking.

mumoshu

@joshmyers hi!

Erik Osterman

@mumoshu has an interesting (common) use-case about renewing locks

Erik Osterman
11:35:57 PM
aknysh
11:36:20 PM

@aknysh has joined the channel

Erik Osterman

@joshmyers is based in GMT (London), so he’ll be online tomorrow

11:37:17 PM

@ has joined the channel

Erik Osterman

@ are you guys doing any distributed locking?

dustinvb
11:37:41 PM

@dustinvb has joined the channel

I don’t remember

Erik Osterman

I was also sharing dynolocking with @dustinvb from codefresh

mumoshu

ah i remembered that i had created a very similar command myself 3 years ago, but in ruby https://github.com/crowdworks/joumae-ruby#cli

crowdworks/joumae-ruby

A client library for the Joumae lock service. Contribute to crowdworks/joumae-ruby development by creating an account on GitHub.

mumoshu

i definitely like a command written in golang am eager to submit a pr to dynolocker if that makes sense

mumoshu

dynolocker run --lock_name mylock --renew_interval 30s -- terraform apply

Erik Osterman

yea, let’s breath some life into it

1
Erik Osterman

also wire it up with a codefresh pipeline to build binary releases

Erik Osterman

then we can also distribute through cloudposse/packages

1

so the use case is…?

Erik Osterman

see the snippet above

Erik Osterman

basically, you need to lock something which could be used across pipelines or even within the same pipeline

1
Erik Osterman

for example, if you’re terraforming, you want to lock a project to a pull request

Erik Osterman

(e.g. like in atlantis)

Erik Osterman

also, i’ve had the problem we’re we merge 2 PRs too close to each other

Erik Osterman

and we end up doing concurrent helm deployments of the same app

Erik Osterman

we should really be locking a helm release before performing a helm deployment

Erik Osterman

that’s (2) very strong use-cases for locking

Erik Osterman
11:46:23 PM

@Erik Osterman set the channel topic: https://github.com/joshmyers/dynolocker

mumoshu

probably it is unlikely to happen when you run the pipeline on a new commit to e.g. master

Erik Osterman

(happened to me yesterday… and we have wait: true, so second release was rolling out destroying pods from first release)

Erik Osterman

first release then was blocked by second release completing

mumoshu

but i do have encountered the same situation as erik’s in my terraform pipeline powered by github flow(the latest one, apply/deploy before merging for final testing)

Erik Osterman

i think for terraform it’s scarier

Erik Osterman

are you using codefresh with terraform now?

mumoshu

not yet, but i’m seriously considering to move to codefresh for anything related to github flow

2019
Feb
    keyboard_arrow_up