Fork me on GitHub
#clojure-uk
<
2016-11-25
>
practicalli-john08:11:24

(if (= brexit brexit) "I'm off back to bed" "good morning, I love the world")

oliy09:11:00

Morning all, good to see some of you last night, I had fun

jonpither09:11:21

anyone using terraform in here?

jasonbell09:11:51

@jonpither the Mastodon C crew do yes

jonpither09:11:10

do you manage diff regions using terraform?

jasonbell09:11:46

regions as in eu-west-1 and eu-central-1 etc?

jasonbell09:11:31

@jonpither I need to run (not working today) worth talking to @otfrom and @elise_huard as well.

elise_huard10:11:55

@jonpither our current use of terraform is within one region at a time (multiple-AZ). We do use it in different regions though.

elise_huard10:11:12

There is no reason why it wouldn't work cross-region, we just have no use for it atm

jonpither10:11:29

Just not sure how to do it 🙂

jonpither10:11:55

I.e. I'm playing with having a separate tfvars file for each region so I could re-use everything else

jonpither10:11:11

but this doesn't work, because it uses the same terraform state..

jonpither10:11:48

basically want to have identical setups in emea and the us

korny10:11:14

We use terraform, but haven’t done anything cross-region

glenjamin10:11:04

@jonpither i’ve seen some examples of using symlinks to have multiple folders, and thus multiple tfstate files

korny10:11:26

we have multiple named environments, each has it’s own state - using bash+python scripting so you specify “bootstrap-environment Foo-tick” and it creates a “Foo-tick" environment.

korny10:11:01

(the ‘tick’ is because we’re trying to do nightly environment re-builds - phoenix environments - so each day we build ‘tock’ and tear down ‘tick’)

jonpither10:11:21

@glenjamin I'm using remote state in an s3 bucket... but not sure if it's possible to switch between remote states...

glenjamin10:11:46

jonpither the s3 location is taken from .terraform iirc

glenjamin10:11:05

so the idea is each environment subdir has a separate .terraform folder

glenjamin10:11:30

@korny does that throw away all your data?

korny10:11:24

No - database storage is going to be shared (still working out how) and while ‘tick’ and ‘tock’ are both up, they replicate state across both.

glenjamin10:11:28

I worked on a system once that reset all dev envs every night, but often failed to rebuild. So it’d be 1pm before it was working the next day, and then you’d have a few hours to get work done before it was blatted

jonpither10:11:29

@glenjamin makes sense your approach

jonpither10:11:43

I might try that

glenjamin10:11:51

i make no claims to ownership - i just read it somewhere 🙂

korny10:11:56

@glenjamin ow - that sounds painful.

glenjamin10:11:22

it was a per-person remote dev environment as well

glenjamin10:11:28

with no mounted drives

glenjamin10:11:37

so everyone would have to scp changed files over

glenjamin10:11:41

such a horrible approach

reborg11:11:59

jonpither I though terraform was getting it from ~/.aws/config where I have

[default]
region = eu-west-1
So you should be able to run it once with one region then with another?

thomas11:11:48

@glenjamin sounds like system designed by someone who actually worked for a competitor and sabotaged the project successfully.

glenjamin11:11:25

heh, it was the sort of place where they’d hit a problem, implement a tool-based solution and never review it

glenjamin11:11:45

I assume there was one production issue once caused by someone losing track of what changes they’d made to a dev environment

thomas11:11:02

I am sure they thought they had a good reason for what they did... not sure if it made sense though.

glenjamin11:11:41

they got some consultants in to replace it with puppet

glenjamin11:11:54

which was a decent approach, but got overengineered

glenjamin11:11:03

I’d left before it finally rolled out

jonpither13:11:47

I like Terraform, does one thing quite well. Puppet is more general purpose

dominicm22:11:08

Does anybody know of a service which can auto buy advance train tickets?

dominicm22:11:03

I'd be happy if I could pick a time and then click every day I'd like to buy a ticket for that time.