github.com/kikitux/packer@v0.10.1-0.20160322154024-6237df566f9f/website/source/docs/command-line/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: '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://www.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 - `-token` - Your access token for the Atlas API. 38 39 -> Login to Atlas to [generate an Atlas 40 Token](https://atlas.hashicorp.com/settings/tokens). The most convenient way to 41 configure your token is to set it to the `ATLAS_TOKEN` environment variable, but 42 you can also use `-token` on the command line. 43 44 - `-name` - The name of the build in the service. This typically looks like 45 `hashicorp/precise64`, which follows the form `<username>/<buildname>`. This 46 must be specified here or in your template. 47 48 - `-var` - Set a variable in your packer template. This option can be used 49 multiple times. This is useful for setting version numbers for your build. 50 51 - `-var-file` - Set template variables from a file. 52 53 ## Examples 54 55 Push a Packer template: 56 57 ``` {.shell} 58 $ packer push template.json 59 ``` 60 61 Push a Packer template with a custom token: 62 63 ``` {.shell} 64 $ packer push -token ABCD1234 template.json 65 ``` 66 67 ## Limits 68 69 `push` is limited to 5gb upload when pushing to Atlas. To be clear, packer *can* 70 build artifacts larger than 5gb, and Atlas *can* store artifacts larger than 71 5gb. However, the initial payload you push to *start* the build cannot exceed 72 5gb. If your boot ISO is larger than 5gb (for example if you are building OSX 73 images), you will need to put your boot ISO in an external web service and 74 download it during the packer run. 75 76 ## Building Private `.iso` and `.dmg` Files 77 78 If you want to build a private `.iso` file you can upload the `.iso` to a secure 79 file hosting service like [Amazon 80 S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html), 81 [Google Cloud 82 Storage](https://cloud.google.com/storage/docs/gsutil/commands/signurl), or 83 [Azure File 84 Service](https://msdn.microsoft.com/en-us/library/azure/dn194274.aspx) and 85 download it at build time using a signed URL. You should convert `.dmg` files to 86 `.iso` and follow a similar procedure. 87 88 Once you have added [variables in your packer 89 template](/docs/templates/user-variables.html) you can specify credentials or 90 signed URLs using Atlas environment variables, or via the `-var` flag when you 91 run `push`. 92 93 