a variety of markdown fixes

This commit is contained in:
Jeff Escalante 2020-03-27 14:22:33 -04:00
parent db48bf7d58
commit f48529e6ff
No known key found for this signature in database
GPG Key ID: 32D23C61AB5450DB
16 changed files with 153 additions and 139 deletions

View File

@ -30,7 +30,7 @@ container if the parent OS is Debian based.
Below is a fully functioning example.
```{.javascript}
```json
{
"builders": [
{
@ -38,37 +38,28 @@ Below is a fully functioning example.
"name": "lxc-trusty",
"config_file": "/tmp/lxc/config",
"template_name": "ubuntu",
"template_environment_vars": [
"SUITE=trusty"
]
"template_environment_vars": ["SUITE=trusty"]
},
{
"type": "lxc",
"name": "lxc-xenial",
"config_file": "/tmp/lxc/config",
"template_name": "ubuntu",
"template_environment_vars": [
"SUITE=xenial"
]
"template_environment_vars": ["SUITE=xenial"]
},
{
"type": "lxc",
"name": "lxc-jessie",
"config_file": "/tmp/lxc/config",
"template_name": "debian",
"template_environment_vars": [
"SUITE=jessie"
]
"template_environment_vars": ["SUITE=jessie"]
},
{
"type": "lxc",
"name": "lxc-centos-7-x64",
"config_file": "/tmp/lxc/config",
"template_name": "centos",
"template_parameters": [
"-R","7",
"-a","x86_64"
]
"template_parameters": ["-R", "7", "-a", "x86_64"]
}
]
}

View File

@ -27,7 +27,7 @@ builder does not work with LXC.
Below is a fully functioning example.
```{.javascript}
```json
{
"builders": [
{

View File

@ -64,8 +64,11 @@ necessary for this build to succeed and can be found further down the page.
#### Optional:
@include 'builder/virtualbox/iso/Config-not-required.mdx'
@include 'builder/virtualbox/common/VBoxVersionConfig-not-required.mdx'
@include 'builder/virtualbox/common/VBoxBundleConfig-not-required.mdx'
@include 'builder/virtualbox/common/GuestAdditionsConfig-not-required.mdx'
### ISO Configuration

View File

@ -23,11 +23,13 @@ image).
When exporting from VirtualBox make sure to choose OVF Version 2, since Version
1 is not compatible and will generate errors like this:
```shell
==> virtualbox-ovf: Progress state: VBOX_E_FILE_ERROR
==> virtualbox-ovf: VBoxManage: error: Appliance read failed
==> virtualbox-ovf: VBoxManage: error: Error reading "source.ova": element "Section" has no "type" attribute, line 21
==> virtualbox-ovf: VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance
==> virtualbox-ovf: VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 304 of file VBoxManageAppliance.cpp
```
The builder builds a virtual machine by importing an existing OVF or OVA file.
It then boots this image, runs provisioners on this new VM, and exports that VM

View File

@ -133,7 +133,7 @@ Only use the `cluster` option. Optionally specify a `resource_pool`:
## Required vSphere Permissions
- VM folder (this object and children):
```
```text
Virtual machine -> Inventory
Virtual machine -> Configuration
Virtual machine -> Interaction
@ -142,35 +142,35 @@ Only use the `cluster` option. Optionally specify a `resource_pool`:
```
Individual privileges are listed in https://github.com/jetbrains-infra/packer-builder-vsphere/issues/97#issuecomment-436063235.
- Resource pool, host, or cluster (this object):
```
```text
Resource -> Assign virtual machine to resource pool
```
- Host in clusters without DRS (this object):
```
```text
Read-only
```
- Datastore (this object):
```
```text
Datastore -> Allocate space
Datastore -> Browse datastore
Datastore -> Low level file operations
```
- Network (this object):
```
```text
Network -> Assign network
```
- Distributed switch (this object):
```
```text
Read-only
```
For floppy image upload:
- Datacenter (this object):
```
```text
Datastore -> Low level file operations
```
- Host (this object):
```
```text
Host -> Configuration -> System Management
```

View File

@ -183,7 +183,7 @@ Only use the `cluster` option. Optionally specify a `resource_pool`:
## Required vSphere Permissions
- VM folder (this object and children):
```
```text
Virtual machine -> Inventory
Virtual machine -> Configuration
Virtual machine -> Interaction
@ -192,35 +192,35 @@ Only use the `cluster` option. Optionally specify a `resource_pool`:
```
Individual privileges are listed in https://github.com/jetbrains-infra/packer-builder-vsphere/issues/97#issuecomment-436063235.
- Resource pool, host, or cluster (this object):
```
```text
Resource -> Assign virtual machine to resource pool
```
- Host in clusters without DRS (this object):
```
```text
Read-only
```
- Datastore (this object):
```
```text
Datastore -> Allocate space
Datastore -> Browse datastore
Datastore -> Low level file operations
```
- Network (this object):
```
```text
Network -> Assign network
```
- Distributed switch (this object):
```
```text
Read-only
```
For floppy image upload:
- Datacenter (this object):
```
```text
Datastore -> Low level file operations
```
- Host (this object):
```
```text
Host -> Configuration -> System Management
```

View File

@ -101,8 +101,10 @@ Issues may arise using and building Ubuntu AMIs where common packages that
_should_ be installed from Ubuntu's Main repository are not found during a
provisioner step:
```text
amazon-ebs: No candidate version found for build-essential
amazon-ebs: No candidate version found for build-essential
```
This, obviously can cause problems where a build is unable to finish
successfully as the proper packages cannot be provisioned correctly. The

View File

@ -175,7 +175,7 @@ We use that list of variables to generate a custom placeholder map per builder t
combines custom variables with the placeholder map of default build variables created by Packer.
Here's an example snippet telling packer what will be made available by the builder:
```
```go
func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
// ...
@ -190,7 +190,7 @@ for the template containing the build variable(s) to validate.
Once the placeholder is set, it's necessary to pass the variables' real values when calling
the provisioner. This can be done as the example below:
```
```go
func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error) {
// ...
@ -210,7 +210,7 @@ will access this data later via the Artifact's `State` method.
The Artifact code should be implemented similar to the below:
```
```go
type Artifact struct {
// ...
@ -231,7 +231,7 @@ func (a *Artifact) State(name string) interface{} {
The builder should return the above Artifact containing the generated data and the code should be similar
to the example snippet below:
```
```go
func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error) {
// ...
@ -246,7 +246,7 @@ The code above assigns the `generated_data` state to the `StateData` map with th
Here some example of how this data will be used by post-processors:
```
```go
func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, source packer.Artifact) (packer.Artifact, bool, bool, error) {
generatedData := source.State("generated_data")

View File

@ -54,8 +54,10 @@ output prompting you to press "enter" to continue the build when you are ready.
For example:
```shell
==> docker: Pausing at breakpoint provisioner with note "foo bar baz".
==> docker: Press enter to continue.
```
Once you press enter, the build will resume and run normally until it either
completes or errors.

View File

@ -234,6 +234,7 @@ required for the JSON template to be parsed correctly.
The above snippet should result in the following output on the Packer console:
```shell
==> amazon-ebs: Provisioning with Powershell...
==> amazon-ebs: Provisioning with powershell script: /var/folders/15/d0f7gdg13rnd1cxp7tgmr55c0000gn/T/packer-powershell-provisioner508190439
amazon-ebs: A literal dollar $ must be escaped
@ -241,6 +242,7 @@ The above snippet should result in the following output on the Packer console:
amazon-ebs: Here "double quotes" must be escaped
amazon-ebs: Here 'single quotes' don't really need to be
amazon-ebs: escaped... but it doesn't hurt to do so.
```
### When Not To Escape...
@ -286,6 +288,7 @@ for the user. There is no need to use escapes in these instances.
The above snippet should result in the following output on the Packer console:
```shell
==> amazon-ebs: Provisioning with Powershell...
==> amazon-ebs: Provisioning with powershell script: /var/folders/15/d0f7gdg13rnd1cxp7tgmr55c0000gn/T/packer-powershell-provisioner961728919
amazon-ebs: The dollar in the elevated_password is interpreted correctly
@ -297,3 +300,4 @@ The above snippet should result in the following output on the Packer console:
amazon-ebs: The single quote in VAR3: A'SingleQuote
amazon-ebs: The double quote in VAR4: A"DoubleQuote
amazon-ebs: The dollar in VAR5 (expanded from a user var): My$tring
```

View File

@ -88,10 +88,12 @@ Optional parameters:
template variables as well as private elements of ExecuteTemplate (see
source: provisioner/puppet-masterless/provisioner.go).
```text
[
{{if ne "{{user environment}}" ""}}--environment={{user environment}}{{end}},
{{if ne ".ModulePath" ""}}--modulepath="{{.ModulePath}}{{.ModulePathJoiner}}$(puppet config print {{if ne "{{user `environment`}}" ""}}--environment={{user `environment`}}{{end}} modulepath)"{{end}}
]
```
* `facter` (object of key:value strings) - Additional
[facts](https://docs.puppet.com/facter/) to make available to the Puppet
@ -152,6 +154,7 @@ multiple manifests you should use `manifest_file` instead.
By default, Packer uses the following command (broken across multiple lines for
readability) to execute Puppet:
```shell
cd {{.WorkingDir}} &&
{{if ne .FacterVars ""}}{{.FacterVars}} {{end}}
{{if .Sudo}}sudo -E {{end}}
@ -163,9 +166,11 @@ readability) to execute Puppet:
{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}
{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
{{.ManifestFile}}
```
The following command is used if guest OS type is windows:
```shell
cd {{.WorkingDir}} &&
{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}
{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}
@ -176,6 +181,7 @@ The following command is used if guest OS type is windows:
{{if ne .ManifestDir ""}}--manifestdir='{{.ManifestDir}}' {{end}}
{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
{{.ManifestFile}}
```
## Default Facts

View File

@ -77,9 +77,11 @@ listed below:
template variables as well as private elements of ExecuteTemplate (see
source: provisioner/puppet-server/provisioner.go).
```text
[
{{if ne "{{user environment}}" ""}}--environment={{user environment}}{{end}}
]
```
* `facter` (object of key/value strings) - Additional
[facts](https://puppetlabs.com/facter) to make available to the Puppet run.
@ -130,6 +132,7 @@ listed below:
By default, Packer uses the following command (broken across multiple lines for
readability) to execute Puppet:
```shell
cd {{.WorkingDir}} &&
{{if ne .FacterVars ""}}{{.FacterVars}} {{end}}
{{if .Sudo}}sudo -E {{end}}
@ -141,9 +144,11 @@ readability) to execute Puppet:
{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
```
The following command is used if guest OS type is windows:
```shell
cd {{.WorkingDir}} &&
{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}
{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}
@ -154,6 +159,7 @@ The following command is used if guest OS type is windows:
{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
{{if ne .ExtraArguments ""}}{{.ExtraArguments}} {{end}}
```
## Default Facts

View File

@ -296,6 +296,7 @@ is an example of packer template inputs and what you should expect to get out:
Output:
```text
docker: FOO is foo
docker: BAR is bar's
docker: BAZ is baz=baz
@ -303,3 +304,4 @@ Output:
docker: FOOBAR is foo bar
docker: FOOBARBAZ is 'foo bar baz'
docker: QUX2 is "qux"
```

View File

@ -41,13 +41,9 @@
following are valid:
- name (string)
- owner (string)
- tags (array of strings)
- visibility (string)
- properties (map of strings to strings) (fields that can be set
with `openstack image set --property key=value`)

View File

@ -42,7 +42,7 @@
  used as the serial port. If `path` is empty, then default to the first
serial port.
* `yield` (bool) - This is an optional boolean that specifies
- `yield` (bool) - This is an optional boolean that specifies
whether the vm should yield the cpu when polling the port. By
default, the builder will assume this as `FALSE`.