Closed
Bug 1185681
Opened 11 years ago
Closed 10 years ago
buildbox should use Atlas for Terraform state and config
Categories
(Socorro :: Infra, task)
Socorro
Infra
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rhelmer, Assigned: jschneider)
References
Details
Terraform supports keeping state and config on Atlas, we should use this from Jenkins.
| Reporter | ||
Comment 1•11 years ago
|
||
I think the basics we need here are:
* stop using wrapper.sh
* configure Jenkins to use Atlas, e.g. for stage collector:
terraform remote config -backend-config="name=mozilla/stage-collector"
* pull state from Atlas
terraform remote pull
* make changes directly from Jenkins
terraform apply
* push state back up to Atlas
terraform remote push
This will take care of syncing the state, and Jenkins doesn't need to push e.g. main.tf config changes (it runs apply directly), but I think we'll still need a terraform.tfvars on Jenkins.
| Assignee | ||
Comment 2•11 years ago
|
||
https://github.com/mozilla/socorro-infra/pull/197 is up to fix the deploy script.
| Assignee | ||
Comment 3•11 years ago
|
||
rhelmer: does terraform remote config -backend-config="name=mozilla/stage-collector" have to be run once, or run each time the deploy is triggered?
Comment 4•11 years ago
|
||
jp: I believe once it is run it persists into the tf state file. I don't think we need to run it more than once, though running it every time would only take extra time and is otherwise benign.
| Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Chris Lonnen :lonnen from comment #4)
> jp: I believe once it is run it persists into the tf state file. I don't
> think we need to run it more than once, though running it every time would
> only take extra time and is otherwise benign.
Yes, you only need to run this once (state files are persisted to .terraform/ IIRC so you can poke around in there to make sure it looks correct.)
You do want to run "terraform remote pull" every time to make sure you have the latest state file.
| Assignee | ||
Comment 6•10 years ago
|
||
We are not pursuing Atlas for the upcoming parts of the project. Closing this bug out.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•