Changed push docs to more clearly explain how they work with Atlas
This commit is contained in:
parent
d8e8f98b32
commit
1e9459a067
|
@ -1,28 +1,21 @@
|
|||
---
|
||||
description: |
|
||||
The `packer push` Packer command takes a template and pushes it to a build
|
||||
service that will automatically build this Packer template.
|
||||
The `packer push` command uploads a template and other required files to the Atlas build service, which will run your packer build for you.
|
||||
layout: docs
|
||||
page_title: 'Push - Command-Line'
|
||||
...
|
||||
|
||||
# Command-Line: Push
|
||||
|
||||
The `packer push` Packer command takes a template and pushes it to a Packer
|
||||
build service such as [HashiCorp's Atlas](https://atlas.hashicorp.com). The
|
||||
build service will automatically build your Packer template and expose the
|
||||
artifacts.
|
||||
The `packer push` command uploads a template and other required files to the Atlas service, which will run your packer build for you. [Learn more about Packer in Atlas.](https://atlas.hashicorp.com/help/packer/features)
|
||||
|
||||
External build services such as HashiCorp's Atlas make it easy to iterate on
|
||||
Packer templates, especially when the builder you are running may not be easily
|
||||
accessable (such as developing `qemu` builders on Mac or Windows).
|
||||
Running builds remotely makes it easier to iterate on packer builds that are not supported on your operating system, for example, building docker or QEMU while developing on Mac or Windows. Also, the hard work of building VMs is offloaded to dedicated servers with more CPU, memory, and network resources.
|
||||
|
||||
!> The Packer build service will receive the raw copy of your Packer template
|
||||
when you push. **If you have sensitive data in your Packer template, you should
|
||||
move that data into Packer variables or environment variables!**
|
||||
When you use push to run a build in Atlas, you may also want to store your build artifacts in Atlas. In order to do that you will also need to configure the [Atlas post-processor](/docs/post-processors/atlas.html). This is optional, and both the post-processor and push commands can be used independently.
|
||||
|
||||
For the `push` command to work, the [push
|
||||
configuration](/docs/templates/push.html) must be completed within the template.
|
||||
!> The push command uploads your template and other files, like provisioning scripts, to Atlas. Take care not to upload files that you don't intend to, like secrets or large binaries. **If you have secrets in your Packer template, you should [move them into environment variables](https://packer.io/docs/templates/user-variables.html).**
|
||||
|
||||
Most push behavior is [configured in your packer template](/docs/templates/push.html). You can override or supplement your configuration using the options below.
|
||||
|
||||
## Options
|
||||
|
||||
|
@ -30,12 +23,16 @@ configuration](/docs/templates/push.html) must be completed within the template.
|
|||
template much like a VCS commit message. This message will be passed to the
|
||||
Packer build service. This option is also available as a short option `-m`.
|
||||
|
||||
- `-token` - An access token for authenticating the push to the Packer build
|
||||
service such as Atlas. This can also be specified within the push
|
||||
configuration in the template.
|
||||
- `-token` - Your access token for the Atlas API.
|
||||
|
||||
-> Login to Atlas to [generate an Atlas Token](https://atlas.hashicorp.com/settings/tokens). The most convenient way to configure your token is to set it to the `ATLAS_TOKEN` environment variable, but you can also use `-token` on the command line.
|
||||
|
||||
- `-name` - The name of the build in the service. This typically looks like
|
||||
`hashicorp/precise64`.
|
||||
`hashicorp/precise64`, which follows the form `<username>/<buildname>`. This must be specified here or in your template.
|
||||
|
||||
- `-var` - Set a variable in your packer template. This option can be used multiple times. This is useful for setting version numbers for your build.
|
||||
|
||||
- `-var-file` - Set template variables from a file.
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
Loading…
Reference in New Issue