Are people bootstrapping atlantis? I'm guessing to...
# atlantis-community
n
Are people bootstrapping atlantis? I'm guessing to do that, you would need one atlantis server hand configured to control the main one?
p
chicken and the egg problem
PR 0 problem
c
Generally, I just make the Atlantis footprint as self-contained as possible, and then it's the first thing I stand up in an environment.
this 1
This is why I prefer a Fargate Atlantis deployment over a K8s one, etc
☝️ 1
p
I have started atlantis locally, run the PR-0 to deploy atlantis to ECS and then destroy the local copy
n
I've setup my atlantis server in fargate with terraform, but given that changes to the server need to restart the server, I was thinking I couldn't control atlantis with atlantis right?
c
I mean...you...can try...I would not.
n
lol
p
Atlantis can me managed by atlantis
as long as you have the Task configured correctly
c
Atlantis is the one root directory I manage by hand, to avoid Atlantis breaking Atlantis. But like PePe says, it's possible. 🙂
n
so in theory as long as a breaking config change isn't made, atlantis would be able to apply itself from a PR?
c
There's nothing stopping it 🙂
n
interesting
j
I run atlanis in fargate and it 100% deploys itself from a PR via an apply comment
n
cool, I'll have to see if I can get that working
j
but bootstrapping is an issue. It definitely would require at least one manual apply to deploy the first one
n
yeah makes sense. I just wasn't sure it would survive itself applying itself. Good to hear that works
j
it does survive in fargate because the apply (in my case) only creates a new task def and then updates the ecs service.
You need to handle the whole persistent storage part by using redis and efs for locking and plan storage and of course
c
Ooooooor you can just make people replan after you update Atlantis. IMO EFS is too slow to suffer with
Our plans literally went from like 10 minutes to 1 minute after getting rid of it
Having to do an additional plan, on the fairly rare occasion I update Atlantis, is a considerable time savings
n
@Chastity Blackwell what do you use in place of efs?
c
Just local storage.
n
so do you also lose the job history?
c
Or a tmpfs? Let me check. I just use the
terraform-aws-modules/terraform-aws-atlantis
module though
n
yeah that's the module I'm using
c
The job history? What do you mean?
n
on the front end:
c
Oh, probably, I think I've looked at the frontend a number of times I can count on one hand
That stuff is also in the PRs, so I guess I am not super concerned
n
yeah, there isn't a lot there, but I thought having a centralized easy to access audit log might be nice
@Jason Reslock how do you have redis configured with atlantis?
c
Maybe. It's still a small price to pay for a 10x speed improvement.
Logs also go into our log aggregator, so I can use that if I need to.
n
Yeah. Appreciate hearing how you've evolved your setup. I'm just getting started with it so speed definitely something to look out for.
👍 1
j
We have redis set up for the PR locks(not tf state locks but the atlantis locks) The default lock backend is boltdb but redis is supported. Use elasticache, we are using 3 node clusters with redis 6.2
we are not using the public module. I wrote my own module for this
I am surprised to hear about 10 minutes for a plan using efs. Our plans are typically minute or two. We have efs set to elastic+general purpose which seems ok. Our atlantis workload handles probably a few hundred plans a day across maybe 70 repos, multiple tf states in each repo.
🤯 1
n
@Chastity Blackwell with two instances, are you able to use a github app, or do you just configure the webhooks 'manually'?
c
We have a github app for each Atlantis server.