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
817822ab
Commit
817822ab
authored
Mar 23, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Amazon builder
parent
41f77eb3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
7 deletions
+57
-7
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+2
-2
builder/amazon/builder.go
builder/amazon/builder.go
+21
-0
example.toml
example.toml
+15
-0
packer.go
packer.go
+18
-5
No files found.
.gitignore
View file @
817822ab
/bin
/packer
Makefile
View file @
817822ab
all
:
@
mkdir
-p
bin/
go get
go build
-o
bin/packer
go get
-a
go build
-
a
-
o
bin/packer
.PHONY
:
all
builder/amazon/builder.go
0 → 100644
View file @
817822ab
package
amazon
type
config
struct
{
AccessKey
string
Region
string
SecretKey
string
SourceAmi
string
}
type
Builder
struct
{
config
config
}
func
(
*
Builder
)
Prepare
()
{
}
func
(
*
Builder
)
Build
()
{
}
func
(
*
Builder
)
Destroy
()
{
}
example.toml
0 → 100644
View file @
817822ab
name
=
"my-custom-image"
[builder.amazon-ebs]
region
=
"us-east-1"
source
=
"ami-de0d9eb7"
[provision]
[provision.shell]
type
=
"shell"
path
=
"script.sh"
[output]
[output.vagrant]
packer.go
View file @
817822ab
// This is the main package for the `packer` application.
package
main
import
"github.com/mitchellh/packer/builder/amazon"
// A command is a runnable sub-command of the `packer` application.
// When `packer` is called with the proper subcommand, this will be
// called.
...
...
@@ -22,10 +24,21 @@ type Environment struct {
commands
map
[
string
]
Command
}
type
Template
struct
{
Name
string
Builders
map
[
string
]
interface
{}
`toml:"builder"`
Provisioners
map
[
string
]
interface
{}
`toml:"provision"`
Outputs
map
[
string
]
interface
{}
`toml:"output"`
}
type
Builder
interface
{
Prepare
()
Build
()
Destroy
()
}
func
main
()
{
env
:=
Environment
{
commands
:
map
[
string
]
Command
{
""
},
}
var
builder
Builder
builder
=
&
amazon
.
Builder
{}
builder
.
Build
()
}
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