github.com/kimor79/packer@v0.8.7-0.20151221212622-d507b18eb4cf/website/source/docs/command-line/push.html.markdown (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: 'Push - Command-Line' 7 ... 8 9 # Command-Line: Push 10 11 The `packer push` command uploads a template and other required files to the 12 Atlas service, which will run your packer build for you. [Learn more about 13 Packer in Atlas.](https://atlas.hashicorp.com/help/packer/features) 14 15 Running builds remotely makes it easier to iterate on packer builds that are not 16 supported on your operating system, for example, building docker or QEMU while 17 developing on Mac or Windows. Also, the hard work of building VMs is offloaded 18 to dedicated servers with more CPU, memory, and network resources. 19 20 When you use push to run a build in Atlas, you may also want to store your build 21 artifacts in Atlas. In order to do that you will also need to configure the 22 [Atlas post-processor](/docs/post-processors/atlas.html). This is optional, and 23 both the post-processor and push commands can be used independently. 24 25 !> The push command uploads your template and other files, like provisioning 26 scripts, to Atlas. Take care not to upload files that you don't intend to, like 27 secrets or large binaries. **If you have secrets in your Packer template, you 28 should [move them into environment 29 variables](https://packer.io/docs/templates/user-variables.html).** 30 31 Most push behavior is [configured in your packer 32 template](/docs/templates/push.html). You can override or supplement your 33 configuration using the options below. 34 35 ## Options 36 37 - `-message` - A message to identify the purpose or changes in this Packer 38 template much like a VCS commit message. This message will be passed to the 39 Packer build service. This option is also available as a short option `-m`. 40 41 - `-token` - Your access token for the Atlas API. 42 43 -> Login to Atlas to [generate an Atlas 44 Token](https://atlas.hashicorp.com/settings/tokens). The most convenient way to 45 configure your token is to set it to the `ATLAS_TOKEN` environment variable, but 46 you can also use `-token` on the command line. 47 48 - `-name` - The name of the build in the service. This typically looks like 49 `hashicorp/precise64`, which follows the form `<username>/<buildname>`. This 50 must be specified here or in your template. 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 ## Examples 58 59 Push a Packer template: 60 61 ``` {.shell} 62 $ packer push -m "Updating the apache version" template.json 63 ``` 64 65 Push a Packer template with a custom token: 66 67 ``` {.shell} 68 $ packer push -token ABCD1234 template.json 69 ``` 70 71 ## Limits 72 73 `push` is limited to 5gb upload when pushing to Atlas. To be clear, packer *can* 74 build artifacts larger than 5gb, and Atlas *can* store artifacts larger than 75 5gb. However, the initial payload you push to *start* the build cannot exceed 76 5gb. If your boot ISO is larger than 5gb (for example if you are building OSX 77 images), you will need to put your boot ISO in an external web service and 78 download it during the packer run. 79 80 ## Building Private `.iso` and `.dmg` Files 81 82 If you want to build a private `.iso` file you can upload the `.iso` to a secure 83 file hosting service like [Amazon 84 S3](http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html), 85 [Google Cloud 86 Storage](https://cloud.google.com/storage/docs/gsutil/commands/signurl), or 87 [Azure File 88 Service](https://msdn.microsoft.com/en-us/library/azure/dn194274.aspx) and 89 download it at build time using a signed URL. You should convert `.dmg` files to 90 `.iso` and follow a similar procedure. 91 92 Once you have added [variables in your packer 93 template](/docs/templates/user-variables.html) you can specify credentials or 94 signed URLs using Atlas environment variables, or via the `-var` flag when you 95 run `push`. 96 97 