Completed adding ent runs pages

This commit is contained in:
Chris Riley 2017-03-17 12:24:20 -07:00 committed by Seth Vargo
parent fb341acb8b
commit cf95a60639
No known key found for this signature in database
GPG Key ID: C921994F9C27E0FF
9 changed files with 121 additions and 71 deletions

View File

@ -1,21 +1,25 @@
--- ---
title: "Automatic Terraform Applies in Atlas" layout: "runs"
page_title: "Runs: Automatic Applies"
sidebar_current: "docs-enterprise-runs-applies"
description: |-
How to automatically apply plans.
--- ---
# Automatic Terraform Applies in Atlas # Automatic Terraform Applies
<div class="alert-infos"> <div class="alert-infos">
<div class="alert-info"> <div class="alert-info">
This is an unreleased beta feature. Please <a href="/help/support">contact support</a> if you are interested in helping us test this feature. This is an unreleased beta feature. Please <a href="mailto:support@hashicorp.com">contact support</a> if you are interested in helping us test this feature.
</div> </div>
</div> </div>
Atlas can optionally automatically apply successful Terraform plans to your Atlas can optionally automatically apply successful Terraform plans to your
infrastructure. This option is disabled by default and can be enabled by an infrastructure. This option is disabled by default and can be enabled by an
organization owner on a per-[environment](/help/glossary#environment) basis. organization owner on a per-environment basis.
<div class="alert-errors"> <div class="alert-infos">
<div class="row alert-error"> <div class="alert-info">
This is an advanced feature that enables changes to active infrastructure This is an advanced feature that enables changes to active infrastructure
without user confirmation. Please understand the implications to your without user confirmation. Please understand the implications to your
infrastructure before enabling. infrastructure before enabling.

View File

@ -1,55 +1,59 @@
--- ---
title: "How Terraform Runs Execute in Atlas" layout: "runs"
page_title: "Runs: How Runs Execute"
sidebar_current: "docs-enterprise-runs-execute"
description: |-
How runs execute in Terraform Enterprise.
--- ---
# How Terraform Runs Execute in Atlas # How Terraform Runs Execute
This briefly covers the internal process of running Terraform plan and This briefly covers the internal process of running Terraform plan and
applies in Atlas. It is not necessary to know this information, but may be applies. It is not necessary to know this information, but may be
valuable to help understand implications of running in Atlas or debug failing valuable to help understand implications of running or debugging failed
runs. runs.
## Steps of Execution ## Steps of Execution
1. A set of Terraform configuration and directory of files is uploaded via Terraform Push or GitHub 1. A set of Terraform configuration and directory of files is uploaded via Terraform Push or GitHub
1. Atlas creates a version of the Terraform configuration and waits for the upload 2. Atlas creates a version of the Terraform configuration and waits for the upload
to complete. At this point, the version will be visible in the UI even if the upload has to complete. At this point, the version will be visible in the UI even if the upload has
not completed not completed
1. Once the upload finishes, Atlas creates a run and queues a `terraform plan` 3. Once the upload finishes, Terraform Enterprise creates a run and queues a `terraform plan`
1. In the run environment, the package including the files and Terraform 4. In the run environment, the package including the files and Terraform
configuration are downloaded configuration are downloaded
1. `terraform plan` is run against the configuration in the run environment 5. `terraform plan` is run against the configuration in the run environment
1. Logs are streamed into the UI and stored 6. Logs are streamed into the UI and stored
1. The `.tfplan` file created in the plan is uploaded and stored 7. The `.tfplan` file created in the plan is uploaded and stored
1. Once the plan completes, the environment is torn down and status is 8. Once the plan completes, the environment is torn down and status is
updated in the UI updated in the UI
1. The plan then requires confirmation by an operator. It can optionally 9. The plan then requires confirmation by an operator. It can optionally
be discarded and ignored at this stage be discarded and ignored at this stage
1. Once confirmed, the run then executes a `terraform apply` in a new 10. Once confirmed, the run then executes a `terraform apply` in a new
environment against the saved `.tfplan` file environment against the saved `.tfplan` file
1. The logs are streamed into the UI and stored 11. The logs are streamed into the UI and stored
1. Once the apply completes, the environment is torn down, status is 12. Once the apply completes, the environment is torn down, status is
updated in the UI and changed state is saved back to Atlas updated in the UI and changed state is saved back
Note: In the case of a failed apply, it's safe to re-run. This is possible Note: In the case of a failed apply, it's safe to re-run. This is possible
because Terraform saves partial state and can "pick up where it left off". because Terraform saves partial state and can "pick up where it left off".
### Customizing Terraform Execution ### Customizing Terraform Execution
As described in the steps above, Atlas will run Terraform against your configuration As described in the steps above, Terraform will be run against your configuration
when changes are pushed via GitHub, `terraform push`, or manually queued in the when changes are pushed via GitHub, `terraform push`, or manually queued in the
Atlas UI. There are a few options available to customize the execution of Terraform. UI. There are a few options available to customize the execution of Terraform.
These are: These are:
- The directory that contains your environment's Terraform configuration can be customized - The directory that contains your environment's Terraform configuration can be customized
to support directory structures with more than one set of Terraform configuration files. to support directory structures with more than one set of Terraform configuration files.
To customize the directory for your Atlas Environment, set the _Terraform Directory_ To customize the directory for your Environment, set the _Terraform Directory_
property in the _GitHub Integration_ settings for your environment. This is equivalent to property in the _GitHub Integration_ settings for your environment. This is equivalent to
passing the `[dir]` argument when running Terraform in your local shell. passing the `[dir]` argument when running Terraform in your local shell.
- The directory in which Terraform is executed from can be customized to support directory - The directory in which Terraform is executed from can be customized to support directory
structures with nested sub-directories or configurations that use Terraform modules with structures with nested sub-directories or configurations that use Terraform modules with
relative paths. To customize the directory used for Terraform execution in your Atlas relative paths. To customize the directory used for Terraform execution in your
Environment, set the `TF_ATLAS_DIR` Environment, set the `TF_ATLAS_DIR`
[environment variable](/help/terraform/runs/variables-and-configuration#environment-variables) [environment variable](/docs/enterprise/runs/variables-and-configuration#environment-variables)
to the relative path of the directory - ie. `terraform/production`. This is equivalent to to the relative path of the directory - ie. `terraform/production`. This is equivalent to
changing directories to the appropriate path in your local shell and then executing Terraform. changing directories to the appropriate path in your local shell and then executing Terraform.

View File

@ -1,5 +1,9 @@
--- ---
title: "Installing Custom Software on the Terraform Runners" layout: "runs"
page_title: "Runs: Installing Software"
sidebar_current: "docs-enterprise-runs-installing"
description: |-
Installing custom software on the Terraform Runners.
--- ---
# Installing Custom Software # Installing Custom Software

View File

@ -1,16 +1,20 @@
--- ---
title: "Managing Terraform Versions" layout: "runs"
page_title: "Runs: Managing Terraform Versions"
sidebar_current: "docs-enterprise-runs-versions"
description: |-
How to manage versions of Terraform Enterprise.
--- ---
# Managing Terraform Versions # Managing Terraform Versions
Atlas does not automatically upgrade the version of Terraform Terraform Enterprise does not automatically upgrade the version of Terraform
used to execute plans and applies. This is intentional, as occasionally used to execute plans and applies. This is intentional, as occasionally
there can be backwards incompatible changes made to Terraform that cause state there can be backwards incompatible changes made to Terraform that cause state
and plans to differ based on the same configuration, and plans to differ based on the same configuration,
or new versions that produce some other unexpected behavior. or new versions that produce some other unexpected behavior.
All upgrades must be performed by a user, but Atlas will display a notice All upgrades must be performed by a user, but Terraform Enterprise will display a notice
above any plans or applies run with out of date versions. We encourage the use above any plans or applies run with out of date versions. We encourage the use
of the latest version when possible. of the latest version when possible.
@ -20,8 +24,8 @@ Terraform used in a plan will be used in the subsequent apply.
### Upgrading Terraform ### Upgrading Terraform
1. Go the Settings tab of an environment 1. Go the Settings tab of an environment
1. Go to the "Terraform Version" section and select the version you 2. Go to the "Terraform Version" section and select the version you
wish to use wish to use
1. Review the changelog for that version and previous versions 3. Review the changelog for that version and previous versions
1. Click the save button. At this point, future builds will use that 4. Click the save button. At this point, future builds will use that
version version

View File

@ -1,18 +1,23 @@
--- ---
title: "Terraform Run Notifications" layout: "runs"
page_title: "Runs: Notifications"
sidebar_current: "docs-enterprise-runs-notifications"
description: |-
Terraform Enterprise can send notifications to your organization. This post is on how.
--- ---
# Terraform Run Notifications # Terraform Run Notifications
Atlas can send run notifications to your organization via one of our [supported Terraform Enterprise can send run notifications to your organization via one of our [supported
notification methods](/help/consul/alerts/notification-methods). The following notification methods](https://atlas.hashicorp.com/help/consul/alerts/notification-methods). The following
events are configurable: events are configurable:
- **Needs Confirmation** - The plan phase has succeeded, and there are changes - **Needs Confirmation** - The plan phase has succeeded, and there are changes
that need to be confirmed before applying. that need to be confirmed before applying.
- **Confirmed** - A plan has been confirmed, and it will begin applying - **Confirmed** - A plan has been confirmed, and it will begin applying
shortly. shortly.
- **Discarded** - A user in Atlas has discarded the plan. - **Discarded** - A user has discarded the plan.
- **Applying** - The plan has begun to apply and make changes to your - **Applying** - The plan has begun to apply and make changes to your
infrastructure. infrastructure.
- **Applied** - The plan was applied successfully. - **Applied** - The plan was applied successfully.

View File

@ -1,34 +1,38 @@
--- ---
title: "Schedule Periodic Plans in Atlas" layout: "runs"
page_title: "Runs: Scheduling Runs"
sidebar_current: "docs-enterprise-runs-schedule"
description: |-
Schedule periodic plan runs in Terraform.
--- ---
# Schedule Periodic Plans in Atlas
# Schedule Periodic Plan Runs
<div class="alert-infos"> <div class="alert-infos">
<div class="alert-info"> <div class="alert-info">
This is an unreleased beta feature. Please <a href="/help/support">contact support</a> if you are interested in helping us test this feature. This is an unreleased beta feature. Please <a href="mailto:support@hashicorp.com">contact support</a> if you are interested in helping us test this feature.
</div> </div>
</div> </div>
Atlas can automatically run a Terraform plan against Terraform can automatically run a plan against
your infrastructure on a specified schedule. This option is disabled by default and can be enabled by an your infrastructure on a specified schedule. This option is disabled by default and can be enabled by an
organization owner on a per-[environment](/help/glossary#environment) basis. organization owner on a per-environment basis.
On the specified interval, Atlas will automatically queue a plan that On the specified interval, a plan can be run that
runs Terraform for you, determining any changes and sending the appropriate for you, determining any changes and sending the appropriate
notifications. notifications.
When used with [automatic applies](/help/terraform/runs/automatic-applies), this feature can help converge When used with [automatic applies](/docs/enterprise/runs/automatic-applies.html), this feature can help converge
changes to infrastructure without human input. changes to infrastructure without human input.
Atlas will not queue new runs while another plan or apply is in progress, or if Runs will not be queued while another plan or apply is in progress, or if
the environment has been manually locked. See [Environment the environment has been manually locked. See [Environment
Locking](/help/terraform/runs#environment-locking) for more information. Locking](/docs/enterprise/runs#environment-locking) for more information.
## Enabling Periodic Plans ## Enabling Periodic Plans
To enable periodic plans for an environment, visit the environment settings page in To enable periodic plans for an environment, visit the environment settings page and select the desired interval and click the save button to
Atlas and select the desired interval and click the save button to
persist the changes. An initial plan may immediately run, depending persist the changes. An initial plan may immediately run, depending
on the state of your environment, and then will automatically on the state of your environment, and then will automatically
plan at the specified interval. plan at the specified interval.

View File

@ -1,7 +1,12 @@
--- ---
title: "Starting Terraform Runs in Atlas" layout: "runs"
page_title: "Runs: Starting"
sidebar_current: "docs-enterprise-runs-starting"
description: |-
How to start runs in Terraform Enterprise.
--- ---
# Starting Terraform Runs in Atlas # Starting Terraform Runs in Atlas
There are a variety of ways to queue a Terraform run in Atlas. In addition to There are a variety of ways to queue a Terraform run in Atlas. In addition to

View File

@ -1,10 +1,14 @@
--- ---
title: "Terraform Variables and Configuration" layout: "runs"
page_title: "Runs: Variables and Configuration"
sidebar_current: "docs-enterprise-runs-schedule"
description: |-
How to configure runs and their variables.
--- ---
# Terraform Variables and Configuration # Terraform Variables and Configuration
There are two ways to configure Terraform runs in Atlas with There are two ways to configure Terraform runs with
Terraform variables or environment variables. Terraform variables or environment variables.
## Terraform Variables ## Terraform Variables
@ -13,16 +17,15 @@ Terraform variables are first-class configuration in Terraform. They
define the parameterization of Terraform configurations and are important define the parameterization of Terraform configurations and are important
for sharing and removal of sensitive secrets from version control. for sharing and removal of sensitive secrets from version control.
Variables are sent to Atlas with `terraform push`. Any variables in your local Variables are sent with the `terraform push` command. Any variables in your local
`.tfvars` files are securely uploaded to Atlas. Once variables are uploaded to `.tfvars` files are securely uploaded. Once variables are uploaded, Terraform will prefer the Atlas-stored variables over any changes you
Atlas, Terraform will prefer the Atlas-stored variables over any changes you
make locally. Please refer to the make locally. Please refer to the
[Terraform push documentation](https://www.terraform.io/docs/commands/push.html) [Terraform push documentation](https://www.terraform.io/docs/commands/push.html)
for more information. for more information.
You can also add, edit, and delete Terraform variables via Atlas. To update You can also add, edit, and delete variables. To update
Terraform variables in Atlas, visit the "variables" page on your Terraform variables, visit the "variables" page on your
[environment](/help/glossary#environment). environment.
The maximum size for the value of Terraform variables is `256kb`. The maximum size for the value of Terraform variables is `256kb`.
@ -36,10 +39,10 @@ Environment variables are injected into the virtual environment that Terraform
executes in during the `plan` and `apply` phases. executes in during the `plan` and `apply` phases.
You can add, edit, and delete environment variables from the "variables" page You can add, edit, and delete environment variables from the "variables" page
on your [environment](/help/glossary#environment). on your environment.
Additionally, the following environment variables are automatically injected by Additionally, the following environment variables are automatically injected by
Atlas. All Atlas-injected environment variables will be prefixed with `ATLAS_` Terraform Enterprise. All injected environment variables will be prefixed with `ATLAS_`
- `ATLAS_TOKEN` - This is a unique, per-run token that expires at the end of - `ATLAS_TOKEN` - This is a unique, per-run token that expires at the end of
run execution (e.g. `"abcd.atlasv1.ghjkl..."`). run execution (e.g. `"abcd.atlasv1.ghjkl..."`).
@ -68,7 +71,7 @@ resource was created outside of GitHub (like using `terraform push`).
## Managing Secret Multi-Line Files ## Managing Secret Multi-Line Files
Atlas has the ability to store multi-line files as variables. The recommended way to manage your secret/sensitive multi-line files (private key, SSL cert, SSL private key, CA, etc.) is to add them as [Terraform Variables](#terraform-variables) or [Environment Variables](#environment-variables) in Atlas. Terraform Enterprise has the ability to store multi-line files as variables. The recommended way to manage your secret/sensitive multi-line files (private key, SSL cert, SSL private key, CA, etc.) is to add them as [Terraform Variables](#terraform-variables) or [Environment Variables](#environment-variables).
Just like secret strings, it is recommended that you never check in these multi-line secret files to version control by following the below steps. Just like secret strings, it is recommended that you never check in these multi-line secret files to version control by following the below steps.
@ -93,11 +96,11 @@ Set the [variables](https://www.terraform.io/docs/configuration/variables.html)
$ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY"
`terraform push` any "Environment Variables" to Atlas: `terraform push` any "Environment Variables":
$ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example
Alternatively, you can add or update variables manually by going to the "Variables" section of your Atlas Environment and pasting the contents of the file in as the value. Alternatively, you can add or update variables manually by going to the "Variables" section of your Environment and pasting the contents of the file in as the value.
Now, any resource that consumes that variable will have access to the variable value, without having to check the file into version control. If you want to run Terraform locally, that file will still need to be passed in as a variable in the CLI. View the [Terraform Variable Documentation](https://www.terraform.io/docs/configuration/variables.html) for more info on how to accomplish this. Now, any resource that consumes that variable will have access to the variable value, without having to check the file into version control. If you want to run Terraform locally, that file will still need to be passed in as a variable in the CLI. View the [Terraform Variable Documentation](https://www.terraform.io/docs/configuration/variables.html) for more info on how to accomplish this.
@ -119,7 +122,7 @@ You can update variables locally by using the `-overwrite` flag with your `terra
## Notes on Security ## Notes on Security
Terraform variables and environment variables in Atlas are encrypted using Terraform variables and environment variables are encrypted using
[Vault](https://vaultproject.io) and closely guarded and audited. If you have [Vault](https://vaultproject.io) and closely guarded and audited. If you have
questions or concerns about the safety of your configuration, please contact questions or concerns about the safety of your configuration, please contact
our security team at [security@hashicorp.com](mailto:security@hashicorp.com). our security team at [security@hashicorp.com](mailto:security@hashicorp.com).

View File

@ -6,15 +6,32 @@
<a href="/docs/enterprise/index.html">&laquo; Terraform Enterprise</a> <a href="/docs/enterprise/index.html">&laquo; Terraform Enterprise</a>
</li> </li>
<li<%= sidebar_current(/^docs-enterprise-runs-index/) %>>
<a href="/docs/enterprise/runs/index.html">Runs</a>
</li>
<li<%= sidebar_current(/^docs-enterprise-runs-/) %>> <li<%= sidebar_current(/^docs-enterprise-runs-/) %>>
<a href="#">Starting</a> <a href="/docs/enterprise/runs/index.html">Runs</a>
<ul class="nav nav-visible"> <ul class="nav nav-visible">
<li<%= sidebar_current("docs-enterprise-runs-starting") %>> <li<%= sidebar_current("docs-enterprise-runs-starting") %>>
<a href="/docs/enterprise/runs/starting.html">local</a> <a href="/docs/enterprise/runs/starting.html">Starting</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-applies") %>>
<a href="/docs/enterprise/runs/automatic-applies.html">Automatic Applies</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-scheduling") %>>
<a href="/docs/enterprise/runs/scheduling-runs.html">Scheduling Runs</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-variables") %>>
<a href="/docs/enterprise/runs/variables-and-configuration.html">Variables and Config</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-installing") %>>
<a href="/docs/enterprise/runs/installing-software.html">Installing Software</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-execute") %>>
<a href="/docs/enterprise/runs/how-runs-execute.html">How Runs Execute</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-versions") %>>
<a href="/docs/enterprise/runs/managing-terraform-versions.html">Managing Terraform Versions</a>
</li>
<li<%= sidebar_current("docs-enterprise-runs-notifications") %>>
<a href="/docs/enterprise/runs/notifications.html">Run Notifications</a>
</li> </li>
</ul> </ul>
</li> </li>