Hi all! I've just completed implementing the Atmo...
# atmos
j
Hi all! I've just completed implementing the Atmos Plan and Apply GitHub Actions as part of our deployment workflow and I'm super impressed with the functionality and quality of life increase this has provided. The feedback and output from the actions is fantastic and we have several fans at work. This has really helped improve velocity and overall confidence in our deployment pipelines so thank you! With the deployment pipelines in place, I'm now working on splitting up a Terraform module that has significant resource count down into several smaller components. One of the core drivers for keeping everything in the same module is some of the tightness in which things are coupled. Using resource references as part of the Terraform DAG made it easy to update multiple components in one pass. However, the module is way too large now and presents the typical blast radius / deployment blocking / calculation time risks. What I need to work on alongside this project is the ability to move these tight couplings from inside the module to the dependency configuration Atmos has built in. We're already using this structure a bit but it's only for pointing engineers to dependency patterns rather than being programmatically functional. I understand that nested dependency plan/apply functionality is not currently capable in GitHub Actions so I'd like to reach out here for guidance. If my research is correct, it looks like I have two paths forward: • Deploy Atlantis and update the plan/apply workflows to lean on Atlantis for planning and applying dependent modules based on get-affected-stacks changes. • Deploy Spacelift and tie that together with Atmos. I'm more hesitant on this path as I think it will be a significantly larger lift and I'd like to have something by end of Q3 if possible. Am I on the right track? Does anyone here have an established pattern for ensuring that if a component is marked for change, it's downstream dependent components will be marked for a subsequent plan/apply? Thanks in advance!
p
I do not see how Atlantis or spacelift are needed to achieve dependency deployments. Atmos supports metadata.depends_on and describe-affected will output a matrix in order of dependency so if you have a concurrency of 1 you can sequentially apply in order every time
j
We have a concurrency of 10 currently and would ideally love to increase this once our EKS worker node expansion project is complete. Kicking the concurrency down to 1 would move our ten minute deployments to over an hour.
p
you can't have concurrency to 10 when you have dependencies, it is just not possible
you can do some logic to say in plan is = 10 and apply is 1
It all depends on how your components are tied to others
as soon as you start using outputs from other components or using
!terraform.outputs
functions you are generating an implicit dependency
j
So then I should specify that concurrency is a requirement. Kicking down to 1 apply at a time would never take flight.
p
think about this: if you have a
depends_on: vpc
on a LB component or subnet component, how can you concurrently apply vpc, subnets, lb if the subnets needs the vpc-id or some other value from the vpc component? for the value to be populated the apply needs to happen first
what you could do is to find the common denominator dependency and apply that first and then apply all the other in parallel
j
Here is a current pattern I'm evaluating: I have a databricks_repo resource that is currently targeting a workspace repository and configuring it for a release tag. With that update complete, we update a databricks_pipeline resource so that the configuration contains a key/value pair of the repo_name => commit_sha. What I would like to do is break apart the repo and the pipeline so that when I update the repo component, a plan/apply on the pipeline component that depends_on ther repo is run so it's configuration state is updated.
So it would be great to identify all components getting updated as part of the repository tag update, and perform the plan / apply....then all pipeline components that depend on the repository component get a subsequent plan/apply after the repository has completed.
Especially since there would be many pipelines to one repo, this could be very advantageous. Where things stand currently, I'll need to build a root module with the databricks_repo and databricks_pipeline in one module and then have 1 repo to 1 pipeline which isn't ideal.
g
@Erik Osterman (Cloud Posse) please chime in
e
heads up, ordered dependencies with native GHA support is what we're building with atmos-pro.com
It's not yet fully flushed out. But we'll make an official announcement when it's ready.
j
And that's absolutely option 3 if it's getting close to a production ready state.
šŸ™Œ 1
Erik, based on what I have mentioned above, would Atlantis get me there in the interim even if it meant I would be breaking away from the github actions I just implemented?
e
(i'll chime in later - preparing for #office-hours)
j
šŸ™‡ Much appreciated.
e
also, look into the new
--affected
flag which is supported for
plan
and
apply
commands. It supports dependency order
šŸ‘€ 1
Am I on the right track? Does anyone here have an established pattern for ensuring that if a component is marked for change, it's downstream dependent components will be marked for a subsequent plan/apply?
Provided that you don't need to review the individual plans prior to approving each plan independently, then the
atmos terraform apply --affected
will do what you want.
j
How does this workflow look with atmos pro in the mix?
e
Atmos Pro is a dispatch engine that is dependency aware.
If will dispatch jobs that run on your infra in order. and wait for dependencies to complete before dispatching new jobs.
j
Probably for a better thread, but where can I find out about Atmos Pro pricing?
e
When it's launched, we'll announce it here. https://atmos-pro.com/pricing
j
Free in Beta šŸ‘ Nice!