Why we built Atlantis blog article (#145)
* Draft of atlantis release blog * Assets * resize images * resize images * Continue work on blog * Final draft * Add link to blog from README
2
.gitignore
vendored
@@ -4,3 +4,5 @@ atlantis
|
||||
.vscode
|
||||
atlantis.db
|
||||
output
|
||||
website/src/public
|
||||
.DS_Store
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
## Walkthrough Video
|
||||
[](https://www.youtube.com/watch?v=TmIPWda0IKg)
|
||||
|
||||
Read about [Why We Built Atlantis](https://www.atlantis.run/blog/atlantis-release/)
|
||||
|
||||
[](https://circleci.com/gh/hootsuite/atlantis/tree/master)
|
||||
[](https://twitter.com/kelseyhightower/status/893260922222813184)
|
||||
[](https://thawing-headland-22460.herokuapp.com)
|
||||
|
||||
@@ -7,7 +7,7 @@ Paginate = 4
|
||||
[[menu.main]]
|
||||
name = "Docs"
|
||||
weight = -100
|
||||
url = "/docs/"
|
||||
url = "https://github.com/hootsuite/atlantis#getting-started"
|
||||
[[menu.main]]
|
||||
name = "Blog"
|
||||
weight = -100
|
||||
@@ -15,7 +15,7 @@ Paginate = 4
|
||||
[[menu.main]]
|
||||
name = "FAQ"
|
||||
weight = -100
|
||||
url = "/faq/"
|
||||
url = "https://github.com/hootsuite/atlantis#faq"
|
||||
[[menu.main]]
|
||||
name = "Demo"
|
||||
weight = 100
|
||||
|
||||
100
website/src/content/blog/atlantis-release.md
Normal file
@@ -0,0 +1,100 @@
|
||||
+++
|
||||
title = "Atlantis: A Unified Workflow For Collaborating On Terraform"
|
||||
description = "Why we built Atlantis and how it's enabled us to more effectively collaborate on Terraform"
|
||||
weight = 20
|
||||
date = "2017-09-11T21:56:55-07:00"
|
||||
draft = false
|
||||
toc = true
|
||||
+++
|
||||
|
||||
We're very excited to announce the [open source](https://github.com/hootsuite/atlantis) release of Atlantis! Atlantis is a tool for collaborating on Terraform that's been in use at [Hootsuite](https://hootsuite.com) for over a year. The core functionality of Atlantis enables developers and operators to run `terraform plan` and `apply` directly from Terraform pull requests. Atlantis then comments back on the pull request with the output of the commands:
|
||||
|
||||
<img src="/img/demo-large.gif">
|
||||
|
||||
This is a simple feature, however it has had a massive effect on how our team writes Terraform. By bringing a Terraform workflow to pull requests, Atlantis helped our Ops team collaborate better on Terraform and also enabled our entire development team to write and execute Terraform safely.
|
||||
|
||||
Atlantis was built to solve two problems that arose at Hootsuite as we adopted Terraform:
|
||||
|
||||
<div style="margin-bottom: 50px">
|
||||
<div style="margin-bottom: 25px">
|
||||
<img alt="Collaborate" style="display:inline; position: relative; float: left; margin-top: 18px" height="48" src="/img/collaborate.png" width="48">
|
||||
<h3 style="margin-left: 70px; margin-bottom: -10px; line-height: 50px;">1. Effective Collaboration</h3>
|
||||
<p style="margin-left: 70px">What's the best way to collaborate on Terraform in a team setting?</p>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<img alt="No need to distribute credentials" style="display:inline; position: relative; float: left; margin-top: 18px" height="48" src="/img/no-need-to-distribute-keys.png" width="48">
|
||||
<h3 style="margin-left: 70px; margin-bottom: -10px; line-height: 50px;">2. Developers Writing Terraform</h3>
|
||||
<p style="margin-left: 70px">How can we enable our developers to write and apply Terraform safely?</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## Effective Collaboration
|
||||
|
||||
When writing Terraform, there are a number of workflows you can follow. The simplest workflow is just using `master`:
|
||||
|
||||
<p style="text-align: center">
|
||||
<img src="/img/master-flow.png" style="height: 150px">
|
||||
</p>
|
||||
|
||||
In this workflow, you work on `master` and run `terraform` locally. The problem with this workflow is that there is no collaboration or code review. So we start to use pull requests:
|
||||
|
||||
<img src="/img/pull-request-flow.png">
|
||||
|
||||
We still run `terraform plan` locally, but once we're satisfied with the changes we create a pull request for review. When the pull request is approved, we run `apply` locally.
|
||||
|
||||
This workflow is an improvement, but there are still problems. The first problem is that it's hard to review just the diff on the pull request. To properly review a change, you really need to see the output from `terraform plan`.
|
||||
|
||||
{{< figure src="/img/diff.png" caption="What looks like a small change..." >}}
|
||||
|
||||
{{< figure src="/img/diff-output.png" caption="...can have a big plan" >}}
|
||||
|
||||
The second problem is that now it's easy for `master` to get out of sync with what's actually been applied. This can happen if you merge a pull request without running `apply` or if the `apply` has an error halfway through, you forget to fix it and then you merge to master. Now what's in `master` isn't actually what's running on production. At best, this causes confusion the next time someone runs `terraform plan`. At worst, it causes an outage when someone assumes that what's in master is actually running, and depends on it.
|
||||
|
||||
With the Atlantis workflow, these problems are solved:
|
||||
|
||||
<img src="/img/atlantis-flow.png">
|
||||
|
||||
Now it's easy to review changes because you see the `terraform plan` output on the pull request.
|
||||
|
||||
{{< figure src="/img/comment.png" caption="Pull requests are easy to review since you can see the plan" >}}
|
||||
|
||||
It's also easy to ensure that the pull request is `terraform apply`'d before merging to master because you can see the actual `apply` output on the pull request.
|
||||
|
||||
{{< figure src="/img/apply-comment.png">}}
|
||||
|
||||
So, Atlantis makes working on Terraform within an operations team much easier, but how does it help with getting your whole team to write Terraform?
|
||||
|
||||
## Developers Writing Terraform
|
||||
|
||||
Terraform usually starts out being used by the Ops team. As a result of using Terraform, the Ops team becomes much faster at making infrastructure changes, but the way developers request those changes remains the same: they use a ticketing system or chat to ask operations for help, the request goes into a queue and later Ops responds that the task is complete.
|
||||
|
||||
Soon however, the Ops team starts to realize that it's possible for developers to make some of these Terraform changes themselves! There are some problems that arise though:
|
||||
|
||||
* Developers don't have the credentials to actually run Terraform commands
|
||||
* If you give them credentials, it's hard to review what is actually being applied
|
||||
|
||||
With Atlantis, these problems are solved. All `terraform plan` and `apply` commands are run from the pull request. This means developers don't need to have any credentials to run Terraform locally. Of course, this can be dangerous: how can you ensure developers (who might be new to Terraform) aren't applying things they shouldn't? The answer is code reviews and approvals.
|
||||
|
||||
Since Atlantis comments back with the `plan` output directly on the pull request, it's easy for an operations engineer to review exactly what changes will be applied. And Atlantis can run in `require-approval` mode, that will require a GitHub pull request approval before allowing `apply` to be run:
|
||||
|
||||
<img src="/img/approval-needed.png">
|
||||
|
||||
With Atlantis, developers are able to write and apply Terraform safely. They submit pull requests, can run `atlantis plan` until their change looks good and then get approval from Ops to `apply`.
|
||||
|
||||
Since the introduction of Atlantis at Hootsuite, we've had **78** contributors to our Terraform repositories, **58** of whom are developers (**75%**).
|
||||
|
||||
## Where we are now
|
||||
|
||||
Since the introduction of Atlantis at Hootsuite we've grown to 144 Terraform repositories[^1] that manage thousands of Amazon resources. Atlantis is used for every single Terraform change throughout our organization.
|
||||
|
||||
## Getting started with Atlantis
|
||||
If you'd like to try out Atlantis for your team you can download the latest release from https://github.com/hootsuite/atlantis/releases. If you run `atlantis bootstrap` you can get started in less than 5 minutes.
|
||||
To read more about Atlantis go to https://github.com/hootsuite/atlantis.
|
||||
|
||||
Check out our video for more information:
|
||||
{{< youtube TmIPWda0IKg >}}
|
||||
|
||||
[^1]: We split our Terraform up into multiple states, each with its own repository (see [1](https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa), [2](https://charity.wtf/2016/03/30/terraform-vpc-and-why-you-want-a-tfstate-file-per-env/), [3](https://www.nclouds.com/blog/terraform-multi-state-management/)).
|
||||
|
||||
<sup>Icons made by <a href="https://www.flaticon.com/authors/prosymbols" title="Prosymbols">Prosymbols</a> and <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> are licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></sup>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
+++
|
||||
date = "2017-03-02T21:56:55+01:00"
|
||||
title = "Welcome to Atlantis"
|
||||
tags = ["markdown","example"]
|
||||
categories = ["general"]
|
||||
draft = false
|
||||
description = "First blog post!"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# Welcome to Atlantis - This is the first post from us!
|
||||
|
||||
|
||||
|
||||
BIN
website/src/static/img/apply-comment.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
website/src/static/img/approval-needed.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
website/src/static/img/atlantis-flow.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
website/src/static/img/atlantis-highquality.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
website/src/static/img/comment.png
Normal file
|
After Width: | Height: | Size: 268 KiB |
BIN
website/src/static/img/demo-large.gif
Normal file
|
After Width: | Height: | Size: 4.5 MiB |
BIN
website/src/static/img/demo.gif
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
website/src/static/img/diff-output.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
website/src/static/img/diff.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
website/src/static/img/master-flow.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/src/static/img/pull-request-flow.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
@@ -5,7 +5,6 @@
|
||||
|
||||
<div id="hero" class="wrap">
|
||||
<h1>Blog</h1>
|
||||
<p>Coming soon....<br> </p>
|
||||
</div>
|
||||
<ul id="posts">
|
||||
|
||||
|
||||
@@ -3,40 +3,45 @@
|
||||
{{ define "main"}}
|
||||
|
||||
<div id="main">
|
||||
<div id="hero">
|
||||
<img class="logo" src="/img/atlantis-logo.png" />
|
||||
<h1>{{.Title}}</h1>
|
||||
<p>{{.Description}}</p>
|
||||
</div>
|
||||
<div id="action-buttons">
|
||||
<a class="button primary big" href="https://github.com/hootsuite/atlantis/releases/tag/v0.1.2">Download</a> <a class="button outline big" href="/docs/getting-started">Get Started</a>
|
||||
<p>Version 0.1.2</p>
|
||||
</div>
|
||||
<div id="kube-features">
|
||||
<div class="row gutters">
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="Collaborate" height="48" src="/img/collaborate.png" width="48">
|
||||
</figure>
|
||||
<h3>Collaborate on Terraform with your team</h3>
|
||||
<p>Run terraform plan and apply from GitHub pull requests so everyone can review the output</p>
|
||||
</div>
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="Lock Environment" height="48" src="/img/locking.png" width="48">
|
||||
</figure>
|
||||
<h3>Lock environments</h3>
|
||||
<p>Lock environments until pull requests are merged to prevent concurrent modification and confusion.</p>
|
||||
</div>
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="No need to distribute credentials" height="48" src="/img/no-need-to-distribute-keys.png" width="48">
|
||||
</figure>
|
||||
<h3>No need to distribute credentials</h3>
|
||||
<p>No need to distribute credentials to your whole team. Developers can submit Terraform changes and run plan and apply directly from the pull request.</p>
|
||||
</div>
|
||||
<div id="hero">
|
||||
<img class="logo" src="/img/atlantis-logo.png"/>
|
||||
<h1>{{.Title}}</h1>
|
||||
<p>{{.Description}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="action-buttons">
|
||||
<a class="button primary big" href="https://github.com/hootsuite/atlantis/releases/tag/v0.1.2">Download</a> <a
|
||||
class="button outline big" href="https://github.com/hootsuite/atlantis#getting-started">Get Started</a>
|
||||
<p>Version 0.1.2</p>
|
||||
</div>
|
||||
<div id="kube-features">
|
||||
<div class="row gutters">
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="Collaborate" height="48" src="/img/collaborate.png" width="48">
|
||||
</figure>
|
||||
<h3>Collaborate on Terraform with your team</h3>
|
||||
<p>Run terraform plan and apply from GitHub pull requests so everyone can review the output</p>
|
||||
</div>
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="No need to distribute credentials" height="48" src="/img/no-need-to-distribute-keys.png"
|
||||
width="48">
|
||||
</figure>
|
||||
<h3>No need to distribute credentials</h3>
|
||||
<p>No need to distribute credentials to your whole team. Developers can submit Terraform changes and run
|
||||
plan and apply directly from the pull request.</p>
|
||||
</div>
|
||||
<div class="col col-4 item">
|
||||
<figure>
|
||||
<img alt="Lock Environment" height="48" src="/img/locking.png" width="48">
|
||||
</figure>
|
||||
<h3>Lock environments</h3>
|
||||
<p>Lock environments until pull requests are merged to prevent concurrent modification and
|
||||
confusion.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center; font-size: 21px; line-height: 32px; color: rgba(0,0,0,0.5)"><p>Read about <a href="/blog/atlantis-release/">Why We Built Atlantis</a><p></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ define "footer"}} {{ partial "footer" .}} {{end}}
|
||||
@@ -1,2 +1,6 @@
|
||||
.logo {
|
||||
height: 200px; }
|
||||
height: 200px; }
|
||||
|
||||
figure figcaption {
|
||||
text-align: center;
|
||||
}
|
||||