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
fc6e8c08
Commit
fc6e8c08
authored
Apr 10, 2014
by
George Miroshnykov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazon: configurable virtualization type
parent
dc21bf01
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 @
fc6e8c08
...
@@ -10,6 +10,7 @@ import (
...
@@ -10,6 +10,7 @@ import (
type
AMIConfig
struct
{
type
AMIConfig
struct
{
AMIName
string
`mapstructure:"ami_name"`
AMIName
string
`mapstructure:"ami_name"`
AMIDescription
string
`mapstructure:"ami_description"`
AMIDescription
string
`mapstructure:"ami_description"`
AMIVirtType
string
`mapstructure:"ami_virtualization_type"`
AMIUsers
[]
string
`mapstructure:"ami_users"`
AMIUsers
[]
string
`mapstructure:"ami_users"`
AMIGroups
[]
string
`mapstructure:"ami_groups"`
AMIGroups
[]
string
`mapstructure:"ami_groups"`
AMIProductCodes
[]
string
`mapstructure:"ami_product_codes"`
AMIProductCodes
[]
string
`mapstructure:"ami_product_codes"`
...
@@ -27,8 +28,9 @@ func (c *AMIConfig) Prepare(t *packer.ConfigTemplate) []error {
...
@@ -27,8 +28,9 @@ func (c *AMIConfig) Prepare(t *packer.ConfigTemplate) []error {
}
}
templates
:=
map
[
string
]
*
string
{
templates
:=
map
[
string
]
*
string
{
"ami_name"
:
&
c
.
AMIName
,
"ami_name"
:
&
c
.
AMIName
,
"ami_description"
:
&
c
.
AMIDescription
,
"ami_description"
:
&
c
.
AMIDescription
,
"ami_virtualization_type"
:
&
c
.
AMIVirtType
,
}
}
errs
:=
make
([]
error
,
0
)
errs
:=
make
([]
error
,
0
)
...
...
builder/amazon/instance/step_register_ami.go
View file @
fc6e8c08
...
@@ -21,6 +21,7 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -21,6 +21,7 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
ImageLocation
:
manifestPath
,
ImageLocation
:
manifestPath
,
Name
:
config
.
AMIName
,
Name
:
config
.
AMIName
,
BlockDevices
:
config
.
BlockDevices
.
BuildAMIDevices
(),
BlockDevices
:
config
.
BlockDevices
.
BuildAMIDevices
(),
VirtType
:
config
.
AMIVirtType
,
}
}
registerResp
,
err
:=
ec2conn
.
RegisterImage
(
registerOpts
)
registerResp
,
err
:=
ec2conn
.
RegisterImage
(
registerOpts
)
...
...
website/source/docs/builders/amazon-chroot.html.markdown
View file @
fc6e8c08
...
@@ -78,6 +78,10 @@ Required:
...
@@ -78,6 +78,10 @@ Required:
Optional:
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_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
AMI(s). By default this description is empty.
...
@@ -115,7 +119,7 @@ Optional:
...
@@ -115,7 +119,7 @@ Optional:
defaults to "{{.Command}}". This may be useful to set if you want to set
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
environmental variables or perhaps run it with
`sudo`
or so on. This is a
configuration template where the
`.Command`
variable is replaced with the
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
*
`mount_path`
(string) - The path where the volume will be mounted. This is
where the chroot environment will be. This defaults to
where the chroot environment will be. This defaults to
...
...
website/source/docs/builders/amazon-ebs.html.markdown
View file @
fc6e8c08
...
@@ -64,6 +64,10 @@ Optional:
...
@@ -64,6 +64,10 @@ Optional:
"volume
\_
type" (string), "volume
\_
size" (int), "delete
\_
on
\_
termination"
"volume
\_
type" (string), "volume
\_
size" (int), "delete
\_
on
\_
termination"
(bool), "no
\_
device" (bool), and "iops" (int).
(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_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
AMI(s). By default this description is empty.
...
...
website/source/docs/builders/amazon-instance.html.markdown
View file @
fc6e8c08
...
@@ -87,6 +87,10 @@ Optional:
...
@@ -87,6 +87,10 @@ Optional:
(bool), "no
\_
device" (bool), and "iops" (int).
(bool), "no
\_
device" (bool), and "iops" (int).
See
[
amazon-ebs
](
/docs/builders/amazon-ebs.html
)
for an example template.
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_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
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