53 Commits

Author SHA1 Message Date
Adrien Delorme
fbd3796377 Update index.html.md.erb 2019-12-19 15:40:08 +01:00
Adrien Delorme
31cad234f2 Update index.html.md.erb 2019-12-19 15:34:26 +01:00
Adrien Delorme
1d066082a5 Update index.html.md.erb 2019-12-19 15:28:29 +01:00
Adrien Delorme
4c3fa0ef26 document split files & main building blocks in guide 2019-12-19 14:58:44 +01:00
Adrien Delorme
04a8758811
Update website/source/guides/hcl/from-json-v1/index.html.md.erb
Co-Authored-By: Wilken Rivera <dev@wilkenrivera.com>
2019-12-18 15:59:53 +01:00
Adrien Delorme
978af9188f
Update website/source/guides/hcl/component-object-spec/index.html.md.erb
Co-Authored-By: Wilken Rivera <dev@wilkenrivera.com>
2019-12-18 15:59:33 +01:00
Adrien Delorme
da12c73726
Update website/source/guides/hcl/component-object-spec/index.html.md.erb
Co-Authored-By: Wilken Rivera <dev@wilkenrivera.com>
2019-12-18 15:59:26 +01:00
Adrien Delorme
971eac1701
Update website/source/guides/hcl/component-object-spec/index.html.md.erb
Co-Authored-By: Wilken Rivera <dev@wilkenrivera.com>
2019-12-18 15:59:16 +01:00
Adrien Delorme
f3629dbaf7 Update index.html.md.erb
fix sidebar_current
2019-12-18 15:57:01 +01:00
Adrien Delorme
93b9f3cb80 rename 2019-12-18 15:51:32 +01:00
Adrien Delorme
da90c22c35 Update index.html.md.erb
better title
2019-12-18 15:51:13 +01:00
Adrien Delorme
1ada06b2d7 fix sidebar_current of guide/hcl/from-json-v1 2019-12-18 15:22:48 +01:00
Adrien Delorme
8c21916606 add guide on how to make ones component HCL2 enabled 2019-12-18 15:01:48 +01:00
Wilken Rivera
ba36201f89 docs/guides/hcl: Update sample configuration (#8499) 2019-12-18 10:17:47 +01:00
Adrien Delorme
65cc5fe823
fix missing typo correction (#8494)
I left this change on my local branch
2019-12-17 11:31:57 +01:00
Adrien Delorme
0785c2f6fc
build using HCL2 (#8423)
This follows #8232 which added the code to generate the code required to parse
HCL files for each packer component.

All old config files of packer will keep on working the same. Packer takes one
argument. When a directory is passed, all files in the folder with a name
ending with  “.pkr.hcl” or “.pkr.json” will be parsed using the HCL2 format.
When a file ending with “.pkr.hcl” or “.pkr.json” is passed it will be parsed
using the HCL2 format. For every other case; the old packer style will be used.

## 1. the hcl2template pkg can create a packer.Build from a set of HCL (v2) files

I had to make the packer.coreBuild (which is our one and only packer.Build ) a public struct with public fields

## 2. Components interfaces get a new ConfigSpec Method to read a file from an HCL file.

  This is a breaking change for packer plugins.

a packer component can be a: builder/provisioner/post-processor

each component interface now gets a `ConfigSpec() hcldec.ObjectSpec`
which allows packer to tell what is the layout of the hcl2 config meant
to configure that specific component.

This ObjectSpec is sent through the wire (RPC) and a cty.Value is now
sent through the already existing configuration entrypoints:

 Provisioner.Prepare(raws ...interface{}) error
 Builder.Prepare(raws ...interface{}) ([]string, error)
 PostProcessor.Configure(raws ...interface{}) error

close #1768


Example hcl files:

```hcl
// file amazon-ebs-kms-key/run.pkr.hcl
build {
    sources = [
        "source.amazon-ebs.first",
    ]

    provisioner "shell" {
        inline = [
            "sleep 5"
        ]
    }

    post-processor "shell-local" {
        inline = [
            "sleep 5"
        ]
    }
}

// amazon-ebs-kms-key/source.pkr.hcl

source "amazon-ebs" "first" {

    ami_name = "hcl2-test"
    region = "us-east-1"
    instance_type = "t2.micro"

    kms_key_id = "c729958f-c6ba-44cd-ab39-35ab68ce0a6c"
    encrypt_boot = true
    source_ami_filter {
        filters {
          virtualization-type = "hvm"
          name =  "amzn-ami-hvm-????.??.?.????????-x86_64-gp2"
          root-device-type = "ebs"
        }
        most_recent = true
        owners = ["amazon"]
    }
    launch_block_device_mappings {
        device_name = "/dev/xvda"
        volume_size = 20
        volume_type = "gp2"
        delete_on_termination = "true"
    }
    launch_block_device_mappings {
        device_name = "/dev/xvdf"
        volume_size = 500
        volume_type = "gp2"
        delete_on_termination = true
        encrypted = true
    }

    ami_regions = ["eu-central-1"]
    run_tags {
        Name = "packer-solr-something"
        stack-name = "DevOps Tools"
    }
    
    communicator = "ssh"
    ssh_pty = true
    ssh_username = "ec2-user"
    associate_public_ip_address = true
}
```
2019-12-17 11:25:56 +01:00
Megan Marsh
ccf58f0c98 major rework of communicator docs and addition of preseed guides 2019-10-03 09:18:03 -07:00
Adrien Delorme
5399e8a67d
Merge pull request #7547 from hashicorp/comment_guide
add guide for uisng jq to strip comments from packer template
2019-04-23 15:26:24 +02:00
Megan Marsh
f985f2de62 add docs for how to use the format strings for the isotime function 2019-04-22 16:10:35 -07:00
Megan Marsh
9eadac3410 add guide for uisng jq to strip comments from packer template 2019-04-22 15:35:00 -07:00
Alexander Georgievskiy
ec8747a042 They finally added https on download.virtualbox.org
Because downloading SHA256SUMS via http is a fun joke
2018-06-22 00:45:20 +03:00
Matthew Hooker
aab786dd1a
formatting 2017-12-18 15:31:50 -08:00
Maciej Skierkowski
7ee50ff926 Should be OVF
As a side note I will point out that the bento projects will use vagrant to package up the image into a .box file. But using OVF as we are assuming not to be using vagrant.
2017-12-18 15:12:04 -08:00
Maciej Skierkowski
37ce11fa0e Add details about the 30% off ongoing coupon. 2017-12-18 14:17:27 -08:00
Maciej Skierkowski
f88cd61e70 Renaming 'Packet.net' to 'Packet' 2017-12-18 14:05:12 -08:00
Maciej Skierkowski
1bc6a445ef Fixing typo in coupon code 2017-12-18 14:04:46 -08:00
Matthew Hooker
4ed60ba789
clarify support vs availability. 2017-12-12 21:07:12 -08:00
Matthew Hooker
88b275715e
clarify that there are cloud providers that support nested virtualization 2017-12-12 21:00:18 -08:00
Matthew Hooker
62e946f5d1
Merge pull request #5698 from skierkowski/guides-update-links
Update links in guides
2017-12-12 09:36:42 -08:00
Matthew Hooker
c62f00f47a
fix link 2017-12-12 09:10:38 -08:00
Maciej Skierkowski
6a91e5273f Update terraform links to new paths 2017-12-11 22:05:50 -08:00
Maciej Skierkowski
383228fded Add link to Cirlce CI article 2017-12-11 22:04:54 -08:00
Matthew Hooker
1a18957eec
call out advanced options 2017-12-11 16:06:58 -08:00
Matthew Hooker
6b30cf3653
use more screenshots for bento in the examples 2017-12-11 15:50:34 -08:00
Matthew Hooker
a2c9898db7
justify 80 cols 2017-12-11 15:10:37 -08:00
Matthew Hooker
532c4a4973
use a vcs project that will work 2017-12-11 15:04:03 -08:00
Matthew Hooker
97bacf6790
use absolute links 2017-12-11 14:37:28 -08:00
Matthew Hooker
be3f0a121a
guides should use infinitive verbs 2017-12-11 14:31:44 -08:00
Maciej Skierkowski
004a434928 Add "coming soon" 2017-12-11 11:48:34 -08:00
Maciej Skierkowski
dd5e5b8993 Using relative links for the docs/guides 2017-12-11 09:14:46 -08:00
Maciej Skierkowski
dc96e73151 Adding more info about the options for Packer 2017-12-11 09:08:12 -08:00
Maciej Skierkowski
3be55d20be Updating section title to be specific to VirtualBox and S3 2017-12-08 16:01:18 -08:00
Maciej Skierkowski
e0d5e18450 Calling out AWS CLI dependencies 2017-12-08 15:57:39 -08:00
Maciej Skierkowski
9c90744d3e Clarifying virtualization phrasing for VirtualBox 2017-12-08 15:55:22 -08:00
Maciej Skierkowski
203f29a95e Moving images to assets folder 2017-12-08 15:49:26 -08:00
Nick Fagerlund
6601f18c78 Minor edits 2017-12-08 13:46:51 -08:00
Nick Fagerlund
d7fe37b862 Delete empty descriptions 2017-12-08 13:25:32 -08:00
Maciej Skierkowski
79c10a251c Using placeholder for now 2017-12-08 11:05:17 -08:00
Maciej Skierkowski
c4abcd9c7c Adding more context for references to other guides 2017-12-08 10:59:43 -08:00
Maciej Skierkowski
59172c5a2d Adding the CI/CD guide content 2017-12-08 10:31:00 -08:00