Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
e38ff2f8
Commit
e38ff2f8
authored
Apr 21, 2014
by
Ross Smith II
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1021 from laggyluke/master
builder/amazon: configurable virtualization type
parents
55016b88
fc6e8c08
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
3 deletions
+18
-3
builder/amazon/common/ami_config.go
builder/amazon/common/ami_config.go
+4
-2
builder/amazon/instance/step_register_ami.go
builder/amazon/instance/step_register_ami.go
+1
-0
website/source/docs/builders/amazon-chroot.html.markdown
website/source/docs/builders/amazon-chroot.html.markdown
+5
-1
website/source/docs/builders/amazon-ebs.html.markdown
website/source/docs/builders/amazon-ebs.html.markdown
+4
-0
website/source/docs/builders/amazon-instance.html.markdown
website/source/docs/builders/amazon-instance.html.markdown
+4
-0
No files found.
builder/amazon/common/ami_config.go
View file @
e38ff2f8
...
...
@@ -10,6 +10,7 @@ import (
type
AMIConfig
struct
{
AMIName
string
`mapstructure:"ami_name"`
AMIDescription
string
`mapstructure:"ami_description"`
AMIVirtType
string
`mapstructure:"ami_virtualization_type"`
AMIUsers
[]
string
`mapstructure:"ami_users"`
AMIGroups
[]
string
`mapstructure:"ami_groups"`
AMIProductCodes
[]
string
`mapstructure:"ami_product_codes"`
...
...
@@ -27,8 +28,9 @@ func (c *AMIConfig) Prepare(t *packer.ConfigTemplate) []error {
}
templates
:=
map
[
string
]
*
string
{
"ami_name"
:
&
c
.
AMIName
,
"ami_description"
:
&
c
.
AMIDescription
,
"ami_name"
:
&
c
.
AMIName
,
"ami_description"
:
&
c
.
AMIDescription
,
"ami_virtualization_type"
:
&
c
.
AMIVirtType
,
}
errs
:=
make
([]
error
,
0
)
...
...
builder/amazon/instance/step_register_ami.go
View file @
e38ff2f8
...
...
@@ -21,6 +21,7 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
ImageLocation
:
manifestPath
,
Name
:
config
.
AMIName
,
BlockDevices
:
config
.
BlockDevices
.
BuildAMIDevices
(),
VirtType
:
config
.
AMIVirtType
,
}
registerResp
,
err
:=
ec2conn
.
RegisterImage
(
registerOpts
)
...
...
website/source/docs/builders/amazon-chroot.html.markdown
View file @
e38ff2f8
...
...
@@ -78,6 +78,10 @@ Required:
Optional:
*
`ami_virtualization_type`
(string) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
"paravirtual" (default) or "hvm".
*
`ami_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
...
...
@@ -115,7 +119,7 @@ Optional:
defaults to "{{.Command}}". This may be useful to set if you want to set
environmental variables or perhaps run it with
`sudo`
or so on. This is a
configuration template where the
`.Command`
variable is replaced with the
command to be run.
.
command to be run.
*
`mount_path`
(string) - The path where the volume will be mounted. This is
where the chroot environment will be. This defaults to
...
...
website/source/docs/builders/amazon-ebs.html.markdown
View file @
e38ff2f8
...
...
@@ -64,6 +64,10 @@ Optional:
"volume
\_
type" (string), "volume
\_
size" (int), "delete
\_
on
\_
termination"
(bool), "no
\_
device" (bool), and "iops" (int).
*
`ami_virtualization_type`
(string) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
"paravirtual" (default) or "hvm".
*
`ami_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
...
...
website/source/docs/builders/amazon-instance.html.markdown
View file @
e38ff2f8
...
...
@@ -87,6 +87,10 @@ Optional:
(bool), "no
\_
device" (bool), and "iops" (int).
See
[
amazon-ebs
](
/docs/builders/amazon-ebs.html
)
for an example template.
*
`ami_virtualization_type`
(string) - The type of virtualization for the AMI
you are building. This option is required to register HVM images. Can be
"paravirtual" (default) or "hvm".
*
`ami_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment