Commit Graph
281 Commits
Author SHA1 Message Date
Lucas Bajolet ec1d2e68f5 hcp: generate fingerprints on each new build
Fingerprints are how we link a packer build to an iteration on HCP.
These are computed automatically from the Git SHA in the current state,
and are unique to the bucket/iteration.

The main problem with this approach is that while sound in theory, it
quickly falls apart when users want to run the same build configuration
twice, but expect a new image to be created.

With the current model, this fails, as the iteration with the current
SHA already exists.

While this is solvable through environment variables, or by committing a
change to the repository, we think this is not clear enough, and causes
an extra step to what should otherwise be a simple process.

Therefore, to lower the barrier of entry into HCP, we change this
behaviour with this commit.

Now, fingerprints are randomly generated ULIDs instead of a git SHA, and
a new one is always generated, unless one is already specified in the
environment.

This makes continuation of an existing iteration a conscious choice
rather than something automatic, and virtually eliminates conflicts such
as the ones described above.
2023-01-25 15:29:26 -05:00
lonegunmanb 6137745cc1 Update variables documentation to refer to Packer not Terraform (#12220) 2023-01-25 10:39:33 -05:00
lonegunmanb ba546eb8cb correct document issue in provisioner block doc (#12210) 2023-01-24 10:21:54 -05:00
craigpero 38d0bc818d Update index.mdx
In trying the example, I found that you have to type "*.second-example" for the expected results.   I took the command line on line #78 literal and it didn't work as typed. When I used my proposed change... it worked for me.
Alternatively, "*.second*" works but that could grab builders that were not intended.
2023-01-20 14:53:53 -05:00
Ashlee Boyer b46fafe871 Updating old learn link 2023-01-16 09:38:53 -05:00
Ashlee Boyer 09ec2fc5bf Updating link to use cases docs page 2023-01-16 09:38:53 -05:00
Lucas Bajolet 338c95b2eb datasource: remove packer-image-iteration
The `packer-image-iteration' datasource is an undocumented, and
unexported datasource, so it cannot be used by clients.

Since this is dead weight, we can remove it safely from the codebase.
2022-11-17 15:47:01 -05:00
Lucas Bajolet 14cad650ca website: add docs for variable warning bypass opts
When the options for bypassing/enabling assigned and undeclared
variables were added to Packer, the website documentation for those
commands and options was not updated.

This commit adds some documentation for those options.
2022-11-17 09:29:55 -05:00
Lucas Bajolet bb2384c56a command/validate: add option to eval datasources
When packer validate is invoked, it does not try to evaluate the
datasources before attempting to decide if the template is valid.

In many cases, this works, but sometimes it will fail as the value is
unknown by the validation code.

Since the validation code for all the elements of a Packer template is
left to be implemented by plugins, we cannot rely on checking for
unknown values everywhere, especially since the unknown references are
replaced automatically by a value of the right type for the
configuration expected.

So, in order for such configurations to be validable, we add an extra
option to packer validate, that will let users evaluate the datasources
from a template.
2022-11-17 09:29:55 -05:00
Ashlee M Boyer 991331c1fc Removing duplicate line of text 2022-11-14 19:52:51 -05:00
Wilken RiveraandLucas Bajolet bc55d6d2d6 [HPR-763] Update HCL variable documentation (#12058)
* Update HCL variable documentation

* Add supported arguments section for variables
* Add inpage links to key variable arguments
* Reorder content to cluster assignment documentation together
* Split variable definitions into two sub-sections

Co-authored-by: Lucas Bajolet <[email protected]>
2022-10-24 20:58:32 -04:00
Wilken Rivera 1296cbfc92 Update links to packer-template-configuration (#12072) 2022-10-24 12:59:32 -04:00
Wilken RiveraandLaura Pacilio 414b576def [HPR-574] Add documentation for configuring Packer for HCP Packer (#12022)
* Add documentation for configuring Packer for HCP Packer

This change works to document the two configuration options for setting
up Packer to publish build artifacts to an active HCP Packer registry.
Currently the HashiCorp Cloud Platform documents the process for
configuring Packer via a HCL template, which is the preferred route.
This documentation focuses more on the use of environment variables for
configuring Packer for HCP Packer, which is necessary for legacy JSON
template users looking to publish to HCP Packer.

In light of the new HCP Packer documentation page we've opted for a shorter
version of the HCP Packer introduction section.

* Applying the first round of suggestions to tighten up the documentation.
* Move HCP Packer side bar to top
* Move intro into docs
* Add redirects for intro pages

Co-authored-by: Laura Pacilio <[email protected]>
2022-10-24 12:51:14 -04:00
Zach ShiltonandWilken Rivera 879fd9035c fix: update redirected and broken links (#12060)
* website: fix broken links on /docs/templates

* fix: redirected install-plugins link

* fix: debugging link

* fix: secrets manager link in docs

* fix: secrets manager link in source

* fix: amazon ami plugin link in docs

* fix: amazon ami plugin link in source

* fix: extending plugins link

* fix: plugins/builders/amazon links

* fix: various builders links

* fix: various amazon builder links

* fix: redirected terminology link

* fix: custom-provisioners link

* fix: docker-push redirected plugin link

* fix: googlecompute plugin links

* fix: hyperv iso plugin links

* website: update link to hcl upgrade guide

Co-authored-by: Wilken Rivera <[email protected]>

Co-authored-by: Wilken Rivera <[email protected]>
2022-10-21 11:00:58 -04:00
Lucas Bajolet 84dc228a68 docs: move legacy JSON warning under title
With the move to Hashidocs, the version picker is within the text area
for the documentation being displayed. This negatively interacts with
the Note on top, as it obstructs part of the text.

To circumvent this problem, we move the Note after the title/intro.
2022-10-21 09:20:34 -04:00
Kevin Wang 0bd6acab07 chore: use ImageConfig (#12026) 2022-10-04 16:31:58 -04:00
Laura PacilioandWilken Rivera d4b03769f2 Update plugin docs - devdot launch (#11978)
* Separate install instructions; add to external plugins

* Remove duplicate external plugin link; modify overiew page

* Remove unnecessary partials; clean up plugin overview page

* cleaning up plugin explanations

* final language updates

* modify external plugin overview page

* Update website/content/docs/plugins/index.mdx

Co-authored-by: Wilken Rivera <[email protected]>

* Update website/content/docs/plugins/install-plugins.mdx

Co-authored-by: Wilken Rivera <[email protected]>

* Move HCP Support to under developing plugins

* Link HCP Packer support to other dev pages; fix overviews

* clean up more language and links

* Add External Plugins link to docs sidebar under plugin section

* Update website/data/docs-nav-data.json

Co-authored-by: Wilken Rivera <[email protected]>
2022-09-15 18:12:37 -04:00
Laura Pacilio 8765cd3cab Content munge devportal (#11982)
* Update content for devdot

* more edits

* Update website/content/docs/templates/hcl_templates/blocks/index.mdx

* Update website/content/docs/provisioners/index.mdx

* Update website/content/docs/datasources/index.mdx
2022-09-14 16:16:39 -04:00
Lucas BajoletandEd Eustace f4a2ac3b31 feat: support pwsh in powershell provisioner (#11950)
* set `pwsh` to true in config to run `pwsh.exe`, default is false.
* add docs

Co-authored-by: Ed Eustace <[email protected]>
2022-08-19 16:00:46 -04:00
Dan Barr d2c83c4944 Update Golang references to Go
* Fix any "golang" to just "Go"
* Update golang.org URLs to go.dev
2022-08-05 13:42:56 -04:00
Dan Barr ab69a2963b Update HTTP data source page title
* Capitalize HTTP
2022-08-05 13:42:56 -04:00
Dan Barr ab29b187b1 Fix capitalizations in docs
* Brands (HashiCorp, VMware)
* Various OS/languages (Windows, Unix, Linux, POSIX, Python, PowerShell)
* Various abbreviations (ID, VM, HTTP)
2022-08-05 13:42:56 -04:00
Shohei Maeda 9f28ced11c Add component_type optional field (#11872)
* Add `component_type` optional field

to support specifying the exact build image when multiple images exist in the same provider and region for a given iteration

* update docs

* update docs
2022-07-14 10:33:10 -07:00
Wilken Rivera 6b03734b2f Document known limitation of locals being used within a data source (#11864)
* Document known limitation of locals being used within a data source

* Update website/content/partials/datasources/local-dependency-limitation.mdx
2022-07-07 12:48:23 -04:00
Sylvia Moss b849ace27b Fail HCP datasources for revoked iteration (#11854) 2022-06-21 17:24:41 +02:00
Mahyar Saffari Moqaddam 3c9fb89a9f Update engine.mdx (#11833)
Corrected "indended" typo
2022-06-03 18:41:29 -04:00
Lucas Bajolet cbc67b7636 Merge pull request #11792 from teddylear/feat-pause_after-powershell
feat: Add pause_after config to powershell provisioner like shell
2022-05-30 16:47:25 -04:00
teddylear 36fc4a9f3d docs: Update unix packer config file location docs (#11797) 2022-05-23 15:47:23 -04:00
teddylear 000ace61a3 feat: Add pause_after config to powershell provisioner like shell
provisioner
2022-05-18 17:35:48 -04:00
sylviamoss 667e18f8be fix docs 2022-05-17 20:11:26 +02:00
teddylear 805225a113 feat: add http datasource (#11658) 2022-05-17 19:26:34 +02:00
Wilken Rivera 14ef80f9eb Update builders index page (#11765)
- Fix broken link thanks
- Update language text
2022-05-06 15:20:15 +02:00
Mike Schinkel fefb70be2b Added mention of HCL in Terminology>Templates (#11749) 2022-05-04 15:27:54 -04:00
Laura Pacilio ed54fb363a Make Builders Overview Page Clearer (#11743)
* Update page to make it clearer where users can find all the builder types

* MOve plugins to be first per PR feedback
2022-05-04 14:08:40 -04:00
doppelc 7d9c6fb795 Fix typo in docs (#11734) 2022-04-25 19:06:52 +02:00
Zachary Shilton a88d54c310 fix(website): remove empty index pages (#11702) 2022-04-11 16:08:39 -04:00
Patrick BandSylvia Moss 93ea7a5fc2 fix missing closing bracket for build {} section (#11654)
Co-authored-by: Sylvia Moss <[email protected]>
2022-03-10 16:18:07 +01:00
Adrien Delorme 7661e41412 reference main branch instead of master branch (#11652)
using search-n-replace
2022-03-10 16:07:02 +01:00
Laura Pacilio 2ca4051dbb Merge pull request #11626 from hashicorp/update-docs-hcp-packer-ga
Remove Beta language from HCP packer docs
2022-03-07 11:57:52 -05:00
Sai Diliyaer 08f26e7870 Website: Fix the hashicorp/packer link on the plugins creation page (#11629)
It's currently linked to `github.com/packer` which seems to be an unrelated personal GitHub repo.
2022-03-05 07:38:38 -05:00
Laura Pacilio e47821f13b Remove beta language from data sources overview page 2022-03-03 18:51:29 -05:00
Laura Pacilio 4a61d4ad0b Add notes about deactivated registries 2022-03-03 18:48:08 -05:00
Laura Pacilio d4447c3c17 Fix langauge on docs intro page and templates build block page 2022-03-03 18:38:15 -05:00
Laura Pacilio 0c908a3a75 Remove Beta language from HCP packer data sources pages 2022-03-03 18:29:53 -05:00
Johanan LiebermannandAdrien Delorme f8ea98d671 Add missing closing parenthesis (#11599)
* Add missing closing parenthesis

Signed-off-by: Johanan Liebermann <[email protected]>
Co-authored-by: Adrien Delorme <[email protected]>
2022-02-28 15:57:57 +01:00
Johanan Liebermann a66a15bd35 Add missing closing parenthesis (#11593)
Signed-off-by: Johanan Liebermann <[email protected]>
2022-02-25 11:09:56 -05:00
Ygal Blum 30813e743d Fix secret name to GPG_PASSPHRASE (#11586) 2022-02-24 10:53:23 -05:00
Wilken Rivera df5699c10d Rename integration program documentation (#11570) 2022-02-18 10:01:59 -05:00
Adrien Delorme 0362a3ec10 all shells: Pass env vars through a key value store (#11569)
* allowing to set shell env vars from a key/value map.
* tests

This new map will work alongside the `environment_vars` but it allows using a
datasource value seamlessly. At validation, and because `environment_vars` was
an array of strings containing `KEY=value`, using datsources would not work,
because these values are not known yet and would evaluate to `<unknown>`. With
this, the value and the key can be unknown and will validate correctly for
datasources.
2022-02-16 12:05:44 +01:00
Michael Weibel f718dbdcc0 docs: add link to builder list (#11571)
browsing through the documentation I was searching for the list of builders available. The obvious choice (builders page) didn't link to the list of builders and it took me a few minutes to find that. Adding a link to the plugins might speed up that bit and would avoid having to rescue to the search engine.
2022-02-16 11:39:04 +01:00