github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/website/source/docs/commands/push.html.md (about) 1 --- 2 description: | 3 The `packer push` command uploads a template and other required files to the 4 Atlas build service, which will run your packer build for you. 5 layout: docs 6 page_title: 'packer push - Commands' 7 sidebar_current: 'docs-commands-push' 8 --- 9 10 # `push` Command 11 12 The `packer push` command uploads a template and other required files to the 13 Atlas service, which will run your packer build for you. [Learn more about 14 Packer in Atlas.](https://atlas.hashicorp.com/help/packer/features) 15 16 Running builds remotely makes it easier to iterate on packer builds that are not 17 supported on your operating system, for example, building docker or QEMU while 18 developing on Mac or Windows. Also, the hard work of building VMs is offloaded 19 to dedicated servers with more CPU, memory, and network resources. 20 21 When you use push to run a build in Atlas, you may also want to store your build 22 artifacts in Atlas. In order to do that you will also need to configure the 23 [Atlas post-processor](/docs/post-processors/atlas.html). This is optional, and 24 both the post-processor and push commands can be used independently. 25 26 !> The push command uploads your template and other files, like provisioning 27 scripts, to Atlas. Take care not to upload files that you don't intend to, like 28 secrets or large binaries. **If you have secrets in your Packer template, you 29 should [move them into environment 30 variables](https://www.packer.io/docs/templates/user-variables.html).** 31 32 Most push behavior is [configured in your packer 33 template](/docs/templates/push.html). You can override or supplement your 34 configuration using the options below. 35 36 ## Options 37 38 - `-token` - Your access token for the Atlas API. Login to Atlas to [generate an 39 Atlas Token](https://atlas.hashicorp.com/settings/tokens). The most convenient 40 way to configure your token is to set it to the `ATLAS_TOKEN` environment 41 variable, but you can also use `-token` on the command line. 42 43 - `-name` - The name of the build in the service. This typically looks like 44 `hashicorp/precise64`, which follows the form `<username>/<buildname>`. This 45 must be specified here or in your template. 46 47 - `-sensitive` - A comma-separated list of variables that should be marked as 48 sensitive in the Terraform Enterprise ui. These variables' keys will be 49 visible, but their values will be redacted. example usage: 50 `-var 'supersecretpassword=mypassword' -sensitive=supersecretpassword1` 51 52 - `-var` - Set a variable in your packer template. This option can be used 53 multiple times. This is useful for setting version numbers for your build. 54 55 - `-var-file` - Set template variables from a file. 56 57 ## Environment Variables 58 59 - `ATLAS_CAFILE` (path) - This should be a path to an X.509 PEM-encoded public 60 key. If specified, this will be used to validate the certificate authority 61 that signed certificates used by an Atlas installation. 62 63 - `ATLAS_CAPATH` - This should be a path which contains an X.509 PEM-encoded 64 public key file. If specified, this will be used to validate the certificate 65 authority that signed certificates used by an Atlas installation. 66 67 ## Examples 68 69 Push a Packer template: 70 71 ``` shell 72 $ packer push template.json 73 ``` 74 75 Push a Packer template with a custom token: 76 77 ``` shell 78 $ packer push -token ABCD1234 template.json 79 ``` 80 81 ## Limits 82 83 `push` is limited to 5gb upload when pushing to Atlas. To be clear, packer *can* 84 build artifacts larger than 5gb, and Atlas *can* store artifacts larger than 85 5gb. However, the initial payload you push to *start* the build cannot exceed 86 5gb. If your boot ISO is larger than 5gb (for example if you are building OSX 87 images), you will need to put your boot ISO in an external web service and 88 download it during the packer run. 89 90 ## Building Private `.iso` and `.dmg` Files 91 92 If you want to build a private `.iso` file you can upload the `.iso` to a secure 93 file hosting service like [Amazon 94 S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html), 95 [Google Cloud 96 Storage](https://cloud.google.com/storage/docs/gsutil/commands/signurl), or 97 [Azure File 98 Service](https://msdn.microsoft.com/en-us/library/azure/dn194274.aspx) and 99 download it at build time using a signed URL. You should convert `.dmg` files to 100 `.iso` and follow a similar procedure. 101 102 Once you have added [variables in your packer 103 template](/docs/templates/user-variables.html) you can specify credentials or 104 signed URLs using Atlas environment variables, or via the `-var` flag when you 105 run `push`. 106 107 