Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several Atlantis servers #1452

Open
ipeacocks opened this issue Mar 12, 2021 · 9 comments
Open

Several Atlantis servers #1452

ipeacocks opened this issue Mar 12, 2021 · 9 comments

Comments

@ipeacocks
Copy link

I have 1 git repo and 3 different infrastructures in it (different AWS accounts), each env in separate directory.
Some resources in e.g. dev can be applied in dev network only (so atlantis instance needs to be in this network). The same logic for prod env and so on.

So I've thought to install 3 atlantis servers in dev, rc, prod, then connect it with the same git repo and each PR should spawn 3 hooks to each atlantis. On each change should answer only correct atlantis: for dev code changes - dev atlantis, for prod - prod one and so on.

I see that atlantis.yaml has dir option. Does repo.yaml have some equivalent? Hope I was clear.

@jamengual
Copy link
Contributor

you can filter per dir in the repo side using a regex but since is the same repo the 3 servers will respond to any comment command you send so if you trigger a valid run for dev the other 2 atlantis servers will say, no valid workspace or another type of error and they will comment back I have been working on an implementation for this here https://github.com/runatlantis/atlantis/tree/multiserver but it is far from finished.

@jamengual
Copy link
Contributor

if you can deal with error comments you can try maybe using a script to filter out the comments.
there is this too : https://github.com/czerasz/atlantis-org-applyer
and some other approaches that try to solve this issue, look for other issues raised.

@ipeacocks
Copy link
Author

you can filter per dir in the repo side using a regex but since is the same repo the 3 servers

Which option do you mean? Could you name it?

@jamengual
Copy link
Contributor

sorry , the server side config does not allow for a regex for directory, only per repo.

@msarvar
Copy link
Contributor

msarvar commented Mar 18, 2021

Another option would be to use pre workflow hook. And generate your atlantis.yaml based on what server you're on.

@msarvar msarvar added waiting-on-response Waiting for a response from the user and removed waiting-on-response Waiting for a response from the user labels Mar 18, 2021
@tinder-tder
Copy link

@ipeacocks you can also see #1345

@GenPage
Copy link
Member

GenPage commented Apr 8, 2021

@ipeacocks Check out #1469. We use this flag to make Atlantis ignore the PR if there are no defined projects that match the modified files in the PR.

@Leooo
Copy link

Leooo commented Dec 29, 2021

one solution here

@nitrocode
Copy link
Member

This may be implemented in the upcoming 0.22.0 release by PR #2805 and #2798. Try the latest 0.22.0 pre-release to see if it resolves this issue

cc @krrrr38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants